Create a learner runtime session
POST/learner-runtime/sessions
Exchanges a trusted organization credential for a short-lived browser token after verifying the learner's current access. Call this endpoint from a trusted server only.
Request body
originstringrequiredThe browser origin allowed to use the learner token, such as https://app.example.com.
rootContentIdstringrequiredThe enrolled root course id.
userIdstringrequiredThe enrolled learner's user id.
Responses
200Create a learner runtime session.400Validation failed or the request body is malformed.401Missing, invalid or revoked API key.403The key's organization does not own this resource.404The resource does not exist (or belongs to another org).429Rate limit exceeded (240 reads/min, 60 writes/min per key).500Unexpected server error.curl https://api.cursare.com/v1/learner-runtime/sessions \
--request POST \
--header 'Authorization: Bearer cr_live_…' \
--header 'Content-Type: application/json' \
--data '{
"origin": "string",
"rootContentId": "string",
"userId": "string"
}'{
"data": {
"expiresAt": "2026-01-31T12:00:00.000Z",
"origin": "string",
"token": "string",
"tokenType": "string"
}
}