Assign conversation
Assign a conversation to an agent or a team, or remove its assignee.
POST https://cotlet.dev/api/v1/chatwoot/conversations/{conversation_id}/assign
write
Sets the Assignee, the Team or both. Pass agent_id from list_agents, team_id from list_teams, or unassign true to remove the assignee. Assigning does not change the status. assign_conversation runs without asking first: it reaches no customer and is undone with one call.
Parameters
| Name | Type | Description |
|---|---|---|
| conversation_id integer required | integer | conversation_id from list_conversations. It is the number in the conversation URL. |
| agent_id integer | integer | agent_id from list_agents. |
| team_id integer | integer | team_id from list_teams. |
| unassign boolean | boolean | true removes the assignee. |
Request
curl -X POST https://cotlet.dev/api/v1/chatwoot/conversations/1842/assign \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"team_id":4}' result = client.call("chatwoot", "assign_conversation", {"conversation_id":1842,"team_id":4}) const result = await cotlet.call('chatwoot', 'assign_conversation', {"conversation_id":1842,"team_id":4}); cotlet call chatwoot assign_conversation --data '{"conversation_id":1842,"team_id":4}' Example response
{
"conversation_id": 1842,
"assignee": null,
"team": {
"team_id": 4,
"name": "Billing"
}
}