Skip to content

List delegations

GET
/delegations
Code sample: Shell / cURL
curl --request GET \
--url 'https://example.com/api/v1/delegations?state=Delegated&page=1&perPage=20' \
--header 'Authorization: Bearer <token>'

Lists the tickets handed to AI agents, newest first, limited to the projects the caller reaches. Filter by agent member, ticket and state; each item carries the agent’s newest delivery. Requires tasks.view.

agentMemberId

Only the delegations held by this agent member

string

Only the delegations held by this agent member

taskId

Only the delegations of this ticket

string

Only the delegations of this ticket

state

Only the delegations in this state

string
Allowed values: Delegated NotStarted Queued Working WaitingForInfo InReview Approved Failed Withdrawn

Only the delegations in this state

page
integer
default: 1 > 0 <= 9007199254740991
perPage
integer
default: 20 >= 1 <= 100

A page of delegations.

Media typeapplication/json
object
data
required
Array<object>

A delegation with its ticket, agent and newest delivery.

object
accountableMemberId
required
string
acknowledgedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
agentMemberId
required
string
agentName
required
string
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
failureReason
required
string | null
id
required
string
lastAgentActivityAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
latestDelivery
required
Any of:

What an agent delivered for review: a pull request or a report, with its preview, summary, evidence and cost.

object
costUsd
required

What the agent reported this revision cost, in US dollars

number | null
deployNotes

Markdown: the steps a person must do that the agent could not; null when none; absent on an older server

string | null
evidence
required

Links the agent gave as evidence, in its order

Array<object>
object
label
required
string
url
required
string
migrationPlan

Markdown: release order, command, verification queries and rollback of a schema change; null when none; absent on an older server

string | null
pageUrl
required
string | null
prState
required
string | null
prUrl
required

The pull request; null for a report

string | null
previewUrl
required
string | null
revision
required
integer
>= -9007199254740991 <= 9007199254740991
summary
required
string | null
managedSession

The agent’s session when it runs on Anthropic, null when it ran none; absent on an older server

Any of:

The newest session an agent that runs on Anthropic worked this delegation in, with its status, cost and pull request.

object
costEstimated
required

True when the cost could not be read and costUsd is the session’s whole budget

boolean
costUsd
required

The session’s list cost in US dollars; null while it runs

number | null
finishedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
pullRequestUrl
required

The pull request the delegation was delivered with; null for a report

string | null
startedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
status
required

CREATING and FINISHING are short; RUNNING means the agent is working

string
Allowed values: CREATING RUNNING FINISHING DONE FAILED
projectId
required
string
requiresPullRequest
required

True when the agent delivers a pull request (a code agent), false when it delivers a report

boolean
revision
required
integer
>= -9007199254740991 <= 9007199254740991
state
required
string
Allowed values: Delegated NotStarted Queued Working WaitingForInfo InReview Approved Failed Withdrawn
stateEnteredAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
taskId
required
string
taskNumber
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
taskTitle
required
string
meta
required

Pagination metadata for list responses.

object
page
required
integer
>= -9007199254740991 <= 9007199254740991
perPage
required
integer
>= -9007199254740991 <= 9007199254740991
total
required
integer
>= -9007199254740991 <= 9007199254740991
totalPages
required
integer
>= -9007199254740991 <= 9007199254740991

Example

{
"data": [
{
"managedSession": {
"status": "CREATING"
},
"state": "Delegated"
}
]
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.