Agents

List agents

GET /api/v1/agents

List agents

Returns paginated agents with their account properties and supports filtering by accountId or externalAccountId and sorting by id, name, or identifier. Children only receive their own agents; parents also receive agents from direct child accounts. Instructions are never included.

Parameters

Name In Type Description
accountId query integer

Filter agents by internal account id.

externalAccountId query string

Filter agents by external account id.

cursor query string

Opaque cursor returned by the previous page.

limit query integer

Maximum number of agents to return.

sort query string

Agent field used to sort results.

order query string

Sort direction.

Responses

Status Schema Description
200 AgentList

Accessible agents with their accounts

400 AgentError

Invalid query params

401 AgentError

Missing or invalid auth

403 AgentError

Caller cannot access agents for this company

Example 200 response
{
    "data": [
        {
            "id": 1,
            "identifier": "string",
            "name": "string",
            "account": {
                "id": 1,
                "externalId": "string",
                "name": "string",
                "parentId": 1
            }
        }
    ],
    "pageInfo": {
        "hasNextPage": true,
        "endCursor": "string"
    }
}
Example 400 response
{
    "error": "string",
    "message": "string",
    "issues": [
        {
            "path": [
                "string"
            ],
            "message": "string",
            "code": "string"
        }
    ]
}
Example 401 response
{
    "error": "string",
    "message": "string",
    "issues": [
        {
            "path": [
                "string"
            ],
            "message": "string",
            "code": "string"
        }
    ]
}
Example 403 response
{
    "error": "string",
    "message": "string",
    "issues": [
        {
            "path": [
                "string"
            ],
            "message": "string",
            "code": "string"
        }
    ]
}