POST /scorm/upload-url

POST /scorm/upload-url

Supabase Storage bucket name Request validation schema 10GB max 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 Generate unique storage path If R2 is configured, generate presigned URL for direct upload 1 hour expiry Fall through to Supabase Storage fallback Fallback to Supabase Storage

Endpoint

POST /scorm/upload-url

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
403HTTP_403Forbidden
500HTTP_500Internal Server Error

Example Request

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