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

    Update an open channel

    Copy link

    You can update information about an open channel using this API. You can add a cover image to a channel to better identify the channel or specify a custom channel type for grouping channels by custom type. See this page to learn more about channel types.


    HTTP request

    Copy link
    PUT https://api-{application_id}.sendbird.com/v3/open_channels/{channel_url}
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    channel_url

    string

    Specifies the URL of the channel.


    Request body

    Copy link

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

    Optional
    Property nameTypeDescription

    name

    string

    Specifies the channel topic or the name of the channel. The length is limited to 191 characters.

    cover_url

    string

    Specifies the URL of the cover image. The length is limited to 2,048 characters.

    cover_file

    file

    Uploads the file for the channel cover image.

    custom_type

    string

    Specifies the custom channel type which is used for channel grouping. The length is limited to 128 characters.

    * Custom types are also used within Sendbird's Advanced analytics to segment metrics as channel metrics can be grouped by channel custom type.

    data

    string

    Specifies additional channel information such as a long description of the channel or JSON formatted string.

    operator_ids[]

    array of strings

    Specifies an array of one or more user IDs to register as operators of the channel. A single channel can have up to 100 channel operators. Operators can delete any messages in the channel and even receive all messages that have been throttled.

    * Operators can't view messages that have been moderated by the domain filter or profanity filter. Only the sender will be notified that the message has been blocked.

    operators[]

    array of strings

    (Deprecated) Specifies the string IDs of the users registered as operators of the channel. Operators can delete any messages in the channel and also receive all messages that have been throttled.

    Note: If you want to upload a profile picture by passing an image file instead of a URL, see Multipart requests.


    Responses

    Copy link

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

    {
        "name": "Live streaming show on channel 5!",
        "channel_url": "monday_channel5_at_10_pm",
        "custom_type": "live",
        "is_ephemeral": false,
        "participant_count": 0,
        "max_length_message": 5000,
        "created_at": 1484787758,
        "cover_url": "https://sendbird.com/main/img/cover/cover_02.jpg",
        "data": "{event_trigger:100,500,1000,2000}",
        "operators": [
            {
                "user_id": "Alek",
                "nickname": "Alexander the Great",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_26_512px.png"
            },
            {
                "user_id": "Leslie",
                "nickname": "Crystal",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_27_512px.png"
            }
        ],
        "freeze": false
    }
    

    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
    }