POST /scorm/packages/process

POST /scorm/packages/process

Supabase Storage bucket name (fallback) Request validation schema 5 minutes for processing Verify authentication with Clerk Use service role client to bypass RLS for profile lookup Get user profile for tenant_id Check if user has permission to upload SCORM packages Check for explicit permissions Parse and validate request body Verify tenant_id matches user's tenant Download the uploaded file from storage (R2 or Supabase) Try R2 first if configured Convert Buffer to ArrayBuffer Fall back to Supabase Storage if R2 download fails Use Supabase Storage Validate file type Cleanup: delete uploaded file Parse SCORM manifest Cleanup: delete uploaded file on parse failure Extract SCORM package to storage , '').replace(/.zip$/, ''); Cleanup: delete uploaded ZIP file Get public URL for the extracted package Use content proxy URL ${process.env.VERCEL_URL}` : 'https://scorm-api.allurelms.com'); Get public URL for the uploaded ZIP (manifest) Use content proxy for R2 files Insert package record into database Cleanup: delete uploaded ZIP and extracted files

Endpoint

POST /scorm/packages/process

Authentication

This endpoint requires authentication. Include your authentication token in the request headers.

Error Responses

Status CodeError CodeDescription
401HTTP_401Unauthorized
404HTTP_404Not Found
403HTTP_403Forbidden
400HTTP_400Bad Request
403HTTP_403Forbidden
404HTTP_404Not Found
404HTTP_404Not Found
400HTTP_400Bad Request
400HTTP_400Bad Request
500HTTP_500Internal Server Error
500HTTP_500Internal Server Error
500HTTP_500Internal Server Error

Example Request

curl -X POST "https://api.allurelms.com/scorm/packages/process" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'