Upload Sessions
Upload sessions enable batch uploading of multiple tracks to a collection. You can optionally include a nested track object when creating the session to also create that track and receive its upload URL in the response.
The resolved player_color is accompanied by two read-only companions, player_color_light and player_color_dark, adjusted to stay legible on light and dark backgrounds respectively.
/v1/upload_session Creates a new upload session for batch uploading tracks. By default returns an upload_session_id only — create tracks via POST /v1/upload/:upload_session_id/track. Optionally include a nested track object to also create that track and receive the per-track upload URL on this response.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
collection_id | uuid | Required | ID of the collection. Required unless the API key is scoped to a collection. |
creator_id | uuid | Optional | ID of the creator |
organization_index | string | Optional | Organization index (session-level) |
metadata | object | Optional | Additional metadata (session-level) |
expires_in | number | Optional | Session duration in seconds (default: 3600, min: 60, max: 86400) |
track Optional track | object | Optional | When present, also create that track and append its upload fields to the response. Nested fields: file_name, organization_index, metadata. |
track.file_name Optional track | string | Required | Original filename of the track. Required when track is present. |
track.organization_index Optional track | string | Optional | Organization index for the track (separate from the session-level field). |
track.metadata Optional track | object | Optional | Metadata for the track (separate from the session-level field). |
Example Request
curl -X POST "https://api.audiodelivery.net/v1/upload_session" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"collection_id": "COLLECTION_ID",
"expires_in": 7200
}' Example with an optional nested track:
Example Request
curl -X POST "https://api.audiodelivery.net/v1/upload_session" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"collection_id": "COLLECTION_ID",
"track": {
"file_name": "track-1.mp3"
}
}' Optional nested track
Include a nested track object to create that track during session create — the response appends the same upload handles as the per-track endpoint. You can still add more tracks later with POST /v1/upload/:upload_session_id/track. For batch-only flows, omit track and create each track with that endpoint.
Response
{
"ok": true,
"upload_session_id": "uuid",
"upload_session": {
"id": "uuid",
"creator_id": "uuid | null",
"collection_id": "uuid",
"organization_index": "string | null",
"metadata": {},
"expires_at": "string"
},
"player_color": "string | null",
"player_color_light": "string | null",
"player_color_dark": "string | null",
"expires_at": "string"
} Response when you include track
{
"ok": true,
"upload_session_id": "uuid",
"upload_session": {
"id": "uuid",
"creator_id": "uuid | null",
"collection_id": "uuid",
"organization_index": "string | null",
"metadata": {},
"expires_at": "string"
},
"player_color": "string | null",
"player_color_light": "string | null",
"player_color_dark": "string | null",
"expires_at": "string",
"track_id": "uuid",
"track": {
"id": "uuid",
"index": "string",
"path": "string",
"upload_url": "string"
},
"track_upload": {
"method": "PUT",
"upload_url": "string",
"ttl": 0,
"expires_at": "string"
},
"track_cover_upload": {
"method": "POST",
"upload_url": "string",
"ttl": 0,
"expires_at": "string"
}
} /v1/upload_session/:upload_session_id Retrieves details about an upload session. No authentication required — the session ID acts as the credential.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
upload_session_id | uuid | Required | The ID of the upload session (path parameter) |
Example Request
curl -X GET "https://api.audiodelivery.net/v1/upload_session/SESSION_ID" Response
{
"ok": true,
"upload_session_id": "uuid",
"upload_session": {
"id": "uuid",
"creator_id": "uuid | null",
"collection_id": "uuid",
"organization_index": "string | null",
"metadata": {},
"expires_at": "string"
},
"player_color": "string | null",
"player_color_light": "string | null",
"player_color_dark": "string | null",
"expires_at": "string"
} /v1/upload/:upload_session_id/track Creates a new track within an upload session and returns its per-track upload URL. Call this once per file (including any additional files after an optional nested track on session create). No authentication required — the session ID acts as the credential.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
upload_session_id | uuid | Required | The ID of the upload session (path parameter) |
file_name | string | Required | Original filename of the track |
organization_index | string | Optional | Organization index |
metadata | object | Optional | Additional metadata |
Example Request
curl -X POST "https://api.audiodelivery.net/v1/upload/SESSION_ID/track" \
-H "Content-Type: application/json" \
-d '{
"file_name": "track-1.mp3"
}' Response
{
"ok": true,
"api_request_id": "uuid",
"upload_session_id": "uuid",
"track_id": "uuid",
"track": {
"id": "uuid",
"index": "string",
"path": "string",
"upload_url": "string"
},
"upload_session": {
"id": "uuid",
"creator_id": "uuid | null",
"collection_id": "uuid",
"organization_index": "string | null",
"metadata": {},
"expires_at": "string"
},
"track_upload": {
"method": "PUT",
"upload_url": "string",
"ttl": 0,
"expires_at": "string"
},
"track_cover_upload": {
"method": "POST",
"upload_url": "string",
"ttl": 0,
"expires_at": "string"
}
}