Enrol a person in a course (as an assignment)
POST
/v1/integration-api/enrollments
const url = 'https://api.academy.example.com/v1/integration-api/enrollments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"personId":"6f1c2a10-0000-4000-8000-0000000000a1","courseId":"6f1c2a10-0000-4000-8000-0000000000c1","dueAt":"2026-11-30T23:59:00.000Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.academy.example.com/v1/integration-api/enrollments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "personId": "6f1c2a10-0000-4000-8000-0000000000a1", "courseId": "6f1c2a10-0000-4000-8000-0000000000c1", "dueAt": "2026-11-30T23:59:00.000Z" }'Versioned integration contract.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Responses
Section titled “Responses”Success
Media typeapplication/json
object
Example
{ "personId": "6f1c2a10-0000-4000-8000-0000000000a1", "courseId": "6f1c2a10-0000-4000-8000-0000000000c1", "status": "active", "dueAt": "2026-11-30T23:59:00.000Z", "created": true}default
Section titled “default”Error; error and message identify the reason
Media typeapplication/json
object
error
required
Stable code, e.g. insufficient_scope, not_found, validation_failed
string
message
string
Example generated
{ "error": "example", "message": "example"}