# social.colibri.beta.community.reorderCategories

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

## Definitions

### `social.colibri.beta.community.reorderCategories`

**Type**: `procedure`

Sets the complete display order of a community's categories.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (did) | Yes | The community whose categories are being reordered. |
| `categories` | `array` | Yes | The complete new display order of the community's categories. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|

#### Errors

- **AuthRequired**: The request is missing, malformed, or unverifiable service auth.
- **Forbidden**: The requesting user lacks the category.update permission.
- **CommunityNotFound**: No community exists with that DID.
- **InvalidRequest**: The supplied categories do not match the community's existing set.
- **CredentialsUnavailable**: The AppView's stored credentials for this community are missing or unusable.

## Raw Schema

```json
{
  "id": "social.colibri.beta.community.reorderCategories",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "community",
            "categories"
          ],
          "properties": {
            "community": {
              "type": "string",
              "format": "did",
              "description": "The community whose categories are being reordered."
            },
            "categories": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "record-key",
                "description": "A category."
              },
              "description": "The complete new display order of the community's categories."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthRequired",
          "description": "The request is missing, malformed, or unverifiable service auth."
        },
        {
          "name": "Forbidden",
          "description": "The requesting user lacks the category.update permission."
        },
        {
          "name": "CommunityNotFound",
          "description": "No community exists with that DID."
        },
        {
          "name": "InvalidRequest",
          "description": "The supplied categories do not match the community's existing set."
        },
        {
          "name": "CredentialsUnavailable",
          "description": "The AppView's stored credentials for this community are missing or unusable."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [],
          "properties": {}
        },
        "encoding": "application/json"
      },
      "description": "Sets the complete display order of a community's categories."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
