Skip to content

Page durable input Turns

GET
/v1/sessions/{sessionId}/turns
curl --request GET \
--url 'https://example.com/v1/sessions/9f2b7c14-59d3-4f7a-b8e1-2a6c05d4e731/turns?after=-1&limit=100' \
--header 'Authorization: Bearer <token>'

Requires wamp.cloud.sessions:read. Turns are the immutable record of what was asked, ascending by ordinal from 0, and are never rewritten — the agent’s answer lives in the event log and in artifacts, not here. Page with after (exclusive, so the default -1 starts at ordinal 0) and feed nextAfter back; hasMore false means you are current, and a later Turn can still appear. dispatch is the admission story rather than the outcome: pending is committed but not yet handed to an engine, attempted has been handed over at least once, confirmed was accepted, and rejected will never run. Each Turn’s run.id is identical to its own id.

sessionId
required

A UUID identifying one Cloud resource; Session, Turn, Publication and Merge ids are minted by the caller so an ambiguous retry addresses the same durable command instead of creating a second one.

string format: uuid
Example
9f2b7c14-59d3-4f7a-b8e1-2a6c05d4e731

A UUID you mint and own; it is the idempotency key for creation and the address of every Turn, artifact and publication underneath

after
integer
default: -1 >= -1

Exclusive Turn ordinal cursor

limit
integer
default: 100 >= 1 <= 100

Turns per page, 1-100, default 100

Turn page

Media typeapplication/json

One page of a Session’s durable input Turns in ascending ordinal order.

object
turns
required

Turns on this page, oldest first

Array<object>

One immutable caller-supplied input to a Session, together with the delivery state of the single Run it created.

object
id
required

The caller-owned Turn id; the one Run admitted with it carries this exact same value

string format: uuid
sessionId
required

Session this Turn belongs to

string format: uuid
ordinal
required

Session-local admission order starting at 0, and the value Turn paging is keyed on

integer
input
required

The immutable admitted input — the message plus whatever model, runtime and reply the caller actually requested

object
message
required
string
model
string
runtime
string
replyTo
object
interactionId
string
dispatch
required

Durable hand-off state to the engine: pending before a worker claims it, attempted once delivery started, confirmed when the engine accepted it, rejected when it definitively did not

string
Allowed values: pending attempted confirmed rejected
run
required

The single Run this Turn created; its id equals the Turn id

object
id
required

A UUID identifying one Cloud resource; Session, Turn, Publication and Merge ids are minted by the caller so an ambiguous retry addresses the same durable command instead of creating a second one.

string format: uuid
createdAt
required

When admission committed the Turn, which is before any compute necessarily existed

string format: date-time
nextAfter
required

Exclusive Session-local ordinal to send as after next time; it never regresses, and an empty page returns the value you sent

integer
hasMore
required

Whether more Turns follow this page

boolean
Example
{
"turns": [
{
"id": "c47a1e08-3d6b-4a92-9f15-8b70d2e5c6a4",
"sessionId": "9f2b7c14-59d3-4f7a-b8e1-2a6c05d4e731",
"ordinal": 0,
"input": {
"message": "Add rate limiting to the payments endpoint and open a PR",
"model": "claude-opus-5",
"runtime": "wamp"
},
"dispatch": "confirmed",
"run": {
"id": "c47a1e08-3d6b-4a92-9f15-8b70d2e5c6a4"
},
"createdAt": "2026-08-12T09:20:31Z"
},
{
"id": "8f2d5b41-6e0c-47a9-b3d8-51ca9e07f2b6",
"sessionId": "9f2b7c14-59d3-4f7a-b8e1-2a6c05d4e731",
"ordinal": 1,
"input": {
"message": "Use a sliding window of 100 requests per minute per API key.",
"model": "claude-opus-5",
"runtime": "wamp",
"replyTo": {
"interactionId": "toolu_01H8sZ4kQm2rVn9pXfB3tGdA"
}
},
"dispatch": "pending",
"run": {
"id": "8f2d5b41-6e0c-47a9-b3d8-51ca9e07f2b6"
},
"createdAt": "2026-08-12T09:46:12Z"
}
],
"nextAfter": 1,
"hasMore": false
}

The resource is missing or inaccessible

Media typeapplication/json

Failure body returned with every non-2xx JSON response; branch on the machine code, never on prose or on the HTTP status alone.

object
error
required

Stable machine code

string
requiredScope

The installation capability the presented credential lacks, returned with insufficient_scope so an integrator knows exactly which capability to request

string
retryAfterSeconds

Advisory seconds to wait before retrying; returned on rate-limit denials, where the Retry-After header carries the same value

integer
>= 1
key
additional properties
any
Example
{
"error": "cloud_session_not_found"
}