Skip to content
Last updated

Retrieve a paginated list of threads with filtering options for assistant, organization, and visibility.

GEThttps://api.aitronos.com/v1/threads

Retrieve a paginated list of threads with filtering options for assistant, organization, and visibility. Uses cursor-based pagination for efficient navigation through large result sets.

Query Parameters

limit integer optional · Defaults to 20

Number of threads to return. Must be between 1 and 100.

order string optional · Defaults to desc

Sort order for threads. Available values: asc (oldest first), desc (newest first).

after string optional

Cursor for pagination. Returns threads created after the specified thread ID.

before string optional

Cursor for pagination. Returns threads created before the specified thread ID.

organization_id string optional

Filter threads by organization ID. Only returns threads belonging to the specified organization. If not provided, returns threads from all organizations the user belongs to.

assistant_id string optional

Filter threads by assistant ID. Only returns threads bound to the specified assistant.

include_deleted boolean optional · Defaults to false

Include soft-deleted threads in the results. When true, returns both active and deleted threads.

visible_in_ui boolean optional · Defaults to true

Filter threads by UI visibility. When true, returns only visible threads (created with store=true in the Responses API). When false, returns only hidden threads (created with store=false). Defaults to true (only visible threads). Learn more about thread visibility

include_total boolean optional

Include total count of matching threads in response.

workflow_id string optional

Filter threads by workflow ID.

is_pinned boolean optional

Filter to return only pinned or unpinned threads.

Returns

Returns a JSON response indicating success or failure.

Bash
curl "https://api.aitronos.com/v1/threads" \
  -H "X-API-Key: $FREDDY_API_KEY"

Response:

{
  "object": "list",
  "data": [
    {
      "id": "thrd_def456",
      "object": "thread",
      "created_at": "2025-11-17T10:10:00Z",
      "updated_at": "2025-11-17T10:10:00Z",
      "last_message_at": "2025-11-17T10:10:00Z",
      "metadata": {},
      "assistant_id": null,
      "organization_id": "org_12345",
      "user_id": "usr_abc123",
      "title": "Another Thread",
      "status": "inactive",
      "message_count": 0,
      "visible_in_ui": true,
      "last_model_used": null,
      "is_pinned": false,
      "pinned_at": null,
      "space_ids": []
    },
    {
      "id": "thrd_abc123",
      "object": "thread",
      "created_at": "2025-11-17T10:00:00Z",
      "updated_at": "2025-11-17T10:05:00Z",
      "last_message_at": "2025-11-17T10:05:00Z",
      "metadata": {
        "user_id": "user_abc"
      },
      "assistant_id": "asst_abc123",
      "organization_id": "org_12345",
      "user_id": "usr_abc123",
      "title": "Aitronos Inquiry",
      "status": "inactive",
      "message_count": 5,
      "visible_in_ui": true,
      "last_model_used": "gpt-4o",
      "is_pinned": false,
      "pinned_at": null,
      "space_ids": ["space_xyz789"]
    }
  ],
  "first_id": "thrd_def456",
  "last_id": "thrd_abc123",
  "has_more": false,
  "limit": 20,
  "total": null
}