Developers
Connect your apps to CourseCloud
A REST API for a training provider's mailing list, course dates and bookings, and signed webhooks that tell your app the moment something happens. The provider stays in control: they choose what each connection may do, see what it did, and can switch it off in one click.
Getting started
- An admin of the training provider opens Settings > Integrations in CourseCloud and chooses New API key.
- They name it, tick only what it needs, and copy the key. It is shown once.
- Your app sends it with every call. Everything is scoped to that one provider.
curl https://www.coursecloud.co.uk/api/v1/ping \
-H "Authorization: Bearer cc_live_xxxxxxxx_..." The API lives at https://www.coursecloud.co.uk/api/v1. Everything is JSON. Times are UTC in ISO 8601 (2026-11-13T09:00:00Z); calendar dates are YYYY-MM-DD.
Keys
Send the key in the Authorization header as Bearer <key>, over HTTPS. A key in the address (for example ?api_key=) is always refused, because addresses end up in logs: if that happens, revoke the key and make a new one.
Keys look like cc_live_AbCd1234_.... We keep only a fingerprint of each key, so a lost key cannot be shown again: make a new one. When the provider makes a new key for a connection, the old one keeps working for 24 hours (responses carry a Warning header) and then stops. A paused or revoked key is refused on its very next call.
Permissions
Each key can only do what the provider ticked. Write permissions are on the Complete plan; the rest are on every paid plan.
| Permission | What the provider sees | Includes |
|---|---|---|
cc:subscribers:read | See your mailing list | Names, email addresses, lists, tags and whether each person can be emailed. |
cc:subscribers:write | Add and update people on your mailing list | Only with a consent reason. Never adds back anyone who unsubscribed or bounced. |
cc:lists:write | Put people on your lists and tag them | Your own lists and tags only. Smart lists follow your data and cannot be changed. |
cc:bookings:read | See your bookings | Course, date, places, status and totals, and the customer's company name. No card details and no learner details. |
cc:customers:read | See your customers and contacts | Company names, and contact names and email addresses. |
cc:courses:read | See your public course dates | Courses on sale, dates, prices and places left. The same as your public pages show. |
cc:certificates:read | See certificates you issue | Course, learner name, date achieved and expiry. No other personal details. |
cc:webhooks | Send your events to an address it chooses | Lets the app subscribe to events (for example a new booking), only for the things it can already see. |
cc:ai:read | Let an AI assistant read what you allow above | The assistant can look things up for you. It cannot change anything. |
cc:ai:act | Let an AI assistant suggest actions (actions that need your approval) | Nothing happens until someone in your team approves it in CourseCloud. |
Endpoints
| Call | Needs | What it does |
|---|---|---|
GET /ping | Any key | Checks your key works. Returns the training provider's name and what the key may do. |
GET /events | Any key | Every event webhooks can send, and whether this key may receive it. |
GET /subscribers | cc:subscribers:read | The mailing list, oldest first. Filters: updated_since (ISO 8601), list (list id), tag (name), email. Paged with limit (1 to 100) and cursor. |
GET /subscribers/{id} | cc:subscribers:read | One person: status, consent, lists and tags. |
POST /subscribers | cc:subscribers:write | Add or update someone by email. consent {basis, source} is required. Someone who unsubscribed, bounced or asked to be erased is never added back (409). lists and tags need cc:lists:write. |
POST /subscribers/{id}/unsubscribe | cc:subscribers:write | Unsubscribe them from the provider's marketing. Only they can undo it. |
POST /subscribers/{id}/tags | cc:lists:write | {"add": ["name"], "remove": ["name"]}. A new tag name makes the tag. |
GET /lists | cc:subscribers:read | The provider's lists. Smart lists follow their records and cannot be added to. |
GET /courses | cc:courses:read | Public course dates for the next 18 months with price, places and places left, and the page to book. |
GET /bookings | cc:bookings:read | Bookings, oldest first. Filter: created_since. Paged with limit and cursor. No card details and no learner details. |
GET /bookings/{id} | cc:bookings:read | One booking by its booking reference. |
GET /webhooks | cc:webhooks | The webhooks this key made. |
POST /webhooks | cc:webhooks | {"url": "https://...", "events": ["booking.created"]}. Returns the webhook with its signing_secret (shown once). For Zapier REST hooks. |
DELETE /webhooks/{id} | cc:webhooks | Stop and remove a webhook this key made. |
Adding someone to the mailing list
curl -X POST https://www.coursecloud.co.uk/api/v1/subscribers \
-H "Authorization: Bearer cc_live_xxxxxxxx_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: signup-8f2c1a" \
-d '{
"email": "[email protected]",
"first_name": "Sam",
"consent": { "basis": "consent", "source": "Website newsletter form" },
"lists": ["<list id from GET /lists>"],
"tags": ["Website"]
}' consent.basis is one of consent, legitimate_interest, soft_opt_in, contract. consent.source says where they agreed. Answers 201 when the person is new, 200 when they were updated.
Paging
Lists answer {"data": [...], "has_more": true, "next_cursor": "..."}. Pass cursor=<next_cursor> for the next page, until has_more is false.
Retrying safely
Send an Idempotency-Key header (up to 255 characters) on POST. The first answer for that key is kept for 24 hours and sent again for a retry (with Idempotent-Replayed: true). The same key with a different body is refused with 422.
Webhooks
A webhook sends each event the provider chose to your HTTPS address as it happens, usually within a minute. Each is a POST with a JSON body. Answer with any 2xx within 10 seconds; anything else (including a redirect, which is never followed) is a failure and is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours. After 20 failures in a row the webhook is stopped and the provider is told. data is the record as it is when sent, with the same safe fields as the API.
| Event | When | Needs |
|---|---|---|
booking.created | A booking is made | cc:bookings:read |
booking.confirmed | A booking is confirmed | cc:bookings:read |
booking.cancelled | A booking is cancelled | cc:bookings:read |
certificate.issued | A certificate is issued | cc:certificates:read |
customer.created | A customer is added | cc:customers:read |
contact.created | A contact is added | cc:customers:read |
subscriber.created | Someone joins your mailing list (through a connection) | cc:subscribers:read |
subscriber.updated | Someone on your mailing list changes their details or lists | cc:subscribers:read |
subscriber.unsubscribed | Someone is unsubscribed through a connection | cc:subscribers:read |
form.submitted | Someone fills in one of your sign-up forms (coming soon) | cc:subscribers:read |
POST /your/address HTTP/1.1
Content-Type: application/json
X-CourseCloud-Event: booking.created
X-CourseCloud-Delivery: 9GfQ2... (the same on every retry of this delivery)
X-CourseCloud-Timestamp: 1794560400
X-CourseCloud-Signature: sha256=5f1d...
{
"id": "9GfQ2...",
"event": "booking.created",
"occurred_at": "2026-11-13T09:00:00Z",
"attempt": 1,
"data": {
"booking": {
"id": "QPBRDVMP", "status": "pending", "paid": false, "places": 2, "total": 300, "currency": "GBP",
"course": { "name": "First Aid at Work", "date_id": "...", "start_date": "2026-12-01" },
"customer": { "id": "...", "name": "Acme Construction Ltd" },
"created_at": "2026-11-13T09:00:00Z", "cancelled_at": null
}
}
} Use X-CourseCloud-Delivery to ignore a delivery you already handled: a retry carries the same one. Changes your own app made through the API are not sent back to it. Addresses must be public HTTPS addresses: private, local and cloud metadata addresses are refused.
Checking the signature
X-CourseCloud-Signature is sha256= and the HMAC-SHA256, in hex, of the timestamp, a full stop and the raw body, made with the webhook's signing secret. For 24 hours after the provider makes a new secret, a second sha256= for the old one follows, comma separated: accept either. Refuse timestamps more than 5 minutes old.
PHP
<?php
// $secret: the signing secret shown when you made the webhook (whsec_...)
$body = file_get_contents('php://input');
$ts = $_SERVER['HTTP_X_COURSECLOUD_TIMESTAMP'] ?? '';
$sigs = explode(',', $_SERVER['HTTP_X_COURSECLOUD_SIGNATURE'] ?? '');
$want = 'sha256=' . hash_hmac('sha256', $ts . '.' . $body, $secret);
$ok = false;
foreach ($sigs as $s) { if (hash_equals($want, trim($s))) { $ok = true; } }
if (!$ok || abs(time() - (int)$ts) > 300) { http_response_code(400); exit; }
$event = json_decode($body, true);
// ... use $event['event'] and $event['data'], then answer 2xx quickly
http_response_code(200); Node.js
const crypto = require('crypto');
// app.post('/coursecloud', express.raw({ type: 'application/json' }), handler)
function verify(req, secret) {
const body = req.body.toString('utf8'); // the raw body, exactly as sent
const ts = req.get('X-CourseCloud-Timestamp') || '';
const want = 'sha256=' + crypto.createHmac('sha256', secret).update(ts + '.' + body).digest('hex');
const sigs = (req.get('X-CourseCloud-Signature') || '').split(',').map(s => s.trim());
const fresh = Math.abs(Date.now() / 1000 - Number(ts)) <= 300;
return fresh && sigs.some(s => s.length === want.length && crypto.timingSafeEqual(Buffer.from(s), Buffer.from(want)));
} Python
import hmac, hashlib, time
def verify(raw_body: bytes, headers, secret: str) -> bool:
ts = headers.get('X-CourseCloud-Timestamp', '')
want = 'sha256=' + hmac.new(secret.encode(), ts.encode() + b'.' + raw_body, hashlib.sha256).hexdigest()
sigs = [s.strip() for s in headers.get('X-CourseCloud-Signature', '').split(',')]
fresh = ts.isdigit() and abs(time.time() - int(ts)) <= 300
return fresh and any(hmac.compare_digest(s, want) for s in sigs) Rate limits
Each key can make 120 calls a minute, and each address 300 a minute across keys. Over the limit you get 429 with a Retry-After header in seconds. Repeated wrong keys from one address are slowed down too.
Errors
Errors follow RFC 7807 (application/problem+json), with a code you can rely on.
HTTP/1.1 403 Forbidden
Content-Type: application/problem+json
{
"type": "https://www.coursecloud.co.uk/developers/#error-insufficient_scope",
"title": "Not allowed",
"status": 403,
"detail": "This key is not allowed to do this (it needs the cc:subscribers:write permission).",
"code": "insufficient_scope",
"scope": "cc:subscribers:write"
} | Status | code | Meaning |
|---|---|---|
| 400 | invalid_json, invalid_parameter, key_in_url | The request is not right. A key sent in the address is refused: revoke it and make a new one. |
| 401 | unauthenticated, invalid_key, revoked, expired | No key, a wrong key, or one that was revoked or has expired. |
| 403 | insufficient_scope, plan_required, paused, disabled | The key may not do this, the provider's plan does not include it, or the provider paused or stopped the connection. |
| 404 | not_found | No such record for this provider (or no such endpoint). |
| 409 | suppressed | That person unsubscribed, bounced or asked to be erased, so they cannot be added. |
| 413 | too_large | Bodies are limited to 64KB. |
| 422 | invalid_field, consent_required, idempotency_key_reused | A field is missing or wrong (the field is named), or an Idempotency-Key was reused for a different request. |
| 429 | rate_limited | Too many requests. Wait for the Retry-After seconds, then try again. |
| 500 | server_error | Something went wrong on our side. Retry with the same Idempotency-Key. |
Zapier, Make and n8n
Triggers: use REST hooks. When a Zap is switched on, call POST /webhooks with the Zap's address and the event; when it is switched off, call DELETE /webhooks/{id}. The key needs cc:webhooks and the permission the event needs. If the provider revokes the key, its webhooks stop too.
Polling instead: ask for what changed with GET /subscribers?updated_since= and GET /bookings?created_since=, then follow next_cursor.
Actions: POST /subscribers adds or updates someone (with consent), and POST /subscribers/{id}/tags tags them. The provider sees one line a day in Marketing, for example "Zapier added 12 people to your mailing list today".
Testing: GET /ping checks the key, and the provider can send a test event to any webhook from Settings > Integrations.
AI assistants (MCP)
A training provider can let their own AI assistant (Claude, GitHub Copilot, Cursor or any app that speaks the Model Context Protocol) work with their CourseCloud. The assistant can look things up within what the provider allowed. Anything that would send, change or spend is only ever a request: the provider sees a preview of exactly what will happen and approves or declines it in CourseCloud. Nothing happens until they do.
Setting it up
- An admin opens Settings > Integrations > Connections and chooses Connect an AI assistant.
- They tick what it may see (bookings, customers, certificates, course dates, mailing list) and, if they want, suggest actions (actions that need your approval). They copy the key: it is shown once.
- They add CourseCloud to their AI app with the address and key below.
Server address: https://www.coursecloud.co.uk/api/mcp. Transport: Streamable HTTP (one JSON-RPC message per POST, a JSON answer, no session). Header: Authorization: Bearer <key>. Protocol revision 2025-06-18 (also 2025-11-25, 2025-03-26).
Claude Code
claude mcp add --transport http coursecloud https://www.coursecloud.co.uk/api/mcp --header "Authorization: Bearer cc_live_..." Or in a project's .mcp.json, with the key in an environment variable:
{
"mcpServers": {
"coursecloud": {
"type": "http",
"url": "https://www.coursecloud.co.uk/api/mcp",
"headers": {
"Authorization": "Bearer ${COURSECLOUD_KEY}"
}
}
}
} Claude Desktop
In claude_desktop_config.json (Settings > Developer > Edit config), through the mcp-remote bridge, which needs Node.js. Restart Claude Desktop after saving.
{
"mcpServers": {
"coursecloud": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://www.coursecloud.co.uk/api/mcp",
"--header",
"Authorization:${COURSECLOUD_AUTH}"
],
"env": {
"COURSECLOUD_AUTH": "Bearer cc_live_..."
}
}
}
} VS Code and GitHub Copilot
In .vscode/mcp.json. VS Code asks for the key once and keeps it safely.
{
"inputs": [
{
"type": "promptString",
"id": "coursecloud-key",
"description": "CourseCloud AI assistant key",
"password": true
}
],
"servers": {
"coursecloud": {
"type": "http",
"url": "https://www.coursecloud.co.uk/api/mcp",
"headers": {
"Authorization": "Bearer ${input:coursecloud-key}"
}
}
}
} ChatGPT and other apps
Any MCP app that lets you set a request header works: give it the address and the Authorization header. ChatGPT's connectors sign in with OAuth, which CourseCloud does not offer yet, so use one of the apps above for now. To try it by hand:
curl -s https://www.coursecloud.co.uk/api/mcp \
-H "Authorization: Bearer $COURSECLOUD_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_upcoming_events","arguments":{"days":30}}}' Tools
An assistant only sees the tools its key may use (tools/list). Every tool also needs cc:ai:read; request tools need cc:ai:act.
| Tool | Needs | What it does |
|---|---|---|
find_records | cc:customers:read or cc:bookings:read | Find records |
get_upcoming_events | cc:bookings:read | Upcoming course dates |
get_event_details | cc:bookings:read | One course date |
get_pipeline_summary | cc:bookings:read | Booking pipeline |
get_cash_position | cc:bookings:read | Money owed |
get_events_at_risk | cc:bookings:read | Course dates at risk |
get_customers_needing_attention | cc:customers:read | Customers needing attention |
get_customer_health | cc:customers:read | Customer account health |
get_renewals_due | cc:certificates:read | Renewals due |
get_course_dates | cc:courses:read | Public course dates |
search_help | cc:ai:read | CourseCloud help |
get_marketing_overview | cc:subscribers:read | Marketing overview |
count_audience | cc:subscribers:read | Count an audience |
get_campaign_results | cc:subscribers:read | Campaign results |
list_automations | cc:subscribers:read | Marketing automations |
list_offers | cc:subscribers:read | The provider's offers |
get_request_status | cc:ai:read | Request status |
draft_campaign | cc:ai:act, cc:subscribers:read | Request: Draft a campaign (needs approval) |
propose_send_campaign | cc:ai:act, cc:subscribers:read | Request: Send a campaign (needs approval) |
propose_switch_on_automation | cc:ai:act, cc:subscribers:read | Request: Switch on an automation (needs approval) |
propose_move_delegates | cc:ai:act, cc:bookings:read | Request: Move a booking to another date (needs approval) |
propose_message_customers | cc:ai:act, cc:bookings:read | Request: Email customers on a course (needs approval) |
How approval works
- A request tool answers with a
request_idand the statuswaiting_for_approval. The assistant checks it withget_request_status:done,declined,failedorexpired(after 7 days). - The provider sees each request under AI requests on the Connections screen, with a preview (who, what, how many, the exact text), and is emailed when one arrives. Marketing ones also appear in Marketing's "What's happening".
- On Approve, everything is checked again with today's data and the request runs as the person who approved it, through the same checks as doing it by hand: marketing roles and campaign approval, the marketing agreement and pause, the pre-send checklist, consent, unsubscribes and the 2-day gap between marketing emails. A draft campaign stays a draft.
- Offers: an assistant can never write offer, discount or deadline wording, and can only attach an offer the provider set up in Settings > Discounts (
list_offers). - At most 20 requests wait per connection, and 30 can be made an hour.
Staying in control
Every call is in the connection's What it did, and every request and decision in its activity. Pausing or revoking the connection stops the very next call, and its waiting requests can no longer be approved. Errors follow JSON-RPC: a refused or failed tool answers isError: true with the reason in words; a missing or wrong key answers HTTP 401, a paused connection 403, too many calls 429 with Retry-After. The rate limits above apply.