Domain filter
The domain filter is designed to detect anything that is seemingly inappropriate in user-submitted messages, images, and more. It allows you to filter out certain domains contained in text and file messages as well as users’ profile images according to your policies and criteria.
HTTP request
Parameters
The following table lists a parameter that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
custom_type | string | Specifies the custom channel type to apply a set of settings. |
Request body
The following table lists the properties of an HTTP request that this action supports.
Optional
Property name | Type | Description |
---|---|---|
domain_filter | nested object | Specifies a domain filter configuration to filter out text and file messages that contain an URL matching the domain set. This property also filters out a user's profile image URL if it matches the domain set. |
domain_filter.domains[] | array of objects | Specifies an array of domains to detect. Each item of the array is specified with a combination of domain name and TLD (Top Level Domain) such as |
domain_filter.type | int | Determines which filtering mode to apply to messages that contain URLs matching any of the domain set. Acceptable values are the following: |
domain_filter.should_check_global | boolean | Determines whether to apply the domain filter of the application settings to messages in addition to |
If you want to turn off the domain filter, send a PUT
request with a blank domains
property as shown below:
Response
If successful, this action returns the updated moderation settings or channels with a custom channel type in the response body.
In the case of an error, an error object is returned. A detailed list of error codes is available here.