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 | Required | ID of the collection |
creator_id | uuid | Optional | ID of the creator |
organization_index | string | Optional | Organization index |
metadata | object | Optional | Additional metadata |
Example Request
{
"collection_id": "123e4567-e89b-12d3-a456-426614174000",
"metadata": { "batch_name": "Summer 2024 Collection" }
} Response
{
"ok": true,
"upload_session_id": "uuid",
"upload_session": {
"id": "uuid",
"collection_id": "uuid",
"expires_at": "string"
},
"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) |
Response
{
"ok": true,
"upload_session_id": "uuid",
"upload_session": {
"id": "uuid",
"creator_id": "uuid",
"collection_id": "uuid",
"organization_index": "string",
"metadata": "object",
"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
{
"file_name": "track-1.mp3",
"metadata": { "track_number": 1, "title": "First Track" }
} Response
{
"ok": true,
"api_request_id": "uuid",
"upload_session_id": "uuid",
"track_id": "uuid",
"track": { "id": "uuid", "index": "string", "path": "string" },
"track_upload": {
"method": "PUT",
"upload_url": "url",
"ttl": "number",
"expires_at": "string"
},
"track_cover_upload": {
"method": "POST",
"upload_url": "url",
"ttl": "number",
"expires_at": "string"
}
}