Skip to main content
GET
/
chat-history
/
{chatId}
/
paginated
Get Chat History
curl --request GET \
  --url https://app.splox.io/api/v1/chat-history/{chatId}/paginated \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "role": "user",
    "content": [
      {
        "type": "text",
        "text": "<string>",
        "toolCallId": "<string>",
        "toolName": "<string>",
        "args": {},
        "result": "<unknown>",
        "reasoning": "<string>"
      }
    ],
    "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": {
      "type": "<string>",
      "reason": "<string>"
    },
    "metadata": {},
    "files": [
      {
        "url": "<string>",
        "content_type": "<string>",
        "file_name": "<string>",
        "file_size": 123,
        "metadata": {}
      }
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
]
Retrieves paginated chat message history for a chat session. Messages are returned newest-first.

Usage

curl "https://app.splox.io/api/v1/chat-history/0199f200-a11b-7c8d-4444-888890abcdef/paginated?limit=20" \
  -H "Authorization: Bearer YOUR_TOKEN"

Path Parameters

ParameterTypeDescription
chatIdstring (uuid)Chat ID

Query Parameters

ParameterTypeDefaultDescription
limitinteger50Messages per page (1–200)
beforestring (RFC3339)Timestamp cursor for backward pagination. Omit to get the latest messages.

Response

Returns a bare JSON array of message objects:
[
  {
    "id": "019c3221-29dc-7735-a4e3-b42ebb1a0cf1",
    "chat_id": "0199f200-a11b-7c8d-4444-888890abcdef",
    "role": "assistant",
    "content": [
      {
        "type": "text",
        "text": "Hello! How can I help you today?"
      }
    ],
    "files": [],
    "created_at": "2025-10-22T10:01:00Z",
    "updated_at": "2025-10-22T10:01:00Z"
  },
  {
    "id": "019c3221-29dc-7735-a4e3-b42ebb1a0cf2",
    "chat_id": "0199f200-a11b-7c8d-4444-888890abcdef",
    "role": "user",
    "content": [
      {
        "type": "text",
        "text": "Summarize the latest report"
      }
    ],
    "created_at": "2025-10-22T10:00:00Z",
    "updated_at": "2025-10-22T10:00:00Z"
  }
]

Message Roles

RoleDescription
userMessage from the user
assistantResponse from the AI agent
systemSystem-level message
toolTool execution result

Content Types

TypeDescription
textPlain text content
tool-callA tool invocation with toolName and args
tool-resultResult from a tool execution
sourceSource reference with url and title

Pagination

Use the created_at timestamp of the oldest message in the current page as the before cursor for the next page:
# First page (latest messages)
curl ".../chat-history/{chatId}/paginated?limit=20"

# Next page (older messages)
curl ".../chat-history/{chatId}/paginated?limit=20&before=2025-10-22T10:00:00Z"

Notes

Authentication required. The authenticated user must own the chat session.

Authorizations

Authorization
string
header
required

API token generated from your Splox account settings. Create tokens at https://app.splox.io/account?tab=settings

Path Parameters

chatId
string<uuid>
required

Chat ID

Query Parameters

limit
integer
default:50

Messages per page (default: 50, max: 200)

Required range: x <= 200
before
string<date-time>

RFC3339 timestamp cursor for backward pagination. Omit to get latest messages.

Response

200 - application/json

Chat messages retrieved successfully (bare JSON array)

id
string<uuid>
required
chat_id
string<uuid>
required
role
enum<string>
required
Available options:
user,
assistant,
system,
tool
content
object[]
required
parent_id
string<uuid> | null
status
object
metadata
object
files
object[] | null
created_at
string<date-time>
updated_at
string<date-time>