Skip to main content

Overview

The Custom Emojis API allows you to create organization-specific emojis that members can use in messages. Each emoji has a unique name within the organization and is associated with an image URL.

customEmoji.create

Create a new custom emoji for an organization.
organizationId
OrganizationId
required
Organization identifier
name
string
required
Emoji name (used as :name: in messages)
imageUrl
string
required
URL to the emoji image
data
CustomEmoji
The created custom emoji
transactionId
TransactionId
Transaction ID for optimistic updates
Errors:
  • CustomEmojiNameConflictError - An emoji with this name already exists in the organization
  • CustomEmojiDeletedExistsError - A deleted emoji with this name exists (contains emoji info to offer restore)
  • UnauthorizedError - User lacks permission to create emojis
  • InternalServerError - Server error
const result = await client.rpc("customEmoji.create", {
  organizationId: "org_123",
  name: "party",
  imageUrl: "https://example.com/emojis/party.png"
})

console.log("Created emoji:", result.data.name)
console.log("Use as :party: in messages")

customEmoji.update

Update an existing custom emoji (rename).
id
CustomEmojiId
required
Emoji identifier
name
string
New emoji name
data
CustomEmoji
Updated emoji object
transactionId
TransactionId
Transaction ID for optimistic updates
Errors:
  • CustomEmojiNotFoundError - Emoji doesn’t exist
  • CustomEmojiNameConflictError - New name conflicts with existing emoji
  • UnauthorizedError - User lacks permission to update emojis
  • InternalServerError - Server error
const result = await client.rpc("customEmoji.update", {
  id: "emoji_abc123",
  name: "party_parrot"
})

console.log("Renamed to:", result.data.name)

customEmoji.delete

Soft-delete a custom emoji. The emoji will be hidden but can be restored later.
id
CustomEmojiId
required
Emoji identifier
transactionId
TransactionId
Transaction ID for optimistic updates
Errors:
  • CustomEmojiNotFoundError - Emoji doesn’t exist
  • UnauthorizedError - User lacks permission to delete emojis
  • InternalServerError - Server error
await client.rpc("customEmoji.delete", {
  id: "emoji_abc123"
})

console.log("Emoji deleted")

customEmoji.restore

Restore a previously soft-deleted custom emoji.
id
CustomEmojiId
required
Emoji identifier
imageUrl
string
Optional new image URL (if the original is no longer available)
data
CustomEmoji
Restored emoji object
transactionId
TransactionId
Transaction ID for optimistic updates
Errors:
  • CustomEmojiNotFoundError - Emoji doesn’t exist
  • CustomEmojiNameConflictError - An active emoji with the same name now exists
  • UnauthorizedError - User lacks permission to restore emojis
  • InternalServerError - Server error
const result = await client.rpc("customEmoji.restore", {
  id: "emoji_abc123"
})

console.log("Restored emoji:", result.data.name)

Usage in Messages

Once created, custom emojis can be used in messages using the :name: syntax:
await client.rpc("message.create", {
  channelId: "channel_123",
  content: "Great work team! :party:"
})

Build docs developers (and LLMs) love