# social.colibri.beta.community.listCategories

> 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.community.listCategories)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.community.listCategories/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.community.listCategories/examples)

## Definitions

### `social.colibri.beta.community.listCategories`

**Type**: `query`

Gets the community's category layout, each category with its channels already nested. This is what a client needs to draw the sidebar in one call.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (did) | Yes | The community to list categories of. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `categories` | `array` | Yes | The community's categories, in display order. |

#### Errors

- **AuthRequired**: The request is missing, malformed, or unverifiable service auth.
- **Forbidden**: The requesting user lacks permission to view this community's categories.
- **CommunityNotFound**: No community exists with that DID.

## Raw Schema

```json
{
  "id": "social.colibri.beta.community.listCategories",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthRequired",
          "description": "The request is missing, malformed, or unverifiable service auth."
        },
        {
          "name": "Forbidden",
          "description": "The requesting user lacks permission to view this community's categories."
        },
        {
          "name": "CommunityNotFound",
          "description": "No community exists with that DID."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "categories"
          ],
          "properties": {
            "categories": {
              "type": "array",
              "items": {
                "ref": "social.colibri.beta.community.defs#categoryView",
                "type": "ref"
              },
              "description": "The community's categories, in display order."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "community"
        ],
        "properties": {
          "community": {
            "type": "string",
            "format": "did",
            "description": "The community to list categories of."
          }
        }
      },
      "description": "Gets the community's category layout, each category with its channels already nested. This is what a client needs to draw the sidebar in one call."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
