What type of API does Thinkific provide?
API Type
Thinkific uses a GraphQL API.
Key Details
- Thinkific built their API using GraphQL internally and has now made it available publicly.
- They chose GraphQL because it allows developers to define precisely which data they need, providing more flexibility compared to REST APIs.
- The GraphQL API allows gathering all needed data in a single request, rather than making multiple requests to different endpoints.
Benefits of Thinkific's GraphQL API
- More efficient data fetching, as developers can request exactly the data they need.
- Improved performance, especially for large datasets, through features like cursor-based pagination.
- Enables deeper customization across Thinkific's platform.
- Provides access to more data across all of Thinkific's features.
- Allows for more regular updates, improvements, and faster bug fixes.
Comparison to Other API Types
- GraphQL offers more flexibility in data querying compared to REST APIs.
- It has a single endpoint, unlike REST which typically has multiple endpoints.
- GraphQL is strongly typed and schema-driven, making it easier to validate and handle data.
- However, GraphQL can be more complex to set up initially compared to REST APIs.
Does the Thinkific API have webhooks?
Yes, the official Thinkific API does have webhooks. Here are the key points about Thinkific's webhooks:
Webhooks Availability
Thinkific provides a Webhooks API that allows you to create and manage webhooks programmatically. This feature is particularly useful when installing an App on a Thinkific site.
Webhook Events
Webhooks typically allow you to subscribe to various events related to the platform's functionality. In Thinkific's case, these events might include:
- Course creation or updates
- User enrollment
- Completion of course modules
- Purchase transactions
- User account changes
However, to get a definitive list of available events, you would need to consult Thinkific's official documentation or contact their support team.
Using Webhooks
To use webhooks with Thinkific's API:
- You need to authenticate using either an Access Token or an API Key.
- The base URL for the Webhooks API is
https://api.thinkific.com/api/v2
.
- You can perform various operations such as getting, creating, updating, and removing webhooks.
Example API Call
Here's an example of how to list webhooks using cURL:
curl -H 'Authorization: Bearer <access_token OR api_key>' \
-H 'Content-Type: application/json' \
"https://api.thinkific.com/api/v2/webhooks?page=1&limit=25"
This call would retrieve a list of existing webhooks, with pagination parameters.
Best Practices
- Always use secure authentication methods when working with webhooks.
- Handle webhook events asynchronously to prevent timeouts.
- Implement proper error handling and logging for webhook events.
- Verify the authenticity of incoming webhook payloads to ensure they're from Thinkific.
While the Thinkific API does offer webhooks, it's important to note that the specific events available for subscription are not detailed in the provided search results. For the most up-to-date and comprehensive information about available webhook events, it's recommended to refer to the official Thinkific API documentation or contact their developer support.
Rate Limits and other limitations
Based on the search results provided, here are the key points regarding the API rate limits for the Thinkific API:
Default Limit
The default limit for API requests is 25 items per request. This means that when making a GET request to endpoints like /users
without specifying a limit, you will only receive 25 results by default.
To retrieve more than the default 25 items, you need to use pagination. The API uses cursor-based pagination, which allows for efficient navigation through large datasets. Instead of page numbers, it uses identifiers (cursors) to pinpoint positions.
Customizing the Limit
You can customize the limit by adding a limit
parameter to your API requests. For example:
https://api.thinkific.com/api/public/v1/users?limit=100
This would request up to 100 users instead of the default 25.
Performance Benefits
The new Thinkific API offers performance benefits, especially for creators with large datasets. The cursor-based pagination approach facilitates efficient retrieval of data for businesses with hundreds or thousands of students.
Best Practices
- When retrieving large amounts of data, use pagination to iterate through all available records.
- Pay attention to the
meta
-> pagination
attribute in the API response to determine the total number of pages and how to retrieve the next set of results.
- Be mindful of making too many requests in a short period, as there may be rate limiting in place (though specific limits are not mentioned in the provided search results).
Key Considerations
- The search results do not provide specific information on hard rate limits (e.g., requests per second or per day).
- Thinkific has recently introduced a new GraphQL-based API, which may offer different capabilities and limits compared to the REST API.
- For the most up-to-date and accurate information on rate limits, it's recommended to consult the official Thinkific API documentation or contact their support team.
It's important to note that while these search results provide some insights into the API's behavior, they do not explicitly state hard rate limits. For mission-critical applications, it would be advisable to confirm the exact rate limits with Thinkific's official documentation or support channels.
Latest API Version
Based on the search results provided, I can answer your question about the most recent version of the Thinkific API. Here's what I found:
The most recent version of the Thinkific API is the new GraphQL-based API. While the search results don't explicitly mention a version number, they do discuss a "New Thinkific API" that represents the most current offering.
Key points to consider:
-
New API approach: Thinkific has adopted an "API-first approach" to product development, making some of their internal APIs public.
-
GraphQL technology: The new API is built using GraphQL, which is described as cutting-edge technology for modern platform development.
-
Performance improvements: The new API offers performance benefits, especially for large-scale operations, by adopting cursor-based pagination.
-
Expanded functionality: The new API provides access to more data and functionalities across all of Thinkific.
Additional information:
- The new API is designed to offer deeper customization and automation capabilities for Thinkific users.
- It allows access to various features such as community engagement data, quiz results, survey submissions, and assignment grading.
- Thinkific plans to continuously expand the data and functionalities available through this API.
While the search results don't provide information about a specific version number, they do mention a base URL for the Admin API:
https://api.thinkific.com/api/public/v1
This suggests that there is at least a v1 of the API available. However, it's important to note that this may refer to an older version of the API, as the main focus of the search results is on the new GraphQL-based API.
For the most up-to-date and accurate information about the current version of the Thinkific API, it would be best to consult the official Thinkific API documentation or contact their support team directly.
How to get a Thinkific developer account and API Keys?
To get a developer account for Thinkific and create an API integration, you'll need to follow these steps:
1. Sign up as a Thinkific Developer
First, you need to sign up as a Thinkific Developer. You can do this by visiting the Thinkific Developers website.
2. Learn About Apps and API Documentation
Before creating your integration, it's important to:
- Understand how to design and build apps with Thinkific by exploring the "Learn About Apps" section.
- Browse the API documentation to learn about its capabilities and how to start building your application.
3. Get API Access
To access the Thinkific API, you have two options:
- OAuth Authorization: This is the recommended method for most integrations.
- API Key Authorization: This can be used for simpler integrations or testing purposes.
4. Familiarize Yourself with the API Structure
Key points to consider:
- The base address of the Admin API is
https://api.thinkific.com/api/public/v1
.
- Thinkific uses GraphQL for its API, which offers more flexibility in data retrieval and manipulation.
- The API uses cursor-based pagination for efficient navigation through large datasets.
5. Start Building Your Integration
Once you have access and understand the API structure, you can start building your integration. Consider the following:
- Use the API documentation to understand available endpoints and data structures.
- Leverage the GraphQL structure to efficiently request only the data you need.
- Test your integration thoroughly using the provided endpoints.
6. Submit Your App (if applicable)
If you're building an app for the Thinkific App Store:
- Follow the guidelines for building and submitting apps.
- Prepare your app documentation.
- Submit your app for review.
Best Practices
- Always use secure authentication methods (OAuth or API Key).
- Respect rate limits to ensure smooth operation of your integration.
- Keep your integration up to date with any API changes by monitoring the changelog.
- Consider subscribing to App Developer News for updates and opportunities.
What can you do with the Thinkific API?
Based on the search results provided, here is a list of data models you can interact with using the Thinkific API, along with what is possible for each model:
Courses
- Get courses
- Manage course information
Users
- Create new users
- Update user information
- Manage user data
Enrollments
- Create new enrollments for students in specific courses
- Manage student enrollments
Lessons
Orders
Webhooks
- Create webhooks
- Get webhooks
- Manage webhook configurations
General API Capabilities
- Perform various admin and site owner related activities
- Access data from the perspective of a Site Owner
- Automate tasks related to course management, user management, and more
- Integrate Thinkific with other applications and services
Key Points to Consider
- The API uses API keys for authentication
- There are rate limits for API usage
- The base URL for the Admin API is https://api.thinkific.com/api/public/v1
- The API allows for programmatic access to your Thinkific site
- You can use the API to sync data across various services and trigger workflows based on specific events
It's important to note that the exact capabilities and limitations for each data model may vary, and you should consult the official Thinkific API documentation for the most up-to-date and detailed information on what operations are supported for each model.