Quickstart
Get a single ready for stores from your own backend: upload a cover and a master, describe the release, submit it, and see it accepted into the catalog with Spotify, Apple Music and four other stores selected, all in sandbox. It takes about twenty minutes.
- It takes about twenty small HTTP calls, all made in sandbox with one tenant key.
- You choose the release id, and the draft and the live release share it.
- Your tenant needs its own GTIN and ISRC ranges, or acceptance fails. Register them first.
- RecordJet’s team reviews the release. In sandbox, ask your RecordJet contact to review it.
- Delivery starts by itself once the release is accepted, and you follow it on the journal. Sandbox stops before the stores, so the sync stays queued.
What you’ll build
You’ll build a one-track release, Midnight Static by Nova Reyes, owned by a customer who receives 100% of its earnings. By the end you’ll have touched every object a distribution integration is built from:
New to the vocabulary? How ReleaseAPI works explains each of these in a page. You don’t need it to follow along.
Before you start
- A sandbox tenant. Your RecordJet contact creates it and invites you to the sandbox dashboard. If you can sign in there, you have one. (Client accounts create their own: Create a tenant.)
- A tenant key with the
MEMBERorADMINrole. Create it in the sandbox dashboard and export it asRELEASEAPI_KEY. This is the key your product backend will use. - Your label’s barcode and recording-code prefixes. Every release needs a barcode (GTIN) and every track a recording code (ISRC). ReleaseAPI makes them from number blocks you own:
- a GS1 company prefix: the block of barcode numbers your company licenses from its national GS1 office (GS1 is the organisation behind retail barcodes);
- an ISRC registrant code: the 2-letter country code plus 3-character code your national ISRC agency gave your label.
- A cover: a square JPEG or PNG, 1,500–8,000 px a side, in RGB colour.
- A master: a stereo WAV or FLAC, 16-, 24- or 32-bit, 44.1–192 kHz. MP3 and AAC aren’t accepted. Stores pay only for plays of 30 seconds or more, so use a full-length track.
Sandbox runs everything up to the stores: files, validation, review, acceptance, codes and the ledger work as in production, but the sync is never processed, so nothing is delivered. Experiment freely.
The Node.js and Python tabs share a small helper, so every later snippet stays short. BASE already ends in /v1, so paths in the snippets leave it out: api("GET", "/me/token") calls $BASE/me/token. Where a page writes GET /v1/…, drop the /v1 (the helper strips it if you forget). Set it up once:
export RELEASEAPI_KEY="your-sandbox-key"
export BASE="https://api-sandbox.releaseapi.com/v1"
export RUN=$(date +%s) # makes externalIds unique, so you can run this again
# export RELEASEAPI_CLIENT_KEY="…" # client accounts only; used by the "Client accounts:" sections
# needs jq (https://jqlang.github.io/jq/) and uuidgen
// quickstart.mjs — Node.js 18+ (built-in fetch)
import { readFile } from "node:fs/promises";
import { randomUUID } from "node:crypto";
const BASE = "https://api-sandbox.releaseapi.com/v1";
const RUN = Date.now().toString(36); // makes externalIds unique, so you can run this again
// path starts after /v1 (a leading /v1 is dropped); pass another key only for client-key calls
async function api(method, path, body, key = process.env.RELEASEAPI_KEY) {
const res = await fetch(BASE + path.replace(/^\/v1(?=\/)/, ""), {
method,
headers: {
"X-API-KEY": key,
...(body !== undefined && { "Content-Type": "application/json" }),
},
body: body === undefined ? undefined : JSON.stringify(body),
});
const data = await res.json().catch(() => ({}));
if (!res.ok) {
// the error code is in message, error or exception (see API basics → Errors)
const code = data.message ?? data.error ?? data.exception ?? `HTTP_${res.status}`;
throw new Error(`${method} ${path} → ${res.status} ${code}`);
}
return data;
}
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
# quickstart.py — Python 3 with requests
import os, time, uuid, requests
BASE = "https://api-sandbox.releaseapi.com/v1"
RUN = str(int(time.time())) # makes externalIds unique, so you can run this again
session = requests.Session()
session.headers["X-API-KEY"] = os.environ["RELEASEAPI_KEY"]
def api(method, path, body=None, key=None):
if path.startswith("/v1/"): # paths start after /v1; a leading /v1 is dropped
path = path[3:]
headers = {"X-API-KEY": key} if key else {}
r = session.request(method, BASE + path, json=body, headers=headers)
if not r.ok:
try:
data = r.json()
except ValueError:
data = {}
# the error code is in message, error or exception (see API basics → Errors)
code = (data.get("message") or data.get("error") or data.get("exception")
or f"HTTP_{r.status_code}")
raise RuntimeError(f"{method} {path} → {r.status_code} {code}")
return r.json()
-
Check your key
Ask the API who you are. The answer names your client (RecordJet, for a RecordJet tenant), your tenant and the key’s roles (
token.accessRights). If this fails, nothing else will work.curl $BASE/me/token -H "X-API-KEY: $RELEASEAPI_KEY"const me = await api("GET", "/me/token"); console.log(`Working in tenant "${me.tenant.displayName}" as ${me.token.accessRights.join(", ")}`);me = api("GET", "/me/token") print(f'Working in tenant "{me["tenant"]["displayName"]}" as {", ".join(me["token"]["accessRights"])}'){ "token": { "clientId": "7c4a91e2-5d3b-4f08-a6e1-93b2c0d4e517", "tenantId": "b55ec853-f63b-4cb3-9c2f-868b4eb42f95", "description": "quickstart", "accessRights": ["MEMBER"], "id": "0f6a2b9e-6c1d-4e8a-9a51-2b7f3d0c8e44", "createdAt": "2026-10-05T08:00:00Z" }, "client": { "displayName": "RecordJet", "id": "7c4a91e2-5d3b-4f08-a6e1-93b2c0d4e517", "...": "..." }, "tenant": { "displayName": "Lowtide Records", "id": "b55ec853-f63b-4cb3-9c2f-868b4eb42f95", "...": "..." } } -
Register your code ranges (once per tenant)
Acceptance gives the release a GTIN and the track an ISRC from ranges registered on your tenant. A new tenant has none, so check, and register what’s missing. An ISRC range is for one calendar year, and assignment always uses the current one.
# Check what the tenant has (both lists empty on a new tenant) curl $BASE/distribution/identifiers/gtin-ranges -H "X-API-KEY: $RELEASEAPI_KEY" curl $BASE/distribution/identifiers/isrc-ranges -H "X-API-KEY: $RELEASEAPI_KEY" # Register a block from YOUR GS1 company prefix (40 + 63361: replace) curl -X POST $BASE/distribution/identifiers/gtin-ranges \ -H "X-API-KEY: $RELEASEAPI_KEY" -H "Content-Type: application/json" \ -d '{"countryCode": 40, "companyNumber": 63361, "articleFrom": 1, "articleTo": 999}' # Register this year's block from YOUR ISRC registrant code (DE + XW9: replace) curl -X POST $BASE/distribution/identifiers/isrc-ranges \ -H "X-API-KEY: $RELEASEAPI_KEY" -H "Content-Type: application/json" \ -d "{\"countryKey\": \"DE\", \"ownerKey\": \"XW9\", \"year\": $(date +%Y), \"recordingFrom\": 1, \"recordingTo\": 999}"const rangeYear = new Date().getUTCFullYear(); // ISRC ranges are per year const gtinRanges = await api("GET", "/distribution/identifiers/gtin-ranges"); const isrcRanges = await api("GET", "/distribution/identifiers/isrc-ranges"); if (gtinRanges.items.length === 0) { await api("POST", "/distribution/identifiers/gtin-ranges", { countryCode: 40, // first 2 digits of YOUR GS1 company prefix companyNumber: 63361, // next 5 digits of YOUR prefix articleFrom: 1, articleTo: 999, }); } if (!isrcRanges.items.some((r) => r.year === rangeYear)) { await api("POST", "/distribution/identifiers/isrc-ranges", { countryKey: "DE", // YOUR registrant code: country … ownerKey: "XW9", // … and the 3 characters after it year: rangeYear, recordingFrom: 1, recordingTo: 999, }); }import datetime range_year = datetime.date.today().year # ISRC ranges are per year gtin_ranges = api("GET", "/distribution/identifiers/gtin-ranges") isrc_ranges = api("GET", "/distribution/identifiers/isrc-ranges") if not gtin_ranges["items"]: api("POST", "/distribution/identifiers/gtin-ranges", { "countryCode": 40, # first 2 digits of YOUR GS1 company prefix "companyNumber": 63361, # next 5 digits of YOUR prefix "articleFrom": 1, "articleTo": 999, }) if not any(r["year"] == range_year for r in isrc_ranges["items"]): api("POST", "/distribution/identifiers/isrc-ranges", { "countryKey": "DE", # YOUR registrant code: country … "ownerKey": "XW9", # … and the 3 characters after it "year": range_year, "recordingFrom": 1, "recordingTo": 999, }){ "items": [ { "countryCode": 40, "companyNumber": 63361, "articleFrom": 1, "articleTo": 999, "articleNext": 1, "id": "6d2e8f41-3b7a-4c09-9e15-a8b7c6d5e4f3", "...": "..." } ], "hasMore": false, "limit": 100, "offset": 0 }Use your own numbers, not the ones above. A range may not overlap any range already registered anywhere in ReleaseAPI, by any account (
GTIN_RANGE_OVERLAPS_EXISTING,ISRC_RANGE_OVERLAPS_EXISTING), so numbers copied from these docs may already be taken. Use a block you won’t need for real releases. Register your ranges has every field and error. -
Create the owner and a wallet
Every release has an owner, a customer who receives its share of the money. Here that’s the artist. A wallet is where money collects, and each track says which wallets split it. Create one of each, with your own id in
externalId. AnexternalIdmust be unique in your tenant, which is why the snippets addRUN: a second run with the same values fails with400 EXTERNAL_ID_ALREADY_DEFINED.CUSTOMER_ID=$(curl -s -X POST $BASE/distribution/accounting/customers \ -H "X-API-KEY: $RELEASEAPI_KEY" -H "Content-Type: application/json" \ -d "{ \"externalId\": \"artist-$RUN\", \"details\": {\"firstName\": \"Nova\", \"lastName\": \"Reyes\", \"email\": \"nova@example.com\"} }" \ | jq -r .id) WALLET_ID=$(curl -s -X POST $BASE/distribution/accounting/wallets \ -H "X-API-KEY: $RELEASEAPI_KEY" -H "Content-Type: application/json" \ -d "{\"customerId\": \"$CUSTOMER_ID\", \"externalId\": \"artist-$RUN-main\"}" \ | jq -r .id)const customer = await api("POST", "/distribution/accounting/customers", { externalId: `artist-${RUN}`, details: { firstName: "Nova", lastName: "Reyes", email: "nova@example.com" }, }); const wallet = await api("POST", "/distribution/accounting/wallets", { customerId: customer.id, externalId: `artist-${RUN}-main`, });customer = api("POST", "/distribution/accounting/customers", { "externalId": f"artist-{RUN}", "details": {"firstName": "Nova", "lastName": "Reyes", "email": "nova@example.com"}, }) wallet = api("POST", "/distribution/accounting/wallets", { "customerId": customer["id"], "externalId": f"artist-{RUN}-main", }){ "id": "0b1c2d3e-4f50-4a61-8b72-93c4d5e6f708", "clientId": "7c4a91e2-5d3b-4f08-a6e1-93b2c0d4e517", "tenantId": "b55ec853-f63b-4cb3-9c2f-868b4eb42f95", "details": { "firstName": "Nova", "lastName": "Reyes", "email": "nova@example.com" }, "externalId": "artist-mgd3k2x1", "createdAt": "2026-10-05T08:02:11.402Z" } -
Upload the cover and the master
Each file takes three steps: ask for an upload URL,
PUTthe bytes to it (the URL is pre-signed, so no API key), then tell ReleaseAPI you’re done. The cover goes under/covers, the master under/masters.# upload KIND ID_FIELD FILE: announce, send the bytes, start processing upload() { START=$(curl -s -X POST $BASE/distribution/files/$1/upload/put/start \ -H "X-API-KEY: $RELEASEAPI_KEY" -H "Content-Type: application/json" \ -d "{\"originalFileName\": \"$3\"}") ID=$(echo "$START" | jq -r ".$2") # the bytes go to the pre-signed URL, with no API key curl -s -X PUT --upload-file "$3" "$(echo "$START" | jq -r .url)" > /dev/null curl -s -X POST $BASE/distribution/files/$1/upload/put/finish/$ID \ -H "X-API-KEY: $RELEASEAPI_KEY" > /dev/null echo "$ID" } COVER_ID=$(upload covers coverFileId midnight-static.jpg) MASTER_ID=$(upload masters masterFileId midnight-static.wav)async function upload(kind, idField, path) { const start = await api("POST", `/distribution/files/${kind}/upload/put/start`, { originalFileName: path, }); const put = await fetch(start.url, { method: "PUT", body: await readFile(path) }); if (!put.ok) throw new Error(`Upload of ${path} failed: ${put.status}`); await api("POST", `/distribution/files/${kind}/upload/put/finish/${start[idField]}`); return start[idField]; } const coverId = await upload("covers", "coverFileId", "midnight-static.jpg"); const masterId = await upload("masters", "masterFileId", "midnight-static.wav");def upload(kind, id_field, path): start = api("POST", f"/distribution/files/{kind}/upload/put/start", {"originalFileName": path}) with open(path, "rb") as f: requests.put(start["url"], data=f).raise_for_status() api("POST", f"/distribution/files/{kind}/upload/put/finish/{start[id_field]}") return start[id_field] cover_id = upload("covers", "coverFileId", "midnight-static.jpg") master_id = upload("masters", "masterFileId", "midnight-static.wav"){ "coverFileId": "5b1c0e3a-1d2e-4f56-9a78-0b1c2d3e4f50", "url": "https://…amazonaws.com/…?X-Amz-Signature=…" }Processing takes seconds for a cover and up to a few minutes for a long master. Wait for
statusSUCCESS. If it’sINVALID,failureReasonssays why (for exampleNO_SQUARE).# wait_for_file KIND ID: poll until processing has finished wait_for_file() { KIND=$1; ID=$2 while :; do STATUS=$(curl -s $BASE/distribution/files/$KIND/$ID \ -H "X-API-KEY: $RELEASEAPI_KEY" | jq -r .status) echo "$KIND $STATUS" case $STATUS in SUCCESS|INVALID|ERROR) break ;; esac sleep 2 done } wait_for_file covers $COVER_ID wait_for_file masters $MASTER_IDasync function waitForFile(kind, id) { for (;;) { const file = await api("GET", `/distribution/files/${kind}/${id}`); if (file.status === "SUCCESS") return file; if (file.status === "INVALID" || file.status === "ERROR") throw new Error(`${kind} ${id}: ${file.status} ${file.failureReasons}`); await sleep(2000); } } await waitForFile("covers", coverId); await waitForFile("masters", masterId);def wait_for_file(kind, file_id): while True: f = api("GET", f"/distribution/files/{kind}/{file_id}") if f["status"] == "SUCCESS": return f if f["status"] in ("INVALID", "ERROR"): raise RuntimeError(f"{kind} {file_id}: {f['status']} {f.get('failureReasons')}") time.sleep(2) wait_for_file("covers", cover_id) wait_for_file("masters", master_id){ "id": "5b1c0e3a-1d2e-4f56-9a78-0b1c2d3e4f50", "clientId": "7c4a91e2-5d3b-4f08-a6e1-93b2c0d4e517", "tenantId": "b55ec853-f63b-4cb3-9c2f-868b4eb42f95", "status": "SUCCESS", "originalFileName": "midnight-static.jpg", "details": { "format": "JPEG", "width": 3000, "height": 3000, "byteSize": 869659 }, "analysis": { "palette": ["#1b1f3a", "#e94f64", "#f6c177"] }, "processedAt": "2026-10-05T08:03:40.120Z", "createdAt": "2026-10-05T08:03:31.884Z" } -
Write the draft
A draft is the release as you’re preparing it. You choose its id: generate a UUID, store it on your release row and use it from now on. The live release keeps the same id. Each track gets your id too, and points back through
details.releaseId, which must match the id in the URL. The snippets build a complete single that passes validation:RELEASE_ID=$(uuidgen | tr 'A-Z' 'a-z') # store this on your release row TRACK_ID=$(uuidgen | tr 'A-Z' 'a-z') RELEASE_DATE=$(date -u -d '+28 days' +%F 2>/dev/null || date -u -v+28d +%F) # four weeks ahead (GNU date, or macOS) jq -n --arg release "$RELEASE_ID" --arg track "$TRACK_ID" \ --arg date "$RELEASE_DATE" \ --arg cover "$COVER_ID" --arg master "$MASTER_ID" \ --arg customer "$CUSTOMER_ID" --arg wallet "$WALLET_ID" --arg run "$RUN" '{ release: { externalId: ("release-" + $run), details: { title: "Midnight Static", language: "EN", genrePrimary: "ELECTRONIC" }, contributions: [ { role: "ARTIST", name: "Nova Reyes", providerArtistId: "artist-nova-reyes" } ], flags: { explicit: "NONE", isLive: false, isRemix: false, isDJRemix: false, isCompilation: false, hasNonExclusives: false }, files: { coverFileId: $cover }, distribution: { originalReleaseDate: $date, releaseDateTime: ($date + "T00:00:00"), stores: ["SPOTIFY", "APPLE_MUSIC", "AMAZON_STREAMING", "DEEZER", "TIDAL", "YOUTUBE_MUSIC"], countriesMode: "EXCLUDE", countries: [], pricingTier: "MID" }, rightsholders: { labelName: "Lowtide Records", cLineYear: ($date[0:4] | tonumber), cLineHolder: "Lowtide Records", pLineYear: ($date[0:4] | tonumber), pLineHolder: "Lowtide Records" }, accounting: { ownerCustomerId: $customer } }, tracks: [ { id: $track, externalId: ("track-" + $run + "-1"), details: { releaseId: $release, volumeNumber: 1, trackNumber: 1, title: "Midnight Static", audioLanguage: "EN", genrePrimary: "ELECTRONIC" }, contributions: [ { role: "ARTIST", name: "Nova Reyes", providerArtistId: "artist-nova-reyes" }, { role: "VOCALS", name: "Nova Reyes" }, { role: "COMPOSER", name: "Mara Lind" }, { role: "LYRICIST", name: "Mara Lind" }, { role: "PRODUCER", name: "Jon Aster" } ], flags: { explicit: "NONE", isLive: false, isRemix: false, isDJRemix: false, isCover: false, isPublicDomain: false }, files: { masterFileId: $master }, rightsholders: { labelName: "Lowtide Records", pLineYear: ($date[0:4] | tonumber), pLineHolder: "Lowtide Records" }, accounting: { shareRules: [ { shares: [ { walletId: $wallet, sharePerMio: 1000000 } ] } ] } } ] }' > draft.jsonconst releaseId = randomUUID(); // store this on your release row const trackId = randomUUID(); // about four weeks ahead const releaseDate = new Date(Date.now() + 28 * 864e5).toISOString().slice(0, 10); const rightsYear = Number(releaseDate.slice(0, 4)); // ℗ and © year: the release year const label = "Lowtide Records"; const artist = { role: "ARTIST", name: "Nova Reyes", providerArtistId: "artist-nova-reyes" }; const draft = { release: { externalId: `release-${RUN}`, details: { title: "Midnight Static", language: "EN", genrePrimary: "ELECTRONIC" }, contributions: [artist], flags: { explicit: "NONE", isLive: false, isRemix: false, isDJRemix: false, isCompilation: false, hasNonExclusives: false }, files: { coverFileId: coverId }, distribution: { originalReleaseDate: releaseDate, releaseDateTime: `${releaseDate}T00:00:00`, stores: ["SPOTIFY", "APPLE_MUSIC", "AMAZON_STREAMING", "DEEZER", "TIDAL", "YOUTUBE_MUSIC"], countriesMode: "EXCLUDE", countries: [], pricingTier: "MID", }, rightsholders: { labelName: label, cLineYear: rightsYear, cLineHolder: label, pLineYear: rightsYear, pLineHolder: label }, accounting: { ownerCustomerId: customer.id }, }, tracks: [{ id: trackId, externalId: `track-${RUN}-1`, details: { releaseId, volumeNumber: 1, trackNumber: 1, title: "Midnight Static", audioLanguage: "EN", genrePrimary: "ELECTRONIC" }, contributions: [ artist, { role: "VOCALS", name: "Nova Reyes" }, { role: "COMPOSER", name: "Mara Lind" }, { role: "LYRICIST", name: "Mara Lind" }, { role: "PRODUCER", name: "Jon Aster" }, ], flags: { explicit: "NONE", isLive: false, isRemix: false, isDJRemix: false, isCover: false, isPublicDomain: false }, files: { masterFileId: masterId }, rightsholders: { pLineYear: rightsYear, pLineHolder: label, labelName: label }, accounting: { shareRules: [{ shares: [{ walletId: wallet.id, sharePerMio: 1_000_000 }] }], }, }], };release_id = str(uuid.uuid4()) # store this on your release row track_id = str(uuid.uuid4()) # about four weeks ahead release_date = (datetime.date.today() + datetime.timedelta(days=28)).isoformat() rights_year = int(release_date[:4]) # ℗ and © year: the release year label = "Lowtide Records" artist = {"role": "ARTIST", "name": "Nova Reyes", "providerArtistId": "artist-nova-reyes"} draft = { "release": { "externalId": f"release-{RUN}", "details": {"title": "Midnight Static", "language": "EN", "genrePrimary": "ELECTRONIC"}, "contributions": [artist], "flags": {"explicit": "NONE", "isLive": False, "isRemix": False, "isDJRemix": False, "isCompilation": False, "hasNonExclusives": False}, "files": {"coverFileId": cover_id}, "distribution": { "originalReleaseDate": release_date, "releaseDateTime": f"{release_date}T00:00:00", "stores": ["SPOTIFY", "APPLE_MUSIC", "AMAZON_STREAMING", "DEEZER", "TIDAL", "YOUTUBE_MUSIC"], "countriesMode": "EXCLUDE", "countries": [], "pricingTier": "MID", }, "rightsholders": {"cLineYear": rights_year, "cLineHolder": label, "pLineYear": rights_year, "pLineHolder": label, "labelName": label}, "accounting": {"ownerCustomerId": customer["id"]}, }, "tracks": [{ "id": track_id, "externalId": f"track-{RUN}-1", "details": {"releaseId": release_id, "volumeNumber": 1, "trackNumber": 1, "title": "Midnight Static", "audioLanguage": "EN", "genrePrimary": "ELECTRONIC"}, "contributions": [ artist, {"role": "VOCALS", "name": "Nova Reyes"}, {"role": "COMPOSER", "name": "Mara Lind"}, {"role": "LYRICIST", "name": "Mara Lind"}, {"role": "PRODUCER", "name": "Jon Aster"}, ], "flags": {"explicit": "NONE", "isLive": False, "isRemix": False, "isDJRemix": False, "isCover": False, "isPublicDomain": False}, "files": {"masterFileId": master_id}, "rightsholders": {"pLineYear": rights_year, "pLineHolder": label, "labelName": label}, "accounting": { "shareRules": [{"shares": [{"walletId": wallet["id"], "sharePerMio": 1_000_000}]}], }, }], }A few things in that body are easy to miss, and each one is a validation error if you leave it out:
- Every
ARTISTcontributor needs aproviderArtistId. Despite the name, this is your stable id for the artist, not a store’s. Use the same value on every release by the same artist. Spotify and Apple Music artist ids go in separate fields (see Artist profiles). - All six release flags and all six track flags must be set explicitly.
falseis a fine answer, but a missing flag is not. - Each track needs at least a
COMPOSERand, for current releases, aPRODUCER. - For a single, the track’s title and main artists must match the release’s.
releaseDateTimehas no time zone, because stores release at local midnight in each country. In production, leave at least two weeks between submit and release date, more if you want the release pitched to playlists.EXCLUDEwith an empty country list means worldwide.cLineYearandpLineYearare the years the rights date from. For a new recording, that’s the release year.labelNameand the ℗ and © holders are required. Always use a label name, never just the artist’s name: a self-released artist uses their own imprint (for example “Nova Reyes Music”), and a platform acting as the label uses its company or imprint name.- The body has no GTIN or ISRC, because ReleaseAPI assigns both from your tenant’s ranges when the release is accepted (see Before you start). Send
identifiers.gtinandidentifiers.isrcif you already have codes.
Now write it under the id you generated:
curl -X PUT $BASE/distribution/drafts/full-releases/$RELEASE_ID \ -H "X-API-KEY: $RELEASEAPI_KEY" -H "Content-Type: application/json" \ -d @draft.jsonconst full = await api("PUT", `/distribution/drafts/full-releases/${releaseId}`, draft); console.log(full.release.status); // "DRAFT"full = api("PUT", f"/distribution/drafts/full-releases/{release_id}", draft) print(full["release"]["status"]) # "DRAFT"{ "release": { "id": "6f2d8c4a-93b1-4e57-a0c2-5d81e7f43b19", "clientId": "7c4a91e2-5d3b-4f08-a6e1-93b2c0d4e517", "tenantId": "b55ec853-f63b-4cb3-9c2f-868b4eb42f95", "status": "DRAFT", "details": { "title": "Midnight Static", "language": "EN", "genrePrimary": "ELECTRONIC" }, "generated": { "artistLine": "Nova Reyes" }, "...": "..." }, "coverFile": { "id": "5b1c0e3a-1d2e-4f56-9a78-0b1c2d3e4f50", "status": "SUCCESS", "...": "..." }, "tracks": [ { "track": { "id": "9c0b1a22-77e1-4c0a-8f11-223344556677", "...": "..." }, "masterFile": { "id": "aa11bb22-cc33-4d44-8e55-667788990011", "status": "SUCCESS", "...": "..." } } ] }A write replaces the whole draftEach
PUTis the complete release. A section you leave out is cleared, and a track that isn’t intracksis deleted. That’s what makes the call safe to retry: send the full body every time. - Every
-
Check it before you submit
Saving never fails because a draft is incomplete. Validation runs when you ask, and again on submit. Only
CRITICALandERRORfindings block submission, so an empty list means you’re clear:curl $BASE/distribution/drafts/releases/$RELEASE_ID/validation \ -H "X-API-KEY: $RELEASEAPI_KEY"const issues = await api("GET", `/distribution/drafts/releases/${releaseId}/validation`); const blocking = issues.filter((i) => ["CRITICAL", "ERROR"].includes(i.check.severity)); if (blocking.length) throw new Error(blocking.map((i) => i.check.name).join(", "));issues = api("GET", f"/distribution/drafts/releases/{release_id}/validation") blocking = [i for i in issues if i["check"]["severity"] in ("CRITICAL", "ERROR")] if blocking: raise RuntimeError(", ".join(i["check"]["name"] for i in blocking))[ { "check": { "severity": "REVIEW", "name": "RELEASE_COVER_TEXT_DOES_NOT_MATCH_TITLE_OR_ARTISTS", "description": "text on coverFile does not match title or artists names" }, "context": { "trackId": null, "bookletId": null, "hint": null } }, { "check": { "severity": "REVIEW", "name": "TRACK_MASTER_FILE_TRUE_PEAK_SPIKES", "description": "true peak exceeds recommended values" }, "context": { "trackId": "9c0b1a22-77e1-4c0a-8f11-223344556677", "bookletId": null, "hint": null } } ]WARNINGandREVIEWfindings, like the two in the sample response (a real sandbox answer), never block. You can show them to your user if you like, since the reviewer sees them too, but you don’t have to. -
Submit for review
Set the draft’s status to
REVIEW. Validation runs once more, synchronously: if anything blocks, you get400 RELEASE_HAS_VALIDATION_ERRORSand nothing changes. Otherwise the draft is locked and queued.curl -X PUT $BASE/distribution/drafts/releases/$RELEASE_ID/status \ -H "X-API-KEY: $RELEASEAPI_KEY" -H "Content-Type: application/json" \ -d '{"status": "REVIEW"}'const submitted = await api("PUT", `/distribution/drafts/releases/${releaseId}/status`, { status: "REVIEW", }); console.log(submitted.review.result); // "OPEN": waiting for a reviewersubmitted = api("PUT", f"/distribution/drafts/releases/{release_id}/status", {"status": "REVIEW"}) print(submitted["review"]["result"]) # "OPEN": waiting for a reviewer{ "id": "6f2d8c4a-93b1-4e57-a0c2-5d81e7f43b19", "status": "REVIEW", "review": { "requestedAt": "2026-10-05T08:06:12.031Z", "result": "OPEN" }, "...": "..." }Submit only goes through once every file is
SUCCESS, so file processing is already behind you. From here, RecordJet’s review team accepts or rejects the release. You don’t call anything for it. Three fields on the draft describe this, and they’re easy to mix up:statusis where the draft is (DRAFT,REVIEW,REJECTED),review.statusis a short automatic step before the release reaches the reviewer (PREPARE, thenREADY), andreview.resultis the decision (OPENuntil someone decides). For your users, one status is enough.Ask for your sandbox reviewTell your RecordJet contact which test release to review. In production, leave time for RecordJet’s review before the release date.
If you run your own client account
Review decisions are made at client level, so a client account reviews its own tenants’ releases: in the dashboard, or through the API with a client key (a tenant key gets
401). The decision is applied once file preparation has finished (review.statusREADY).curl -X PUT $BASE/distribution/drafts/releases/$RELEASE_ID/review \ -H "X-API-KEY: $RELEASEAPI_CLIENT_KEY" -H "Content-Type: application/json" \ -d '{"result": "ACCEPTED"}'Small edits to a release that’s already live, like a new release date or a removed store, are accepted automatically. See Submit and review.
-
Wait for the outcome on the journal
The decision lands on the journal, the event log every integration reads. Here you follow only this release’s stream by passing its id (draft and catalog release share it). In production you read your tenant’s whole stream from a stored cursor, and a webhook tells you when to read it (Events and webhooks).
curl -X POST $BASE/journal/query \ -H "X-API-KEY: $RELEASEAPI_KEY" -H "Content-Type: application/json" \ -d "{\"elementId\": \"$RELEASE_ID\"}" \ | jq -r '.[] | "\(.elementType) \(.eventType) \(.eventName)"'// Reads this release's events once. Run it again later until it isn't "pending". async function checkDecision(id) { const events = await api("POST", "/journal/query", { elementId: id }); for (const e of events) { if (e.eventName === "DRAFT_RELEASE_ACCEPTED") return "accepted"; if (e.eventName === "DRAFT_RELEASE_REJECTED") return "rejected"; } return "pending"; } console.log(await checkDecision(releaseId)); // "pending" until RecordJet decides# Reads this release's events once. Run it again later until it isn't "pending". def check_decision(element_id): events = api("POST", "/journal/query", {"elementId": element_id}) for e in events: if e.get("eventName") == "DRAFT_RELEASE_ACCEPTED": return "accepted" if e.get("eventName") == "DRAFT_RELEASE_REJECTED": return "rejected" return "pending" print(check_decision(release_id)) # "pending" until RecordJet decides[ { "clientId": "7c4a91e2-5d3b-4f08-a6e1-93b2c0d4e517", "tenantId": "b55ec853-f63b-4cb3-9c2f-868b4eb42f95", "eventType": "UPDATED", "eventName": "DRAFT_RELEASE_SUBMITTED", "elementType": "DRAFT_RELEASE", "elementId": "6f2d8c4a-93b1-4e57-a0c2-5d81e7f43b19", "id": "2b7c1f60-9a8e-4c3d-b1f2-0e9d8c7b6a51", "createdAt": "2026-10-05T08:06:13.114210Z" }, { "eventType": "UPDATED", "eventName": "DRAFT_RELEASE_REVIEW_READY", "elementType": "DRAFT_RELEASE", "elementId": "6f2d8c4a-93b1-4e57-a0c2-5d81e7f43b19", "id": "4f0a9c31-6b2d-4e8f-a1c7-9d3e5b2f8a60", "createdAt": "2026-10-05T08:06:23.247315Z", "...": "..." }, { "eventType": "DELETED", "eventName": "DRAFT_RELEASE_ACCEPTED", "elementType": "DRAFT_RELEASE", "elementId": "6f2d8c4a-93b1-4e57-a0c2-5d81e7f43b19", "id": "8d41a7c2-3e5f-4b6a-9c0d-1e2f3a4b5c6d", "createdAt": "2026-10-05T08:41:57.630118Z", "...": "..." } ]After a few seconds,
DRAFT_RELEASE_REVIEW_READYappears. It means the release has reached the reviewer’s queue, not that it has been accepted. A person from the review team makes that decision later, so there’s no need to keep a process waiting. Checking about once an hour is enough. The release keeps its place in the queue while you wait. A release’s own stream holds only a few events, so one read without a cursor sees all of them.Match on
eventName. Acceptance writes severalDRAFT_RELEASE_ACCEPTEDevents at once: aDELETEDone on the draft (the draft has become the catalog release) and aCREATEDone on the newRELEASE. The check stops at the first one it finds. A production consumer reacts to acceptance on theRELEASEevent and to rejection on theDRAFT_RELEASEevent whoseeventTypeisOTHER. Submit and review explains why.If the answer is
rejected, read the draft withapi("GET", `/distribution/drafts/releases/${releaseId}`).review.rejectionReasonslists what to fix. Write the draft again and resubmit it under the same id. -
Read the live release
The draft is now a catalog release with the same id (the draft endpoints return 404). The GTIN and ISRC are assigned, the ledger knows who earns, and a sync to the stores is already queued.
curl $BASE/distribution/catalog/full-releases/$RELEASE_ID \ -H "X-API-KEY: $RELEASEAPI_KEY"const live = await api("GET", `/distribution/catalog/full-releases/${releaseId}`); const { identifiers, status, storeSnapshot } = live.release; console.log(identifiers.gtin, status, storeSnapshot.isSynced);live = api("GET", f"/distribution/catalog/full-releases/{release_id}") r = live["release"] print(r["identifiers"]["gtin"], r["status"], r["storeSnapshot"]["isSynced"]){ "release": { "id": "6f2d8c4a-93b1-4e57-a0c2-5d81e7f43b19", "status": "UNRELEASED", "identifiers": { "gtin": "4063361000016" }, "storeSnapshot": { "deliveredStores": [], "syncRequest": "FULL_SYNC", "syncRequestPriority": 1, "isSynced": false, "storeChanges": [ { "store": "SPOTIFY", "firstSelectedAt": "2026-10-05T08:41:57.601Z", "lastSelectedAt": "2026-10-05T08:41:57.601Z", "...": "..." }, "..." ], "...": "..." }, "generated": { "artistLine": "Nova Reyes", "trackCount": 1, "...": "..." }, "...": "..." }, "tracks": [ { "track": { "id": "9c0b1a22-77e1-4c0a-8f11-223344556677", "identifiers": { "isrc": "DEXW92600001" }, "...": "..." } } ] }This is the response right after acceptance, and in sandbox it stays that way. Three fields tell the delivery story:
storeSnapshot.syncRequestis the queued sync (FULL_SYNCfor a new release). In production a scheduler picks it up within seconds, opens the delivery requests and clears it. Sandbox doesn’t process sync requests, so it stays set.storeSnapshot.deliveredStoreslists every store ReleaseAPI has contacted for this release, and when. A store shows up as soon as its delivery is requested, and getslastDeliveryAtonce the store has accepted it. In sandbox it stays empty.storeSnapshot.isSyncedistruewhen every store you selected has the current version.
/catalog/full-releases/{id}returns the release with its tracks, and/catalog/releases/{id}returns the release alone, with the samestoreSnapshot. To turn all of this into one status for your users (in review, rejected, delivering, live), use the table in One status for your users.In production, ReleaseAPI then opens one delivery request per provider and retries failures itself. The journal shows
RELEASE_SYNC_STARTEDandDELIVERY_REQUEST_SUCCESS.statusmoves fromUNRELEASEDtoRELEASEDon the release date. See Deliver to stores.
What you built
With a few dozen lines of code you’ve built the core loop of a distribution product:
| You did | ReleaseAPI did |
|---|---|
| Created a customer and a wallet | Gave the release an owner and a place for the money to land |
| Uploaded two files | Checked format, size and audio quality, and analysed the cover and the master |
| Wrote one draft under your own id | Kept it editable until you were ready, with validation on demand |
| Submitted it | Ran the review, assigned a GTIN and an ISRC, wrote the ledger |
| Read the journal | Created the catalog release, assigned the GTIN and ISRC, wrote the ledger and queued the sync (production delivers it; sandbox doesn’t) |
Point the same code at https://api.releaseapi.com/v1 with a production key and it ships for real, once the points below are settled.
Before you go live
Sandbox lets you skip a few things that production needs. Settle these with your RecordJet contact before your first real release:
| You need | Why | Read |
|---|---|---|
| A production tenant and keys | Sandbox and production don’t share accounts, keys or data. Your RecordJet contact creates the production tenant. | Environments |
| The list of stores you offer | A release can only select stores your account delivers to. For a RecordJet tenant, those are the stores RecordJet delivers to; for a client account, they’re the stores your own delivery profiles cover. Otherwise validation fails with RELEASE_STORE_NOT_COVERED_BY_DELIVERY_PROFILE. | Stores and providers |
| Your own GTIN and ISRC ranges, or codes on each draft | Ranges come from your own GS1 prefix and ISRC registrant code. Each range belongs to one tenant, and each ISRC range covers one year. A tenant without them can’t have a release accepted. | Identifiers and artists |
| A journal consumer | Replace the one-off check above with a cursor-based worker and a webhook. | Build a reliable consumer |
| A plan for release dates | RecordJet reviews every new release, and stores need time to ingest it. Submit at least two weeks before the release date, more if you want it pitched to playlists. distribution.isPriority requests a priority review, which is billed (prices on releaseapi.com). Client accounts review their own releases. | Submit and review |
| A plan for the money | RecordJet imports the monthly store statements, and you decide how you pay your users from the results. | How money flows |
If something went wrong
| You saw | What it means | Fix |
|---|---|---|
401 UNAUTHORIZED | The key is missing, unknown, from the other environment, or the endpoint is for client keys only. | Check GET /me/token and the base URL. |
400 TENANT_ID_NEEDED_FOR_CLIENT_REQUEST or SAME_TENANT_ID_NEEDED_ON_ALL_REQUESTS | Client accounts only: you used a client key on a create call without naming the tenant. | Add tenantId to the body (on a draft: release.tenantId), or use a tenant key. All variants of this error are listed under the tenantId rules. |
400 PATCH_FULL_DRAFT_REQUIRES_TRACK_ID_IN_CHANGE_REQUEST | A track in the full-release body has no id. | Generate a UUID per track and keep it. |
400 RELEASE_HAS_VALIDATION_ERRORS | Submit found a blocking check. | Call /validation and fix every CRITICAL and ERROR. |
TRACK_MASTER_STATUS_NOT_SUCCESS | The master is still processing, or was rejected. | Wait for SUCCESS, or upload a corrected file. |
RELEASE_STORE_NOT_COVERED_BY_DELIVERY_PROFILE | Your account has no delivery set up for one of the stores you picked. | Remove that store, or ask your RecordJet contact which stores you can offer. See Which stores you can offer. |
409 RELEASE_LOCKED_IN_REVIEW | You wrote to a draft that’s in review. | Withdraw it with {"status": "DRAFT"}, edit it, then resubmit. |
400 EXTERNAL_ID_ALREADY_DEFINED or DIFFERENT_DRAFT_RELEASE_WITH_SAME_EXTERNAL_ID_EXISTS_ALREADY | You ran the quickstart again with the same externalId values. | Keep the RUN suffix from the setup, or look the existing object up by ?externalId=. |
400 RELEASE_NOT_FOUND on the draft write | A track’s details.releaseId isn’t the id in the URL. (If it points at another draft that’s in review, you get 409 RELEASE_LOCKED_IN_REVIEW instead.) | Use the same release id in both places. |
The draft stays in REVIEW | No review decision has been made yet. | Ask your RecordJet contact to review it (Submit for review). Client accounts accept it themselves. |
Rejected with PROVIDER_OUT_OF_GTIN or PROVIDER_OUT_OF_ISRC | The tenant has no free GTIN, or no ISRC range for this year. | Add a range (Register your code ranges), or send your own codes, then resubmit. |
Next steps
Events and webhooks
Replace the one-off check with a cursor-based journal worker woken by webhooks.
Read the guide →Build a release
Go beyond a single with albums, pre-orders, featured artists and booklets, and see how writes behave.
Read the guide →Manage live releases
Change a live release by opening an edit draft under the same id and submitting it.
Read the guide →How money flows
What happens to the wallet you just created when the first statement arrives.
Read the guide →