Quickstart
Embed a Coassemble course in your product and verify that a learner can complete it.
API base and authentication
Use https://api.coassemble.com/api as your API base. Send the whole key as the Authorization header value without a Bearer prefix.
Authorization: COASSEMBLE:<workspaceId>:<secret>Store the key in your server environment as COASSEMBLE_KEY. Keep it out of browser code, email and AI chats.
How to start
Have a course
Done when the workspace has a course. New workspaces arrive with a sample.
Create a test key
Test calls never bill, and learner sessions carry a Test mode badge. AI narration and images still count toward your allowance.
Create a production key
This key issues live learner sessions. Keep it on your server.
Create the key in Developer > API keys. The available key modes depend on your workspace.
Make your first call
Done when a call with your key gets a 2xx response.
cURLcurl https://api.coassemble.com/api/v1/headless/courses \ -H "Authorization: $COASSEMBLE_KEY"Nodeconst response = await fetch('https://api.coassemble.com/api/v1/headless/courses', { headers: { Authorization: process.env.COASSEMBLE_KEY } }); if (!response.ok) throw new Error(await response.text()); const courses = await response.json();Pythonimport os, requests response = requests.get('https://api.coassemble.com/api/v1/headless/courses', headers={'Authorization': os.environ['COASSEMBLE_KEY']}) response.raise_for_status() courses = response.json()Choose a published course from the response and use its numeric
idascourseIdin the next request.Ask for a signed link
Tell us the course and who is looking at it. Reuse one test identifier while you try it.
cURLcurl -X POST https://api.coassemble.com/api/v1/headless/embed/course \ -H "Authorization: $COASSEMBLE_KEY" -H "Content-Type: application/json" \ -d '{"action":"view","courseId":"<courseId from the courses response>","identifier":"test-anna"}'Nodeconst response = await fetch('https://api.coassemble.com/api/v1/headless/embed/course', { method: 'POST', headers: { Authorization: process.env.COASSEMBLE_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({"action":"view","courseId":"<courseId from the courses response>","identifier":"test-anna"}) }); if (!response.ok) throw new Error(await response.text()); const url = await response.text();Pythonimport os, requests response = requests.post('https://api.coassemble.com/api/v1/headless/embed/course', headers={'Authorization': os.environ['COASSEMBLE_KEY']}, json={"action":"view","courseId":"<courseId from the courses response>","identifier":"test-anna"}) response.raise_for_status() url = response.textReplace the quoted course ID placeholder with that number. Use a stable identifier from your own app for each live learner.
Serving several customers? Add clientIdentifier only when you intend to create a separate client.
The response is the signed URL as plain text. The link expires in 3 hours. Mint it server-side per learner per page load; do not store it.
Put it on your page
Done when a learner opens the link, from your page or a browser tab.
Prove a completion
Done when an identified learner finishes through your integration.
Clone the example
A small working integration: one serverless function that holds your key, and one page that shows your course.
Use Node 24 and a published course. Set COASSEMBLE_KEY in .env before running the last command.
git clone https://github.com/coassemble/embed-starter
cd embed-starter && cp .env.example .env # paste your key into .env
npm install && COASSEMBLE_API_BASE='https://api.coassemble.com/api' npm run dev # opens your courseYou can send the brief to your developer from the setup guide in your workspace.