v4

latestSwagger 2.02026-08-0343714211.7 MB
chat_sessions
Chat Sessions

List Chat Sessions

List Chat Sessions

get/chat_sessions

Query parameters

cursorstring

Used for pagination. When a list request has more records available, cursors are provided in the response headers X-Files-Cursor-Next and X-Files-Cursor-Prev. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.

per_pageinteger

Number of records to show per page. (Max: 10000, 1,000 or less is recommended).

If set, sort records by the specified field in either asc or desc direction. Valid fields are id.

If set, return records where the specified field is equal to the supplied value. Valid fields are ai_task_id, user_id or workspace_id.

Response

A list of ChatSessions objects.

idstring

Chat Session ID.

titlestring

Short AI-generated chat title.

user_idinteger

User ID.

ai_task_idinteger

AI Task ID. Present when the conversation was started by an AI Task.

workspace_idinteger

Workspace ID. 0 means the default workspace.

last_active_atstring date-time

Most recent chat activity date/time.

created_atstring date-time

Chat session creation date/time.

Example response

[
  {
    "id": "example",
    "title": "example",
    "user_id": 1,
    "ai_task_id": 1,
    "workspace_id": 1,
    "last_active_at": "2000-01-01T01:00:00Z",
    "created_at": "2000-01-01T01:00:00Z",
    "messages": [
      {
        "id": 1,
        "role": "example",
        "content": "example",
        "created_at": "2000-01-01T01:00:00Z"
      }
    ]
  }
]