ApiSessions
Update Session
Update a conversation.
Update a conversation.
title sets the conversation's display name, replacing any generated name.
archived moves the conversation into or out of the archive; archiving is
rejected with 409 while a turn is still pending or running — stop it first via
POST /api/v1/sessions/{session_id}/cancel.
The response carries the updated metadata with no events; fetch the timeline via
GET /api/v1/sessions/{session_id}.
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Path Parameters
session_id*Session Id
Format
uuidHeader Parameters
X-API-Key?string|null
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://api.levainlabs.com/api/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"agent_id": "string",
"agent_version_id": "string",
"state": "string",
"title": "string",
"kind": "agent",
"first_prompt": "string",
"origin": "slack",
"origin_provider": "string",
"origin_provider_display": "string",
"has_artifacts": true,
"archived_at": "string",
"created_at": "string",
"last_activity_at": "string",
"terminated_at": "string",
"rounds": [],
"events": [],
"steered": true,
"dispatched_run_id": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}