# social.colibri.beta.thread.listThreads

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.thread.listThreads)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.thread.listThreads/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.thread.listThreads/examples)

## Definitions

### `social.colibri.beta.thread.listThreads`

**Type**: `query`

Lists a community's threads, most recently active first. Threads the requesting user may not read are absent rather than refused.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `channel` | `string` (space-ref) | No | Restrict the list to threads in one channel. Absent lists every channel's threads, which is what the community sidebar needs. |
| `community` | `string` (did) | Yes | The community to list threads in. |
| `cursor` | `string` | No | Pagination cursor from a previous call. |
| `filter` | `string` | No | Which threads to list. |
| `limit` | `integer` | No | Maximum number of threads to return. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No | Pagination cursor for the next page. |
| `threads` | `array` | Yes | The threads. |

#### Errors

- **AuthRequired**: The request has no valid service auth.
- **Forbidden**: The requesting user is not a member of this community.
- **CommunityNotFound**: No community matches the given DID.
- **ChannelNotFound**: No channel matches the given space reference.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Lists a community's threads, most recently active first. Threads the requesting user may not read are absent rather than refused.",
      "errors": [
        {
          "description": "The request has no valid service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The requesting user is not a member of this community.",
          "name": "Forbidden"
        },
        {
          "description": "No community matches the given DID.",
          "name": "CommunityNotFound"
        },
        {
          "description": "No channel matches the given space reference.",
          "name": "ChannelNotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "description": "Pagination cursor for the next page.",
              "type": "string"
            },
            "threads": {
              "description": "The threads.",
              "items": {
                "description": "A thread.",
                "ref": "social.colibri.beta.thread.defs#threadView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "threads"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "channel": {
            "description": "Restrict the list to threads in one channel. Absent lists every channel's threads, which is what the community sidebar needs.",
            "format": "space-ref",
            "type": "string"
          },
          "community": {
            "description": "The community to list threads in.",
            "format": "did",
            "type": "string"
          },
          "cursor": {
            "description": "Pagination cursor from a previous call.",
            "type": "string"
          },
          "filter": {
            "default": "all",
            "description": "Which threads to list.",
            "knownValues": [
              "all",
              "unread",
              "following"
            ],
            "type": "string"
          },
          "limit": {
            "default": 50,
            "description": "Maximum number of threads to return.",
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "community"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "social.colibri.beta.thread.listThreads",
  "lexicon": 1
}
```
