Documentation
Transfer chat
POST
/api/bot/transferTransfer a chat from the bot to a human agent or specific group. The original bot is removed from the chat.
Request body
| Parameter | Type | Description |
|---|---|---|
chatId* | string | ID of the chat to transfer |
targetGroupId | string | Optional group to route the chat to |
reason | string | Transfer reason shown to the receiving agent |
How transfer works
- Bot receives transfer request
- System finds available agent in target group (or all agents if no group specified)
- Chat status changes to
QUEUED - System message posted: "Chat transferred by bot"
- Webhook
chat.transferredfires - Agent accepts the chat from their queue
Example request
terminal
curl -X POST https://app.bx-livechat.com/api/bot/transfer \
-H "Authorization: Bearer bxl_pat_aB7XyZ..." \
-H "Content-Type: application/json" \
-d '{
"chatId": "clxyz1234567890abc",
"targetGroupId": "grp_sales_001",
"reason": "Customer wants to speak with a human agent"
}'Response
200 OK
{
"chatId": "clxyz1234567890abc",
"newStatus": "QUEUED",
"assignedTo": null
}Auto-routing
If no
targetGroupId is specified, the system uses your organization's routing config to find the best available agent.