Agents

Create agent

POST /api/v1/agents

Create agent

Creates an agent for the authenticated account. Parent accounts may provide a direct child's accountId when the session or bearer token has agents:write scope.

Request body

CreateAgent

Field Type Description
name * string

Agent display name.

accountId integer

Client account id. Defaults to the authenticated account.

Responses

Status Schema Description
201 PublicAgent

Agent created

400 AgentError

Invalid request body

401 AgentError

Missing or invalid auth

403 AgentError

Caller cannot create agents for this company

Example 201 response
{
    "id": 1,
    "identifier": "string",
    "name": "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"
        }
    ]
}