REST API reference
Teachers Pay Teachers API
14 endpoints for Teachers Pay Teachers. Each one is a POST with a JSON body, called with your API key.
- Base URL
- https://cotlet.dev/api/v1/teachers-pay-teachers
- Connects with
- Your own TPT Seller account
- Integration page
- Teachers Pay Teachers
| Endpoint | Access | Description |
|---|---|---|
| list_products | read | Your product listings with title, type, price, status and custom category. |
| get_product | read | Full listing: title, description, price, additional license price, grades, subjects, tags, formats and files. |
| get_store_stats | read | Seller Dashboard totals: earnings, units sold, carts, unique buyers, views and conversions. |
| get_product_stats | read | Per product: earnings, units sold, views, conversion, Wish Listed and Saved for Later. |
| list_sales | read | Sales Details from your Sales Reports, one line per item sold, with earnings and sales tax. |
| get_search_keywords | read | Search Analytics: TPT search keywords that led buyers to your products, with visits, conversions and earnings. |
| list_buyer_questions | read | Questions from the Q&A section of your store, newest first, with product and any answer. |
| create_product | write | New Digital Download listing from a file. Inactive by default; an active listing is live for buyers right away. |
| update_product | write | Change title, description, price, additional license price, grades, subjects or tags of a listing. |
| set_product_status | write | Make a listing active or inactive. Past buyers keep their downloads. |
| upload_revised_file | write | Replace the product file and optionally notify past buyers with a note on what changed. |
| answer_buyer_question | write | Post a public answer to a question on your product page. |
| schedule_sale | write | Throw a sale on chosen products or your whole store for set dates. |
| send_note_to_followers | write | Weekly Note to Followers about new products or promotions, sent now or on a set date. |
List products
readPOST https://cotlet.dev/api/v1/teachers-pay-teachers/list_products
Lists your listings with title, type, price, status and custom category. Filter by status, type or custom category to find a group of products. Pages hold up to 100 products; pass next_cursor back as cursor for the next page.
Parameters
| Name | Type | Description |
|---|---|---|
| status | enum | active, inactive or all. Default: all. |
| type | enum | digital_download, bundle, video, google_resource or all. Default: all. |
| custom_category | string | Only products in this store custom category. |
| limit | integer | 1 to 100. Default: 50. |
| cursor | string | Next page cursor from the previous call. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/list_products \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("teachers-pay-teachers", "list_products") const result = await cotlet.call('teachers-pay-teachers', 'list_products'); cotlet call teachers-pay-teachers list_products Example response
{
"products": [
{
"product_id": "11204567",
"title": "Fraction Task Cards, Grades 3-4",
"type": "digital_download",
"price_cents": 600,
"status": "active",
"custom_category": "Fractions"
},
{
"product_id": "9873310",
"title": "Fractions Bundle",
"type": "bundle",
"price_cents": 900,
"status": "active",
"custom_category": "Fractions"
}
],
"next_cursor": null
} Get product
readPOST https://cotlet.dev/api/v1/teachers-pay-teachers/get_product
Returns one listing in full: description, price, additional license price, grades, subjects, tags, formats and files. Use it before answering a buyer question or rewriting a title, so your agent works from the real listing.
Parameters
| Name | Type | Description |
|---|---|---|
| product_id required | string | Product ID from list_products. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/get_product \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"product_id":"product_8c41d2"}' result = client.call("teachers-pay-teachers", "get_product", {"product_id":"product_8c41d2"}) const result = await cotlet.call('teachers-pay-teachers', 'get_product', {"product_id":"product_8c41d2"}); cotlet call teachers-pay-teachers get_product --data '{"product_id":"product_8c41d2"}' Example response
{
"product_id": "11204567",
"title": "Fraction Task Cards, Grades 3-4",
"description": "20 printable task cards on comparing and adding fractions, with answer keys.",
"price_cents": 600,
"additional_license_price_cents": 300,
"grades": [
"3rd",
"4th"
],
"subjects": [
"Fractions"
],
"tags": [
"Task Cards"
],
"formats": [
"PDF"
],
"status": "active"
} Get store stats
readPOST https://cotlet.dev/api/v1/teachers-pay-teachers/get_store_stats
Returns the Seller Dashboard totals for a period: earnings, units sold, carts, unique buyers, views and conversions. Set buyer_type to compare first-time and repeat buyers, or product_ids to look at part of the store. Earnings are in US cents.
Parameters
| Name | Type | Description |
|---|---|---|
| from required | date | First day of the period. |
| to required | date | Last day of the period. |
| buyer_type | enum | all, first_time or repeat. Default: all. |
| product_ids | string[] | Only these products. Default: whole store. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/get_store_stats \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"2026-10-01","to":"2026-10-01"}' result = client.call("teachers-pay-teachers", "get_store_stats", {"from":"2026-10-01","to":"2026-10-01"}) const result = await cotlet.call('teachers-pay-teachers', 'get_store_stats', {"from":"2026-10-01","to":"2026-10-01"}); cotlet call teachers-pay-teachers get_store_stats --data '{"from":"2026-10-01","to":"2026-10-01"}' Example response
{
"from": "2026-10-05",
"to": "2026-10-11",
"buyer_type": "all",
"earnings_cents": 41235,
"units_sold": 74,
"carts": 91,
"unique_buyers": 58,
"views": 3120,
"conversion": 0.024
} Get product stats
readPOST https://cotlet.dev/api/v1/teachers-pay-teachers/get_product_stats
Returns the numbers of one product for a period: earnings, units sold, views, conversion, Wish Listed and Saved for Later. Call it for each product from list_products to rank them.
Parameters
| Name | Type | Description |
|---|---|---|
| product_id required | string | Product ID from list_products. |
| from required | date | First day of the period. |
| to required | date | Last day of the period. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/get_product_stats \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"product_id":"product_8c41d2","from":"2026-10-01","to":"2026-10-01"}' result = client.call("teachers-pay-teachers", "get_product_stats", {"product_id":"product_8c41d2","from":"2026-10-01","to":"2026-10-01"}) const result = await cotlet.call('teachers-pay-teachers', 'get_product_stats', {"product_id":"product_8c41d2","from":"2026-10-01","to":"2026-10-01"}); cotlet call teachers-pay-teachers get_product_stats --data '{"product_id":"product_8c41d2","from":"2026-10-01","to":"2026-10-01"}' Example response
{
"product_id": "11204567",
"from": "2026-10-05",
"to": "2026-10-11",
"earnings_cents": 7200,
"units_sold": 12,
"views": 410,
"conversion": 0.029,
"wish_listed": 5,
"saved_for_later": 9
} List sales
readPOST https://cotlet.dev/api/v1/teachers-pay-teachers/list_sales
Returns Sales Details from your Sales Reports, one line per item sold, with earnings and sales tax. Filter by product to see the sales of one listing. Pass next_cursor back as cursor for the next page.
Parameters
| Name | Type | Description |
|---|---|---|
| from required | date | First day of the period. |
| to required | date | Last day of the period. |
| product_id | string | Only sales of this product. |
| cursor | string | Next page cursor from the previous call. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/list_sales \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"2026-10-01","to":"2026-10-01"}' result = client.call("teachers-pay-teachers", "list_sales", {"from":"2026-10-01","to":"2026-10-01"}) const result = await cotlet.call('teachers-pay-teachers', 'list_sales', {"from":"2026-10-01","to":"2026-10-01"}); cotlet call teachers-pay-teachers list_sales --data '{"from":"2026-10-01","to":"2026-10-01"}' Example response
{
"sales": [
{
"date": "2026-10-09",
"product_id": "11204567",
"title": "Fraction Task Cards, Grades 3-4",
"earnings_cents": 510,
"sales_tax_cents": 0
},
{
"date": "2026-10-09",
"product_id": "9873310",
"title": "Fractions Bundle",
"earnings_cents": 765,
"sales_tax_cents": 0
}
],
"next_cursor": null
} Get search keywords
readPOST https://cotlet.dev/api/v1/teachers-pay-teachers/get_search_keywords
Returns the TPT search keywords that led buyers to your products, with visits, conversions and earnings. Search Analytics starts on 1 Jan 2025. Pass product_id to see the keywords of one listing.
Parameters
| Name | Type | Description |
|---|---|---|
| from required | date | First day of the period, 1 Jan 2025 or later. |
| to required | date | Last day of the period. |
| product_id | string | One product only. Default: whole store. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/get_search_keywords \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"2026-07-01","to":"2026-09-30","product_id":"11204567"}' result = client.call("teachers-pay-teachers", "get_search_keywords", {"from":"2026-07-01","to":"2026-09-30","product_id":"11204567"}) const result = await cotlet.call('teachers-pay-teachers', 'get_search_keywords', {"from":"2026-07-01","to":"2026-09-30","product_id":"11204567"}); cotlet call teachers-pay-teachers get_search_keywords --data '{"from":"2026-07-01","to":"2026-09-30","product_id":"11204567"}' Example response
{
"keywords": [
{
"keyword": "fraction task cards",
"visits": 214,
"conversions": 9,
"earnings_cents": 5400
},
{
"keyword": "fractions 4th grade",
"visits": 167,
"conversions": 6,
"earnings_cents": 3600
}
]
} List buyer questions
readPOST https://cotlet.dev/api/v1/teachers-pay-teachers/list_buyer_questions
Lists questions from the Q&A section of your store, newest first, each with its product and any answer you already gave. Set unanswered_only to see what needs a reply. Pass question_id to answer_buyer_question.
Parameters
| Name | Type | Description |
|---|---|---|
| unanswered_only | boolean | Skip questions you already answered. Default: false. |
| limit | integer | 1 to 100. Default: 50. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/list_buyer_questions \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("teachers-pay-teachers", "list_buyer_questions") const result = await cotlet.call('teachers-pay-teachers', 'list_buyer_questions'); cotlet call teachers-pay-teachers list_buyer_questions Example response
{
"questions": [
{
"question_id": "q_5821",
"product_id": "11204567",
"question": "Does this include answer keys?",
"asked_at": "2026-10-10T14:20:00Z",
"answer": null
}
]
} POST https://cotlet.dev/api/v1/teachers-pay-teachers/create_product
Creates a Digital Download listing from the URL of a PDF or ZIP. The listing is inactive unless active is true, and an active listing is live for buyers right away. Price is in US cents. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| title required | string | Product title. |
| description required | string | Product description. |
| file_url required | string | URL of the PDF or ZIP buyers download. |
| price_cents required | integer | Price in US cents, e.g. 600 for $6. 0 for a free resource. |
| grades required | string[] | TPT grade levels, e.g. "1st", "2nd". |
| subjects required | string[] | TPT subjects, e.g. "Fractions". |
| tags | string[] | Resource type tags, e.g. "Centers". |
| preview_url | string | URL of a PDF preview. |
| active | boolean | Make Listing Active now. Default: false. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/create_product \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"title","description":"description","file_url":"https://example.com","price_cents":1,"grades":["1st"],"subjects":["Fractions"]}' result = client.call("teachers-pay-teachers", "create_product", {"title":"title","description":"description","file_url":"https://example.com","price_cents":1,"grades":["1st"],"subjects":["Fractions"]}) const result = await cotlet.call('teachers-pay-teachers', 'create_product', {"title":"title","description":"description","file_url":"https://example.com","price_cents":1,"grades":["1st"],"subjects":["Fractions"]}); cotlet call teachers-pay-teachers create_product --data '{"title":"title","description":"description","file_url":"https://example.com","price_cents":1,"grades":["1st"],"subjects":["Fractions"]}' Example response
{
"product_id": "11310482",
"title": "Fall Math Centers, Grades 1-2",
"status": "inactive",
"price_cents": 600,
"grades": [
"1st",
"2nd"
],
"subjects": [
"Math"
]
} POST https://cotlet.dev/api/v1/teachers-pay-teachers/update_product
Changes the fields you pass and leaves the rest. Price changes show to buyers right away on an active listing. Price is in US cents. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| product_id required | string | Product ID from list_products. |
| fields required | object | Any of title, description, price_cents, additional_license_price_cents, grades, subjects, tags. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/update_product \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"product_id":"9873310","fields":{"price_cents":1000,"additional_license_price_cents":900}}' result = client.call("teachers-pay-teachers", "update_product", {"product_id":"9873310","fields":{"price_cents":1000,"additional_license_price_cents":900}}) const result = await cotlet.call('teachers-pay-teachers', 'update_product', {"product_id":"9873310","fields":{"price_cents":1000,"additional_license_price_cents":900}}); cotlet call teachers-pay-teachers update_product --data '{"product_id":"9873310","fields":{"price_cents":1000,"additional_license_price_cents":900}}' Example response
{
"product_id": "11204567",
"status": "updated",
"changed": {
"price_cents": {
"from": 600,
"to": 700
}
}
} POST https://cotlet.dev/api/v1/teachers-pay-teachers/set_product_status
Makes a listing active (for sale) or inactive (hidden). Past buyers keep their downloads. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| product_id required | string | Product ID from list_products. |
| active required | boolean | true to sell it, false to hide it. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/set_product_status \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"product_id":"product_8c41d2","active":true}' result = client.call("teachers-pay-teachers", "set_product_status", {"product_id":"product_8c41d2","active":True}) const result = await cotlet.call('teachers-pay-teachers', 'set_product_status', {"product_id":"product_8c41d2","active":true}); cotlet call teachers-pay-teachers set_product_status --data '{"product_id":"product_8c41d2","active":true}' Example response
{
"product_id": "11310482",
"active": true,
"status": "active"
} POST https://cotlet.dev/api/v1/teachers-pay-teachers/upload_revised_file
Replaces the file buyers download. With notify_buyers set, past buyers are notified on their My Purchases page, and change_note tells them what changed. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| product_id required | string | Product ID from list_products. |
| file_url required | string | URL of the new PDF or ZIP. |
| notify_buyers | boolean | Notify Buyers on their My Purchases page. Default: false. |
| change_note | string | What changed, shown to buyers when notified. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/upload_revised_file \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"product_id":"product_8c41d2","file_url":"https://example.com"}' result = client.call("teachers-pay-teachers", "upload_revised_file", {"product_id":"product_8c41d2","file_url":"https://example.com"}) const result = await cotlet.call('teachers-pay-teachers', 'upload_revised_file', {"product_id":"product_8c41d2","file_url":"https://example.com"}); cotlet call teachers-pay-teachers upload_revised_file --data '{"product_id":"product_8c41d2","file_url":"https://example.com"}' Example response
{
"product_id": "11204567",
"status": "file_replaced",
"buyers_notified": true
} POST https://cotlet.dev/api/v1/teachers-pay-teachers/answer_buyer_question
Posts an answer to one buyer question. The answer is public and appears under your store name. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| question_id required | string | Question ID from list_buyer_questions. |
| answer required | string | Answer text, shown publicly under your store name. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/answer_buyer_question \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question_id":"q_5821","answer":"Yes, the file has answer keys for all 20 task cards at the end of the PDF."}' result = client.call("teachers-pay-teachers", "answer_buyer_question", {"question_id":"q_5821","answer":"Yes, the file has answer keys for all 20 task cards at the end of the PDF."}) const result = await cotlet.call('teachers-pay-teachers', 'answer_buyer_question', {"question_id":"q_5821","answer":"Yes, the file has answer keys for all 20 task cards at the end of the PDF."}); cotlet call teachers-pay-teachers answer_buyer_question --data '{"question_id":"q_5821","answer":"Yes, the file has answer keys for all 20 task cards at the end of the PDF."}' Example response
{
"question_id": "q_5821",
"status": "published"
} POST https://cotlet.dev/api/v1/teachers-pay-teachers/schedule_sale
Schedules a sale of 5, 10, 15 or 20 percent off between a start and an end date. Leave product_ids empty to put the whole store on sale. Buyers see the lower prices during the sale. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| discount required | enum | 5, 10, 15 or 20 (percent off). |
| start_date required | date | First day of the sale. |
| end_date required | date | Last day of the sale. |
| product_ids | string[] | Products on sale. Empty: whole store. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/schedule_sale \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"discount":"20","start_date":"2026-10-16","end_date":"2026-10-18","product_ids":["11204567","11204582","9873310"]}' result = client.call("teachers-pay-teachers", "schedule_sale", {"discount":"20","start_date":"2026-10-16","end_date":"2026-10-18","product_ids":["11204567","11204582","9873310"]}) const result = await cotlet.call('teachers-pay-teachers', 'schedule_sale', {"discount":"20","start_date":"2026-10-16","end_date":"2026-10-18","product_ids":["11204567","11204582","9873310"]}); cotlet call teachers-pay-teachers schedule_sale --data '{"discount":"20","start_date":"2026-10-16","end_date":"2026-10-18","product_ids":["11204567","11204582","9873310"]}' Example response
{
"sale_id": "sale_48213",
"status": "scheduled",
"discount": 20,
"start_date": "2026-10-16",
"end_date": "2026-10-18",
"products": 3
} POST https://cotlet.dev/api/v1/teachers-pay-teachers/send_note_to_followers
Sends a Note to Followers about new products or promotions, now or on the date you set. Images go in the body by URL. The note reaches everyone who follows your store. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| body required | string | Note text. Images by URL. |
| send_on | date | Send date. Default: now. |
Request
curl -X POST https://cotlet.dev/api/v1/teachers-pay-teachers/send_note_to_followers \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body":"body"}' result = client.call("teachers-pay-teachers", "send_note_to_followers", {"body":"body"}) const result = await cotlet.call('teachers-pay-teachers', 'send_note_to_followers', {"body":"body"}); cotlet call teachers-pay-teachers send_note_to_followers --data '{"body":"body"}' Example response
{
"note_id": "note_3307",
"status": "sent",
"sent_on": "2026-10-12"
}