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

    Register users as operators to a channel by a custom channel type

    Copy link

    This API registers one or more users as operators at once to a channel with a specified custom channel type.


    HTTP Request

    Copy link
    POST https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}/operators
    

    Parameters

    Copy link

    The following table shows a parameter that this action supports.

    Required
    Parameter nameTypeDescription

    custom_type

    string

    Specifies a custom channel type.


    Request body

    Copy link

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

    Properties
    RequiredTypeDescription

    operator_ids[]

    array of strings

    Specifies an array of one or more user IDs to register as operators of the channel. If the channel in channel_url is private and the users in operator_ids aren't members of the channel yet, they need an invitation first. If the channel is a public group channel, they don't need an invitation. The maximum number of operators allowed per channel is 100.

    OptionalTypeDescription

    on_demand_upsert

    boolean

    Determines whether to register existing users as operators and create new users to register as operators in advance in the case that there are no matching users with the IDs specified in the operator_ids property. If true, new users in the operator_ids property are created and registered as operators. If false, only existing users can be registered as operators. (Default: false)

    {
        "operator_ids": ["Grace", "Janna", "Benjamin"]
    }
    

    Responses

    Copy link

    If successful, this action returns an empty response body.

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

    {
        "message": "Invalid value: \"JSON body.\".",
        "code": 400403,
        "error": true
    }