Skip to main content
GET
/
v2
/
messages
List Messages (v2 - UIMessage format)
curl --request GET \
  --url https://api.example.com/v2/messages
{
  "data": [
    {
      "id": "<string>",
      "parts": [
        {
          "text": "<string>",
          "type": "text"
        }
      ],
      "role": "system",
      "createdAt": "<string>",
      "metadata": {
        "costUsd": 123,
        "durationMs": 123,
        "model": "<string>",
        "parentToolUseId": "<string>",
        "usage": {
          "inputTokens": 123,
          "outputTokens": 123,
          "totalTokens": 123
        }
      }
    }
  ],
  "hasMore": false,
  "nextCursor": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.terminaluse.com/llms.txt

Use this file to discover all available pages before exploring further.

Query Parameters

limit
integer
default:50
cursor
string | null
direction
enum<string>
default:older
Available options:
older,
newer
parent_tool_use_id
string | null
task_id
string
required

The task ID

Response

Successful Response

Response for list messages v2 endpoint.

data
UIMessage · object[]
required

List of UIMessages

hasMore
boolean
default:false

Whether there are more messages to fetch

nextCursor
string | null

Cursor for fetching the next page