Skip to main content
GET
/
v1
/
messages
Error
A valid request URL is required to generate request examples
{
  "messages": [
    {
      "id": "<string>",
      "parts": [
        {}
      ],
      "metadata": {}
    }
  ],
  "hasMore": true,
  "totalCount": 123,
  "title": "<string>"
}

Authorizations

Authorization
string
header
required

Org API key (scopes the request to its organization) or the shared trusted key (requires X-Organization-Id on every request).

Headers

X-Organization-Id
string

Organization to scope the request to. Optional when authenticating with an org API key (the org is taken from the key; if sent, it must match). Required when authenticating with the trusted key.

X-User-Id
string

End-user identity for the request; user-scoped data (threads, memory) resolves to {orgId}_{userId}. Required by endpoints that read or write user-scoped resources. A userId query param (or body field, where documented) is accepted as a fallback.

Query Parameters

threadId
string
required

Thread identifier

limit
number
default:10

Maximum number of messages to return (max 50, default 10)

Required range: 1 <= x <= 50
offset
number
default:0

Number of messages to skip for pagination

Required range: x >= 0

Response

Messages in UIMessage format

messages
object[]
hasMore
boolean
totalCount
number
title
string

The thread title (null if unset or thread not found)