Create tracks
const url = 'http://localhost:8891/api/v1/releases/9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70/tracks';const options = { method: 'POST', headers: { 'idempotency-key': '3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"tracks":[{"track_id":"7a1e2b3c-4d5e-4f60-8a71-9b0c1d2e3f40","title":"Headlights","content_type":"audio/wav","byte_size":52428800,"checksum_sha256":"9f2c1d4e6a8b0c2d4e6f8a0b2c4d6e8f0a2b4c6d8e0f2a4b6c8d0e2f4a6b8c0d"},{"track_id":"7a1f3c4d-5e6f-4708-9a81-0b1c2d3e4f50","title":"Overpass","content_type":"audio/wav","byte_size":48112000,"checksum_sha256":"3b5d7f9a1c3e5a7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5a"},{"track_id":"7a205d6e-7f80-4912-9ab1-1c2d3e4f5061","title":"Return","content_type":"audio/wav","byte_size":50331648,"checksum_sha256":"7d9f1b3d5f7a9c1e3b5d7f9a1c3e5a7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8891/api/v1/releases/9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70/tracks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: 3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17' \ --data '{ "tracks": [ { "track_id": "7a1e2b3c-4d5e-4f60-8a71-9b0c1d2e3f40", "title": "Headlights", "content_type": "audio/wav", "byte_size": 52428800, "checksum_sha256": "9f2c1d4e6a8b0c2d4e6f8a0b2c4d6e8f0a2b4c6d8e0f2a4b6c8d0e2f4a6b8c0d" }, { "track_id": "7a1f3c4d-5e6f-4708-9a81-0b1c2d3e4f50", "title": "Overpass", "content_type": "audio/wav", "byte_size": 48112000, "checksum_sha256": "3b5d7f9a1c3e5a7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5a" }, { "track_id": "7a205d6e-7f80-4912-9ab1-1c2d3e4f5061", "title": "Return", "content_type": "audio/wav", "byte_size": 50331648, "checksum_sha256": "7d9f1b3d5f7a9c1e3b5d7f9a1c3e5a7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c" } ] }'Step 2 — build the track pool. A batch, so a multi-file drop registers in one round trip and each track comes back with its own upload target; PUT each file to upload.url with upload.headers verbatim, all of them — Content-Type, Content-Length and the checksum are signed, so a PUT that omits or changes one is rejected. The body must therefore be exactly byte_size bytes: a shorter or longer one fails the signature and is refused by storage before any of it is stored. Content-Length is not an entry in upload.headers because the transport writes it from the body. No confirmation call — the object is detected on arrival and track.ready fires when processing completes. Repeating a track_id in a later request updates that track and returns its existing upload target rather than making a second one, and that update recomposes the generated artwork of every draft Quick product already carrying the track, as PATCH …/tracks/{trackId} does. Retry a 500 under the same Idempotency-Key until it answers 201: the tracks may already be saved, and each retry starts whatever processing or recompose the first attempt could not. 404 on an unknown release; 409 on an Idempotency-Key reused for a different request, on a track a product that has left draft has pinned, or on a track_id whose upload target was opened for a different file; 422 on a track_id repeated within one batch — each entry addresses its own track — on an ISRC under an elasticStage registrant that was not issued to your organisation, on a track_id belonging to another release, on one whose audio has already been accepted (use the upload route for a fresh target), or on a cover for a track whose song_origin isn't cover (original when none is sent). The body is strict, the track entries and their credit lists included: a key this operation does not define — byteSize for byte_size — is a 400 naming it, never a value quietly dropped. Requires the tracks:write scope. Full flow: see the minimal path guide.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Example
9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70Header Parameters
Section titled “Header Parameters”Example
3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17Unique key for this write. Retrying with the same key replays the first response instead of creating a duplicate; reusing it for a different body is a 409. Keys are scoped to the operation, so the same key may also be sent to a different endpoint.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Hex SHA-256 of the exact bytes you will PUT. Any other bytes are refused: by storage when upload.headers carries it as x-amz-checksum-sha256, otherwise by the ingest. Produce it with shasum -a 256 <file>.
object
object
Where the song comes from: original, written for this recording; cover, a recording of a song someone else wrote. A track that has never been given one is original.
The song this track covers, for a track whose song_origin is cover; sent for any other origin it is a 422. Each field is optional here, and an edit changes only the fields it sends: null clears the publisher. Publish needs original_song_title and lyrics_and_melody_unchanged.
The recordings this track samples, in order; any track can carry them. An edit replaces the list whole. Each sample's fields are optional here; publish needs every field of each but publisher.
Example
{ "tracks": [ { "track_id": "7a1e2b3c-4d5e-4f60-8a71-9b0c1d2e3f40", "title": "Headlights", "content_type": "audio/wav", "byte_size": 52428800, "checksum_sha256": "9f2c1d4e6a8b0c2d4e6f8a0b2c4d6e8f0a2b4c6d8e0f2a4b6c8d0e2f4a6b8c0d" }, { "track_id": "7a1f3c4d-5e6f-4708-9a81-0b1c2d3e4f50", "title": "Overpass", "content_type": "audio/wav", "byte_size": 48112000, "checksum_sha256": "3b5d7f9a1c3e5a7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5a" }, { "track_id": "7a205d6e-7f80-4912-9ab1-1c2d3e4f5061", "title": "Return", "content_type": "audio/wav", "byte_size": 50331648, "checksum_sha256": "7d9f1b3d5f7a9c1e3b5d7f9a1c3e5a7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c" } ]}Responses
Section titled “ Responses ”Default Response
object
object
object
object
Where the song comes from: original, written for this recording; cover, a recording of a song someone else wrote. A track that has never been given one is original.
The recordings this track samples, in order; empty when it samples none.
object
Example
{ "data": [ { "id": "7a1e2b3c-4d5e-4f60-8a71-9b0c1d2e3f40", "release_id": "9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70", "title": "Headlights", "subtitle": null, "primary_artist": "Miriam Vale", "additional_artists": [], "rightsholders": [], "isrc": null, "explicit": false, "content_type_classification": "Musical Work", "song_origin": "original", "cover": null, "samples": [], "filename": "01-headlights.wav", "checksum_sha256": null, "status": "awaiting_upload", "locked": false, "audio_version": 1, "upload": { "url": "https://uploads.staging.elasticstage.com/uploads/upl_7a1e…?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Signature=…", "method": "PUT", "headers": { "Content-Type": "audio/wav", "x-amz-checksum-sha256": "nywdTmqLDC1Ob4oLLE1ujworTG2ODypLbI0OL0prjA0=" }, "expires_at": "2026-07-29T23:00:00Z" }, "duration_seconds": null, "sampling_rate": null, "bit_depth": null, "lufs": null, "true_peak": null, "preview_url": null, "error_code": null, "error_detail": null, "created_at": "2026-07-29T10:04:02Z", "updated_at": "2026-07-29T10:32:00Z" } ]}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}