Skip to main content

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

    type enum

    Allowlist/blocklist type: ALLOW for allowlist, BLOCK for blocklist.

    • ALLOW:
    • BLOCK:

    Possible values: [ALLOW, BLOCK]

    entities object[]

    List of items to be created.

    type enum

    Entry type.

    • EMAIL: Email address
    • DOMAIN_NAME: Domain name
    • IPV4ADDRESS: IPv4 address
    • IPV4ADDRESSRANGE: IPv4 address range
    • IPV6ADDRESS: IPv6 address
    • IPV6ADDRESSRANGE: IPv6 address range
    • IPREGION: IP region

    Possible values: [EMAIL, DOMAIN_NAME, IPV4ADDRESS, IPV4ADDRESSRANGE, IPV6ADDRESS, IPV6ADDRESSRANGE, IPREGION]

    email string

    Email address. Required when the type is EMAIL.

    domain string

    Domain name. Required when type is DOMAIN_NAME.

    ipAddress string

    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.

    begin string

    Start address of the IP range, such as "192.168.1.1" or "2001:db8::1".

    end string

    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.

    countryCode string

    Country code, such as CN.

    provinceCode string

    Province code.

    cityCode string

    City code.

Response

No response fieldsA successful response contains no documented fields.

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.