Skip to main content
PATCH
Rename a session

Authorizations

X-Api-Key
string
header
required

Workspace API key, created in the dashboard under Settings → API Keys.

Path Parameters

id
string
required

Session ID.

Body

application/json
name
string | null
required

New display name (trimmed); null clears it.

Required string length: 1 - 120
workspaceId
string<uuid>

Optional for workspace-scoped API keys.

Response

Updated session

One run. Content is kept for the workspace's history window; each *ExpiresAt field says when the matching field expires.

id
string
required
prompt
string
required
status
enum<string>
required
Available options:
queued,
running,
executing,
awaiting_human,
complete,
completed,
failed,
cancelled
createdAt
string<date-time>
required
deviceId
string | null
workspaceId
string<uuid> | null
app
string | null
outputSchema
object | null
output

Structured output. Populated when status == completed. Shape is caller-defined via outputSchema on session create.

error
string | null

Machine-readable failure code when status == failed. Known code: secret_required:<name> - a run created with an API key needed a credential or 2FA code (<name> is the agent's slug for it, for example gmail_password) that it was not given. The run ends immediately rather than waiting for a human. Save the secret in the workspace, then retry the run naming it in secrets (<item_slug>.<field>). Dashboard runs never fail this way: they pause in awaiting_human and are answered in the dashboard. Known code: credits_exhausted - the run's model cost reached the workspace's credit balance at the time the run started, so it stopped; upgrade the plan or buy a credit pack, then continue the session.

startedAt
string<date-time> | null
completedAt
string<date-time> | null
maxDurationSecs
integer<int64> | null

Effective per-session duration cap in seconds as persisted by the API at session creation. Null means a historical row has no persisted cap; consumers must not infer the current default from null.

agentId
string<uuid> | null

The agent that ran this turn; null for runs started without an agent.

name
string | null

Display name; null means derive it from the prompt.

promptExpiresAt
string<date-time> | null
outputExpiresAt
string<date-time> | null
nameExpiresAt
string<date-time> | null
errorExpiresAt
string<date-time> | null