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 Code | Error Code | Description |
|---|---|---|
| 401 | HTTP_401 | Unauthorized |
| 404 | HTTP_404 | Not Found |
| 403 | HTTP_403 | Forbidden |
| 400 | HTTP_400 | Bad Request |
| 403 | HTTP_403 | Forbidden |
| 403 | HTTP_403 | Forbidden |
| 500 | HTTP_500 | Internal 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 '{}'