v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
BlockIP
Block IP

Add IP address to cPanel account's block list

This function blocks IP addresses from accessing the domains on a cPanel account.

Important

When you disable the Web Server role, the system disables this function.

get/BlockIP/add_ip

Query parameters

ipstring required

The IP address or IP address range that you wish to block.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "add_ip",
  "module": "BlockIP",
  "result": {
    "data": [
      "1.1.1.1"
    ],
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}