Retrieve a paginated list of threads with filtering options for assistant, organization, and visibility.
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.
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.
visibleInUi 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
- Bash
- Python
- JavaScript
curl "https://api.aitronos.com/v1/threads" \
-H "X-API-Key: $FREDDY_API_KEY"Response:
{
"object": "list",
"data": [
{
"id": "thread_def456",
"created_at": "2025-11-17T10:10:00Z",
"metadata": {},
"organization_id": "org_12345",
"title": "Another Thread",
"lastMessageAt": "2025-11-17T10:10:00Z",
"assistant_id": null,
"status": "active",
"visibleInUi": true
},
{
"id": "thread_abc123",
"created_at": "2025-11-17T10:00:00Z",
"metadata": {
"userId": "user_abc"
},
"organization_id": "org_12345",
"title": "Aitronos Inquiry",
"lastMessageAt": "2025-11-17T10:05:00Z",
"assistant_id": "asst_abc123",
"status": "active",
"visibleInUi": true
}
],
"first_id": "thread_def456",
"last_id": "thread_abc123",
"has_more": false
}