# social.colibri.beta.category.create

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

## Definitions

### `social.colibri.beta.category.create`

**Type**: `procedure`

Creates a category in a community.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The category's name. |
| `community` | `string` (did) | Yes | The community to create the category in. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `category` | `ref` → `social.colibri.beta.community.defs#categoryView` | Yes | The newly created category. |

#### Errors

- **AuthRequired**: The request is missing, malformed, or unverifiable service auth.
- **Forbidden**: The caller lacks the category.create permission.
- **CommunityNotFound**: No community exists at the given DID.
- **CredentialsUnavailable**: The AppView cannot act as the community because its stored credentials are missing or unusable.

## Raw Schema

```json
{
  "id": "social.colibri.beta.category.create",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "community",
            "name"
          ],
          "properties": {
            "name": {
              "type": "string",
              "maxLength": 32,
              "minLength": 1,
              "description": "The category's name."
            },
            "community": {
              "type": "string",
              "format": "did",
              "description": "The community to create the category in."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthRequired",
          "description": "The request is missing, malformed, or unverifiable service auth."
        },
        {
          "name": "Forbidden",
          "description": "The caller lacks the category.create permission."
        },
        {
          "name": "CommunityNotFound",
          "description": "No community exists at the given DID."
        },
        {
          "name": "CredentialsUnavailable",
          "description": "The AppView cannot act as the community because its stored credentials are missing or unusable."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "category"
          ],
          "properties": {
            "category": {
              "ref": "social.colibri.beta.community.defs#categoryView",
              "type": "ref",
              "description": "The newly created category."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Creates a category in a community."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
