Platform API
Custom Channel Settings

Settings for Channels with Custom Channel Type

Custom channel types allow you to classify and apply customized settings to groups of channels. For the channels without custom channel types, the global application settings are applied to those channels by default.

Actions

  • In this page, the /applications/settings_by_channel_custom_type endpoint in all the HTTP request URLs refers to https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type. The following API endpoints are relative to the base URL allocated to your application.

Note: If you want to know the ID and base URL of your application, sign in to your dashboard, select the application, open the Overview, and then check the App credentials > App ID, API request URL.

Managing settings for channels with a custom channel type
ActionHTTP request

List all settings for custom channel types

GET /applications/settings_by_channel_custom_type
Retrieves a list of all registered settings for custom channel types.

View settings for a custom channel type

GET /applications/settings_by_channel_custom_type/{custom_type}
Retrieves settings for a custom channel type.

Create settings for a custom channel type

POST /applications/settings_by_channel_custom_type
Creates settings for a custom channel type which apply to channels with the type.

Update settings for a custom channel type

PUT /applications/settings_by_channel_custom_type/{custom_type}
Updates settings for a custom channel type.

Delete settings for a custom channel type

DELETE /applications/settings_by_channel_custom_type/{custom_type}
Deletes settings for a custom channel type.

Operators of channels with a custom channel type
ActionHTTP request

List operators

GET /applications/settings_by_channel_custom_type/{custom_type}/operators
Retrieves a list of the operators of channels with the custom type.

Register operators

POST /applications/settings_by_channel_custom_type/{custom_type}/operators
Registers a list of one or more users as the operators of channels with the custom type at once.

Unregister operators

DELETE /applications/settings_by_channel_custom_type/{custom_type}/operators
Unregisters a list or one or more operators from channels with the custom type at once.

Moderation in channels with a custom channel type
ActionHTTP request

List banned users

GET /applications/settings_by_channel_custom_type/{custom_type}/ban
Retrieves a list of the banned users from channels with the custom type.

Ban users

POST /applications/settings_by_channel_custom_type/{custom_type}/ban
Bans users from channels with the custom type at once.

Unban users

DELETE /applications/settings_by_channel_custom_type/{custom_type}/ban
Unbans users from channels with the custom type at once.

List muted users

GET /applications/settings_by_channel_custom_type/{custom_type}/mute
Retrieves a list of the muted users in channels with the custom type.

Mute users

POST /applications/settings_by_channel_custom_type/{custom_type}/mute
Mutes users in channels with the custom type at once.

Unmute users

DELETE /applications/settings_by_channel_custom_type/{custom_type}/mute
Unmutes users in channels with the custom type at once.


List all settings for custom channel types

Retrieves a list of all settings for custom channel types.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type   

Parameters

The following table lists the parameters that this action supports.

Parameters
OptionalTypeDescription

token

string

Specifies a token that indicates the starting index of a chunk of results to retrieve. If not specified, the index is set as 0.

limit

int

Specifies the number of results to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10)

Response

If successful, this action returns a list of settings for channels with the custom types in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "channel_custom_type_settings": [
        {
            "domain_filter": {
                "domains": ["espn.com", "sports.yahoo.com"],
                "type": 1
            },
            "profanity_filter": {
                "keywords": "idiot,dummy,damn",
                "regex_filters": [
                    {
                        "regex": "[^!@#$%^&*]*(bitch|assole)[^!@#$%^&*]*"
                    },
                    {
                        "regex": "(http://|https://)?(casino|sex|betting)+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?"
                    }
                ],
                "type": 2
            },
            "custom_type": "Sports",
            "display_past_message": true,
            "text_moderation": {    // The default settings of text moderation.
                "languages": [],
                "requestedAttributes": {
                    "TOXICITY": [
                        {
                            "scoreThreshold": 0.9
                        }
                    ]
                },
                "moderationLevel": 0,
                "doNotStore": true
            },
            "image_moderation": {   // The default settings of image moderation.
                "type": 0, 
                "soft_block": false,
                "limits": {
                    "adult": 3,
                    "spoof": 5,
                    "medical": 5,
                    "violence": 3,
                    "racy": 4
                },
                "check_urls": false
            },
            "allow_links": true,
            "user_messages_per_channel_duration": 1,
            "user_messages_per_channel": -1,
            "profanity_triggered_moderation": {
                "count": 0,
                "duration": 1,
                "action": 0
            },
            "message_retention_hours": 1440
        },
        {
            "domain_filter": {
                "domains": ["imdb.com", "reddit.com/r/movies"],
                "type": 1
            },
            "profanity_filter": {
                "keywords": "nude scene,bloody,suck",
                "regex_filters": [],
                "type": 2
            },
            "custom_type": "Movies",
            "display_past_message": true,
            "text_moderation": {    // The default settings of text moderation.
                "languages": [],
                "requestedAttributes": {
                    "TOXICITY": [
                        {
                            "scoreThreshold": 0.9
                        }
                    ]
                },
                "moderationLevel": 0,
                "doNotStore": true
            },
            "image_moderation": {   // The default settings of image moderation
                "type": 0,
                "soft_block": false,
                "limits": {
                    "adult": 3,
                    "spoof": 5,
                    "medical": 5,
                    "violence": 3,
                    "racy": 4
                },
                "check_urls": false
            },
            "allow_links": true,
            "user_messages_per_channel_duration": 1,
            "user_messages_per_channel": -1,
            "profanity_triggered_moderation": {
                "count": 0, 
                "duration": 1,
                "action": 0
            },
            "message_retention_hours": 2880 
        }
    ],  
    "next": "ArfdrFRd31AIEUYXX1RcRTd4kUZSUlkJFer4HB46AkAgD68eABABBBNFX11fUA3EfRa3"
}
Property nameTypeDescription

channel_custom_type_settings

string

A list of the settings per custom channel type.

next

string

The value for the token parameter to retrieve the next page in the result set.


View settings for a custom channel type

Retrieves settings for a specific custom channel type.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}   

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies the custom channel type of which settings to retrieve.

Response

If successful, this action returns the setting for channels with the custom type in the response body.


Create settings for a custom channel type

Creates settings for a custom channel type which apply to channels with the type.

Note: If a custom type is not specified for a channel, it takes on the default custom type.

HTTP request

Light Color Skin
Copy
POST https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type

Request body

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

Properties
RequiredTypeDescription

custom_type

string

Specifies the custom channel type.

OptionalTypeDescription

message_retention_hours

int

Specifies the length of time in hours which the messages are retained in the channels with the custom type.

display_past_message

boolean

Determines whether to display past messages to a new member. If true, the entire message history of the channel is shown to new users who join the channel.

allow_links

boolean

Determines whether to allow clickable links in a message within the channels with the custom type.

user_messages_per_channel

int

Specifies the maximum number of messages which a user is allowed to send to one of the channels with the custom type during a set time duration. A value of -1 indicates that no limit is imposed.

user_messages_per_channel_duration

int

Specifies the period which is used as a base unit for counting the number of message which a user sends to one of the channels with the custom type.

domain_filter

nested object

A domain filter configuration on the URLs which are specified in the text and file messages within the channels with the custom type.

domain_filter.domains[]

array

Specifies an array of domains to filter. Each item of the array should be specified at least with a combination of domain name and TLD (top level domain) like 'amazon.com'.

domain_filter.type

int

Determines the filtering mode which is applied to the URLs containing the specified domains. Acceptable values are 0 (none), 1 (pass if matched), and 2 (block if matched).

profanity_filter

nested object

A filter configuration on certain words and patterns for matching character combinations in strings, which are not allowed to be used within the channels wth the custom type.

profanity_filter.keywords

string

Specifies a string of comma-separated words to filter. *word filters all words that end with "word" including "word" itself while word* filters all words that start with "word" including "word" itself.

profanity_filter.regex_filters[]

list

Specifies a list of regular expressions used for filtering. Each item of the list should be specified in {"regex": a pattern in regular expression} format.

profanity_filter.type

int

Determines the filtering method which is applied to profanity words and patterns that match the specified keywords and regular expressions. Acceptable values are limited to 0 (none), 1 (replace), and 2 (block). 1 (replace) replaces only the keywords property with asterisks (*) found in the filtered words. 2 (block) prevents users from sending messages that contain the keywords property or partially match the regex_filters property. (Default: 0)

profanity_triggered_moderation

nested object

A moderation configuration on which penalty is automatically imposed on users who reach the profanity violation limit within a channel.

profanity_triggered_moderation.count

int

Specifies the number of profanity violation limit which then imposes a penalty on a user if reached. A value of 0 indicates that automatically-triggered moderation is turned off. A value of equal to or larger than 1 indicates that the moderation is turned on and imposes a penalty on a user who commits a number of violations equal to or beyond the set value of the count property within the set time of the duration property.

profanity_triggered_moderation.duration

int

Specifies the duration of the time window in seconds which counts the number of a user’s violations within a channel. For example, if the count property is 2 and the duration property is 5, the number of violations equal to or beyond 2 will be moderated for every 5 seconds. The maximum value is 86400 which indicates 60 days. (Default: 1 second)

profanity_triggered_moderation.action

int

Determines the type of moderation penalty within a channel which is permanently imposed on users until canceled. Valid values are 0 (no action), 1 (mute), 2 (kick), and 3 (ban). (Default: 0)

text_moderation

nested object

A moderation configuration on which penalty is imposed on abusive and harassing text messages within the channels with the custom type. Perspective API is used for text moderation.

text_moderation.languages[]

array

Specifies an array of one or more language codes specifying the languages which are moderated. Currently, the moderation supports only English (en), Spanish (es), and French (fr). If not specified, the API will automatically detect the text message language.

text_moderation.requestedAttributes

nested object

Specifies a map of one or more attributes which represent machine learning models to score the perceived impact that a text messageight have on a conversation in terms of its toxicity probability. Currently, TOXICITY model is only supported for a limited set of languages.

text_moderation.requestedAttributes.(key)

nested object

Specifies a list of one or more score information sets for the attribute. Each score set consists of the scoreThreshold and actions properties to configure when and how to moderate. You can set different moderation standards based on the score, applying different penalties on a message, a user, or a channel.

text_moderation.requestedAttributes.(key).scoreThreshold

float

Specifies a floating-point value in the range [0,1] to only moderate the text messages scoring above the specified value. (Default: 0.9)

text_moderation.requestedattributes.(key).actions

array

Determines the types of moderation penalties which are imposed on a message, a user, or a channel at the same time. Valid values are limited to message_delete, user_ban, user_mute, channel_freeze, and channel_delete. If not specified, no penalty is imposed. (Default: empty array)

text_moderation.moderationLevel

int

Determines the moderation level which is applied to the text messages perceived as toxic. Valid values are 0 (turning off moderation), 1 (manual moderation for reported messages), 2 (automatic moderation for reported messages), and 3 (automatic moderation for all sent messages). (Default: 0)

text_moderation.doNotStore

boolean

Determines whether to allow Perspective API to store text messages for future research to improve the API over time. (Default: true, which doesn't allow the API to store the submitted text messages.)

image_moderation

nested object

A moderation configuration on inappropriate images within the channels with the custom type. Google Cloud Vision API is used for image moderation and supports many types of images.

image_moderation.type

int

Determines the moderation method which is applied to the images and image URLs in the text and file messages. Valid values are limited to 0 (none), 1 (normal), and 2 (strict). A value of 0 indicates that no moderation is imposed. A value of 1 indicates that the messages with images or image URLs are blocked if the images or image URLs violate the content policies. A value of 2 indicates that the file messages with no images are also blocked in addition to the messages with explicit images or inappropriate image URLs. (Default: 0)

image_moderation.soft_block

boolean

If true, the moderation method set by the type property above is ignored and no moderation is imposed on the text and file messages in regard to explicit images or inappropriate image URLs. It will only give the image analysis results in the response. If false, the image moderation works according to the moderation method already set. (Default: false)

image_moderation.limits

nested object

A set of features pertaining to the images for moderation. Each feature specifies the content likelihood for the image which is used as a moderation standard. Acceptable likelihood values are 0 (unknown), 1 (very unlikely), 2 (unlikely), 3 (possible), 4 (likely), and 5 (very likely).

image_moderation.limits.adult

int

Specifies the adult content likelihood for the image.

image_moderation.limits.spoof

int

Specifies spoof likelihood.

image_moderation.limits.medical

int

Specifies likelihood that the image is a medical image.

image_moderation.limits.violence

int

Specifies likelihood that the image contains violent content.

image_moderation.limits.racy

int

Specifies likelihood that the image contains racy content.

image_moderation.check_urls

boolean

Determines whether to check if the image URLs in the text and file messages are appropriate.

Request body example
Light Color Skin
Copy
{
    "custom_type": "Sports",
    "display_past_message": true,
    "message_retention_hours": 1440,
    "domain_filter": {
        "domains": ["espn.com", "sports.yahoo.com"],
        "type": 1
    },
    "profanity_filter": {
        "keywords": "idiot,dummy,damn",
        "regex_filters": [
            {
                "regex": "[^!@#$%^&*]*(bitch|assole)[^!@#$%^&*]*"
            },
            {
                "regex": "(http://|https://)?(casino|sex|betting)+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?"
            }
        ],
        "type": 2
    }
}

Response

If successful, this action returns the settings for channels with the custom type in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "domain_filter": { 
        "domains": ["espn.com", "sports.yahoo.com"],
        "type": 1
    },
    "profanity_filter": {
        "keywords": "idiot,dummy,damn",
        "regex_filters": [
            {
                "regex": "[^!@#$%^&*]*(bitch|assole)[^!@#$%^&*]*"
            },
            {
                "regex": "(http://|https://)?(casino|sex|betting)+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?"
            }
        ],      
        "type": 2
    },
    "custom_type": "Sports",
    "display_past_message": true,
    "text_moderation": {    // The default settings of text moderation.
        "languages": [],
        "requestedAttributes": {
            "TOXICITY": [
                {
                    "scoreThreshold": 0.9
                }
            ]
        },
        "moderationLevel": 0,
        "doNotStore": true
    },
    "image_moderation": {   // The default settings of image moderation.
        "type": 0, 
        "soft_block": false,
        "limits": {
            "adult": 3,
            "spoof": 5,
            "medical": 5,
            "violence": 3,
            "racy": 4
        },
        "check_urls": false
    },
    "allow_links": true,
    "user_messages_per_channel_duration": 1,
    "user_messages_per_channel": -1,
    "profanity_triggered_moderation": {
        "count": 0,
        "duration": 1,
        "action": 0
    },
    "message_retention_hours": 1440
}

Update settings for a custom channel type

Updates settings for a specific custom channel type.

HTTP request

Light Color Skin
Copy
PUT https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies the custom channel type of which settings to update.

Request body

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

Properties
OptionalTypeDescription

message_retention_hours

int

Specifies the length of time in hours which the messages are retained in the channels with the custom type.

display_past_message

boolean

Determines whether to display past messages to a new member. If true, the entire message history of the channel is shown to new users who join the channel.

allow_links

boolean

Determines whether to allow clickable links in a message within the channels with the custom type.

user_messages_per_channel

int

Specifies the maximum number of messages which a user is allowed to send to one of the channels with the custom type during a set time duration. A value of -1 indicates that no limit is imposed.

user_messages_per_channel_duration

int

Specifies the period which is used as a base unit for counting the number of message which a user sends to one of the channels with the custom type.

domain_filter

nested object

A domain filter configuration on the URLs which are specified in the text and file messages within the channels with the custom type.

domain_filter.domains[]

array

Specifies an array of domains to filter. Each item of the array should be specified at least with a combination of domain name and TLD (top level domain) like 'amazon.com'.

domain_filter.type

int

Determines the filtering mode which is applied to the URLs containing the specified domains. Acceptable values are 0 (none), 1 (pass if matched), and 2 (block if matched).

profanity_filter

nested object

A filter configuration on certain words and patterns for matching character combinations in strings, which are not allowed to be used within the channels with the custom type.

profanity_filter.keywords

string

Specifies a string of comma-separated words to filter. *word filters all words that end with "word" including "word" itself while word* filters all words that start with "word" including "word" itself.

profanity_filter.regex_filters[]

list

Specifies a list of regular expressions used for filtering. Each item of the list should be specified in {"regex": a pattern in regular expression} format.

profanity_filter.type

int

Determines the filtering method which is applied to profanity words and patterns that match the specified keywords and regular expressions. Acceptable values are limited to 0 (none), 1 (replace), and 2 (block). 1 (replace) replaces only the keywords property with asterisks (*) found in the filtered words. 2 (block) prevents users from sending messages that contain the keywords property or partially match the regex_filters property. (Default: 0)

profanity_triggered_moderation

nested object

A moderation configuration on which penalty is automatically imposed on users who reach the profanity violation limit within a channel.

profanity_triggered_moderation.count

int

Specifies the number of profanity violation limit which then imposes a penalty on a user if reached. A value of 0 indicates that automatically-triggered moderation is turned off. A value of equal to or larger than 1 indicates that the moderation is turned on and imposes a penalty on a user who commits a number of violations equal to or beyond the set value of the count property within the set time of the duration property.

profanity_triggered_moderation.duration

int

Specifies the time duration in seconds which sets a time window of which the number of a user’s violations is being counted. For example, if the count property is 2 and the duration property is 5, the number of violations equal to or beyond 2 will be moderated for every 5 seconds. The maximum value is 86400 which indicates 60 days. (Default: 1 second)

profanity_triggered_moderation.action

int

Determines the type of moderation penalty which is permanently imposed on users until canceled. Acceptable values are 0 (no action), 1 (mute), 2 (kick), and 3 (ban). (Default: 0)

text_moderation

nested object

A moderation configuration on which penalty is imposed on abusive and harassing text messages within the channels with the custom type. Perspective API is used for text moderation.

text_moderation.languages[]

array

Specifies an array of one or more language codes specifying the languages which are moderated. Currently, the moderation supports only English (en), Spanish (es), and French (fr). If not specified, the API will automatically detect the text message language.

text_moderation.requestedAttributes

nested object

Specifies a map of one or more attributes which represent machine learning models to score the perceived impact that a text messageight have on a conversation in terms of its toxicity probability. Currently, TOXICITY model is only supported for a limited set of languages.

text_moderation.requestedAttributes.(key)

nested object

Specifies a list of one or more score information sets for the attribute. Each score set consists of the scoreThreshold and actions properties to configure when and how to moderate. You can set different moderation standards based on the score, applying different penalties on a message, a user, or a channel.

text_moderation.requestedAttributes.(key).scoreThreshold

float

Specifies a floating-point value in the range [0,1] to only moderate the text messages scoring above the specified value. (Default: 0.9)

text_moderation.requestedattributes.(key).actions

array

Determines the types of moderation penalties which are imposed on a message, a user, or a channel at the same time. Valid values are limited to message_delete, user_ban, user_mute, channel_freeze, and channel_delete. If not specified, no penalty is imposed. (Default: empty array)

text_moderation.moderationLevel

int

Determines the moderation level which is applied to the text messages perceived as toxic. Valid values are 0 (turning off moderation), 1 (manual moderation for reported messages), 2 (automatic moderation for reported messages), and 3 (automatic moderation for all sent messages). (Default: 0)

text_moderation.doNotStore

boolean

Determines whether to allow Perspective API to store text messages for future research to improve the API over time. (Default: true, which doesn't allow the API to store the submitted text messages.)

image_moderation

nested object

A moderation configuration on inappropriate images within the channels with the custom type. Google Cloud Vision API is used for image moderation and supports many types of images.

image_moderation.type

int

Determines the moderation method which is applied to the images and image URLs in the text and file messages. Valid values are limited to 0 (none), 1 (normal), and 2 (strict). A value of 0 indicates that no moderation is imposed. A value of 1 indicates that the messages with images or image URLs are blocked if the images or image URLs violate the content policies. A value of 2 indicates that the file messages with no images are also blocked in addition to the messages with explicit images or inappropriate image URLs. (Default: 0)

image_moderation.soft_block

boolean

If true, the moderation method set by the type property above is ignored and no moderation is imposed on the text and file messages in regard to explicit images or inappropriate image URLs. It will only give the image analysis results in the response. If false, the image moderation works according to the moderation method already set. (Default: false)

image_moderation.limits

nested object

A set of features pertaining to the images for moderation. Each feature specifies the content likelihood for the image which is used as a moderation standard. Acceptable likelihood values are 0 (unknown), 1 (very unlikely), 2 (unlikely), 3 (possible), 4 (likely), and 5 (very likely).

image_moderation.limits.adult

int

Specifies the adult content likelihood for the image.

image_moderation.limits.spoof

int

Specifies spoof likelihood.

image_moderation.limits.medical

int

Specifies likelihood that the image is a medical image.

image_moderation.limits.violence

int

Specifies likelihood that the image contains violent content.

image_moderation.limits.racy

int

Specifies likelihood that the image contains racy content.

image_moderation.check_urls

boolean

Determines whether to check if the image URLs in the text and file messages are appropriate.

Response

If successful, this action returns the setting for channels with the custom type in the response body.


Delete settings for a custom channel type

Deletes settings for a specific custom channel type.

HTTP request

Light Color Skin
Copy
DELETE https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}  

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies the custom channel type of which settings to delete.

Response

If successful, this action returns an empty response body.


List operators

Retrieves a list of the operators of channels with a custom channel type.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}/operators

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies a custom channel type which chooses a group of channels to perform this action.

OptionalTypeDescription

token

string

Specifies a token that indicates the starting index of a chunk of results to retrieve. If not specified, the index is set as 0.

limit

int

Specifies the number of results to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10)

Query string example
Light Color Skin
Copy
?token=SabQRDpSpl65dR1WXlVaFr4P&limit=5

Response

If successful, this action returns a list of user resources registered as the operators of channels with the custom type in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "operators": [
        {
            "user_id": "Jeremy",
            "nickname": "Bishop",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_78_512px.png",
            "metadata": {
                "location": "Tucson",
                "marriage": "N"
            }
        },
        ...     # More operators
    ],
    "next": "Fa3Re7dFdVNrEUBRfFRdFR1f2Fk4D6~~"
}
Property nameTypeDescription

operators[]

list

A list of the users who are registered as the operators of the channel.

next

string

The value for the token parameter to retrieve the next page in the result set.


Register operators

Registers one or more users as the operators of channels with a custom channel type at once.

HTTP request

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

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies a custom channel type which chooses a group of channels to perform this action.

Request body

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

Properties
RequiredTypeDescription

operator_ids[]

array

Specifies a comma-separated array of one or more IDs of users registered as the operators of channels with the custom channel type. In case of a group channel, the operators should be invited for private group or joined for public group if they are not member of the group. The maximum number of operators for the channel is 100.

OptionalTypeDescription

on_demand_upsert

boolean

When there are no matching users with the IDs specified in the operator_ids property within the application, determines for the SendBird system whether to register existing users as operators in addition to creating new users to register in advance. If true, new users in the operator_ids property are created and registered as operators along with the existing users. If false, only existing users are registered as operators. (Default: false)

Request body example
Light Color Skin
Copy
{
    "operator_ids": ["Grace", "Janna", "Benjamin"]
}

Response

If successful, this action returns an empty response body.


Unregister operators

Unregisters one or more operators from channels with a custom channel type at once.

HTTP request

Light Color Skin
Copy
DELETE https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}/operators

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies a custom channel type which chooses a group of channels to perform this action.

Request body

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

Properties
RequiredTypeDescription

operator_ids[]

array

Specifies a comma-separated array of one or more IDs of the users to be unregisterd from the operators of channels with the custom type. The users in this array remain as the members of the channel after losing their operator roles.

Request body example
Light Color Skin
Copy
{
    "operator_ids": ["Janna", "Benjamin"]
}

Response

If successful, this action returns an empty response body.


List banned users

Retrieves a list of the banned users from channels with a custom channel type.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}/ban

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies a custom channel type which chooses a group of channels to perform this action.

OptionalTypeDescription

token

string

Specifies a token that indicates the starting index of a chunk of results to retrieve. If not specified, the index is set as 0.

limit

int

Specifies the number of results to return per page. This value must be between 1 and 100. (Default: 10)

Query string example
Light Color Skin
Copy
?token=QnYDpDRsPRl1WAXe3RlVaFd2A&limit=5

Response

If successful, this action returns a list of banned user resources and information on each ban in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "banned_list": [
        {
            "user": {
                "user_id": "Joe",
                "nickname": "Numbers",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_67_512px.png",
                "metadata": {
                    "location": "San Mateo",
                    "marriage": "Y"
                }
            },
            "start_at": 1543211891000,
            "end_at": 1543223391000,
            "description": "Too many messages"
        },
        ...     # More bans
    ],
    "next": "d4R5lDaWR1nRFnPOelVaRy4s"
}
Property nameTypeDescription

banned_list[]

list

A list of the bans which contain information on a user, ban period, and reason.

(ban).user

nested object

The user resource which constains the simplified information on the banned user.

(ban).start_at

long

The timestamp of when the ban starts, in Unix milliseconds.

(ban).end_at

long

The timestamp of when the ban is scheduled to end, in Unix milliseconds.

(ban).description

string

A reason for the banning.

next

string

The value for the token parameter to retrieve the next page in the result set.


Ban users

Bans users from channels with a custom channel type at once.

HTTP request

Light Color Skin
Copy
POST https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}/ban

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies a custom channel type which chooses a group of channels to perform this action.

Request body

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

Properties
RequiredTypeDescription

banned_list[]

list

Specifies a list of bans which contain information on user, ban period, and reason.

(ban).user_id

string

Specifies the ID of the user to ban.

OptionalTypeDescription

(ban).seconds

int

Specifies the ban duration. If set to -1, the user is banned permanently (10 years, technically). (Default: -1)

(ban).description

string

Specifies a reason for the banning. The length is limited to 250 bytes.

on_demand_upsert

boolean

When there are no matching users with the IDs specified in the banned_list property within the application, determines for the SendBird system whether to ban existing users in addition to creating new users to ban in advance. If true, new users in the banned_list property are created and banned in advance along with the existing users. If false, only existing users are banned. (Default: false)
The on_demand_user_upsert can be used interchangeably with this property.

Request body example
Light Color Skin
Copy
{
    "banned_list": [
        {
            "user_id": "Joe",
            "seconds": 600,
            "description": "Too many messages"
        },
        {
            "user_id": "Harry",
            "seconds": 1000,
            "description": "Not good manner"
        },
        {
            "user_id": "Jeff",
            "seconds": 200,
            "description": "Short penalty"
        }
    ],
    "on_demand_upsert": true 
}

Response

If successful, this action returns an empty response body.


Unban users

Unbans users from channels with a custom channel type at once.

HTTP request

Light Color Skin
Copy
DELETE https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}/ban

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies a custom channel type which chooses a group of channels to perform this action.

Request body

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

Properties
RequiredTypeDescription

user_ids[]

array

Specifies a comma-separated array of one or more IDs of the users to unban from channels with the custom type.

Request body example
Light Color Skin
Copy
{
    "user_ids": ["Joe", "Harry"]
}

Response

If successful, this action returns an empty response body.


List muted users

Retrieves a list of the muted users in channels with a custom channel type.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}/mute

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies a custom channel type which chooses a group of channels to perform this action.

OptionalTypeDescription

token

string

Specifies a token that indicates the starting index of a chunk of results to retrieve. If not specified, the index is set as 0.

limit

int

Specifies the number of results to return per page. This value must be between 1 and 100. (Default: 10)

Query string example
Light Color Skin
Copy
?token=&limit=5

Response

If successful, this action returns a list of muted user resources and information on users' mutings in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "muted_list": [
        {
            "user_id": "Sean",
            "nickname": "SeanTheBest",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_56_512px.png",
            "metadata": {
                "location": "Tokyo",
                "marriage": "Y"
            },
            "remaining_duration": -1,
            "end_at": -1,
            "description": "Not allowed to talk in the channels of this type."
        },
        {
            "user_id": "Alek",
            "nickname": "Renegade",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_21_512px.png",
            "metadata": {
                "location": "San Francisco",
                "marriage": "Y"
            },
            "remaining_duration": 24343000,
            "end_at": 1542722341000,
            "description": "Uncomfortable messages"
        },
        ...     # More muted users
    ],
    "next": "n4eRA3E7RmARFeVpYjVZE43d3R~~"
}
Property nameTypeDescription

muted_list[]

list

A list of the muted users

next

string

The value for the token parameter to retrieve the next page in the result set.


Mute users

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

HTTP request

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

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies a custom channel type which chooses a group of channels to perform this action.

Request body

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

Properties
RequiredTypeDescription

user_ids[]

array

Specifies a comma-separated array of one or more IDs of the users to mute in channels with the custom type.

OptionalTypeDescription

seconds

long

Specifies the duration of mute status. If set to -1, the user is muted permanently (10 years, technically). (Default: -1)

description

string

Specifies a reason for the muting.

on_demand_upsert

boolean

When there are no matching users with the IDs specified in the user_ids property within the application, determines for the SendBird system whether to mute existing users in addition to creating new users to mute in advance. If true, new users in the user_ids property are created and muted in advance along with the existing users. If false, only existing users are muted. (Default: false)
The on_demand_user_upsert can be used interchangeably with this property.

Response

If successful, this action returns an empty response body.


Unmute users

Unmutes users in channels with a custom channel type at once.

HTTP request

Light Color Skin
Copy
DELETE https://api-{application_id}.sendbird.com/v3/applications/settings_by_channel_custom_type/{custom_type}/mute

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

custom_type

string

Specifies a custom channel type which limits channels to perform this action.

Request body

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

Properties
RequiredTypeDescription

user_ids[]

array

Specifies a comma-separated array of one or more IDs of the users to unmute in channels with the custom type.

Response

If successful, this action returns an empty response body.