All data returned from the Thinkific Admin API is in JSON format. For information on the specific fields each endpoint returns, refer to our Admin API Reference pages.
Note: This article relates to Thinkific's REST APIs (Admin, Site Scripts, and Webhooks). It does not relate to Thinkific's upcoming GraphQL API.
In this article
Date Format
All dates and timestamps are returned and expected in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
Pagination
In our REST APIs all collections returned are limited by default to 25 items. You can override this limit to a maximum of 250 items by providing a "limit" parameter in your request.
For example:
curl https://api.thinkific.com/api/public/v1/collections?limit=50 \
-H "Authorization: Bearer <access_token>"
The above request will return up to 50 collection items.
You can also specify the page
within a collection of items to retrieve. This is useful in combination with the limit parameter to loop until all items have been retrieved.
For example:
curl https://api.thinkific.com/api/public/v1/collections?limit=50&page=5 \
-H "Authorization: Bearer <access_token>"
All endpoints that return a collection of items will also contain a meta
key that provides a hash of pagination data.
For example:
{
"items":[
{
"id":4,
"created_at":"2015-09-10T23:39:56.189Z",
"first_name":"Bob",
"last_name":"Smith",
"full_name":"Bob Smith",
"company": "A Company",
"email":"something@example.com",
"roles":["course_admin"],
"avatar_url":null,
"bio":null,
"headline":null,
"affiliate_code":null,
"affiliate_commission":null,
"affiliate_payout_email":null,
"administered_course_ids":[1,2],
"custom_profile_fields":[
{
"id":1,
"value":"Canada",
"label":"Country",
"custom_profile_field_definition_id":1
},
{
"id":2,
"value":"778-877-1000",
"label":"Phone Number",
"custom_profile_field_definition_id":2
}
]
}
],
"meta":
{
"pagination":
{
"current_page":1,
"next_page":null,
"prev_page":null,
"total_pages":1,
"total_items":1
}
}
}
}
You can use the information in the pagination hash to determine whether there are more items to fetch.
Validation Errors
All create and update operations have the potential to return validation errors if you pass invalid data. The general format is:
{
"errors": {
"email": ["has already been taken"],
"password": ["is too short (minimum is 6 characters)"]
}
}
Responses will have an HTTP status code of 422
.
Scope Errors
All requests will return a Forbidden response unless your app enables the appropriate scope. The general format is:
{
"error": "App does not have permission to perform this action. Please check the access token permissions"
}
Responses will have an HTTP status code of 403
.