Chat and AI hotel guide
The chat routes let a guest message a department or ask the AI hotel guide, and let staff read and answer the department chats. A chat is a thread of messages for one stay. For sign-in and calling see the Concierge API.
Resources¶
| Resource | What it is |
|---|---|
| Thread | A conversation of one stay with one department, or with the AI hotel guide (isAi: true). |
| Message | One line in a thread, from the guest (guest), staff (staff) or the assistant (ai). |
| Handoff | The guest's choice to chat or call the team instead of the assistant. |
Authentication and permissions¶
Guest routes need a guest session token; /staff/threads… routes need a staff access token. See the
Concierge API. Staff see the threads of the departments they work in.
Base path¶
Capabilities¶
- A guest opens a thread with a department or the AI guide, sends messages, and reads the history
- New department threads are answered first by the hotel assistant; a person joins on request, on a request to do something, after unsure answers, on a thumbs-down, or at once for an emergency
- Guest messages get an English translation for staff, and staff replies are translated back to the guest's language, in the background
- The first staff member to accept a chat has it; others are refused
- Conversation memory in the AI guide: each question is answered on its own (planned)
Object model¶
Thread¶
| Field | Type | Description |
|---|---|---|
id |
integer | ID of the thread. |
stayId |
integer | The stay. |
departmentId |
integer | The department. Absent for the AI guide. |
isAi |
boolean | true for the AI hotel guide thread. |
aiFirst |
boolean | true if the assistant answers first. |
status |
string | ai, offered, waiting, claimed, closed. Empty on older threads. |
handoffReason |
string | Why a person was offered: person, request, unsure, long, not_helpful, emergency. |
guestLanguage |
string | Language name, for example Thai. Detected from the first message, or set with PATCH /threads/{id}/language. Once set to a language, the guide answers in it. |
claimedBy |
string | The staff member who has the chat. |
closedAt |
string or null |
Message¶
| Field | Type | Description |
|---|---|---|
id, threadId |
integer | |
senderType |
string | guest, staff or ai. |
body |
string | The text. The AI guide may use **bold** and - bullets only. |
translatedBody |
string | English translation for staff, or the guest-language translation. Absent until it is ready; it can stay absent if translation fails. |
cards |
array | Cards of hotel information the assistant attached. |
redirect |
object | {departmentId, name} when the request belongs to another department. |
createdAt |
string (ISO 8601 UTC) |
{
"id": 301,
"threadId": 88,
"senderType": "ai",
"body": "The pool is open **07:00 to 21:00**.",
"createdAt": "2026-11-16T08:52:10Z"
}
Lists¶
Thread and message lists are not paginated: no page or limit, and the whole list comes back in data.
| List | Order |
|---|---|
GET /threads/{id}/messages, and messages in GET /threads/{id} |
Oldest first |
GET /staff/threads |
Most recently active first. ?status=waiting,claimed filters. |
curl "https://<API_HOST>/api/v1/concierge/threads/88/messages" \
-H "Authorization: Bearer <GUEST_TOKEN>"
{
"success": true,
"data": [
{
"id": 300,
"createdAt": "2026-11-16T08:52:02Z",
"updatedAt": "2026-11-16T08:52:02Z",
"deletedAt": null,
"threadId": 88,
"senderType": "guest",
"body": "What time does the pool open?"
},
{
"id": 301,
"createdAt": "2026-11-16T08:52:10Z",
"updatedAt": "2026-11-16T08:52:10Z",
"deletedAt": null,
"threadId": 88,
"senderType": "ai",
"body": "The pool is open **07:00 to 21:00**."
}
]
}
States¶
status |
Meaning |
|---|---|
ai |
The assistant answers every guest message. |
offered |
The assistant answers and the guest is offered the team, with handoffReason. |
waiting |
The guest asked for the team. The assistant stays silent and the team is notified. |
claimed |
One staff member accepted. The assistant stays silent. |
closed |
Staff closed it. The guest's next message starts the assistant again. |
Errors¶
| Status | When | What to do |
|---|---|---|
400 |
Invalid ID or body; body empty; neither ai: true nor departmentId on thread creation |
Fix the request. |
401 |
No valid token | Sign in again. |
403 |
Staff token without an organization | Use a token with an organization. |
404 |
The thread or department isn't found for you | Check the ID. |
409 |
The chat is closed (handoff), or {"claimedBy": "<user>"} when another staff member has it |
Send a message to start again; leave it to the person named. |
Bodies as returned:
400. Others: invalid id param, either ai:true or a departmentId is required.
401 on a guest route. A staff route (/staff/threads…) answers { "message": "Unauthorized - No token provided" }.
403.
404.
409 has the same error shape. When another staff member has the chat, the body also names them as claimedBy.
Endpoints¶
Guest routes (guest session token):
| Method and path | What it does |
|---|---|
GET /departments |
The departments the guest can contact. |
POST /threads |
Open a thread. Body {"departmentId": 3} or {"ai": true}. If one exists for this stay, it is returned: safe to repeat. |
DELETE /threads |
Reset all of the stay's threads (demo reset). |
GET /threads/{id} |
{thread, messages}: the thread with its status and the history. |
GET /threads/{id}/messages |
History, oldest first. |
POST /threads/{id}/messages |
Send {"body": "…"}. Returns the updated list, including the assistant's or the standard reply. |
PATCH /threads/{id}/language |
{"language": "Thai"}. An empty value goes back to answering in the language of the question. |
POST /threads/{id}/handoff |
{"mode": "chat"} or {"mode": "call"}. For call, the answer has startCall: true and departmentId: then POST /calls. |
POST /threads/{id}/not-helpful |
Thumbs-down: a person is offered. |
Staff routes (staff access token):
| Method and path | What it does |
|---|---|
GET /staff/threads |
Department threads, most recently active first. ?status=waiting,claimed filters. |
GET /staff/threads/{id}/messages |
History with translations. |
POST /staff/threads/{id}/messages |
Reply {"body": "…"}. Takes the chat if nobody has it; 409 with claimedBy otherwise. |
POST /staff/threads/{id}/accept |
Take the chat. First wins; the others get 409 with claimedBy. |
POST /staff/threads/{id}/release |
Give the chat back to the whole team. |
POST /staff/threads/{id}/close |
End the conversation. |
DELETE /staff/threads/{id} |
Remove the thread from staff's view. |
All responses use {"success": true, "data": …}.
Related¶
- Concierge API: sign-in and calling
- Voice commands
- Changelog