---
title: List space threads
---

# List space threads

List all threads associated with a space.


{% api-container %}
{% api-content %}

{% endpoint method="GET" path="https://api.aitronos.com/v1/spaces/{space_id}/threads" /%}

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 <em style="color: #ef4444 !important; font-weight: 600 !important; font-style: normal !important;">required</em>

The unique identifier of the space.

#### Query Parameters

**`organization_id`** string <em style="color: #ef4444 !important; font-weight: 600 !important; font-style: normal !important;">required</em>

Organization ID to scope the request to.

**`limit`** integer <em style="color: #9ca3af !important; font-weight: 500 !important; font-style: normal !important;">optional</em> · Defaults to `50`

Maximum number of threads to return. Must be between 1 and 100.

**`cursor`** string <em style="color: #9ca3af !important; font-weight: 500 !important; font-style: normal !important;">optional</em>

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.

Because a space aggregates threads created by **different members**, each thread object carries its creator's identity so the row can be attributed without a second lookup:

- **`user_id`** `string \| null` — the thread creator (owner).
- **`owner_name`** `string \| null` — the creator's display name, for attribution UI. Null if the owner record can't be resolved.
- **`owner_avatar_url`** `string \| null` — the creator's profile-image URL, paired with `owner_name`. Null when the owner has no image set.

{% /api-content %}
{% api-examples %}
{% tabs %}
{% tab label="Request" %}

{% code-group mode="dropdown" %}

```bash {% title="cURL" %}
curl "https://api.aitronos.com/v1/spaces/space_abc123/threads?organization_id=org_abc123&limit=20" \
  -H "X-API-Key: $FREDDY_API_KEY"
```

```python {% title="Python SDK" %}
from aitronos import Aitronos

client = Aitronos(api_key="your-api-key")
result = client.spaces.list_space_threads(
    space_id="space_abc123",
    organization_id="org_abc123",
    limit=20,
)
print(result)
```

```python {% title="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={"organization_id": "org_abc123", "limit": 20},
)
print(response.json())
```

```javascript {% title="JavaScript" %}
const response = await fetch(
  "https://api.aitronos.com/v1/spaces/space_abc123/threads?organization_id=org_abc123&limit=20",
  {
    headers: { "X-API-Key": apiKey },
  }
);
const data = await response.json();
```

{% /code-group %}

{% /tab %}
{% tab label="Response" %}

```json {% title="200 OK" %}
{
  "object": "list",
  "data": [
    {
      "id": "thread_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",
      "owner_name": "Ada Lovelace",
      "owner_avatar_url": "https://cdn.aitronos.com/avatars/usr_abc123.png",
      "title": "Project Discussion",
      "status": "inactive",
      "message_count": 12,
      "visible_in_ui": true,
      "last_model_used": "gpt-4o",
      "is_pinned": false,
      "pinned_at": null,
      "space_ids": ["space_abc123"]
    },
    {
      "id": "thread_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_def789",
      "owner_name": "Grace Hopper",
      "owner_avatar_url": null,
      "title": "Quick Question",
      "status": "inactive",
      "message_count": 4,
      "visible_in_ui": true,
      "last_model_used": "gpt-4o-mini",
      "is_pinned": false,
      "pinned_at": null,
      "space_ids": ["space_abc123"]
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

```json {% title="401 Unauthorized" %}
{
  "success": false,
  "error": {
    "code": "AUTHENTICATION_REQUIRED",
    "message": "Authentication is required to access this resource.",
    "system_message": "Missing or invalid authentication credentials",
    "type": "client_error",
    "status": 401,
    "details": {},
    "trace_id": "abc-123-def",
    "timestamp": "2026-02-26T10:00:00Z"
  }
}
```

```json {% title="404 Not Found" %}
{
  "success": false,
  "error": {
    "code": "SPACE_NOT_FOUND",
    "message": "The requested space 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 {% title="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"
  }
}
```

```json {% title="422 Validation Error" %}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The request contains invalid parameters.",
    "system_message": "Request validation failed",
    "type": "validation_error",
    "status": 422,
    "details": {
      "fields": [
        {
          "field": "limit",
          "message": "Input should be less than or equal to 100",
          "type": "less_than_equal"
        }
      ]
    },
    "trace_id": "abc-123-def",
    "timestamp": "2026-02-26T10:30:00Z"
  }
}
```

{% /tab %}
{% /tabs %}
{% /api-examples %}
{% /api-container %}


---

## Related Resources

- [Add Thread to Space](./add-thread.md)
- [Remove Thread from Space](./remove-thread.md)
- [Retrieve Space](./retrieve.md)
- [Create Space](./create.md)
- [Add Vector Store to Space](./add-vector-store.md)
