# social.colibri.beta.emoji.rename

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

## Definitions

### `social.colibri.beta.emoji.rename`

**Type**: `procedure`

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.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (did) | Yes | The community that owns the emoji. |
| `emoji` | `string` (at-uri) | Yes | The emoji's record URI in the community's repo. |
| `name` | `string` | Yes | The emoji's name without colons. Lowercase letters, digits and underscores. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `emoji` | `ref` → `social.colibri.beta.emoji.defs#emojiView` | Yes | The emoji 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.
- **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.

## Raw 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
}
```
