# social.colibri.beta.emoji.createPack

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

## Definitions

### `social.colibri.beta.emoji.createPack`

**Type**: `procedure`

Creates a pack of a community's custom emoji.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (did) | Yes | The community that owns the emoji. |
| `description` | `string` | No | The pack's description. |
| `emojis` | `array` | Yes | URIs of the community's emoji to put in the pack. |
| `name` | `string` | Yes | The pack's name. |
| `provider` | `string` | No | The emoji provider that writes the records. Defaults to the AppView's default provider. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `pack` | `ref` → `social.colibri.beta.emoji.defs#packView` | Yes | The pack as stored. |

#### Errors

- **AuthRequired**: The request is missing, malformed, or unverifiable service auth.
- **Forbidden**: The caller lacks the community.manage permission.
- **CommunityNotFound**: No community exists at the given DID.
- **EmojiNotFound**: No emoji of this community exists at the given URI.
- **UnsupportedProvider**: The emoji provider is unknown, or it does not support the requested operation.
- **InvalidName**: The pack name is empty or longer than 64 characters.
- **CredentialsUnavailable**: The AppView cannot act as the community because its stored credentials are missing or unusable.
- **UpstreamFailure**: A PDS call the AppView depends on failed.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Creates a pack of a community's custom emoji.",
      "errors": [
        {
          "description": "The request is missing, malformed, or unverifiable service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller lacks the community.manage permission.",
          "name": "Forbidden"
        },
        {
          "description": "No community exists at the given DID.",
          "name": "CommunityNotFound"
        },
        {
          "description": "No emoji of this community exists at the given URI.",
          "name": "EmojiNotFound"
        },
        {
          "description": "The emoji provider is unknown, or it does not support the requested operation.",
          "name": "UnsupportedProvider"
        },
        {
          "description": "The pack name is empty or longer than 64 characters.",
          "name": "InvalidName"
        },
        {
          "description": "The AppView cannot act as the community because its stored credentials are missing or unusable.",
          "name": "CredentialsUnavailable"
        },
        {
          "description": "A PDS call the AppView depends on failed.",
          "name": "UpstreamFailure"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "community": {
              "description": "The community that owns the emoji.",
              "format": "did",
              "type": "string"
            },
            "description": {
              "description": "The pack's description.",
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            },
            "emojis": {
              "description": "URIs of the community's emoji to put in the pack.",
              "items": {
                "format": "at-uri",
                "type": "string"
              },
              "maxLength": 500,
              "type": "array"
            },
            "name": {
              "description": "The pack's name.",
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            },
            "provider": {
              "description": "The emoji provider that writes the records. Defaults to the AppView's default provider.",
              "knownValues": [
                "blue.moji"
              ],
              "type": "string"
            }
          },
          "required": [
            "community",
            "name",
            "emojis"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "pack": {
              "description": "The pack as stored.",
              "ref": "social.colibri.beta.emoji.defs#packView",
              "type": "ref"
            }
          },
          "required": [
            "pack"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.emoji.createPack",
  "lexicon": 1
}
```
