DELETE
/api/public/v1/agents/{agentId}

Fire an agent

Removes the agent. Hiring the same role again starts a fresh one at zero accrued minutes — there is no rehire that keeps its history. Needs `agents:admin`: firing takes the agent’s work with it, which is not the same decision as hiring one.

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:admin

Path Parameters

NameTypeRequiredDescription
agentIdstringRequiredAgent ID.
DELETEExample request
curl
curl -X DELETE "https://www.pxb.app/api/public/v1/agents/{agentId}" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Agent has been fired.",
  "content": {
    "agentId": "agt_2211"
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Employees → Agents
/employee/agents