Add block on emails from specific countries

This function blocks email from specific countries.

SecurityBasicAuth
Request
query Parameters
country_code
required
string

The country to block. The ISO 3166-1 alpha-2 code two-letter country code.

Warning:

Do not block the ZZ country code if the server uses a NAT configuration.

Note:

  • To search all available country codes, read the ISO's Full list of Country Codes documentation.
  • To block multiple countries, duplicate or increment the parameter name. For example: country_code-1, country_code-2, and country_code-3.
Examples:
country_code=country_code-1=AA country_code-2=AB country_code-3=AC
country_code=AA
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/block_incoming_email_from_country
Request samples
whmapi1 --output=jsonpretty \
  block_incoming_email_from_country \
  country_code='AA'
Response samples
application/json
{
  • "data": {
    • "updated": 1
    },
  • "metadata": {
    • "command": "block_incoming_email_from_country",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}