Delete a track
const url = 'http://localhost:8891/api/v1/releases/9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70/tracks/7a1e2b3c-4d5e-4f60-8a71-9b0c1d2e3f40';const options = { method: 'DELETE', headers: { 'idempotency-key': '3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://localhost:8891/api/v1/releases/9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70/tracks/7a1e2b3c-4d5e-4f60-8a71-9b0c1d2e3f40 \ --header 'Authorization: Bearer <token>' \ --header 'idempotency-key: 3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17'Take an abandoned upload out of the release's track pool. 204 with no body — there is nothing left to describe, and a repeat under the same Idempotency-Key answers 204 again rather than 404, because the track is gone precisely because the first call succeeded. 409 while any product's tracklist references the track, draft or not: the pool is what a tracklist selects from, so a product may never be left pointing at a recording that no longer exists. Take the track off that product with PUT /api/v1/releases/{id}/products/{productId}/tracklist first — which is possible while the product is a draft and a 409 once it has left draft, so a track stays on a product for good from the moment that product is published — whatever the factory then answers about it. That PUT can never leave a tracklist empty — it takes at least one side and at least one track on it — so freeing a draft product's only track means putting a replacement track in its place in the same call. The audio the track was created with is not reclaimed: an upload is single-use, so its id stays spent. 404 on an unknown track, on a track of another release, and on a release belonging to another organisation — which it was is not disclosed. 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-2b3c4d5e6f70Example
7a1e2b3c-4d5e-4f60-8a71-9b0c1d2e3f40Header 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.
Responses
Section titled “ Responses ”The track was removed from the release's track pool.
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"}