Skip to main content
GET
/
threads
/
{thread_id}
/
messages
Get Messages
curl --request GET \
  --url https://api.puppeteerai.com/threads/{thread_id}/messages \
  --header 'Authorization: <authorization>'
{
  "messages": [
    {
      "message_id": "<string>",
      "role": "<string>",
      "message": "<string>",
      "conversation_id": 123,
      "timestamp": 123,
      "extras": {}
    }
  ],
  "pagination": {
    "cursor": "<string>"
  }
}

Headers

Authorization
string
required

Path Parameters

thread_id
string
required

Query Parameters

cursor
string | null

Base64-encoded pagination cursor. If not provided, returns the latest 20 messages.

reverse
boolean
default:false

Controls the direction of message retrieval. When false (default), returns messages older than the cursor. When true, returns messages newer than the cursor.

Response

Successful Response

messages
CursorMessageModel · object[]
required

List of messages.

pagination
CursorPagination · object
required