레퍼런스HTTP APIMessages & turns

Queued and finished turns

GET
/v1/sessions/{id}/turns

Lists the session's turns oldest first, in turn_id order: queued, running and finished, limit per page (default 50, at most 100). Pass next_cursor back as cursor for the next page; it is null on the last one. Items are summaries; read one turn for its result, usage and attempts. It changes nothing.

Scope: sessions:read (API key or cookie session).

Authorization

headerAuthorizationBearer <token>

For servers and scripts: an API key sent as an HTTP bearer token, Bearer <key>. It holds exactly the scopes it was issued with; a key issued before scopes existed holds none. It never needs the CSRF header, and it cannot manage agents, members, teams or API keys. Issue one in the web console under Settings → API keys; each operation names the scope it needs.

Scope: sessions:read

Path Parameters

id*string

The session's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Query Parameters

cursor?string

The next_cursor of the page before; omit it for the first page.

Length1 <= length
limit?integer

How many items a page holds at most.

Range1 <= value <= 100
Default50

Response Body

One page of turn summaries.

application/json
  1. response
items*array<>
next_cursor*|null
Example Request
curl -X GET 'https://example.com/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/turns'
Example Response
{  "items": [    {      "turn_id": "1",      "session_id": "0f8b6a52-3d1e-4c7a-9b2f-5e6d7c8a9b01",      "status": "completed",      "message": "Add a health check endpoint and a test for it.",      "channel": "web",      "created_by": {        "user_id": "3e7f1a90-5c2d-4b8e-8f61-2a9d0c4b7e35",        "display_name": "Mina Park"      },      "slack_permalink": null,      "terminal_reason": null,      "checkpoint_revision": 2,      "created_at": "2026-10-11T08:00:00Z",      "started_at": "2026-10-11T08:00:05Z",      "ended_at": "2026-10-11T08:03:12Z"    },    {      "turn_id": "2",      "session_id": "0f8b6a52-3d1e-4c7a-9b2f-5e6d7c8a9b01",      "status": "running",      "message": "Now add the endpoint to the README.",      "channel": "web",      "created_by": {        "user_id": "3e7f1a90-5c2d-4b8e-8f61-2a9d0c4b7e35",        "display_name": "Mina Park"      },      "slack_permalink": null,      "terminal_reason": null,      "checkpoint_revision": null,      "created_at": "2026-10-11T08:14:00Z",      "started_at": "2026-10-11T08:14:02Z",      "ended_at": null    }  ],  "next_cursor": null}