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"
}')"
{
"success": true,
"commit": {
"id": "commit-example",
"song_id": "sng-example",
"message": "Bass and drums balanced",
"timeline_snapshot": {}
}
}
Editing
Save a timeline snapshot
Record a named timeline snapshot.
POST
/
api
/
editing
/
commits
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"
}')"
{
"success": true,
"commit": {
"id": "commit-example",
"song_id": "sng-example",
"message": "Bass and drums balanced",
"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.
Headers and parameters
string
required
Selected account address. Required for owner-scoped reads and writes. It identifies the account; your product must authenticate its own users.
JSON body
string
required
Opaque ID returned by the API. Minimum length:
1.string
required
Wallet address for the selected account. Use the same address as the session owner. Minimum length:
10.string
required
Minimum length:
1.object
Response (201)
Success.boolean
required
object
required
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/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"
}')"
{
"success": true,
"commit": {
"id": "commit-example",
"song_id": "sng-example",
"message": "Bass and drums balanced",
"timeline_snapshot": {}
}
}
โI