Skip to content

List AI turns

GET
/api/v1/ai/turns
curl --request GET \
--url https://example.com/api/v1/ai/turns \
--header 'Authorization: Bearer <token>'

List the caller’s recent turns, newest first. Set limit to choose how many summaries to return. Each summary includes its status, prompt snippet, and file change count. Route: /api/v1/ai/turns. Inputs: limit. Safe reads can use bounded retries.

limit
integer format: int64

Most turns to return, 1 to 100. Defaults to 50.

The User’s recent turns, newest first

Media typeapplication/json
Array<object>

One row of Turn history.

object
change_count
required

Distinct Files items this turn changed.

integer format: int64
created_ms
required
integer format: int64
error_code
string | null
finished_ms
integer | null format: int64
id
required
string
kind
required

The server-side turn policy. Ask turns get a token with a read-only scope.

string
Allowed values: agent ask
prompt_snippet
required

The first 200 characters of the User’s request.

string
provider
required

The official coding Agent selected by a prompt mention.

string
Allowed values: claude codex
status
required
string
Example
[
{
"kind": "agent",
"provider": "claude"
}
]
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}