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

    Add metadata

    Copy link

    Adds key-values items to store additional information for a message.


    HTTP request

    Copy link
    POST https://api-{application_id}.sendbird.com/v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    channel_type

    string

    Specifies the type of the channel. Acceptable values are open_channels and group_channels.

    channel_url

    string

    Specifies the URL of the target channel.

    message_id

    long

    Specifies the unique ID of the message to add key-values items for additional information.


    Request body

    Copy link

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

    Required
    Property nameTypeDescription

    sorted_metaarray

    array of objects

    Specifies an array of one or more JSON objects consisting of key-values items to store additional message information. Items are saved and returned in the order they've been specified.

    metaarray

    array of objects

    (Deprecated) Specifies an array of one or more JSON objects consisting of key-values items to store additional message information.

    {
        "sorted_metaarray": [
            {
                "key": "beverages",
                "value": ["water", "milk", "coffee"]
            }
        ]
    }
    

    Response

    Copy link

    If successful, this action returns all registered items including the key and values of added items in the response body.

    {
        "sorted_metaarray": [
            {
                "key": "places",
                "value": ["office", "cafe", "restaurant"]
            },
            {
                "key": "beverages",
                "value": ["water", "milk", "coffee"] // Newly added key-values item
            }
        ]
    }
    

    In the case of an error, an error object is returned. A detailed list of error codes is available here.