Levain LabsLevain Labs
ApiSessions

Delete Session

Archive a conversation.

Archive a conversation.

Equivalent to PATCH /api/v1/sessions/{session_id} with archived=true: the conversation moves out of the default listing and into the archive, but stays readable — and its historical runs remain visible so usage and billing data stay accurate. Restore it with archived=false.

Rejected with 409 while a turn is still pending or running; stop it first via POST /api/v1/sessions/{session_id}/cancel.

DELETE
/api/v1/sessions/{session_id}

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

session_id*Session Id
Formatuuid

Header Parameters

X-API-Key?string|null

Response Body

application/json

application/json

curl -X DELETE "https://api.levainlabs.com/api/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "property1": "string",
  "property2": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}