Using the Thinkific API

The Thinkific APIs allow developers to extend Thinkific's functionality in a variety of different ways by accessing site data.

API Use Cases

The API has been designed for two primary use cases, each of which has a different recommended method of authentication:

Private Apps

Advanced course creators that are looking to build their own private solutions and extensions on top of Thinkific should use Private Apps. the recommended authentication method to begin building private apps is to use the API Key and Subdomain that are provided on your Thinkific Site.

*Note: When using this authentication course creators must be on a Paid Thinkific plan (Pro + Growth, Premier or Plus)

Learn how to authenticate using API Key

Public Apps

Puplic Apps are built with the intention of being distributed and installed on many Thinkific sites.

The reommended authentication method to build Public Apps is use our OAuth Authentication method. Authenticating using our OAuth system requires that you first create a Thinkific Parnter Account and register an App to access your credentials.

Learn how to authenticate using OAuth

Cross Origin Requests

Cross origin requests are supported, although it should be noted that making calls to the the API using client-side javascript is insecure as API keys can easily be discovered. We recommend using your server as a proxy to make calls to the Thinkific API to ensure that you do not expose your API key.

Data Format

All data is returned in JSON format.

Date Format

All dates and timestamps are returned and expected in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

Pagination

All collections returned are limited to 25 items by default. This limit can be overridden by providing a "limit" parameter in your request. You can request up to 250 items per API by overriding the limit parameter.

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)"]
  }
}

and responses will have an HTTP status code of 422.