List chats

GET/api/bot/chats

Lists up to 50 chats with their 5 most recent messages.

Query parameters

ParameterTypeDescription
statusstring= ACTIVEFilter by chat status. One of QUEUED, ACTIVE, TRANSFERRED, CLOSED, or ARCHIVED.

Example request

cURL
curl https://app.bx-livechat.com/api/bot/chats?status=ACTIVE \
  -H "Authorization: Bearer bxl_pat_aB7XyZ..."

Example response

200 OK
{
  "chats": [
    {
      "id": "clxyz1234567890abc",
      "status": "ACTIVE",
      "channel": "WIDGET",
      "createdAt": "2025-07-01T08:30:00.000Z",
      "lastMessageAt": "2025-07-01T08:32:15.000Z",
      "visitor": {
        "id": "vis_abc123",
        "name": "John Doe",
        "email": "[email protected]"
      },
      "group": {
        "id": "grp_sales",
        "name": "Sales"
      },
      "messages": [
        {
          "id": "msg_001",
          "type": "TEXT",
          "content": "Hi, I need help with pricing.",
          "senderId": null,
          "createdAt": "2025-07-01T08:30:00.000Z"
        },
        {
          "id": "msg_002",
          "type": "TEXT",
          "content": "Sure! Let me pull up our plans.",
          "senderId": "agent_bot_01",
          "createdAt": "2025-07-01T08:30:05.000Z"
        }
      ]
    }
  ]
}
Response notes
  • A maximum of 50 chats is returned, newest first.
  • Each chat includes up to 5 most recent messages.
  • A senderId of null means the message was sent by the visitor.