# social.colibri.beta.emoji.rename

> Renames a community's custom emoji. Providers that key records by name move the record to a new key and repoint pack memberships, so the emoji's URI changes.

- 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.rename)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.emoji.rename/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.emoji.rename/analytics)

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

Type: procedure · POST

### Input (application/json)

- `community` (string · did, required): The community that owns the emoji.
- `emoji` (string · at-uri, required): The emoji's record URI in the community's repo.
- `name` (string, required): The emoji's name without colons. Lowercase letters, digits and underscores.
  - Constraints: minLength: 2, maxLength: 32

### Output (application/json)

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

### 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.
- `InvalidName`: The name is not 2 to 32 characters of lowercase letters, digits and underscores.
- `NameTaken`: The community already has an emoji with this name.
- `UnsupportedProvider`: The emoji provider is unknown, or it does not support the requested operation.
- `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 custom emoji. Providers that key records by name move the record to a new key and repoint pack memberships, so the emoji's URI changes.",
      "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 name is not 2 to 32 characters of lowercase letters, digits and underscores.",
          "name": "InvalidName"
        },
        {
          "description": "The community already has an emoji with this name.",
          "name": "NameTaken"
        },
        {
          "description": "The emoji provider is unknown, or it does not support the requested operation.",
          "name": "UnsupportedProvider"
        },
        {
          "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"
            },
            "emoji": {
              "description": "The emoji's record URI in the community's repo.",
              "format": "at-uri",
              "type": "string"
            },
            "name": {
              "description": "The emoji's name without colons. Lowercase letters, digits and underscores.",
              "maxLength": 32,
              "minLength": 2,
              "type": "string"
            }
          },
          "required": [
            "community",
            "emoji",
            "name"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "emoji": {
              "description": "The emoji as stored.",
              "ref": "social.colibri.beta.emoji.defs#emojiView",
              "type": "ref"
            }
          },
          "required": [
            "emoji"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.emoji.rename",
  "lexicon": 1
}
```
