POST
/api/public/v1/agentsHire an agent
Takes on an agent for a role. Hiring a role the company already has returns 409 rather than a second agent. `hoursLimit` caps what it may work in a cycle; `autoScaling` lets it exceed that when there is work waiting rather than stopping dead.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.
agents:write
Request Body
| Property | Type | Description |
|---|---|---|
type | string | The desk it works. Also decides its name. |
hoursLimit | number | Hours per cycle. |
autoScaling | boolean | Defaults to true. |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/agents" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"type": "CUSTOMER_SUPPORT",
"hoursLimit": 40
}'200Example response
json
{
"message": "Customer Support agent hired!",
"content": {
"agent": {
"id": "agt_2211",
"referenceId": 4,
"type": "CUSTOMER_SUPPORT",
"name": "Customer Support",
"hoursLimit": 40,
"autoScaling": true,
"minutesAccrued": 812,
"createdAt": "2026-05-02T09:00:00.000Z",
"updatedAt": "2026-08-29T09:00:00.000Z"
}
}
}409Example response
json
{
"message": "You have already hired a Customer Support."
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.