Messages
REST endpoints for messages. Bearer-auth required.
GET /api/messages
List messages.
Query parameters
limit(optional): Page size (1–100, default 100).after(optional): Keyset cursor — return the page after this row (next page).before(optional): Keyset cursor — return the page before this row (prev page).ids(optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).filter(optional): Nested filter expression (<Entity>Filter): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.orderBy(optional): Multi-key sort (<Entity>OrderBy[]): array of{ field: direction }applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.thread_id(optional): Filter to messages in this thread.workspace_id(optional): Filter to messages in threads in this workspace.author_participant_id(optional): Shorthand: filter whereauthorParticipantIdequals this value.run_id(optional): Shorthand: filter whererunIdequals this value.
Response
JSON
{
"data": [
{
"id": "<...>",
"threadId": "<...>",
"authorParticipantId": "<...>",
"content": "<...>",
"runId": "<...>",
"createdAt": "<...>"
}
],
"pageInfo": {
"total": "number",
"hasNextPage": "boolean",
"hasPreviousPage": "boolean",
"startCursor": "string",
"endCursor": "string"
}
}GET /api/messages/{id}
Get a message by ID.
Path parameters
id(required): Message to retrieve.
Response
JSON
{
"id": "string",
"threadId": "string",
"authorParticipantId": "string",
"content": ["<...>"],
"runId": "string",
"createdAt": "string"
}