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

    Get metadata

    Copy link

    This action retrieves one or more key-value items used to store additional information about a channel.

    Note: See this page to learn more about differences among data properties.


    HTTP request

    Copy link
    // Retrieves all items of a channel metadata.
    GET https://api-{application_id}.sendbird.com/v3/{channel_type}/{channel_url}/metadata
    
    // Retrieves a specific item of a channel metadata by its key.
    GET https://api-{application_id}.sendbird.com/v3/{channel_type}/{channel_url}/metadata/{key}
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Parameters
    RequiredTypeDescription

    channel_type

    string

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

    channel_url

    string

    Specifies the URL of a channel.

    OptionalTypeDescription

    key

    string

    Specifies the key of a metadata item. If not specified, all items of the metadata are returned. If specified, only the item that matches the parameter value is returned. URL encoding a key is recommended.

    keys

    array of strings

    In a query string, specifies an array of one or more keys of the metadata items. If not specified, all items of the metadata are returned. If specified, only the items that match the parameter values are returned. URL encoding each key is recommended.

    ../metadata?keys=background_image,description
    

    Responses

    Copy link

    If successful, this action returns the stored metadata in the response body.

    {
        "background_image": "https://sendbird.com/main/img/bg/theme_013.png",
        "description": "A chat room for discussing the upcoming project."
    }
    

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

    {
        "message": "\"Channel\" not found.",
        "code": 400201,
        "error": true
    }