curl --fail-with-body -X POST "$RAWCHUNKS_API/api/songs/$(jq -nr --arg v "$ID" '$v|@uri')/version" \
-H "x-session-user-address: $USER_ADDRESS"
{
"id": "sng-example",
"title": "Night circuit",
"creator": "0x1111111111111111111111111111111111111111",
"url": "https://example.com/final.wav"
}
Songs and takes
Open an editable version
Open an owned song for further editing.
POST
/
api
/
songs
/
{id}
/
version
curl --fail-with-body -X POST "$RAWCHUNKS_API/api/songs/$(jq -nr --arg v "$ID" '$v|@uri')/version" \
-H "x-session-user-address: $USER_ADDRESS"
{
"id": "sng-example",
"title": "Night circuit",
"creator": "0x1111111111111111111111111111111111111111",
"url": "https://example.com/final.wav"
}
An unminted song returns itself. A minted song returns a private draft with copied arrangement and cleared mint fields. An existing draft for the same basis can be reused. Always continue with the returned
id.
Headers and parameters
string
required
Resource ID.
string
required
Selected account address. Required for owner-scoped reads and writes. It identifies the account; your product must authenticate its own users.
Response (201)
Success.string
required
string
required
string
required
string
required
string
string | null
string | null
string | null
string | null
string | null
string | null
string | null
string | null
string | null
integer
integer
number
Listed USDC per minute.
number
Listed USDC per license.
number | null
Seconds.
string[]
boolean
Catalog visibility. Media URLs are not private storage.
Errors
Failed JSON responses contain anerror string. Check the HTTP status before reading a successful result. See job handling for interrupted or uncertain submissions.
| Status | Meaning |
|---|---|
400 | Invalid request. |
403 | Account does not match resource. |
404 | Resource not found. |
409 | Resource conflict; reload state or open an editable version. |
500 | Request failed. |
curl --fail-with-body -X POST "$RAWCHUNKS_API/api/songs/$(jq -nr --arg v "$ID" '$v|@uri')/version" \
-H "x-session-user-address: $USER_ADDRESS"
{
"id": "sng-example",
"title": "Night circuit",
"creator": "0x1111111111111111111111111111111111111111",
"url": "https://example.com/final.wav"
}
โI