Quickstart Guide

The following quickstart guide will walk through how to access and make a call to the Teachable API.

If you are already comfortable with how to make requests to the API, you can jump ahead to Authentication and reviewing all available endpoints in our reference documentation.

1. Signing up for an account

To use the Teachable API, you must have a Teachable account on the Pro plan or higher. Sign up here for a Teachable account.

2. Getting your API Key

Next, you will need to get your API keys. Your API keys are how you authenticate your requests to the API.

To get your API keys:

  1. Navigate to the Settings > API tab of your Teachable school admin.
  2. Click the Create API Key button.
  3. In the popup window, enter a Name for your API Key.
  4. Click Create.

Once you have your API key, you will need to include it in the header of request calls you make to the API.

Learn more about Authentication.

1079

3. Making a request

To make an API request, you’ll need to complete the following steps:

1. Select an endpoint you'd like to use.

You can view all available endpoints in our reference documentation. For example, you can use the /courses endpoint to fetch data on all courses in your school.

2. Choose a tool to make your request in.

Throughout our documentation, we write our requests in cURL—these cURL requests can be executed directly from your Terminal (Mac) or Command Prompt (Windows).

You can also choose to make your requests through various third-party graphical user interface (GUI) clients, such as Postman or Paw.

🚧

You can use the "Try It!" feature in the reference documentation to make requests to the API. However, be aware that using this function makes a an actual to the API—and therefore, will get and/or post real data to/from your Teachable school.

3. Format and make your request.

Your request will be composed of:

  • A request method (GET, POST, PATCH, or DELETE). For example, if you selected the /courses endpoint, you would be using the GET request method.
  • URL: The URL consists of the base URL (i.e., developers.teachable.com) and the specific endpoint you’re using. For example, the full request URL of the /v1/courses endpoint is https://developers.teachable.com/v1/courses.
  • Header: This is where you include your API Key for authentication.

A sample request is formatted as follows:

curl --request GET \
     --url https://developers.teachable.com/v1/courses \
     --header 'apiKey: YOURKEYHERE'

📘

Replace YOURKEYHERE with your unique API key.

4. Use parameters to specify your request.

Some endpoints have parameters that you can add to the request URL to specify your request. Some parameters are required (e.g., indicating a specific course ID when enrolling users into a course with the /enroll endpoint), while others are optional. The reference documentation will indicate when a parameter is required.

A sample request to the /v1/courses/{course_id} endpoint, including parameters (e.g., adding a course_id of 123), is formatted as follows:

curl --request GET \
     --url https://developers.teachable.com/v1/courses/123 \
     --header 'apiKey: YOURKEYHERE'

📘

Some requests might require additional header information or request bodies. (This is typically required when making a POST, PATCH, or DELETE request, which require you to send data with the request.) Learn more about making requests.

4. Next steps

Now that you know how to make a call to the Teachable API, you can review all available endpoints in our reference documentation to begin utilizing the API according to your business needs.