Skip to content

Create a manual block in a zone

POST
/api/zones/{zoneId}/security/blocks

Adds an IP, CIDR, or ASN to the zone's manual blocklist with the given action (block or challenge). The source must be valid, must not already be blocked in this zone, and the type must match the source.

Authorizations

ApiToken

Long-lived API token created via POST /api/api-tokens (returned once in plaintext).

Type
API Key (header: X-API-TOKEN)
or
JWT

JWT access token obtained via POST /api/auth/login. Send as: Authorization: Bearer .

Type
HTTP (bearer)

Parameters

Path Parameters

zoneId*

Zone identifier

Type
string
Required

Request Body

JSON
{
  
"source": "203.0.113.10",
  
"action": "block",
  
"type": "ip"
}

Responses

zone-block resource created

JSON
{
  
"@context": "string",
  
"@id": "string",
  
"@type": "string",
  
"geo": {
  
  
"country": "US",
  
  
"country_name": "United States",
  
  
"region": "California",
  
  
"city": "San Francisco",
  
  
"latitude": 37.77,
  
  
"longitude": -122.42,
  
  
"accuracy_radius_km": 20,
  
  
"asn": 15169,
  
  
"asn_organization": "Google LLC"
  
},
  
"source": "203.0.113.10",
  
"action": "block",
  
"type": "ip",
  
"id": "MjAzLjAuMTEzLjEw"
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI