Build on CreatorClass

Your classes, enrollments, and sessions — available to the tools you already run your school with. Connect once with an API key and CreatorClass keeps your CRM, your automations, and your own site in step with your classroom: a seat sells, your stack knows. A class ends, your follow-up fires itself.

1. Get an API key

Sign in as a teacher, open Teacher Studio → Integrations, and create a key. Keys look like cck_live_… and come in two scopes: read (list classes, enrollments, sessions) and write (create classes, enroll students, manage subscriptions). The full key is shown exactly once — we store only a hash, so a lost key is simply revoked and replaced. Revoking takes effect immediately.

2. Authenticate

Send the key on every request, as a bearer token or the X-API-Key header:

curl https://fbxvyarbofujzsmsgaqg.supabase.co/functions/v1/api/v1/me \
  -H "Authorization: Bearer cck_live_YOUR_KEY"

Base URL: https://fbxvyarbofujzsmsgaqg.supabase.co/functions/v1/api. Every response is JSON, scoped to your school only — a key can never read another teacher's data. Unknown or revoked keys get 401; a read-only key attempting a write gets 403.

3. Endpoints

Method & pathWhat it does
GET /v1/meYour teacher profile and the key's scopes.
GET /v1/classes?q=&limit=&offset=Your classes, newest first. q searches titles.
GET /v1/classes/{id}One class.
POST /v1/classesCreate a class as a draft (title, starts_at, seat_cap, price_cents, optional subject, ends_at). Write scope.
GET /v1/classes/{id}/enrollmentsThe roster for one class.
GET /v1/enrollments?cohort_id=&limit=Enrollments across your classes, newest first.
POST /v1/enrollmentsEnroll a student who already has a CreatorClass account, by email (cohort_id, student_email). Write scope.
GET /v1/sessions?cohort_id=Sessions for your classes, including completion stamps.
POST /v1/hooksSubscribe a URL to one event type (automation platforms use this). Write scope.
DELETE /v1/hooks/{id}Remove a subscription. Write scope.

4. Webhooks — CreatorClass tells your stack what happened

Create an endpoint in Teacher Studio → Integrations (or subscribe one through POST /v1/hooks) and we POST a signed JSON event the moment something happens in your school:

EventFires when
enrollment.createdA student enrolls in a class — in the app, on the web, through this API, or through a connected ticket listing.
enrollment.refundedAn enrollment is refunded and the seat is released.
class.publishedA draft class goes open for enrollment.
session.completedA live session is marked complete.
claim.activatedA ticket buyer from a connected listing claims their seat in your classroom.

Every delivery is a JSON envelope — id, type, created_at, and a data object with the event's ids and amounts. Answer with any 2xx within 10 seconds. If delivery fails, we retry with backoff — 5 attempts in total — and every attempt is kept in your delivery log in the Studio.

Verify the signature

Each delivery carries a CreatorClass-Signature header: t=<unix seconds>,v1=<hex>. The v1 value is HMAC-SHA256 of the timestamp, a dot, and the raw request body, keyed with your endpoint's signing secret (shown once, when the endpoint is created). Verify before you trust a payload:

import { createHmac, timingSafeEqual } from 'node:crypto';

function verified(rawBody, header, secret) {
  const t = header.match(/t=(\d+)/)[1];
  const v1 = header.match(/v1=([0-9a-f]+)/)[1];
  const expected = createHmac('sha256', secret)
    .update(t + '.' + rawBody).digest('hex');
  return timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}

5. Automation platforms

CreatorClass speaks the standard REST-hook pattern: an automation platform hands us a target URL per trigger through POST /v1/hooks, we POST signed events to it as they happen, and DELETE /v1/hooks/{id} unsubscribes. Polling works too — GET /v1/enrollments is newest-first, ready to watch. If your platform needs something this page doesn't cover, ask through the support page and we'll build the door with you.

Errors

Errors are JSON with a stable code — an error object carrying code and message fields. Codes you'll meet: cc.invalid_api_key (401), cc.forbidden_scope (403), cc.not_found (404), cc.invalid (400), cc.student_not_found (404 — the student needs a free CreatorClass account first).