Replace the full agent set for a customer
Sets the customer's assigned agents to exactly the provided list. The server diffs against the current set and applies the necessary adds and removes in one call. Pass an empty agentIds array to clear all assignments.
Returns three lists: added, removed, and unchanged.
Authorization
ApiKeyAuth API key from your dashboard (Settings > API Keys)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://loading/api/v1/agents/assignments" \ -H "Content-Type: application/json" \ -d '{ "customer": "919876543210", "agentIds": [ "agt_abc123", "agt_ghi789" ] }'{
"success": true,
"data": {
"added": [
"string"
],
"removed": [
"string"
],
"unchanged": [
"string"
]
}
}{
"success": false,
"message": "to field is required"
}{
"success": false,
"message": "user not authenticated"
}{
"success": false,
"message": "forbidden"
}{
"success": false,
"message": "customer not found"
}{
"success": false,
"message": "internal server error"
}List customers currently assigned to an agent GET
Paginated list. The agent must belong to your tenant.
Unassign specific agents from a customer PATCH
Removes the listed agents from a customer's assignments. Agents not currently assigned are silently ignored — the response reports only the agents actually removed.


