latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

Mail
Spam Management

Add block on emails from specific countries

This function blocks email from specific countries.

get/block_incoming_email_from_country

Query parameters

country_codestring required

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.

Response

HTTP Request was successful.

Example response

{
  "data": {
    "updated": 1
  },
  "metadata": {
    "command": "block_incoming_email_from_country",
    "reason": "OK",
    "result": 1,
    "version": 1
  }
}