WhatsApp API Platform
Agent Assignments

Replace the full agent set for a customer

PUT
/api/v1/agents/assignments

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
X-API-Key<token>

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"
}