Assign conversation
Assign a conversation to an agent or a group.
POST https://cotlet.dev/api/v1/freshchat/conversations/{conversation_id}/assign
write
Sets the assignee of one conversation to an agent_id, a group_id or both. It needs an Account Owner or Admin, because Freshchat limits assigning to those roles. Assigning reaches no customer and is undone with one call, so it does not wait for your OK. Assignment Rules and IntelliAssign still handle new conversations on their own; this call overrides the current assignee.
Parameters
| Name | Type | Description |
|---|---|---|
| conversation_id string required | string | Conversation ID from list_conversations. |
| agent_id string | string | Agent from list_agents. |
| group_id string | string | Group from list_groups. |
Request
curl -X POST https://cotlet.dev/api/v1/freshchat/conversations/1a4d7c0e-5b8f-4e23-9c6a-0d3f6b9e2a51/assign \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"agent_id":"2f8a1c3e-9b47-4d60-a5e2-7c1d0b9f3a45"}' result = client.call("freshchat", "assign_conversation", {"conversation_id":"1a4d7c0e-5b8f-4e23-9c6a-0d3f6b9e2a51","agent_id":"2f8a1c3e-9b47-4d60-a5e2-7c1d0b9f3a45"}) const result = await cotlet.call('freshchat', 'assign_conversation', {"conversation_id":"1a4d7c0e-5b8f-4e23-9c6a-0d3f6b9e2a51","agent_id":"2f8a1c3e-9b47-4d60-a5e2-7c1d0b9f3a45"}); cotlet call freshchat assign_conversation --data '{"conversation_id":"1a4d7c0e-5b8f-4e23-9c6a-0d3f6b9e2a51","agent_id":"2f8a1c3e-9b47-4d60-a5e2-7c1d0b9f3a45"}' Example response
{
"conversation_id": "7c1e5a90-3b2d-4f68-a4c1-9e0d2b6f8a31",
"status": "assigned",
"assigned_group": {
"group_id": "4d5e6f70-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
"name": "Billing"
},
"assigned_agent": null
}