> ## 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.

# Add a song to an album

> Associate a song with an album.

A song has one album association. Check the creator of both records in your integration.

## Headers and parameters

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

## JSON body

<ParamField body="songId" type="string" required>
  Minimum length: `1`.
</ParamField>

## Response (200)

Success.

<ResponseField name="success" type="boolean" required />

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

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

## 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. |
| `500` | Request failed. |

<RequestExample>
  ```bash cURL theme={null}
  curl --fail-with-body -X POST "$RAWCHUNKS_API/api/albums/$(jq -nr --arg v "$ID" '$v|@uri')/songs" \
    -H "Content-Type: application/json" \
    --data "$(jq -nc --arg song "$SONG_ID" '{
    "songId": $song
  }')"
  ```
</RequestExample>


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