> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rawchunks.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a song

> Update an owned song’s metadata or catalog fields.

Send at least one recognized field. Audio or arrangement changes on a minted song require an editable version. Chain fields record a confirmed mint; changing them does not execute or prove a mint.

[Publish an original](/dev/guides/publish/mint).

## Headers and parameters

<ParamField path="id" type="string" required>
  Resource ID.
</ParamField>

<ParamField header="x-session-user-address" type="string" required>
  Selected account address. Required for owner-scoped reads and writes. It identifies the account; your product must authenticate its own users.
</ParamField>

## JSON body

<ParamField body="title" type="string">
  Nonempty title. Minimum length: `1`.
</ParamField>

<ParamField body="version" type="integer" />

<ParamField body="source" type="string | null" />

<ParamField body="url" type="string" />

<ParamField body="licenses" type="integer" />

<ParamField body="stream_price" type="number">
  Listed USDC per minute.
</ParamField>

<ParamField body="license_price" type="number">
  Listed USDC per license.
</ParamField>

<ParamField body="duration" type="number | null">
  Seconds.
</ParamField>

<ParamField body="tags" type="string[]" />

<ParamField body="metadata_cid" type="string | null" />

<ParamField body="image" type="string | null" />

<ParamField body="album_id" type="string | null" />

<ParamField body="public" type="boolean">
  Catalog visibility. Media URLs are not private storage.
</ParamField>

<ParamField body="network" type="string | null" />

<ParamField body="chain_song_id" type="string | null" />

<ParamField body="tx_hash" type="string | null" />

## Response (200)

Success.

<ResponseField name="id" type="string" required />

<ResponseField name="title" type="string" required />

<ResponseField name="creator" type="string" required />

<ResponseField name="url" type="string" required />

<ResponseField name="created_at" type="string" />

<ResponseField name="family" type="string | null" />

<ResponseField name="basis" type="string | null" />

<ResponseField name="source" type="string | null" />

<ResponseField name="metadata_cid" type="string | null" />

<ResponseField name="image" type="string | null" />

<ResponseField name="album_id" type="string | null" />

<ResponseField name="network" type="string | null" />

<ResponseField name="chain_song_id" type="string | null" />

<ResponseField name="tx_hash" type="string | null" />

<ResponseField name="version" type="integer" />

<ResponseField name="licenses" type="integer" />

<ResponseField name="stream_price" type="number">
  Listed USDC per minute.
</ResponseField>

<ResponseField name="license_price" type="number">
  Listed USDC per license.
</ResponseField>

<ResponseField name="duration" type="number | null">
  Seconds.
</ResponseField>

<ResponseField name="tags" type="string[]" />

<ResponseField name="public" type="boolean">
  Catalog visibility. Media URLs are not private storage.
</ResponseField>

## Errors

Failed JSON responses contain an `error` string. Check the HTTP status before reading a successful result. See [job handling](/dev/guides/jobs) 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. |

<RequestExample>
  ```bash cURL theme={null}
  curl --fail-with-body -X PATCH "$RAWCHUNKS_API/api/songs/$(jq -nr --arg v "$ID" '$v|@uri')" \
    -H "x-session-user-address: $USER_ADDRESS" \
    -H "Content-Type: application/json" \
    --data "$(jq -nc '{
    "title": "Night circuit",
    "tags": [
      "acid house"
    ],
    "public": false
  }')"
  ```
</RequestExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.