# List space threads List all threads associated with a space. Retrieve all threads that have been added to a space. Returns paginated results with cursor-based pagination. Requires view access to the space. #### Path Parameters **`space_id`** string required The unique identifier of the space. #### Query Parameters **`limit`** integer optional ยท Defaults to `50` Maximum number of threads to return. Must be between 1 and 100. **`cursor`** string optional Pagination cursor from a previous response's `next_cursor` field. ## Returns An object containing a `data` array of thread objects, a `has_more` boolean indicating whether more results are available, and a `next_cursor` string for fetching the next page. Request ```bash cURL curl "https://api.aitronos.com/v1/spaces/space_abc123/threads?limit=20" \ -H "X-API-Key: $FREDDY_API_KEY" ``` ```python Python import os import requests api_key = os.environ["FREDDY_API_KEY"] response = requests.get( "https://api.aitronos.com/v1/spaces/space_abc123/threads", headers={"X-API-Key": api_key}, params={"limit": 20}, ) print(response.json()) ``` ```javascript JavaScript const response = await fetch( "https://api.aitronos.com/v1/spaces/space_abc123/threads?limit=20", { headers: { "X-API-Key": apiKey }, } ); const data = await response.json(); ``` Response ```json 200 OK { "object": "list", "data": [ { "id": "thrd_abc123", "object": "thread", "created_at": "2026-02-26T10:00:00Z", "updated_at": "2026-02-26T10:30:00Z", "last_message_at": "2026-02-26T10:30:00Z", "metadata": null, "assistant_id": "asst_def456", "organization_id": "org_abc123", "user_id": "usr_abc123", "title": "Project Discussion", "status": "inactive", "message_count": 12, "visible_in_ui": true, "last_model_used": "gpt-4o", "is_pinned": false, "pinned_at": null }, { "id": "thrd_def456", "object": "thread", "created_at": "2026-02-26T11:00:00Z", "updated_at": "2026-02-26T11:15:00Z", "last_message_at": "2026-02-26T11:15:00Z", "metadata": null, "assistant_id": null, "organization_id": "org_abc123", "user_id": "usr_abc123", "title": "Quick Question", "status": "inactive", "message_count": 4, "visible_in_ui": true, "last_model_used": "gpt-4o-mini", "is_pinned": false, "pinned_at": null } ], "has_more": false, "next_cursor": null } ``` ```json 404 Not Found { "success": false, "error": { "code": "RESOURCE_NOT_FOUND", "message": "The requested resource could not be found.", "system_message": "Space not found", "type": "client_error", "status": 404, "details": { "space_id": "space_invalid" }, "trace_id": "abc-123-def", "timestamp": "2026-02-26T10:30:00Z" } } ``` ```json 403 Forbidden { "success": false, "error": { "code": "INSUFFICIENT_PERMISSIONS", "message": "You don't have permission to perform this action.", "system_message": "View access required", "type": "client_error", "status": 403, "details": { "space_id": "space_abc123" }, "trace_id": "abc-123-def", "timestamp": "2026-02-26T10:30:00Z" } } ``` ## Related Resources - [Add Thread to Space](/docs/api-reference/spaces/add-thread) - [Remove Thread from Space](/docs/api-reference/spaces/remove-thread) - [Retrieve Space](/docs/api-reference/spaces/retrieve) - [Create Space](/docs/api-reference/spaces/create) - [Add Vector Store to Space](/docs/api-reference/spaces/add-vector-store)