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

Parameters: assign_conversation
NameTypeDescription
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
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"}'
Python
result = client.call("freshchat", "assign_conversation", {"conversation_id":"1a4d7c0e-5b8f-4e23-9c6a-0d3f6b9e2a51","agent_id":"2f8a1c3e-9b47-4d60-a5e2-7c1d0b9f3a45"})
Node.js
const result = await cotlet.call('freshchat', 'assign_conversation', {"conversation_id":"1a4d7c0e-5b8f-4e23-9c6a-0d3f6b9e2a51","agent_id":"2f8a1c3e-9b47-4d60-a5e2-7c1d0b9f3a45"});
CLI
cotlet call freshchat assign_conversation --data '{"conversation_id":"1a4d7c0e-5b8f-4e23-9c6a-0d3f6b9e2a51","agent_id":"2f8a1c3e-9b47-4d60-a5e2-7c1d0b9f3a45"}'

Example response

JSON

{
  "conversation_id": "7c1e5a90-3b2d-4f68-a4c1-9e0d2b6f8a31",
  "status": "assigned",
  "assigned_group": {
    "group_id": "4d5e6f70-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
    "name": "Billing"
  },
  "assigned_agent": null
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.