Refresh or replace the track upload
const url = 'http://localhost:8891/api/v1/releases/9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70/tracks/7a1e2b3c-4d5e-4f60-8a71-9b0c1d2e3f40/upload';const options = { method: 'POST', headers: { 'idempotency-key': '3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"filename":"01-headlights.wav","content_type":"audio/wav","byte_size":52901120,"checksum_sha256":"1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5a7b9d1f3a"}'};
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/7a1e2b3c-4d5e-4f60-8a71-9b0c1d2e3f40/upload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: 3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17' \ --data '{ "filename": "01-headlights.wav", "content_type": "audio/wav", "byte_size": 52901120, "checksum_sha256": "1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5a7b9d1f3a" }'A fresh upload target for a track that already exists. Two uses: the URL from step 2 lapsed before the bytes arrived, or you are replacing the audio on a track that is already ready — which increments audio_version and restarts processing. A lapsed window reopens at the same audio_version whether or not the record has reached upload_expired yet: audio that never arrived is not a new upload. An omitted filename leaves the one on the record. A track still waiting on a live window is answered with that same target, not a new one. 404 on an unknown track; 409 once a product that has left draft pins it, while the current upload is still being processed, when a live window was opened for a different file, or on an Idempotency-Key reused for a different request. The body is strict: a key this operation does not define is a 400 naming it, not a declaration about the file that nothing would enforce. 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.
Request Bodyrequired
Section titled “Request Bodyrequired”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>.
Example
{ "filename": "01-headlights.wav", "content_type": "audio/wav", "byte_size": 52901120, "checksum_sha256": "1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5a7b9d1f3a"}Responses
Section titled “ Responses ”Default Response
object
object
object
Example
{ "audio_version": 2, "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": "Gjxee50fOlx+mx0/WnyeGz1fepweO11/mhw+WnudHzo=" }, "expires_at": "2026-07-29T23:00: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"}