/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    Add emojis

    Copy link

    This action adds emojis to your application. Since all emojis belong to emoji categories, you should create an emoji category before you add emojis.

    If you already have emoji categories in your application, you can check their IDs by using the list all emoji categories API.


    HTTP request

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

    Request body

    Copy link

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

    Required
    Property nameTypeDescription

    emoji_category_id

    int

    Specifies the unique ID of the emoji category that the emojis belong to. This ID is automatically generated by Sendbird when you add an emoji category to your application.

    emojis[]

    array of objects

    Specifies an array of emojis to register.

    (emoji).key

    string

    Specifies the string key of the emoji. The length is limited to 30 characters.

    (emoji).url

    string

    Specifies the image URL of the emoji.

    {
        "emoji_category_id": 1,
        "emojis": [
            {
                "key": "blowing_a_kiss",
                "url": "https://emojikeyboard.io/img/img-apple-64/1f618.png"
            },
            {
                "key": "wink",
                "url": "https://emojikeyboard.io/img/img-apple-64/1f609.png"
            },
            {
                "key": "tears_of_joy",
                "url": "https://emojikeyboard.io/img/img-apple-64/1f602.png"
            }
        ]
    }
    

    Responses

    Copy link

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

    {
        "emojis": [
            {
                "id": 103964,
                "key": "blowing_a_kiss",
                "url": "https://emojikeyboard.io/img/img-apple-64/1f618.png"
            },
            {
                "id": 103965,
                "key": "wink",
                "url": "https://emojikeyboard.io/img/img-apple-64/1f609.png"
            },
            {
                "id": 103966,
                "key": "tears_of_joy",
                "url": "https://emojikeyboard.io/img/img-apple-64/1f602.png"
            }
        ]
    }
    

    In the case of an error, an error object like below is returned. See the error codes section for more details.

    {
        "message": "\"category id 24\" not found.",
        "code": 400201,
        "error": true
    }