Skip to content

Developers

Build on ClassPro. Ship on your terms.

A REST API for class-based businesses. 32 webhook events, a full OpenAPI 3.1 spec, scoped keys and signed deliveries with replay protection. Read state, react to events, write changes back.

30-day trial. No charge until it ends. Keys are scoped to your school.

curl
# List active students
curl -H "Authorization: Bearer $API_KEY" \
     "https://<your-subdomain>.classpro.io/api/v1/students?state=active&limit=50"

# Schedule a lesson
curl -X POST \
     -H "Authorization: Bearer $API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "tutorId":   "...",
       "studentId": "...",
       "startTime": "2026-06-12T15:00:00Z",
       "endTime":   "2026-06-12T15:30:00Z"
     }' \
     "https://<your-subdomain>.classpro.io/api/v1/lessons"

First call in four steps.

No SDK required. The API is plain HTTP and JSON.

  1. 01

    Create an API key

    In your owner dashboard, open Settings → Email, API & data. Create a key, scope it to the resources you need (for example read:students write:lessons), and copy the secret. Each key belongs to one school. There's no platform-wide key.

  2. 02

    Hit the API

    Every endpoint lives under your subdomain. Send the key as a Bearer token (or in an X-API-Key header). The full spec is OpenAPI 3.1: import it into Postman or generate a typed client.

  3. 03

    Subscribe to webhook events

    Add a webhook endpoint in the same settings page or through the API, pick the events you care about, and ClassPro POSTs a signed JSON payload to your URL each time one happens. Verify the signature before you trust it.

  4. 04

    Ship

    That's the loop. Read state, react to events, write changes back. Every endpoint takes and returns JSON, lists paginate the same way (page and limit, up to 100 per page), and errors come back as { "error": { "code", "message" } } with a matching HTTP status.

Read state, react to events, write changes back.

List students and schedule a lesson · Node 18+
const API = 'https://<your-subdomain>.classpro.io/api/v1';
const headers = {
  Authorization: `Bearer ${process.env.CLASSPRO_API_KEY}`,
  'Content-Type': 'application/json',
};

// List active students
// -> { data: [...], meta: { total, page, limit, totalPages } }
const res = await fetch(`${API}/students?state=active&limit=50`, { headers });
const { data: students, meta } = await res.json();

// Schedule a lesson
await fetch(`${API}/lessons`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    tutorId: '...',
    studentId: '...',
    startTime: '2026-06-12T15:00:00Z',
    endTime:   '2026-06-12T15:30:00Z',
  }),
});
Verify a webhook delivery · Node
import { createHmac, timingSafeEqual } from 'crypto';

// X-Webhook-Signature: t=1781273400,v1=5f2c9e…
export function verify(rawBody: string, header: string, secret: string) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const t = Number(parts.t);
  // Too old (or from the future): treat as a replay.
  if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false;

  const expected = createHmac('sha256', secret)
    .update(`${t}.${rawBody}`)
    .digest('hex');
  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1 ?? '');
  // Constant-time compare; never ===.
  return a.length === b.length && timingSafeEqual(a, b);
}

// In your handler
app.post('/webhooks/classpro', async (req, res) => {
  const sig = req.header('X-Webhook-Signature') ?? '';
  if (!verify(req.rawBody, sig, process.env.WEBHOOK_SECRET!)) {
    return res.status(401).end();
  }
  const event = JSON.parse(req.rawBody);
  // event.id, event.type ('student.created', 'lesson.completed'…),
  // event.created, event.data
  await handle(event);
  res.status(204).end();
});

Webhooks

32 events. Filter what you want.

Subscribe per endpoint, per event. Signed, replay-protected, retried with backoff.

Students

student.created
A new student record was added.
student.updated
A student record was edited (state, contact, instrument, tags).
student.deleted
A student record was deleted.

Lessons

lesson.created
A lesson was scheduled (single, recurring, or group).
lesson.updated
A lesson was edited (time, tutor, room, attendance).
lesson.completed
A lesson finished and attendance was recorded.
lesson.cancelled
A lesson was cancelled: with credit, with charge, or no fault.

Payments

payment.created
A payment was initiated (Stripe charge or GoCardless mandate-backed payment).
payment.confirmed
A payment cleared. Safe to ship goods or start service.
payment.failed
A payment was declined or returned.
mandate.created
A direct-debit mandate was set up (GoCardless).
mandate.cancelled
A direct-debit mandate was cancelled.

Branches & rooms

branch.created
A new branch was opened on the academy.
branch.updated
A branch was edited.
branch.deleted
A branch was deleted.
room.created
A room was added inside a branch.
room.updated
A room was edited.
room.deleted
A room was deleted.
room_booking.created
A room was booked (e.g. for a lesson, rehearsal, or external rental).
room_booking.cancelled
A room booking was released.

Workflows

workflow.submission.created
A workflow form was submitted (intake, exam entry, costume order, etc.).
workflow.submission.completed
A submission reached its final state (approved, paid, signed).

Pricing plans & gift cards

pricing_plan.created
A pricing plan was added to the academy.
pricing_plan.updated
A pricing plan was edited.
gift_card.created
A gift card was issued.
gift_card.redeemed
A gift card was redeemed by a student or guardian.
gift_card.cancelled
A gift card was cancelled before redemption.

Tags, contracts, report cards

tag.created
A new tag was created.
tag.deleted
A tag was deleted.
contract.created
A contract was sent to a student or guardian.
contract.updated
A contract was edited or signed.
report_card.published
A report card was published to the parent portal.

Production-grade by default.

Signed deliveries

Every webhook POST carries an X-Webhook-Signature header: an HMAC-SHA256 of the timestamp and the raw body, keyed with that endpoint’s own signing secret. Reject anything that doesn’t verify.

Replay protection

The signed timestamp travels with each delivery, along with a unique X-Webhook-Id. Reject signatures older than five minutes and deduplicate by ID, since a retried delivery carries the same ID.

Retries with backoff

A failed delivery (a non-2xx response, or no response within 30 seconds) is retried up to three more times with backoff. After 10 consecutive failures the endpoint is switched off until you turn it back on. Consume idempotently.

Scoped, hashed keys

Every API key declares its scopes (read:students, write:lessons and so on), and only a hash of the key is stored. Lose a key and the damage is bounded by the scopes it held.

Rate limits

100 requests a minute per key. X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers tell you where you stand.

Scopes

Grant the minimum. Audit the rest.

Each API key declares its scopes. The principle of least privilege, baked in.

  • Students
    read:studentswrite:students
  • Lessons
    read:lessonswrite:lessons
  • Tutors
    read:tutors
  • Payments
    read:payments
  • Branches & rooms
    read:brancheswrite:branchesread:roomswrite:rooms
  • Guardians
    read:guardianswrite:guardians
  • Webhooks
    read:webhookswrite:webhooks
  • Instruments
    read:instrumentswrite:instruments
  • Workflows
    read:workflowswrite:workflowsread:workflow_submissions
  • Pricing plans
    read:pricing_planswrite:pricing_plans
  • Gift cards
    read:gift_cardswrite:gift_cards
  • Tags
    read:tagswrite:tags
  • Contracts
    read:contractswrite:contracts

Your classes. Your stack. Your rules.

Spin up an account, generate a scoped key, and ship the first integration today.