# Change the agent of a client

`POST https://backend.estactics.com/api/clients/changeClientAssignee`

Assigns a client to another agent. Send `assignedToUserId` as null to remove the agent.

Authentication: `Authorization: Bearer YOUR_API_KEY`. Required permission: `clients.CHANGE_ASSIGNEE`.

## Body parameters

- `id` (integer, required): ID of the client.
- `assignedToUserId` (integer): ID of the new agent, or null to remove the agent.

## Example request body

```json
{
  "id": 1042,
  "assignedToUserId": 18
}
```

## Example response

```json
{
  "success": true,
  "data": {
    "id": 1042,
    "assignedToUserId": 18,
    "assignedToUserFullName": "Jamie Parker"
  }
}
```
