Skip to content

TeachableClient

Defined in: index.ts:24

The root client for interacting with the Teachable API. Instantiating this class automatically sets up all versioned sub-clients.

import { TeachableClient } from './src';
// Standard usage
const client = new TeachableClient('your-api-key');
// Debug mode — logs all requests and responses to the console
const client = new TeachableClient('your-api-key', true);
const users = await client.v1.users.getList(); // will log the request

new TeachableClient(apiKey, enableDebug?): TeachableClient

Defined in: index.ts:37

Creates a new TeachableClient instance and initializes the v1 sub-client.

string

Your Teachable API key, used to authenticate all requests.

boolean = false

If true, enables debug mode for all sub-clients. Defaults to false.

TeachableClient

v1: TeachableV1

Defined in: index.ts:30

Provides access to all Teachable v1 API resources, including users, transactions, and courses.