Lucebra
Lucebra Business
Lucebra Enterprise B2B API • v1

Lucebra Enterprise Content & Tracking API

Integrate 5,000+ courses, eBooks, documentation kits, and certification exams directly into Workday, Docebo, SAP SuccessFactors, Moodle, or your custom corporate LMS.

Workday Learning
Docebo
SAP SuccessFactors
Cornerstone OnDemand
Moodle
Custom LMS / LRS

How Corporate LMS Integration Works

01
OAuth2 Authentication

Exchange your Client ID & Client Secret at POST /api/v1/b2b/oauth/token for a short-lived 1-hour Bearer token.

02
Catalog Synchronization

Pull Courses, Curriculum, eBooks, Documentation Kits, Audio eBooks, and Certification Exams directly into your LMS.

03
Method A or Method B Playback

Embed Lucebra Launch Player (Method A) or stream via 2-hour HMAC-signed URLs inside your own player (Method B).

04
xAPI Webhooks & Reporting

Receive HMAC-signed xAPI completion webhooks in real time or query /api/v1/b2b/reports/progress anytime.

Method A • Recommended
Redirect / Embed Launch Player

Call POST /api/v1/b2b/launch to generate a 4-hour signed launchUrl or embedUrl (/enterprise-launch). Videos stream securely from Lucebra CDN with DRM protection, curriculum sidebar, and automatic 30-second watch-time heartbeats.

Method B • Headless
Signed Direct Stream + Tracking API

Call POST /api/v1/b2b/stream/sign to receive a 2-hour HMAC-signed stream URL for your own LMS video player, and send playback heartbeats back to POST /api/v1/b2b/tracking/events.

Quickstart Code & API Responses
# 1. Request OAuth2 Bearer Token
curl -X POST https://api.lucebra.com/api/v1/b2b/oauth/token \
  -H "Content-Type: application/json" \
  -d '{"client_id":"<YOUR_CLIENT_ID>","client_secret":"<YOUR_CLIENT_SECRET>"}'

# 2. Sync Published Courses (Workshops excluded)
curl -H "Authorization: Bearer <ACCESS_TOKEN>" \
  "https://api.lucebra.com/api/v1/b2b/catalog/courses?page=1&limit=25"

# 3A. Method A: Create Launch Player URL
curl -X POST https://api.lucebra.com/api/v1/b2b/launch \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"externalUserKey":"[email protected]","contentType":"Course","contentId":"<COURSE_ID>"}'

# 3B. Method B: Create 2-Hour Signed Stream URL
curl -X POST https://api.lucebra.com/api/v1/b2b/stream/sign \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"externalUserKey":"[email protected]","contentType":"Course","contentId":"<COURSE_ID>","lessonId":"<LESSON_ID>"}'
// 200 OK (Method A Launch)
{
  "launchUrl": "https://www.lucebra.com/enterprise-launch?token=<SIGNED_TOKEN>",
  "embedUrl": "https://www.lucebra.com/enterprise-launch?token=<SIGNED_TOKEN>&embed=1",
  "expiresAt": "2026-11-16T22:00:00Z"
}

// 403 Forbidden (Subscription expired or cancelled)
{
  "error": "subscription_inactive",
  "status": "Expired",
  "message": "Your Enterprise API subscription is inactive or expired."
}
B2B API Endpoint Reference
MethodEndpointRequired ScopeDescription
POST
/api/v1/b2b/oauth/tokenpublic (credentials)Exchange Client ID & Secret for a 1-hour Bearer JWT
GET
/api/v1/b2b/catalog/coursescatalog:readList published marketplace courses (Workshops excluded)
GET
/api/v1/b2b/catalog/courses/{id}/curriculumcatalog:readFetch sections, lessons & durations for a course
GET
/api/v1/b2b/catalog/ebookscatalog:readList PDF eBooks, Documentation Kits & Audio eBooks
GET
/api/v1/b2b/catalog/examsexams:readList Certification Exam categories & tracks
POST
/api/v1/b2b/launchcatalog:readMethod A: Generate 4-hour signed Launch / Embed Player URL
POST
/api/v1/b2b/stream/signcatalog:readMethod B: Generate 2-hour HMAC-signed stream URL
POST
/api/v1/b2b/tracking/eventstracking:writeRecord watch/read seconds & trigger xAPI completion webhooks
GET
/api/v1/b2b/reports/progressreports:readPull learner progress & completion metrics
Webhook Signature Verification (X-Lucebra-Signature)
import crypto from 'crypto';

export function verifyLucebraWebhook(rawBody: string, signatureHeader: string, webhookSecret: string): boolean {
  const expected = 'sha256=' + crypto.createHmac('sha256', webhookSecret).update(rawBody).digest('hex');
  return crypto.timingSafeEqual(Buffer.from(signatureHeader), Buffer.from(expected));
}
Status & Error Codes
HTTPError CodeBehavior
200 OK—Request succeeded
401 Unauthorizedinvalid_client / token_expiredInvalid credentials, revoked client, or expired Bearer token
403 Forbiddensubscription_inactiveSubscription expired or cancelled — access halted immediately
403 Forbiddenseat_limit_exceeded30-day rolling active seat limit reached
403 Forbiddeninsufficient_scopeClient key lacks the required API scope
404 Not Foundcourse_not_found / media_not_foundRequested course, lesson, or media item not found
Live Subscription & Webhook Security

Every OAuth token request, catalog sync, launch URL, and signed stream validates your live BusinessPlan status in real time. Cancelled or expired plans immediately receive 403 subscription_inactive until renewed.

Rate Limits, Seats & Exclusions

Enterprise API includes 1,000 requests/min SLA, 30-day rolling active learner seat tracking (externalUserKey), and automatic Sandbox test keys. E-Workshops, LMS UI, and Skill-Matrix remain excluded from standalone API (70%) packages.