SecurityUpdate IP Access

Update IP Access

Update IP access control of HTTP pull zone

curl -X POST "https://api.5centscdn.com/v2/zones/http/pull/42/ipaccess" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "enabled": "Y",
  "policy": "Y",
  "list": "1.2.3.4,5.6.7.8",
  "ips": "192.168.1.1",
  "mode": "save"
}'
{
  "result": "success",
  "message": "Zone Updated",
  "zone": {
    "type": "pull",
    "id": 12345,
    "serviceid": 67890,
    "mode": "http",
    "cnames": "",
    "edgeruleids": 0,
    "deleted": null,
    "name": "my-cdn-zone",
    "hashid": "abc123def456",
    "fqdn": "cdn.example.com",
    "edgerules": {
      "enabled": "N"
    },
    "domainlock": {
      "policy": "N",
      "list": "example.com,cdn.example.com",
      "ips": "203.0.113.10",
      "noreferer": "N",
      "type": "push",
      "enabled": "N",
      "active": "N"
    },
    "geoblock": {
      "policy": "N",
      "list": [
        "US",
        "GB"
      ],
      "ips": "203.0.113.10",
      "enabled": "N",
      "active": "N"
    },
    "securetoken": {
      "policy": "F",
      "keyip": "N",
      "list": "ab12cd34ef56gh78",
      "timeout": 3600,
      "session": "0",
      "ips": "",
      "dirs": "",
      "enabled": "N",
      "active": "N"
    },
    "eac": {
      "policy": "N",
      "list": "http://example.com/auth.script",
      "ips": "203.0.113.10",
      "enabled": "N",
      "active": "N"
    },
    "ssl": {
      "http": "N",
      "http2": "Y",
      "redirect": "Y",
      "mode": "S",
      "certid": null,
      "zerossl": null,
      "enabled": "Y",
      "warning": false
    },
    "cache": {
      "smart": "0",
      "cache": "4h",
      "expiry": "1M",
      "querystring": "N",
      "cachecontrol": "Y",
      "usestale": "Y",
      "revalidate": "Y",
      "cacheInSecs": 14400,
      "cacheInMins": 240,
      "expiryInSecs": 2592000,
      "expiryInMins": 43200
    },
    "edge": {
      "compression": "N",
      "compressionlevel": 5,
      "disposition": "N",
      "stripcookie": "N",
      "xff": "N",
      "cors": "Y",
      "webp": "N",
      "pseudostreaming": "N",
      "wp": "N",
      "lfo": "Y",
      "prefresh": "N"
    },
    "shield": {
      "shields": [
        "CA",
        "FR"
      ]
    },
    "waf": {
      "enabled": "N"
    },
    "seo": {
      "id": 12345,
      "type": "pull",
      "canonical": "N",
      "mode": "default",
      "robots": "N",
      "robotstxt": "N",
      "robotstxtcustom": ""
    },
    "ftpdetails": {
      "username": "user_67890_push_12345",
      "password": "••••••••"
    },
    "ssl_enabled": "Y"
  }
}
POST
/zones/http/pull/{zoneid}/ipaccess
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
enabledstring

Enable or disable IP access control.

Options: Y, N
policystring

IP access filtering mode. Y = Blacklist mode (block listed IPs). N = Whitelist mode (allow only listed IPs, block all others).

Options: Y, N
liststring

Comma-separated IP addresses or CIDR ranges to block (Y) or allow (N).

ipsstring

Comma-separated IP addresses excluded from access control restrictions.

modestring

Configuration persistence mode. save = replace current list. append = add entries to existing list. overwrite = reset and replace entirely.

Options: save, append, overwrite
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

zoneidinteger
Required

Zone ID

Example:
42

Body

application/json
enabledstring

Enable or disable IP access control.

Allowed values:YN
policystring

IP access filtering mode. Y = Blacklist mode (block listed IPs). N = Whitelist mode (allow only listed IPs, block all others).

Allowed values:YN
liststring

Comma-separated IP addresses or CIDR ranges to block (Y) or allow (N).

Example:
1.2.3.4,5.6.7.8
ipsstring

Comma-separated IP addresses excluded from access control restrictions.

Example:
192.168.1.1
modestring

Configuration persistence mode. save = replace current list. append = add entries to existing list. overwrite = reset and replace entirely.

Allowed values:saveappendoverwrite

Responses

resultstring

Status of the API response.

messagestring

Human-readable status or result message

zoneobject