Skip to main content
DELETE
Delete a session

Authorizations

Authorization
string
header
required

An API token for one organization. You create and revoke tokens in the dashboard. A token scoped to one App can reach only that App, so give that kind of token to an agent. An organization-wide token can create a short-lived one with POST /api/tokens.

Headers

Idempotency-Key
string

A key that identifies this request for retries, up to 200 printable characters. A retry with the same key and input returns the first request's result instead of repeating the work. If you omit the key, the API generates one and returns it in the Idempotency-Key response header.

Required string length: 1 - 200

Path Parameters

id
string
required

A unique ID that starts with app_.

Pattern: ^app_[0-9A-Za-z]{24}$
Example:

"app_Zj7XhMgplmTJcp5Dk4vcYuk0"

session_id
string
required

A unique ID that starts with ses_.

Pattern: ^ses_[0-9A-Za-z]{24}$
Example:

"ses_Zj7XhMgplmTJcp5Dk4vcYuk0"

Response

The deleted session.

id
string
required

The session's ID, which starts with ses_.

app_id
string
required

The ID of the App that the session belongs to.

title
string
required

The session's title.

model
string
required

The default model for the session's turns: auto or a model ID.

status
enum<string>
required

The session's state:

  • idle: no turn is running or queued.
  • running: a turn is running or queued.
  • waiting: the active turn needs input from a person. The turn's input_request field describes the input.
Available options:
idle,
running,
waiting
active_turn_id
string | null
required

The ID of the running or waiting turn, or null if there isn't one.

last_sequence
integer
required

The sequence of the session's newest event. A transcript that includes this event is up to date.

Required range: x >= 0
Example:

48

usage
object
required

The tokens used by all of the session's turns.

created_by
string | null
required

The ID of the user who created the session, or null if that user deleted their account.

created_at
string<date-time>
required

When the session was created.

Example:

"2026-10-03T14:01:30.000Z"

updated_at
string<date-time>
required

When the session last changed. Sessions are listed by this time.

Example:

"2026-10-03T14:01:30.000Z"