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

# Save a timeline snapshot

> Record a named timeline snapshot.

When `timelineSnapshot` is omitted, the current stems and active-take information are recorded. `snapshot` is an alias for the same input. Saving a commit does not render audio.

[Arrangement and history](/dev/guides/edit/arrangement).

## Headers and parameters

<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="songId" type="string" required>
  Opaque ID returned by the API. Minimum length: `1`.
</ParamField>

<ParamField body="userAddress" type="string" required>
  Wallet address for the selected account. Use the same address as the session owner. Minimum length: `10`.
</ParamField>

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

<ParamField body="timelineSnapshot" type="object" />

## Response (201)

Success.

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

<ResponseField name="commit" type="object" required>
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required />

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

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

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

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

    <ResponseField name="timeline_snapshot" type="object" required />

    <ResponseField name="created_at" type="string" />
  </Expandable>
</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 POST "$RAWCHUNKS_API/api/editing/commits" \
    -H "x-session-user-address: $USER_ADDRESS" \
    -H "Content-Type: application/json" \
    --data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" '{
    "songId": $song,
    "userAddress": $user,
    "message": "Bass and drums balanced"
  }')"
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "success": true,
    "commit": {
      "id": "commit-example",
      "song_id": "sng-example",
      "message": "Bass and drums balanced",
      "timeline_snapshot": {}
    }
  }
  ```
</ResponseExample>


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