Creates a domain-level inbound allowlist/blocklist entry
POST/v2/messageRules/allowBlockLists
Creates domain-level inbound allowlist/blocklist entries in the current organization in bulk. The type in the request determines whether to create allowlist or blocklist entries, and entities specifies the entries such as email addresses, domains, IP addresses, IP ranges, or IP geographic regions.
Request
Body parameters
- ALLOW:
- BLOCK:
- EMAIL: Email address
- DOMAIN_NAME: Domain name
- IPV4ADDRESS: IPv4 address
- IPV4ADDRESSRANGE: IPv4 address range
- IPV6ADDRESS: IPv6 address
- IPV6ADDRESSRANGE: IPv6 address range
- IPREGION: IP region
Allowlist/blocklist type: ALLOW for allowlist, BLOCK for blocklist.
Possible values: [ALLOW, BLOCK]
entities object[]
List of items to be created.
Entry type.
Possible values: [EMAIL, DOMAIN_NAME, IPV4ADDRESS, IPV4ADDRESSRANGE, IPV6ADDRESS, IPV6ADDRESSRANGE, IPREGION]
Email address. Required when the type is EMAIL.
Domain name. Required when type is DOMAIN_NAME.
IP address. When the type is IPV4ADDRESS, fill in, for example, "192.168.1.1". When the type is IPV6ADDRESS, fill in, for example, "2001:db8::1".
ipAddressRange object
IP address range, required when type is IPV4ADDRESSRANGE or IPV6ADDRESSRANGE.
Start address of the IP range, such as "192.168.1.1" or "2001:db8::1".
Ending IP address of the range, for example, "192.168.1.255" or "2001:db8::ffff".
ipRegion object
IP region area. Required when type is IPREGION.
Country code, such as CN.
Province code.
City code.
Response
Errors
401 | Access is unauthorized. Please check whether the correct authorization token is passed. |
403 | No API access permission. Please complete the relevant authorization on the application management page of the domain administrator. |