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

    List channel settings for all custom channel types

    Copy link

    You can retrieve a list of settings for all custom channel types using this API.


    HTTP Request

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

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Optional
    Parameter nameTypeDescription

    token

    string

    Specifies a page token that indicates the starting index 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)


    Responses

    Copy link

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

    {
        "channel_custom_type_settings": [
            {
                "domain_filter": {
                    "domains": ["espn.com", "sports.yahoo.com"],
                    "type": 1,
                    "should_check_global": true
                },
                "profanity_filter": {
                    "keywords": "dumb,dummy",
                    "regex_filters": [
                        {
                            "regex": "[^!@#$%^&*]*(damn|crap)[^!@#$%^&*]*"
                        },
                        {
                            "regex": "(http://|https://)?(casino|sex|betting)+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?"
                        }
                    ],
                    "type": 2,
                    "should_check_global": false
                },
                "custom_type": "Sports",
                "display_past_message": 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,
                "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
                },
                "push_template": {
                    "MESG": {
                        "title": "",
                        "body": "A new message arrived."
                    },
                    "FILE": "{sender_name} sent {filename} file",
                    "ADMM": "New announcement: {message}"
                },
                "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"
    }
    

    List of response properties

    Copy link
    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.

    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": 400201,
        "error": true
    }