Skip to content

Start an edit session

POST/v2/themes/{themeId}/rive-graphics/{graphicId}/edit-sessions

POST
/v2/themes/{themeId}/rive-graphics/{graphicId}/edit-sessions
curl --request POST \
--url https://api.ligr.live/rest/v2/themes/1/rive-graphics/example/edit-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "agentLabel": "example" }'

Beta. This operation can change between minor versions. See Beta status.

Starts an edit session. The API key holds the editor lock until the session ends or expires. Send sessionToken in the x-ligr-edit-session header on every write. The open builder becomes read-only and shows each change live. Fails with 409 LOCKED when another editor holds the graphic.

themeId
required
number format: double
graphicId
required
string
Media typeapplication/json
object
agentLabel

Name of the agent or tool, shown in the builder lock badge. Example: “Claude Code”.

string
Examplegenerated
{
"agentLabel": "example"
}

Created

Media typeapplication/json
object
sessionToken
required

Send this token in the x-ligr-edit-session header on every write.

string
expiresAt
required

ISO 8601. Each write and heartbeat extends the lock by 60 s.

string
updatedAt
required

ISO 8601 updatedAt of the draft when the session started.

string
Examplegenerated
{
"sessionToken": "example",
"expiresAt": "example",
"updatedAt": "example"
}