API Reference
Downloads and Secure Delivery API
Contract-backed secure delivery documentation for entitlement-gated file streaming and legacy download compatibility routes.
POST /activateGET /validatePOST /deactivate
Product credentials
Activation request
Entitlement check
Device registration
Periodic validation
Deactivation when needed
SoundSync
Verified delivery endpoint
This is the canonical current route for entitlement-gated delivery.
GET
/api/delivery/entitlements/:entitlementId/files/:fileIndex
Streams a file from an active customer entitlement.
- Auth
- Customer library/download token. Accepted transports are Authorization: Bearer <token>, token, download_token, or libraryToken.
- Scope
- Entitlement, customer identity, product, source/sourceId, expansion rule, and file-index scoped.
- Request fields
- entitlementId numeric path parameter
- fileIndex zero-based numeric path parameter
- Bearer library/download token or token/download_token/libraryToken query alias
- Returns
- Binary file stream with Content-Type and Content-Disposition, or JSON error for missing token, invalid entitlement/file index, inactive entitlement, expansion block, missing file, upstream failure, or delivery failure.
- Side effects
- Logs delivery and updates legacy serial download count when the entitlement metadata includes a serialId.
- Notes
- This endpoint streams the file; it does not return a signed URL in the current verified implementation.
SoundSync
Download example
The token is a temporary customer/library token. Do not place product plugin credentials in browser download links.
curl
curl -L "$SOUNDSYNC_API_BASE/api/delivery/entitlements/1042/files/0" \
-H "Authorization: Bearer $CUSTOMER_LIBRARY_TOKEN" \
-o NebulaKeysInstaller.zip
SoundSync
Delivery behavior
Documented exactly from the route/controller.
| Case | Response | Client behavior |
|---|---|---|
| Missing token | 401 JSON { message: Missing token } | Prompt customer to sign in or refresh library token. |
| Invalid entitlement id or file index | 400 JSON error | Treat as integration or stale-link bug. |
| Entitlement not found | 404 JSON error | Refresh customer library and do not retry file URL blindly. |
| Entitlement inactive | 403 JSON error | Block download; explain refund, expiration, or revoked access where known. |
| File index missing | 404 JSON error | Refresh library product file list/version. |
| External upstream unavailable | 502 JSON error | Show temporary delivery failure; retry later. |
| Successful R2/external file | Binary stream with Content-Disposition | Save/download file; do not expose backing object key. |
Signed URL note
The verified canonical entitlement route streams content through SoundSync. It does not currently return a signed URL payload. Any future signed URL docs must include explicit expiry, replay, and cache-header evidence.
