Sessions

Get session messages

Changed on

Returns paginated message history with optional role filtering. This feature is enabled for selected organizations only.

get/api/v0/sessions/{sessionId}/messages

Request

  • Base URL
    https://api.factory.ai
  • Auth
    HTTP bearer

Path parameters

sessionId, string required

Query parameters

limit, integer

Maximum number of items to return (1-100)

cursor, string

Cursor for pagination

computerId, string

Computer ID to query directly

role, 'user' | 'assistant' | 'tool'

Filter messages by role

Headers

X-Factory-Org-Id, string

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Response

Response for status 200

GetMessages200ResponseBody required
messages, object[] required
pagination, object required

Changes

    • info

      added the optional property messages/items/author/sharedSessionMember to the response with the status

    • info

      added the optional property messages/items/content/items/anyOf[subschema #6]/respondedBy/sharedSessionMember to the response with the status

    • info

      added the optional property messages/items/noticeKind to the response with the status

    1 more change in this revision