Skip to main content
PATCH
Update session

Authorizations

x-api-key
string
header
required

Path Parameters

sessionId
string
required

The id of the session to update.

Body

application/json

All fields are optional; an empty object {} is valid and leaves the session unchanged.

title
string

New display title for the session (rename).

status
enum<string>

Lifecycle status (matches the DB CHECK). running is active / unarchived; completed and failed are terminal; archived archives the row. Use running to unarchive from archived.

Available options:
running,
completed,
failed,
archived
linesAdded
integer

Updates the persisted lines_added column on the session (≥ 0).

Required range: x >= 0
linesRemoved
integer

Updates the persisted lines_removed column on the session (≥ 0).

Required range: x >= 0

Response

Session updated successfully.

session
object
required

Agent session returned by POST /api/sessions, GET /api/sessions/{sessionId}, and PATCH /api/sessions/{sessionId}. The api serializes every field listed in required on each response, including isNewBranch (boolean, from the non-null sessions.is_new_branch column) and artistId (UUID or null).