Platform API
Emojis

Emojis

Reactions can be expressed through emojis registered to your application and you can enable reactions and add or delete emojis to your application through Chat Platform API. Those emojis are divided by category and emojis and emoji categories have the following properties.

Resource representation

Emoji category
Property nameTypeDescription

id

int

The unique ID of an emoji category.

name

string

The name of an emoji category.

url

string

The URL of an emoji category.

application_id

int

The unique ID of the application that an emoji category belongs to.

Emoji
Property nameTypeDescription

id

int

The unique ID of an emoji.

key

string

The key of an emoji.

url

string

The image URL of an emoji.

application_id

int

The unique ID of the application that an emoji belongs to.

emoji_category_id

int

The unique ID of the emoji category that an emoji belongs to.


Actions

  • API endpoints in this page are relative to the base URL allocated to your application as below:
EndpointRefers to ...

/applications/settings/reactions

https://api-{application_id}.sendbird.com/v3/applications/settings/reactions

/applications/settings/use_default_emoji

https://api-{application_id}.sendbird.com/v3/applications/settings/use_default_emoji

/emoji_categories

https://api-{application_id}.sendbird.com/v3/emoji_categories

/emojis

https://api-{application_id}.sendbird.com/v3/emojis

Note: If you want to know the ID and base URL of your application, sign in to your dashboard, go to the Settings > Application > General, and then check the Application ID, API request URL.

ActionHTTP request

Enable reactions

PUT /applications/settings/reactions
Enables reactions in a Sendbird application.

Use default emojis

PUT /applications/settings/use_default_emoji
Determines whether to use 7 default reaction emojis initially provided.

List all emojis and emoji categories

GET /emoji_categories
Retrieves a list of all emoji categories and emojis under each emoji category.

Get an emoji category

GET /emoji_categories/{emoji_category_id}
Retrieves an emoji category with the specified ID, including its emojis.

Add emoji categories

POST /emoji_categories
Adds one or more new emoji categories to the application.

Update an emoji category URL

PUT /emoji_categories/{emoji_category_id}
Updates an emoji category with the specified ID.

Delete an emoji category

DELETE /emoji_categories/{emoji_category_id}
Deletes an emoji category with the specified ID.

List emojis

GET /emojis
Retrieves a list of all emojis registered to the application.

Get am emoji

GET /emojis/{emoji_key}
Retrieves an emoji with the specified key.

Add emojis

POST /emojis
Adds a list of one or more new emojis to the application.

Update an emoji URL

PUT /emojis/{emoji_key}
Updates the image URL of an emoji with the specified key.

Delete an emoji

DELETE /emojis/{emoji_key}
Deletes an emoji with the specified key.


Enable reactions

Turn on or off reactions in a Sendbird application.

Note: This action also allows reactions in UIKit.

HTTP request

Light Color Skin
Copy
PUT https://api-{application_id}.sendbird.com/v3/applications/settings/reactions

Request body

The following table lists the properties of an HTTP request that this action supports.

Properties
RequiredTypeDescription

enabled

boolean

Determines whether to turn reactions in the application on or off.

Request body example
Light Color Skin
Copy
{
    "enabled": true
}

Response

If successful, this action returns the information regarding the reactions status in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "reactions": true
}

Use default emojis

Determines whether to use the 7 default emojis initially provided.

HTTP request

Light Color Skin
Copy
PUT https://api-{application_id}.sendbird.com/v3/applications/settings/use_default_emoji

Request body

The following table lists the properties of an HTTP request that this action supports.

Properties
RequiredTypeDescription

use_default_emoji

boolean

Determines whether to use the 7 default emojis initially provided.

Request body example
Light Color Skin
Copy
{
    "use_default_emoji": true
}

Response

If successful, in the response body, this action returns the information regarding the use of default emojis.


List all emojis and emoji categories

Retrieves a list of all emoji categories registered to the application, including their emojis.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/emoji_categories

Response

If successful, this action returns a list of emoji category resources in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "emoji_hash": "",
    "emoji_categories": [
        {
            "id": 1, 
            "name": "face",
            "url": "http://emojicategory.com/face_category",
            "emojis": [
                {
                    "id": 1,
                    "key": "smile",
                    "url": "https://emojikeyboard.io/img/img-apple-64/1f600.png"
                },
                {
                    "id": 2,
                    "key": "angry",
                    "url": "https://emojikeyboard.io/img/img-apple-64/1f620.png"
                },
                ...
            ]
        },
        ...
    ]
}

Get an emoji category

Retrieves an emoji category with the specified ID, including its emojis.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/emoji_categories/{emoji_category_id}

Parameter

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

emoji_category_id

int

Specifies the unique ID of the emoji category to retrieve.

Response

If successful, this action returns an emoji category resource in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "id": 1, 
    "name": "face",
    "url": "https://emojicategory.com/face_category",
    "emojis": [
        {
            "id": 1,
            "key": "smile",
            "url": "https://emojikeyboard.io/img/img-apple-64/1f600.png"
        },
        {
            "id": 2,
            "key": "angry",
            "url": "https://emojikeyboard.io/img/img-apple-64/1f620.png"
        },
        ...
    ]
}

Add emoji categories

Adds a list of one or more new emoji categories to the application.

HTTP request

Light Color Skin
Copy
POST  https://api-{application_id}.sendbird.com/v3/emoji_categories

Request body

The following table lists the properties of an HTTP request that this action supports.

Properties
RequiredTypeDescription

emoji_categories[]

list

Specifies a list of one or more new emoji categories to register, including their name and URL.

(emoji_category).id

int

Specifies the unique ID of each new emoji category.

(emoji_category).name

string

Specifies the name of each new emoji category.

(emoji_category).url

string

Specifies the URL of each new emoji category.

Request body example
Light Color Skin
Copy
{
    "emoji_categories": [
        {
            "id": 2,
            "name": "nature",
            "url": "http://emojicategory.com/nature_category"
        },
        {
            "id": 3,
            "name": "animal",
            "url": "http://emojicategory.com/animal_category"
        },
        ...
    ]
}

Response

If successful, this action returns a list of newly added emoji category resources in the response body.


Update an emoji category URL

Updates the URL of an emoji category with the specified ID.

HTTP request

Light Color Skin
Copy
PUT https://api-{application_id}.sendbird.com/v3/emoji_categories/{emoji_category_id}

Parameter

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

emoji_category_id

int

Specifies the unique ID of the emoji category to update.

Request body

The following table lists the properties of an HTTP request that this action supports.

Properties
RequiredTypeDescription

url

string

Specifies the new URL of the emoji category.

Response

If successful, this action returns an updated emoji category resource in the response body.


Delete an emoji category

Deletes an emoji category with the specified ID.

HTTP request

Light Color Skin
Copy
DELETE https://api-{application_id}.sendbird.com/v3/emoji_categories/{emoji_category_id}

Parameter

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

emoji_category_id

int

Specifies the unique ID of the emoji category to delete.

Response

If successful, this action returns an empty body.


List emojis

Retrieves a list of all emojis registered to the application.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/emojis

Response

If successful, this action returns a list of emoji resources in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "emojis": [
        {
            "key": "smile",
            "url": "https://emojikeyboard.io/img/img-apple-64/1f600.png"
        },
        {
            "key": "angry",
            "url": "https://emojikeyboard.io/img/img-apple-64/1f620.png"
        },
        ...
    ]
}

Get an emoji

Retrieves an emoji with the specified key.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/emojis/{emoji_key}

Parameter

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

emoji_key

string

Specifies the key of the emoji to retrieve.

Response

If successful, this action returns an emoji resource in the response body.


Add emojis

Adds a list of one or more new emojis to the application.

HTTP request

Light Color Skin
Copy
POST https://api-{application_id}.sendbird.com/v3/emojis

Request body

The following table lists the properties of an HTTP request that this action supports.

Properties
RequiredTypeDescription

emoji_category_id

int

Specifies the unique ID of the emoji category that a list of new emojis belong to.

emojis[]

list

Specifies a list of one or more new emojis to register.

(emoji).key

string

Specifies the string key of each new emoji.

(emoji).url

string

Specifies the image URL of each new emoji.

Request body example
Light Color Skin
Copy
{
    "emoji_category_id": 1,
    "emojis": [
        {
            "key": "blowing_a_kiss",
            "url": "https://emojikeyboard.io/img/img-apple-64/face-blowing-a-kiss.png"
        },
        {
            "key": "wink",
            "url": "https://emojikeyboard.io/img/img-apple-64/19-191148_emoji-emojis-whatsapp-stickers-tumblr-transparent-tumblr-ios.png"
        },
        {
            "key": "both_winks",
            "url": "https://emojikeyboard.io/img/img-apple-64/8aecc835b3b7fde54f52589ff09991db.jpg"
        }
    ]
}

Response

If successful, this action returns a list of newly added emoji resources in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "emojis": [
        {
            "id": 103964,
            "key": "blowing_a_kiss",
            "url": "https://emojikeyboard.io/img/img-apple-64/face-blowing-a-kiss.png"
        },
        {
            "id": 103965,
            "key": "wink",
            "url": "https://emojikeyboard.io/img/img-apple-64/19-191148_emoji-emojis-whatsapp-stickers-tumblr-transparent-tumblr-ios.png"
        },
        {
            "id": 103966,
            "key": "both_winks",
            "url": "https://emojikeyboard.io/img/img-apple-64/8aecc835b3b7fde54f52589ff09991db.jpg"
        }
    ]
}

Update an emoji URL

Updates the image URL of an emoji with the specified key.

HTTP request

Light Color Skin
Copy
PUT https://api-{application_id}.sendbird.com/v3/emojis/{emoji_key}

Parameter

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

emoji_key

string

Specifies the key of the emoji to update.

Request body

The following table lists the properties of an HTTP request that this action supports.

Properties
RequiredTypeDescription

url

string

Specifies the new image URL of the emoji.

Response

If successful, this action returns an updated emoji resource in the response body.


Delete an emoji

Deletes an emoji from the application.

HTTP request

Light Color Skin
Copy
DELETE https://api-{application_id}.sendbird.com/v3/emojis/{emoji_key}

Parameter

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

emoji_key

string

Specifies the key of the emoji to delete.

Response

If successful, this action returns an empty body.