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

    Mute users in channels by a custom channel type

    Copy link

    Mutes specified users in channels with a custom channel type at once.

    Note: To learn more about other available moderation tools, see Moderation Overview.


    HTTP Request

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

    Parameters

    Copy link

    The following table lists the parameters 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 an HTTP request that this action supports.

    Properties
    RequiredTypeDescription

    user_ids[]

    array of strings

    Specifies an array of one or more user IDs.

    OptionalTypeDescription

    seconds

    long

    Specifies the duration of mute in seconds. If set to -1, the user will be muted for ten years, which refers to a permanent mute in the Sendbird Dashboard. (Default: -1)

    description

    string

    Specifies the reason for mute. The maximum length is 2,048 characters.

    on_demand_upsert

    boolean

    Determines whether the Sendbird system should create new users to mute if there are no users with the IDs specified in the user_ids property. If set to true and the value of user_ids contains user IDs that don't exist in the Sendbird application, this API creates new users as specified in user_ids and mutes both existing and new users. If set to false, only existing users are muted. (Default: false)

    * The on_demand_user_upsert property can be used interchangeably with this property.


    Response

    Copy link

    If successful, this action returns an empty response body.

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