PATCH
/api/public/v1/agents/{agentId}Update an agent
Changes its hours limit or its auto-scaling. The role and the name are fixed — an agent is defined by the desk it works.
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
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
agentId | string | Required | Agent ID. |
Request Body
| Property | Type | Description |
|---|---|---|
hoursLimit | number | Send null for no cap. |
autoScaling | boolean |
PATCHExample request
curl
curl -X PATCH "https://www.pxb.app/api/public/v1/agents/{agentId}" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"hoursLimit": 60
}'200Example response
json
{
"message": "Agent updated successfully!",
"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"
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.
Employees → Agents
/employee/agents