Start an edit session
POST/v2/themes/{themeId}/rive-graphics/{graphicId}/edit-sessions
POST
/v2/themes/{themeId}/rive-graphics/{graphicId}/edit-sessions
const url = 'https://api.ligr.live/rest/v2/themes/1/rive-graphics/example/edit-sessions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"agentLabel":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”themeId
required
number format: double
graphicId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
agentLabel
Name of the agent or tool, shown in the builder lock badge. Example: “Claude Code”.
string
Examplegenerated
{ "agentLabel": "example"}Responses
Section titled “Responses”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"}