SMAO API Documentation
Public APIWebsite chats

Get a website chat with its messages

GET
/chats/{chat_id}

The chat and the messages the visitor saw, oldest first: visitor messages, AI replies, team replies, and system notices. Internal messages such as the AI's tool calls are not included. Reading a chat never marks it as read.

Authorization

bearerAuth
AuthorizationBearer <token>

API key in the Authorization: Bearer <key> header. Keys are created in the SMAO dashboard (Settings → API Keys).

In: header

Path Parameters

chat_id*string

The chat's UUID, as the dashboard Inbox shows it and listChats returns it.

Match^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/chats/3f2b8c1e-9a4d-4c6b-8f1e-2d7a5b9c0e41"
{  "data": {    "id": "string",    "widget_id": "string",    "widget_name": "string",    "assistant_id": "string",    "assistant_name": "string",    "language": "string",    "status": "open",    "current_responder": "ai",    "needs_human": true,    "human_request_reason": "explicit_request",    "human_requested_at": "2019-08-24T14:15:22Z",    "human_takeover_at": "2019-08-24T14:15:22Z",    "visitor": {      "name": "string",      "email": "user@example.com"    },    "page_url": "string",    "origin": "string",    "last_message_preview": "string",    "last_message_author": "visitor",    "last_message_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "closed_at": "2019-08-24T14:15:22Z",    "messages": [      {        "id": "string",        "sequence": 1,        "author": "visitor",        "author_name": "string",        "content": "string",        "created_at": "2019-08-24T14:15:22Z"      }    ],    "messages_truncated": true  }}