Developers · Updated November 13, 2026

Cubite API reference: REST endpoints, scopes, webhooks

Cubite LMS ships a headless REST API, HMAC-signed webhooks and a hosted MCP server in its Growth plan at $290 a month or $2,900 a year; the plan highlight reads "Headless API, webhooks and MCP server". This page is the endpoint index: every public route under /api/v1 with the scope it needs, generated from the same registry the admin API keys card shows, plus the authentication, error, rate-limit and webhook conventions as the code implements them.

Request and response schemas and an OpenAPI document are later steps, not on this page yet. The worked example is the SureCart integration post linked below.

Authentication

Create a key in Admin, under your site's Integrations tab, with the scopes it needs. The secret is shown once. Send it in the X-Cubite-Key header on every request to https://cubite.io/api/v1/...; the key, not the host, selects the site it acts on.

A key can carry a source IP allowlist (single IPs or CIDR ranges); a request from elsewhere gets 403. A credential approved for several sites picks the site per request with the X-Cubite-Site header; a site outside the grant is refused. The header's value is the site's id.

Authorization: Bearer tokens are accepted only by the MCP endpoint, which uses OAuth 2.1 with dynamic client registration; the REST routes take the key header only. Keys and tokens are stored as hashes.

Enroll a learner (the worked example)
curl -X POST https://cubite.io/api/v1/enrollments \
  -H "X-Cubite-Key: ck_..." \
  -H "Content-Type: application/json" \
  -d '{"email":"learner@example.com","courseId":"...","redirectTo":"/course/foo/courseware","sendInvite":true}'

The SureCart post walks through this call end to end: SureCart to Cubite enrollment with Ottokit.

Limits and conventions

  • Rate limits per key and minute: 120 writes (POST, PUT, PATCH, DELETE) and 600 reads; a 429 carries Retry-After, X-RateLimit-Limit and X-RateLimit-Remaining.
  • Bodies and responses are JSON. A failed request returns a JSON object with an error string; the common statuses are below. Others appear where they fit: 409 when a slug or name is already taken or a course still has enrolled learners, 413 when an upload exceeds its cap, 415 for a file type the media route refuses, 422 when a certificate cannot be issued or every learner in a bulk enrollment fails, and 502 when a provider upload fails. On the grading routes, 409 with code certificate_at_stake means the grade or assessment would take away the pass a learner's course or learning-path certificate rests on: the body lists those certificates, and repeating the call with revokeCertificate: true revokes them and reopens the course (certificate.revoked fires for each). Code submission_changed means the submission changed meanwhile; read it again before retrying.
  • List endpoints such as GET /api/v1/pages take limit and offset query parameters and return total, limit and offset beside the items.
  • A :write scope also satisfies the matching :read route, with one exception: forms:write reads form templates but not form responses, which need forms:read. The deprecated POST /api/v1/magic-link is not listed; use POST /api/v1/users/invite.
  • Write calls (POST, PUT, PATCH, DELETE) are recorded in an audit trail with the key, site, method, path and source IP; reads are not logged. Admin shows each key's last-used time beside the key.

Errors

StatusWhenBody
400The body is malformed or a required field is missing.{ "error": "<what is missing or invalid>" }
401No key, or a key that is unknown, revoked or expired.{ "error": "Missing X-Cubite-Key header" }, "Invalid API key", "API key revoked" or "API key expired"
403The key lacks the route's scope, its IP allowlist excludes the caller, the X-Cubite-Site header names a site outside the grant, or the credential is a list-only MCP catalog key. A grade or assessment that would revoke a certificate also needs certificates:write (code certificate_revoke_forbidden).{ "error": "Key missing required scope: courses:write" }
404The object is not on the key's site.{ "error": "<object> not found" }
429The key passed 120 writes or 600 reads in a minute.{ "error": "Rate limit exceeded for this API key. Retry later." } with Retry-After, X-RateLimit-Limit and X-RateLimit-Remaining headers

Scopes (37)

A key carries only the scopes you give it. Scopes marked sensitive reach learner personal data, payment data or visitor search terms, create accounts, accept executable content or rewrite the emails learners receive; the consent screen shows them with emphasis when an assistant connection is approved.

ScopeGrantsSensitive
pages:readView pages and blog posts
pages:writeCreate and edit pages and blog posts
enrollments:readView enrollmentsYes
enrollments:writeEnroll and unenroll learnersYes
users:readView usersYes
users:writeCreate, invite and manage usersYes
courses:readView courses and their content
courses:writeCreate and edit courses and their content
site:readView site settings
site:writeEdit site settings, theme and homepage
question-banks:readView question banks
question-banks:writeManage question banks and questions
media:writeUpload media (images and files)
media:readView the site's video library
members:readView site membersYes
members:writeManage site members and rolesYes
groups:readView groups and cohortsYes
groups:writeManage groups and cohortsYes
learning-paths:readView learning pathsYes
learning-paths:writeManage learning pathsYes
packages:readView uploaded xAPI/SCORM packages
packages:writeUpload xAPI/SCORM packages (executable content)Yes
reports:readView aggregate analytics and reports
search-console:readView Google Search Console performance and SEO opportunitiesYes
certificates:readView issued certificatesYes
certificates:writeIssue, revoke and re-render certificatesYes
discussions:readView course discussions and the moderation queueYes
discussions:writePost, moderate and manage course discussionsYes
grading:readView assignment, open-response and quiz submissions to gradeYes
grading:writeGrade submissions and override scores and completionsYes
forms:readView form responses and form templatesYes
forms:writeCreate and delete reusable form templates
announcements:readView site announcements
announcements:writeCreate, edit and publish site announcements
payments:readView sales revenue and payment reconciliationYes
email-templates:writeEdit the site's transactional email copyYes
webhooks:readView webhook subscriptions and their delivery logYes

Endpoints (126 rows, 25 resources)

Method, path and the scope a key needs. Segments written :id, :qid, :courseId or :packageId are path parameters. The same table is shown in Admin beside your keys; both read one registry, checked against the route files by a script (npm run check:api-registry) that fails when a route has no row.

Pages and blog posts

/api/v1/pages
  • GET/api/v1/pages
    pages:read
  • POST/api/v1/pages
    pages:write
  • GET/api/v1/pages/:id
    pages:read
  • PATCH · DELETE/api/v1/pages/:id
    pages:write

IndexNow

/api/v1/indexnow
  • POST/api/v1/indexnow
    pages:write

Courses and content

/api/v1/courses
  • GET/api/v1/courses
    courses:read
  • POST/api/v1/courses
    courses:write
  • GET/api/v1/courses/:id
    courses:read
  • PATCH · DELETE/api/v1/courses/:id
    courses:write
  • GET/api/v1/courses/:id/content
    courses:read
  • PUT/api/v1/courses/:id/content
    courses:write
  • GET/api/v1/courses/:id/quizzes/:blockId
    courses:read
  • PATCH/api/v1/courses/:id/quizzes/:blockId
    courses:write
  • GET/api/v1/courses/:id/versions
    courses:read
  • POST/api/v1/courses/:id/duplicate
    courses:write

Site settings and homepage

/api/v1/site
  • GET/api/v1/site
    site:read
  • PATCH/api/v1/site
    site:write
  • GET/api/v1/site/homepage
    site:read
  • PUT/api/v1/site/homepage
    site:write
  • POST/api/v1/site/nav-links
    site:write

Question banks

/api/v1/question-banks
  • GET/api/v1/question-banks
    question-banks:read
  • POST/api/v1/question-banks
    question-banks:write
  • PATCH · DELETE/api/v1/question-banks/:id
    question-banks:write
  • GET/api/v1/question-banks/:id/questions
    question-banks:read
  • POST/api/v1/question-banks/:id/questions
    question-banks:write
  • PATCH · DELETE/api/v1/question-banks/:id/questions/:qid
    question-banks:write
  • GET · POST/api/v1/question-banks/tags
    question-banks:read/write
  • DELETE/api/v1/question-banks/tags/:id
    question-banks:write

Media

/api/v1/media
  • POST/api/v1/media
    media:write

Video library

/api/v1/videos
  • GET/api/v1/videos
    media:read

SCORM and xAPI packages

/api/v1/packages
  • GET/api/v1/packages/:packageId
    packages:read
  • PATCH/api/v1/packages/:packageId
    packages:write
  • GET/api/v1/packages
    packages:read
  • POST/api/v1/packages
    packages:write

Users

/api/v1/users
  • GET/api/v1/users
    users:read
  • POST/api/v1/users
    users:write
  • GET/api/v1/users/:id
    users:read
  • PUT/api/v1/users/:id
    users:write
  • POST/api/v1/users/invite
    users:write

Enrollments

/api/v1/enrollments
  • GET/api/v1/enrollments
    enrollments:read
  • POST · PUT · DELETE/api/v1/enrollments
    enrollments:write

Course applications

/api/v1/applications
  • GET/api/v1/applications
    enrollments:read
  • PATCH/api/v1/applications/:id
    enrollments:write

Learner transcript

/api/v1/transcript
  • GET/api/v1/transcript
    members:read

Site members and roles

/api/v1/members
  • GET/api/v1/members
    members:read
  • POST · DELETE/api/v1/members
    members:write

Groups and cohorts

/api/v1/groups
  • GET/api/v1/groups
    groups:read
  • POST/api/v1/groups
    groups:write
  • PATCH · DELETE/api/v1/groups/:id
    groups:write
  • GET/api/v1/groups/:id/members
    groups:read
  • POST · DELETE/api/v1/groups/:id/members
    groups:write
  • GET/api/v1/groups/:id/leaders
    groups:read
  • POST · DELETE/api/v1/groups/:id/leaders
    groups:write

Learning paths

/api/v1/learning-paths
  • GET/api/v1/learning-paths
    learning-paths:read
  • POST/api/v1/learning-paths
    learning-paths:write
  • GET/api/v1/learning-paths/:id
    learning-paths:read
  • PATCH · DELETE/api/v1/learning-paths/:id
    learning-paths:write
  • POST/api/v1/learning-paths/:id/enroll
    learning-paths:write
  • GET/api/v1/learning-paths/:id/learners
    learning-paths:read
  • PUT/api/v1/learning-paths/:id/steps
    learning-paths:write
  • GET/api/v1/learning-paths/:id/prerequisites
    learning-paths:read
  • PUT/api/v1/learning-paths/:id/prerequisites
    learning-paths:write

Reports

/api/v1/reports
  • GET/api/v1/reports/overview
    reports:read
  • GET/api/v1/reports/courses
    reports:read
  • GET/api/v1/reports/learners
    members:read
  • GET/api/v1/reports/completion-funnel
    reports:read
  • GET/api/v1/reports/item-analysis
    reports:read
  • GET/api/v1/reports/score-distribution
    reports:read
  • GET/api/v1/reports/cohort-comparison
    reports:read
  • GET/api/v1/reports/credits
    reports:read
  • GET/api/v1/reports/page-views
    reports:read
  • GET/api/v1/reports/at-risk
    members:read
  • GET/api/v1/reports/access-expiry
    members:read
  • GET/api/v1/reports/grading-sla
    members:read
  • GET/api/v1/reports/ecommerce
    payments:read
  • GET/api/v1/reports/paid-not-enrolled
    payments:read

Google Search Console

/api/v1/search-console
  • GET/api/v1/search-console/overview
    search-console:read
  • GET/api/v1/search-console/queries
    search-console:read
  • GET/api/v1/search-console/pages
    search-console:read
  • GET/api/v1/search-console/opportunities
    search-console:read
  • GET/api/v1/search-console/status
    search-console:read

Certificates

/api/v1/certificates
  • GET/api/v1/certificates
    certificates:read
  • POST/api/v1/certificates
    certificates:write
  • GET/api/v1/certificates/:id
    certificates:read
  • DELETE/api/v1/certificates/:id
    certificates:write
  • POST/api/v1/certificates/rerender
    certificates:write
  • POST/api/v1/certificates/renewals
    certificates:write
  • GET/api/v1/certificates/config
    certificates:read

Discussions

/api/v1/discussions
  • GET/api/v1/discussions
    discussions:read
  • POST/api/v1/discussions
    discussions:write
  • GET/api/v1/discussions/threads/:id
    discussions:read
  • PATCH · DELETE/api/v1/discussions/threads/:id
    discussions:write
  • POST · PATCH · DELETE/api/v1/discussions/threads/:id/replies
    discussions:write
  • GET/api/v1/discussions/moderation
    discussions:read
  • PATCH/api/v1/discussions/moderation
    discussions:write
  • GET/api/v1/discussions/topics
    discussions:read
  • POST · PATCH · DELETE/api/v1/discussions/topics
    discussions:write
  • GET/api/v1/discussions/prompts
    discussions:read
  • POST · DELETE/api/v1/discussions/prompts
    discussions:write
  • GET/api/v1/discussions/moderators
    discussions:read
  • POST · DELETE/api/v1/discussions/moderators
    discussions:write

Grading

/api/v1/grading
  • GET/api/v1/grading/assignments
    grading:read
  • GET/api/v1/grading/assignments/:id
    grading:read
  • POST/api/v1/grading/assignments/:id/grade
    grading:write
  • GET/api/v1/grading/open-responses
    grading:read
  • GET/api/v1/grading/open-responses/:id
    grading:read
  • POST/api/v1/grading/open-responses/:id/assess
    grading:write
  • GET/api/v1/grading/quiz-attempts
    grading:read
  • GET/api/v1/grading/quiz-attempts/:id/review
    grading:read
  • POST/api/v1/grading/quiz-attempts/:id/override
    grading:write
  • GET/api/v1/grading/courses/:courseId/learners
    grading:read
  • POST/api/v1/grading/courses/:courseId/completion-override
    grading:write

Forms

/api/v1/forms
  • GET/api/v1/forms/responses
    forms:read
  • GET/api/v1/forms/templates
    forms:read
  • POST/api/v1/forms/templates
    forms:write
  • GET/api/v1/forms/templates/:id
    forms:read
  • DELETE/api/v1/forms/templates/:id
    forms:write

Announcements

/api/v1/announcements
  • GET/api/v1/announcements
    announcements:read
  • POST/api/v1/announcements
    announcements:write
  • GET/api/v1/announcements/:id
    announcements:read
  • PATCH · DELETE/api/v1/announcements/:id
    announcements:write

Email templates

/api/v1/email-templates
  • GET/api/v1/email-templates
    site:read
  • PATCH/api/v1/email-templates
    email-templates:write

Webhooks

/api/v1/webhooks
  • GET/api/v1/webhooks
    webhooks:read
  • GET/api/v1/webhooks/:id/deliveries
    webhooks:read

Webhooks

Subscriptions are created in Admin, under the same Integrations tab, with a URL, the event types to receive (or * for all) and a signing secret that Cubite generates and shows once. Each delivery is an HTTP POST with a JSON body and three headers:

  • X-Cubite-Event: the event type
  • X-Cubite-Signature: sha256=<hex HMAC-SHA256 of the raw body, keyed with the secret>
  • X-Cubite-Delivery-Id: the delivery's id

Verify by recomputing the HMAC over the raw request body with your secret and comparing it to the header in constant time; reject anything else. Deliveries and their status are readable through GET /api/v1/webhooks and GET /api/v1/webhooks/:id/deliveries (scope webhooks:read).

Event types (20)

  • enrollment.created
  • course.completed
  • certificate.issued
  • certificate.revoked
  • certificate.expiring
  • certificate.expired
  • quiz.passed
  • quiz.failed
  • form.submitted
  • assignment.submitted
  • assignment.passed
  • assignment.failed
  • assignment.returned
  • open_response.submitted
  • open_response.self_assessed
  • open_response.peer_assessed
  • open_response.staff_assessed
  • open_response.passed
  • open_response.failed
  • open_response.retried

Payloads

Every body has the same envelope: id, unique to each delivery (two endpoints get different ids for one event), type, occurredAt (when Cubite sent the event, ISO 8601 in UTC), siteId and data. Ids are Cubite's own, as the API returns them.

The 8 events below carry learner (id, email and name) and groups: the groups the learner is an active member of on the site that sent the event, each with id, name and externalRef (the external reference set on the group, or null). A group the learner was removed from, and groups on any other site, never appear. Both are read when the event is sent. If that read fails the event still goes out, without groups, and without learner on course.completed and the quiz events (the expiry events then carry learner.id only).

verifyUrl is absolute, on the site's own domain: its custom domain when one is set, otherwise its Cubite address.

A course.completed body
{
  "id": "evt_5f1c0c8e2a9b4d7e6f3a1b2c",
  "type": "course.completed",
  "occurredAt": "2026-11-12T15:04:05.120Z",
  "siteId": "cmw1site000000000000001",
  "data": {
    "courseId": "cmw1course0000000000001",
    "userId": "cmw1learner0000000000001",
    "source": "quiz",
    "triggerAttemptId": "cmw1attempt000000000001",
    "completedAt": "2026-11-12T15:04:05.000Z",
    "progressPercentage": 100,
    "learner": {
      "id": "cmw1learner0000000000001",
      "email": "jordan.lee@example.com",
      "name": "Jordan Lee"
    },
    "groups": [
      {
        "id": "cmw1group00000000000001",
        "name": "Night shift drivers",
        "externalRef": "CRM-4412"
      }
    ]
  }
}
enrollment.createdA learner is enrolled in a course on the site.
Fields in data
  • courseIdThe course.
  • userIdThe learner's id, the same as learner.id.
  • learner{ id, email, name } of the learner.
  • statusThe enrollment's stored status; completed means the enrollment went through, not that the course is finished.
  • isWaitListedtrue when the learner is on the course's waitlist.
  • enrolledAtWhen the enrollment was created.
  • expiresAtWhen the learner's access to the course ends, or null.
  • groups[{ id, name, externalRef }]: the learner's active groups on this site, [] when none.
Example data
{
  "courseId": "cmw1course0000000000001",
  "userId": "cmw1learner0000000000001",
  "learner": {
    "id": "cmw1learner0000000000001",
    "email": "jordan.lee@example.com",
    "name": "Jordan Lee"
  },
  "status": "completed",
  "isWaitListed": false,
  "enrolledAt": "2026-11-02T14:20:00.000Z",
  "expiresAt": null,
  "groups": [
    {
      "id": "cmw1group00000000000001",
      "name": "Night shift drivers",
      "externalRef": "CRM-4412"
    }
  ]
}
course.completedA learner completes a course, once: when its completion rule is first met, or when staff record the completion.
Fields in data
  • courseIdThe course.
  • userIdThe learner's id, the same as learner.id.
  • sourceWhat completed it, for example quiz, xapi, scorm, video, reading, form, assignment, open_response, manual (a staff override) or manual_issue (a certificate staff issued).
  • triggerAttemptIdOnly when source is quiz: the attempt that completed the course.
  • triggerSubmissionIdOnly when source is assignment or open_response: the graded submission.
  • completedAtWhen the course was completed.
  • progressPercentageThe learner's progress at completion; below 100 when the course's completion rule asks for less.
  • learner{ id, email, name } of the learner.
  • groups[{ id, name, externalRef }]: the learner's active groups on this site, [] when none.
Example data
{
  "courseId": "cmw1course0000000000001",
  "userId": "cmw1learner0000000000001",
  "source": "quiz",
  "triggerAttemptId": "cmw1attempt000000000001",
  "completedAt": "2026-11-12T15:04:05.000Z",
  "progressPercentage": 100,
  "learner": {
    "id": "cmw1learner0000000000001",
    "email": "jordan.lee@example.com",
    "name": "Jordan Lee"
  },
  "groups": [
    {
      "id": "cmw1group00000000000001",
      "name": "Night shift drivers",
      "externalRef": "CRM-4412"
    }
  ]
}
quiz.passedA learner submits a graded quiz attempt that reaches the pass mark.
Fields in data
  • attemptIdThe attempt.
  • attemptNumber1 for the learner's first attempt at this quiz, then 2, 3 and so on.
  • quizBlockIdThe quiz block in the course content.
  • courseIdThe course the quiz is in, or null when the quiz block no longer exists.
  • userIdThe learner's id, the same as learner.id.
  • timedOuttrue when the attempt was submitted after its time limit.
  • scoreThe percentage scored, 0 to 100 (may have decimals).
  • passedtrue when score reached passMarkPercent.
  • passMarkPercentThe quiz's pass mark, in percent.
  • totalQuestionsQuestions asked in this attempt.
  • correctCountQuestions answered correctly.
  • submittedAtWhen the attempt was submitted.
  • learner{ id, email, name } of the learner.
  • groups[{ id, name, externalRef }]: the learner's active groups on this site, [] when none.
Example data
{
  "attemptId": "cmw1attempt000000000001",
  "attemptNumber": 2,
  "quizBlockId": "Xk3pQ9aZ1b",
  "courseId": "cmw1course0000000000001",
  "userId": "cmw1learner0000000000001",
  "timedOut": false,
  "score": 85,
  "passed": true,
  "passMarkPercent": 80,
  "totalQuestions": 20,
  "correctCount": 17,
  "submittedAt": "2026-11-12T15:04:05.000Z",
  "learner": {
    "id": "cmw1learner0000000000001",
    "email": "jordan.lee@example.com",
    "name": "Jordan Lee"
  },
  "groups": [
    {
      "id": "cmw1group00000000000001",
      "name": "Night shift drivers",
      "externalRef": "CRM-4412"
    }
  ]
}
quiz.failedA learner submits a graded quiz attempt below the pass mark.
Fields in data
  • attemptIdThe attempt.
  • attemptNumber1 for the learner's first attempt at this quiz, then 2, 3 and so on.
  • quizBlockIdThe quiz block in the course content.
  • courseIdThe course the quiz is in, or null when the quiz block no longer exists.
  • userIdThe learner's id, the same as learner.id.
  • timedOuttrue when the attempt was submitted after its time limit.
  • scoreThe percentage scored, 0 to 100 (may have decimals).
  • passedtrue when score reached passMarkPercent.
  • passMarkPercentThe quiz's pass mark, in percent.
  • totalQuestionsQuestions asked in this attempt.
  • correctCountQuestions answered correctly.
  • submittedAtWhen the attempt was submitted.
  • learner{ id, email, name } of the learner.
  • groups[{ id, name, externalRef }]: the learner's active groups on this site, [] when none.
Example data
{
  "attemptId": "cmw1attempt000000000000",
  "attemptNumber": 1,
  "quizBlockId": "Xk3pQ9aZ1b",
  "courseId": "cmw1course0000000000001",
  "userId": "cmw1learner0000000000001",
  "timedOut": false,
  "score": 55,
  "passed": false,
  "passMarkPercent": 80,
  "totalQuestions": 20,
  "correctCount": 11,
  "submittedAt": "2026-11-12T14:31:40.000Z",
  "learner": {
    "id": "cmw1learner0000000000001",
    "email": "jordan.lee@example.com",
    "name": "Jordan Lee"
  },
  "groups": [
    {
      "id": "cmw1group00000000000001",
      "name": "Night shift drivers",
      "externalRef": "CRM-4412"
    }
  ]
}
certificate.issuedA certificate is issued for a course or a learning path, including the new certificate of a renewal.
Fields in data
  • certificateIdThe certificate.
  • statementCodeThe certificate's own code, unique on Cubite.
  • sharedStatementCodeOnly on a certificate that prints another certificate's code: the code it prints.
  • renewsOnly on a renewal: { certificateId, statementCode } of the certificate it replaces.
  • courseId, courseTitleOn a course certificate. A learning path certificate has learningPathId and pathTitle instead, and no grade.
  • learner{ id, email, name } of the learner.
  • ceusEarnedThe CEU text set on the certificate, or null.
  • creditsEarnedValueThe credits earned, or null.
  • gradeThe learner's best exam score in the course, or null.
  • completedAtWhen the learner completed.
  • expiresAtWhen the certificate expires, or null when it does not.
  • verifyUrlThe certificate's public verification page.
  • groups[{ id, name, externalRef }]: the learner's active groups on this site, [] when none.
Example data
{
  "certificateId": "cmw1cert000000000000001",
  "statementCode": "HAZ-1042",
  "courseId": "cmw1course0000000000001",
  "courseTitle": "Hazmat Awareness",
  "learner": {
    "id": "cmw1learner0000000000001",
    "email": "jordan.lee@example.com",
    "name": "Jordan Lee"
  },
  "ceusEarned": "1.5",
  "creditsEarnedValue": 2,
  "grade": 85,
  "completedAt": "2026-11-12T15:04:05.000Z",
  "expiresAt": "2027-11-12T15:04:05.000Z",
  "verifyUrl": "https://academy.example.com/verify/HAZ-1042",
  "groups": [
    {
      "id": "cmw1group00000000000001",
      "name": "Night shift drivers",
      "externalRef": "CRM-4412"
    }
  ]
}
certificate.revokedStaff revoke a certificate (in Admin or with DELETE /api/v1/certificates/:id), or a grade change takes away the pass it rested on. A certificate that printed the revoked one's code is revoked with it and sends its own event.
Fields in data
  • certificateIdThe certificate, which no longer exists.
  • statementCodeIts code, which stops verifying and is never reused.
  • courseIdThe course, or null on a learning path certificate.
  • learningPathIdThe learning path, or null on a course certificate.
  • learner{ id, email, name } of the learner.
  • reasonmanual (staff revoked it) or grade_changed.
  • revokedAtWhen it was revoked.
  • groups[{ id, name, externalRef }]: the learner's active groups on this site, [] when none.
Example data
{
  "certificateId": "cmw1cert000000000000001",
  "statementCode": "HAZ-1042",
  "courseId": "cmw1course0000000000001",
  "learningPathId": null,
  "learner": {
    "id": "cmw1learner0000000000001",
    "email": "jordan.lee@example.com",
    "name": "Jordan Lee"
  },
  "reason": "manual",
  "revokedAt": "2026-11-20T09:00:00.000Z",
  "groups": [
    {
      "id": "cmw1group00000000000001",
      "name": "Night shift drivers",
      "externalRef": "CRM-4412"
    }
  ]
}
certificate.expiringOnce per certificate in each of the site's renewal reminder windows: 60, 30 and 7 days before it expires, unless the site changed the days of its Certificate renewal reminder email. Sent by the daily certificate job whether or not that email is on, for the window the certificate is in on the day; a window that has already passed is not sent late. Not sent for a certificate a renewal replaced, or for a closed account.
Fields in data
  • certificateIdThe certificate.
  • statementCodeThe certificate's own code, unique on Cubite.
  • sharedStatementCodeOnly on a certificate that prints another certificate's code: the code it prints.
  • courseIdThe course, or null on a learning path certificate.
  • learningPathIdThe learning path, or null on a course certificate.
  • courseNameThe course's name, or the learning path's on a path certificate.
  • expiresAtWhen the certificate expires.
  • daysLeftWhole days until expiresAt, rounded up.
  • verifyUrlThe certificate's public verification page.
  • learner{ id, email, name } of the learner.
  • groups[{ id, name, externalRef }]: the learner's active groups on this site, [] when none.
Example data
{
  "certificateId": "cmw1cert000000000000001",
  "statementCode": "HAZ-1042",
  "courseId": "cmw1course0000000000001",
  "learningPathId": null,
  "courseName": "Hazmat Awareness",
  "expiresAt": "2027-11-12T15:04:05.000Z",
  "daysLeft": 30,
  "verifyUrl": "https://academy.example.com/verify/HAZ-1042",
  "learner": {
    "id": "cmw1learner0000000000001",
    "email": "jordan.lee@example.com",
    "name": "Jordan Lee"
  },
  "groups": [
    {
      "id": "cmw1group00000000000001",
      "name": "Night shift drivers",
      "externalRef": "CRM-4412"
    }
  ]
}
certificate.expiredOnce, from the daily certificate job after the certificate's expiry date, whether or not the Certificate expired email is on. Not sent for a certificate that expired more than 30 days before the job ran, a certificate a renewal replaced, or a closed account.
Fields in data
  • certificateIdThe certificate.
  • statementCodeThe certificate's own code, unique on Cubite.
  • sharedStatementCodeOnly on a certificate that prints another certificate's code: the code it prints.
  • courseIdThe course, or null on a learning path certificate.
  • learningPathIdThe learning path, or null on a course certificate.
  • courseNameThe course's name, or the learning path's on a path certificate.
  • expiresAtWhen the certificate expires.
  • verifyUrlThe certificate's public verification page.
  • learner{ id, email, name } of the learner.
  • groups[{ id, name, externalRef }]: the learner's active groups on this site, [] when none.
Example data
{
  "certificateId": "cmw1cert000000000000001",
  "statementCode": "HAZ-1042",
  "courseId": "cmw1course0000000000001",
  "learningPathId": null,
  "courseName": "Hazmat Awareness",
  "expiresAt": "2027-11-12T15:04:05.000Z",
  "verifyUrl": "https://academy.example.com/verify/HAZ-1042",
  "learner": {
    "id": "cmw1learner0000000000001",
    "email": "jordan.lee@example.com",
    "name": "Jordan Lee"
  },
  "groups": [
    {
      "id": "cmw1group00000000000001",
      "name": "Night shift drivers",
      "externalRef": "CRM-4412"
    }
  ]
}

Signed-token sign-in

Your own system can sign a learner in without SAML. It signs a short-lived JSON Web Token with a secret Cubite creates for your site and sends the learner's browser to the site's sign-in address. Cubite checks the token, creates the learner or updates their name, adds them to groups by external reference and signs them in. Turn it on in Admin, under your site's Integrations tab (Signed-token sign-in); the secret is shown once. It is a browser sign-in, not a REST endpoint: no API key is involved.

The request

GET https://<your site>/api/auth/token-signin
    ?token=<jwt>&redirect=<path>

Any address of the site works: its cubite.io address or its live custom domain. redirect is optional and must be a path on the site, such as /courses; a full URL, a //host or a backslash lands on /, and without it the learner lands on their dashboard.

The header is {"alg":"HS256","typ":"JWT"}. HS256 is the only algorithm; typ is optional, kid is optional and ignored, and any other algorithm (none, RS256, ES256 and the rest) or header member is refused. The key is the secret exactly as Admin shows it, as text: do not decode it. Sign on your server, never in the browser.

Claims
  • aud requiredYour site's address, such as https://academy.example.com (its custom domain while that is live, otherwise its cubite.io address), or the site's id. Admin shows both. A single string.
  • iat requiredIssued at, in seconds since the epoch. Refused when more than 30 seconds in the future.
  • exp requiredExpiry in seconds since the epoch: after iat and at most 300 seconds after it. Accepted until 30 seconds past it.
  • jti requiredA unique id for this token, up to 128 characters. Each jti signs in once per site; a second use is refused.
  • email requiredThe learner's email address, compared without regard to case.
  • name optionalThe learner's name, up to 80 characters. Names a new account and updates an existing one.
  • groups optionalUp to 20 group external references. The learner joins each group on the site with that external reference, the way an admin adding them would: seat limits apply, leader roster rules do not. An unknown reference is skipped. A token never removes anyone from a group.
  • nbf optionalNot before, in seconds since the epoch, with the same 30 second allowance.
Node (crypto)
// Node 16 or later, no library needed.
const crypto = require("crypto");

const SECRET = process.env.CUBITE_SIGNIN_SECRET; // exactly as shown in Admin
const SITE_URL = "https://academy.example.com";  // your site's address
const AUDIENCE = SITE_URL;                        // or your site's id

const part = (obj) => Buffer.from(JSON.stringify(obj)).toString("base64url");

function signInUrl({ email, name, groups }, redirect = "/dashboard") {
  const now = Math.floor(Date.now() / 1000);
  const header = part({ alg: "HS256", typ: "JWT" });
  const payload = part({
    aud: AUDIENCE,
    iat: now,
    exp: now + 120,
    jti: crypto.randomUUID(),
    email,
    name,   // optional
    groups, // optional: group external references
  });
  const signature = crypto
    .createHmac("sha256", SECRET)
    .update(`${header}.${payload}`)
    .digest("base64url");
  const url = new URL("/api/auth/token-signin", SITE_URL);
  url.searchParams.set("token", `${header}.${payload}.${signature}`);
  url.searchParams.set("redirect", redirect);
  return url.toString();
}

// Answer the learner's request with a redirect, for example in Express:
// res.redirect(302, signInUrl({ email: "learner@example.com", name: "Ana Diaz" }));
Python (PyJWT)
# pip install PyJWT
import os, time, uuid
from urllib.parse import urlencode

import jwt

SECRET = os.environ["CUBITE_SIGNIN_SECRET"]  # exactly as shown in Admin
SITE_URL = "https://academy.example.com"     # your site's address
AUDIENCE = SITE_URL                          # or your site's id

def sign_in_url(email, name=None, groups=None, redirect="/dashboard"):
    now = int(time.time())
    claims = {
        "aud": AUDIENCE,
        "iat": now,
        "exp": now + 120,
        "jti": str(uuid.uuid4()),
        "email": email,
    }
    if name:
        claims["name"] = name
    if groups:
        claims["groups"] = groups  # group external references
    token = jwt.encode(claims, SECRET, algorithm="HS256")
    query = urlencode({"token": token, "redirect": redirect})
    return f"{SITE_URL}/api/auth/token-signin?{query}"

# Then send the learner's browser to sign_in_url(...) with an HTTP 302.

Who it can sign in

  • An email with no Cubite account: the account is created as a learner of the site.
  • An existing account that belongs to this site and to nothing else on Cubite, including one with a password or one made by Google, GitHub or Facebook sign-in.

Refused:

  • Global admins, admins and managers of any site, closed accounts, audit portal users and accounts that run a Cubite dashboard of their own.
  • Anyone with a role, enrollment, records, group membership, group leadership or staff rights on another Cubite site, or who uses another Cubite product.
  • An existing account that is not a member of this site yet: add it first, in Admin or with POST /api/v1/users.

Errors, rotation and limits

  • A good token answers 303 to /auth/magic-link, which finishes the sign-in in the browser and lands on redirect. Every refusal goes to the site's /auth/token-signin page with one message, whatever the cause, so the answer never tells whether an account exists. Causes to check: the flow is off or the token is signed with an old or decoded secret; the header is not HS256; aud is neither the site's address nor its id; the clock (keep your server on NTP); a jti used before; a missing or malformed email; an account the site may not sign in. Cubite support can read the cause of an attempt from the server log.
  • Rotate the secret in Admin: the new one is shown once and works at once, and the one it replaces keeps working for 24 hours or until you stop accepting it. Only that one previous secret is kept. Turning the flow off refuses every token and deletes the secrets; turning it on again creates a new one.
  • The session a token starts lasts at most 12 hours, however much it is used; after that, send the learner through your system again. It ends sooner, within a minute, when you turn the flow off, when the secret that signed the token stops working (you stop accepting it, or 24 hours after a rotation), when the learner leaves the site, when the account is made a manager or an admin of the site, or when it gains access anywhere else on Cubite. The learner cannot change their email in it.
  • At most 120 attempts a minute from one address and 600 sign-ins a minute per site.
  • The token travels in a URL, so it can reach browser history and server logs. That is why it lives 5 minutes at most and works once.

Frequently asked questions

Does Cubite LMS have a public API?
Yes. Cubite LMS exposes a headless REST API under /api/v1 (126 endpoint rows on this page), HMAC-signed webhooks and a hosted MCP server with 142 tools, all included in the Growth plan at $290 a month or $2,900 a year.
How do I authenticate?
Create an API key in Admin, under your site's Integrations tab, with the scopes it needs, and send it in the X-Cubite-Key header on every request. A request without the header gets 401 Missing X-Cubite-Key header. Authorization: Bearer tokens are accepted only by the MCP endpoint, which uses OAuth 2.1.
Which scopes exist?
37 scopes, listed on this page with the permission each grants, such as courses:read, enrollments:write and reports:read. A :write scope also satisfies the matching :read route, with one exception: forms:write reads form templates but not form responses, which need forms:read. Keys carry only the scopes you give them, and a key can be limited to an IP allowlist.
How are webhooks signed?
Each delivery is a POST with a JSON body and three headers: X-Cubite-Event (the event type), X-Cubite-Signature (sha256= followed by the hex HMAC-SHA256 of the raw body, keyed with the subscription's secret) and X-Cubite-Delivery-Id. Verify by recomputing the HMAC over the raw body and comparing it in constant time.
Can my own system sign learners in to Cubite without SAML?
Yes, with signed-token sign-in. Turn it on in Admin, under the site's Integrations tab, and Cubite shows a secret once. Your server signs a short-lived HS256 JSON Web Token with it (aud, iat, exp at most 300 seconds after iat, a single-use jti and the learner's email, optionally a name and group external references) and redirects the learner's browser to /api/auth/token-signin on your site. Cubite creates or updates the learner, adds them to those groups and signs them in. Admins, site managers and accounts with access to another Cubite site are never signed in this way.
Is there an OpenAPI document?
Not yet. This page is the endpoint index with the auth, error, rate-limit and webhook conventions; a request-and-response reference and an OpenAPI document are the next steps.

Building an integration? Tell us what it has to do

A 30-minute call on your data flow, or email amir@cubite.io with the endpoints you need and the system on the other side.

Support

How can we help?

Send us a message and we'll get back to you shortly.

Amir replies to every message within one business day.

Cubite API reference: REST endpoints, scopes, webhooks | Cubite