# social.colibri.beta.emoji.updatePack

> Renames a community's pack or replaces its emoji. Omitted fields stay as they are.

- Kind: procedure
- Authority: emoji.beta.colibri.social
- Lexicon: 1
- Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.emoji.updatePack)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.emoji.updatePack/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.emoji.updatePack/analytics)

## Procedure (`social.colibri.beta.emoji.updatePack`)

Type: procedure · POST

### Input (application/json)

- `community` (string · did, required): The community that owns the emoji.
- `description` (string): The new description. An empty string clears it.
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `emojis` (array): The full new list of emoji URIs, in order.
  - Constraints: maxLength: 500
  - `items` (string · at-uri)
- `name` (string): The new name.
  - Constraints: minLength: 1, maxLength: 64
- `pack` (string · at-uri, required): The pack's record URI in the community's repo.

### Output (application/json)

- `pack` (ref, required): The pack as stored.
  - Reference: `social.colibri.beta.emoji.defs#packView`

### 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.
- `PackNotFound`: No pack of this community exists at the given URI.
- `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.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Renames a community's pack or replaces its emoji. Omitted fields stay as they are.",
      "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 pack of this community exists at the given URI.",
          "name": "PackNotFound"
        },
        {
          "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 new description. An empty string clears it.",
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            },
            "emojis": {
              "description": "The full new list of emoji URIs, in order.",
              "items": {
                "format": "at-uri",
                "type": "string"
              },
              "maxLength": 500,
              "type": "array"
            },
            "name": {
              "description": "The new name.",
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            },
            "pack": {
              "description": "The pack's record URI in the community's repo.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "community",
            "pack"
          ],
          "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.updatePack",
  "lexicon": 1
}
```
