Skip to main content
GET
/
chats
/
{chat_id}
/
messages
Get Chat Messages
curl --request GET \
  --url https://api.example.com/chats/{chat_id}/messages
[
  {
    "id": "<string>",
    "role": "user",
    "model": "<string>",
    "status": "RUNNING",
    "created_at": "2023-12-25",
    "updated_at": "2023-12-25",
    "messages": [
      {
        "role": "system",
        "parts": [
          {
            "type": "text",
            "text": "<string>",
            "audio": {
              "id": "<string>",
              "file_path": "<string>",
              "file_filename": "document.pdf",
              "file_size": 1024,
              "file_mimetype": "application/pdf",
              "file_url": "<string>",
              "created_at": "2023-12-25"
            },
            "start_timestamp": 123,
            "end_timestamp": 123
          }
        ]
      }
    ],
    "tools": [
      {
        "name": "<string>",
        "display_name": "<string>",
        "action_name": "<string>",
        "description": "<string>",
        "icon": "StepFormIcon",
        "icon_url": "<string>",
        "connection_id": "<string>",
        "parameters": {},
        "enabled_by_default": true,
        "callback": "<string>"
      }
    ],
    "features": {
      "web_search": {},
      "reasoning": {
        "effort": "low"
      }
    },
    "member": {
      "id": "<string>",
      "role": "ADMIN",
      "user": {
        "id": "<string>",
        "name": "<string>",
        "avatar": "<string>"
      },
      "session": {
        "id": "<string>"
      },
      "contact_channel": {
        "id": "<string>",
        "channel_type": "internal",
        "channel_id": "<string>",
        "channel_name": "<string>",
        "channel_display_name": "<string>",
        "channel_avatar": "<string>",
        "country": "<string>",
        "agent": "<string>",
        "ip": "<string>",
        "language": "<string>",
        "contact": {
          "id": "<string>",
          "name": "<string>",
          "blocked": true
        },
        "link": "<string>"
      }
    },
    "error": "<string>",
    "usage": {
      "input_tokens": 123,
      "output_tokens": 123,
      "total_tokens": 123,
      "reasoning_tokens": 123,
      "cached_input_tokens": 123
    }
  }
]

Path Parameters

chat_id
string
required

Chat ID

Query Parameters

from_date
string<date> | null

The date to start fetching messages from

page
number

Page number

take
number

Number of items to take

next
string

Next page token (Only used on special endpoints)

Response

200 - application/json
id
string
required
role
enum<string>
required

The role of the message

Available options:
user,
assistant,
system,
tool,
event,
note
model
string
required

The model used for the message

status
enum<string>
required

The chat status

Available options:
RUNNING,
COMPLETED,
FAILED,
CANCELED
created_at
string<date> | null
required
updated_at
string<date> | null
required
messages
object[]

The message content

System message

tools
object[]

The tools used in the message

Maximum array length: 10
features
object

Enabled features for the model

member
object

The member of the chat

error
string

Error message if the message failed

usage
object

The usage information for the message