Transfer chat

POST/api/bot/transfer

Transfer a chat from the bot to a human agent or specific group. The original bot is removed from the chat.

Request body

ParameterTypeDescription
chatId*stringID of the chat to transfer
targetGroupIdstringOptional group to route the chat to
reasonstringTransfer reason shown to the receiving agent

How transfer works

  1. Bot receives transfer request
  2. System finds available agent in target group (or all agents if no group specified)
  3. Chat status changes to QUEUED
  4. System message posted: "Chat transferred by bot"
  5. Webhook chat.transferred fires
  6. 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.