Agent Chat APIData structures

Overview

Data structures

The objects the Agent Chat API sends and returns, with their fields and an example of each.

WsTicket

FieldDescription

ticketstringrequired

Single-use ticket, already inside url.

urlstring (uri)required

Wss://…/v1/ws?v=1&ticket=…, ready to open.

expires_in30required

Seconds the ticket stays valid.
WsTicket exampleJSON
{
  "ticket": "f3T1dWl0LXRpY2tldC1leGFtcGxl",
  "url": "https://hooks.northwind.example/mlivechat",
  "expires_in": 30
}

QuickReply

FieldDescription

titlestringrequired

The button label; tapping sends it as the visitor's message. 1 to 40 characters.

postbackstringrequired

What the bot receives as the message's postback. 1 to 200 characters.
QuickReply exampleJSON
{
  "title": "Shipping",
  "postback": "faq:shipping"
}

LCChatSummary

FieldDescription

idstringrequired

last_event_per_typeobjectrequired

Message, file, system_message → {thread_id, thread_created_at, event}.

usersarray of LCUserrequired

last_thread_summaryobjectrequired

propertiesobjectrequired

accessLCAccessrequired

is_followedbooleanrequired

LCChatSummary exampleJSON
{
  "id": "828aec20-b9c3-7700-80fb-c1e028342cc0",
  "last_event_per_type": {},
  "users": [
    {
      "id": "828aec20-b9c3-7700-80fb-c1e028342cc0",
      "type": "customer",
      "name": "Nadia Rahman",
      "email": "nadia@shop.northwind.example",
      "present": true,
      "avatar": "avatar",
      "visibility": "visibility",
      "created_at": "2026-11-13T09:30:00Z",
      "session_fields": [
        {}
      ]
    }
  ],
  "last_thread_summary": {
    "id": "828aec20-b9c3-7700-80fb-c1e028342cc0",
    "created_at": "2026-11-13T09:30:00Z",
    "user_ids": [
      "749389f6-853a-76d0-85e2-43aaa689a084"
    ],
    "properties": {},
    "active": true,
    "access": {
      "group_ids": [
        0
      ]
    }
  },
  "properties": {},
  "access": {
    "group_ids": [
      0
    ]
  },
  "is_followed": true
}

LCUser

FieldDescription

idstringrequired

typestringrequired

Bots are agents. One of customer, agent.

namestring

emailstring

presentbooleanrequired

avatarstring

visibilitystring

Agents only.

created_atstring

Customers only.

session_fieldsarray of object

Customers only.
LCUser exampleJSON
{
  "id": "828aec20-b9c3-7700-80fb-c1e028342cc0",
  "type": "customer",
  "name": "Nadia Rahman",
  "email": "nadia@shop.northwind.example",
  "present": true,
  "avatar": "avatar",
  "visibility": "visibility",
  "created_at": "2026-11-13T09:30:00Z",
  "session_fields": [
    {}
  ]
}

LCAccess

FieldDescription

group_idsarray of integerrequired

LCAccess exampleJSON
{
  "group_ids": [
    0
  ]
}

LCThread

FieldDescription

idstringrequired

created_atstringrequired

activebooleanrequired

The thread is not closed.

user_idsarray of stringrequired

eventsarray of LCEventrequired

propertiesobjectrequired

accessLCAccessrequired

previous_thread_idstring

next_thread_idstring

LCThread exampleJSON
{
  "id": "828aec20-b9c3-7700-80fb-c1e028342cc0",
  "created_at": "2026-11-13T09:30:00Z",
  "active": true,
  "user_ids": [
    "749389f6-853a-76d0-85e2-43aaa689a084"
  ],
  "events": [
    {
      "id": "828aec20-b9c3-7700-80fb-c1e028342cc0",
      "created_at": "2026-11-13T07:57:41.512000Z",
      "type": "message",
      "text": "Orders ship within 1 business day.",
      "author_id": "19623f8a-8ab9-7d30-8c10-9ad66d67c87c",
      "visibility": "all",
      "system_message_type": "handover_requested",
      "name": "Nadia Rahman",
      "url": "https://hooks.northwind.example/mlivechat",
      "content_type": "application/pdf",
      "size": 1,
      "width": 1200,
      "height": 800,
      "properties": {}
    }
  ],
  "properties": {},
  "access": {
    "group_ids": [
      0
    ]
  },
  "previous_thread_id": "f81acd41-8943-73b8-8a6b-9a2fab9400a6",
  "next_thread_id": "a47a8181-e08c-71b8-8c9d-81ef58af0226"
}

LCEvent

IDs are strings (our UUIDs); created_at is UTC with microseconds.

FieldDescription

idstringrequired

created_atstringrequired

typestringrequired

One of message, file, system_message.

textstring

author_idstring

The agent's.

visibilitystringrequired

One of all, agents.

system_message_typestring

namestring

urlstring

content_typestring

sizeinteger

widthinteger

heightinteger

propertiesobject

Our quick replies and postback under the mlivechat namespace.
LCEvent exampleJSON
{
  "id": "828aec20-b9c3-7700-80fb-c1e028342cc0",
  "created_at": "2026-11-13T07:57:41.512000Z",
  "type": "message",
  "text": "Orders ship within 1 business day.",
  "author_id": "19623f8a-8ab9-7d30-8c10-9ad66d67c87c",
  "visibility": "all",
  "system_message_type": "handover_requested",
  "name": "Nadia Rahman",
  "url": "https://hooks.northwind.example/mlivechat",
  "content_type": "application/pdf",
  "size": 1,
  "width": 1200,
  "height": 800,
  "properties": {}
}

LCCustomer

FieldDescription

idstringrequired

typestringrequired

One of customer.

namestring

emailstring

created_atstringrequired

session_fieldsarray of objectrequired

chat_idsarray of stringrequired

statisticsobjectrequired

visitobject

LCCustomer exampleJSON
{
  "id": "828aec20-b9c3-7700-80fb-c1e028342cc0",
  "type": "customer",
  "name": "Nadia Rahman",
  "email": "nadia@shop.northwind.example",
  "created_at": "2026-11-13T09:30:00Z",
  "session_fields": [
    {}
  ],
  "chat_ids": [
    "98c7f777-40e4-7888-8901-1999911daaaa"
  ],
  "statistics": {
    "chats_count": 3,
    "visits_count": 3
  },
  "visit": {
    "last_pages": [
      {
        "url": "https://hooks.northwind.example/mlivechat",
        "title": "Shipping",
        "opened_at": "2026-11-13T09:30:00Z"
      }
    ],
    "geolocation": {
      "city": "Kuala Lumpur"
    }
  }
}