Skip to content

Create a zone allowlist entry

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

Adds an IP or CIDR source to the zone allowlist. ASN sources are rejected for zones. The source must be unique within the zone allowlist, 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.5",
  
"type": "ip"
}

Responses

zone-allow resource created

JSON
{
  
"@context": "string",
  
"@id": "string",
  
"@type": "string",
  
"origin": "manual",
  
"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.5",
  
"type": "ip",
  
"id": "MjAzLjAuMTEzLjU"
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI