Upload Sessions
Upload sessions enable batch uploading of multiple tracks to a collection.
POST
/v1/upload_session Creates a new upload session for batch uploading tracks
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
collection_id | uuid | Optional | 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 |
metadata | object | Optional | Additional metadata |
expires_in | number | Optional | Session duration in seconds (default: 3600, min: 60, max: 86400) |
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}' 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",
"expires_at": "string"
} GET
/v1/upload_session/:upload_session_id Retrieves details about an upload session
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" \
-H "Authorization: Bearer YOUR_API_KEY" 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",
"expires_at": "string"
} POST
/v1/upload/:upload_session_id/track Creates a new track within an upload session and generates upload URLs
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 "Authorization: Bearer YOUR_API_KEY" \
-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"
}
}