REST API reference
Everything you can do with an API key. Requests and responses are JSON; authentication, quotas, errors and pagination are described in the overview.
Base URL
https://livechat.ae/api/v1
Every request needs Authorization: Bearer lck_…. Requests with a body need Content-Type: application/json.
Account
Get the account and usage
The account the key belongs to, the key itself and this month's usage. Handy to check a key.
{
"account": { "id": "7ff865a3-af91-…", "name": "Acme Store", "plan": "growth" },
"key": { "name": "CRM", "prefix": "lck_Xb3kQ", "readOnly": false },
"usage": { "month": "2026-11", "calls": 1520, "limit": 20000, "planLimit": 20000, "extra": 0 }
}
limit is -1 when unlimited; extra counts the extra calls you bought.
Team
List agents
Active people on your team, and whether they are online in the panel right now.
{
"data": [
{ "username": "anna@acme.com", "name": "Anna", "role": "admin", "online": true },
{ "username": "marco@acme.com", "name": "Marco", "role": "agent", "online": false }
]
}
role is one of admin, supervisor, agent.
List departments
{ "data": [ { "id": 3, "name": "Sales" }, { "id": 4, "name": "Support" } ] }
Chats
List chats
| Parameter | Description |
|---|---|
status | all (default), open (queued or active), queued, active, closed |
since | Chats started at or after this time (2026-11-01 or 2026-11-01T08:00:00Z) |
until | Chats started before this time |
page, per_page | Pagination (per_page up to 100) |
curl "https://livechat.ae/api/v1/chats?status=closed&since=2026-11-01&per_page=50" \
-H "Authorization: Bearer lck_your_key"
Returns a paginated list of chat objects without messages, newest first.
Get a chat with its messages
The chat object plus messages, oldest first:
"messages": [
{ "id": 901, "type": "visitor", "author": "Sara", "text": "Do you ship to Dubai?", "createdAt": "2026-11-19T10:02:11Z" },
{ "id": 902, "type": "agent", "author": "Anna", "text": "Yes, in 24 hours!", "createdAt": "2026-11-19T10:02:40Z" },
{ "id": 903, "type": "note", "author": "Anna", "text": "VIP customer", "createdAt": "2026-11-19T10:03:05Z" },
{ "id": 904, "type": "visitor", "author": "Sara", "text": null,
"attachment": { "name": "order.pdf", "contentType": "application/pdf", "size": 48211 }, "createdAt": "2026-11-19T10:04:00Z" }
]
| type | Meaning |
|---|---|
visitor | Written by the visitor |
agent | Written by an agent (or an AI agent) |
note | Internal note of the team, never shown to the visitor |
system | Automatic event (chat taken, transferred, closed…). It may carry a code and args instead of text |
The chat object
{
"id": "c1f0b6a2-…",
"status": "closed",
"visitor": { "id": "v_8d2…", "name": "Sara", "email": "sara@example.com", "country": "AE", "language": "en" },
"department": { "id": 3, "name": "Sales" },
"agent": { "username": "anna@acme.com", "name": "Anna" },
"page": { "url": "https://acme.com/shoes", "title": "Shoes – Acme" },
"rating": "good",
"ratingComment": "Very fast, thanks",
"tags": ["order", "vip"],
"lastMessage": "Thanks, bye!",
"createdAt": "2026-11-19T10:02:11Z",
"firstAgentReplyAt": "2026-11-19T10:02:40Z",
"lastMessageAt": "2026-11-19T10:09:58Z",
"closedAt": "2026-11-19T10:10:30Z"
}
status: queued (waiting for an agent), active, closed. rating: good, bad or null. Fields that are unknown are null.
Tickets
List tickets
| Parameter | Description |
|---|---|
status | all (default), open, pending (waiting for the customer), solved |
assignee | Username of the agent the ticket is assigned to |
page, per_page | Pagination; most recently updated first |
{
"data": [ {
"id": 1042, "subject": "Return request", "status": "open", "priority": "high",
"requester": { "name": "Luca", "email": "luca@example.com" },
"assignee": { "username": "anna@acme.com", "name": "Anna" },
"tags": ["return"], "source": "chat", "chatId": "c1f0b6a2-…",
"createdAt": "2026-11-19T10:12:00Z", "updatedAt": "2026-11-19T11:30:00Z", "solvedAt": null
} ],
"page": 1, "perPage": 25, "total": 1, "totalPages": 1
}
source: chat (created from a chat), offline (message left when nobody was online), agent (created in the panel), api. priority: low, normal, high, urgent.
Get a ticket
The ticket plus your custom fields and the whole thread in messages:
"fields": { "Order number": "A-5521" },
"messages": [
{ "id": 1, "type": "requester", "author": "Luca", "text": "I'd like to return…", "createdAt": "…" },
{ "id": 2, "type": "reply", "author": "Anna", "text": "Sure, here is the label…", "emailed": true, "createdAt": "…" },
{ "id": 3, "type": "note", "author": "Anna", "text": "Refund approved", "createdAt": "…" },
{ "id": 4, "type": "system", "author": "Anna", "text": "status: solved", "createdAt": "…" }
]
Create a ticket
Opens a ticket and emails the first message to the customer. Needs a read-write key.
curl -X POST https://livechat.ae/api/v1/tickets \
-H "Authorization: Bearer lck_your_key" \
-H "Content-Type: application/json" \
-d '{
"subject": "Your order A-5521",
"requesterName": "Luca",
"requesterEmail": "luca@example.com",
"message": "Hi Luca, your order has shipped.",
"priority": "normal"
}'
| Field | Description |
|---|---|
requesterEmail | Required. The customer's email: your messages and replies are sent here |
message | Required. First message, sent by email |
subject | Up to 200 characters |
requesterName | Customer name |
priority | low, normal (default), high, urgent |
Answers 201 Created with the ticket, its fields and messages. Tickets created with the API have "source": "api" and no assignee; the author of their messages is shown as "API · key name".
Reply or add a note
{ "text": "We've sent the replacement today.", "internal": false }
With "internal": false (default) the text is emailed to the customer and an open ticket becomes pending; with true it's an internal note. Text up to 20,000 characters. Answers 201 with the message.
Update a ticket
Send only what changes:
{
"status": "solved",
"priority": "low",
"assignee": "anna@acme.com",
"tags": ["return", "refunded"],
"fields": { "Order number": "A-5521" }
}
| Field | Description |
|---|---|
status | open, pending, solved |
priority | low, normal, high, urgent |
assignee | Username of an active agent; "" to unassign |
tags | Replaces all tags |
fields | Your custom ticket fields (set them up in Administration → Tickets); replaces all values |
subject | New subject |
Changes to status, priority and assignee are written in the ticket thread and sent as ticket.updated webhooks.