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

Parameters: assign_conversation
NameTypeDescription
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
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}'
Python
result = client.call("chatwoot", "assign_conversation", {"conversation_id":1842,"team_id":4})
Node.js
const result = await cotlet.call('chatwoot', 'assign_conversation', {"conversation_id":1842,"team_id":4});
CLI
cotlet call chatwoot assign_conversation --data '{"conversation_id":1842,"team_id":4}'

Example response

JSON

{
  "conversation_id": 1842,
  "assignee": null,
  "team": {
    "team_id": 4,
    "name": "Billing"
  }
}

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.