List agents and groups
Agents and groups a chat can be transferred to, with their current availability.
GET https://cotlet.dev/api/v1/livechat/agents
read
Returns the agents and groups shown in the Transfer to... dialog, with each agent's group and availability. Use the agent_id or group from here in transfer_chat. Transferring to a group lands on the first free agent in it, so no agent is chosen for a group.
Parameters
No parameters.
Request
curl https://cotlet.dev/api/v1/livechat/agents \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("livechat", "list_agents") const result = await cotlet.call('livechat', 'list_agents'); cotlet call livechat list_agents Example response
{
"agents": [
{
"agent_id": "maria@example.com",
"name": "Maria Silva",
"groups": [
"Support"
],
"available": true
}
],
"groups": [
{
"group": "Billing"
},
{
"group": "Support"
}
]
}