hosting

PUT /v1/sites/{siteId}/cdn/ip-access

Replace a site's edge IP allow and block lists.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the hosting.cdn.manage permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/cdn/ip-access \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "allow": <string[]>, "block": <string[]> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Each entry is an IPv4 or IPv6 address or a CIDR range; entries are normalised and de-duplicated. An address may not be on both lists. A range wider than /8 (IPv4) or /16 (IPv6), including 0.0.0.0/0 and ::/0, is refused with 422 (refusal.edge.ipAccessRangeTooWide). block_asns is optional: when absent the site's network list is kept as it is. A reserved or private AS number is refused with 422; a search crawler's network (Google, Microsoft, Yandex, Apple) with refusal.edge.asnBlockProtectedSearch and the edge's own with refusal.edge.asnBlockProtectedEdge, both {asn}. An empty list removes that rule. A site on a shared preview zone is refused with 422. Audited as site.cdn.ip_access_updated. Requires hosting.cdn.manage.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).

Request body

NameTypeRequiredWhat it is
allowstring[]Yes—
blockstring[]Yes—
block_asnsinteger[]No—

Response

NameTypeRequiredWhat it is
site_idstringYes—
supportedbooleanYes—
allowstring[]Yes—
blockstring[]Yes—
max_entriesintegerYes—
block_asnsinteger[]Yes—
max_asnsintegerYes—
asn_presetsobjectYes—

Errors this endpoint can return

401 · 403 · 404 · 422 · 429 · 502 · 503