hosting
PUT /v1/sites/{siteId}/cdn/rate-limit-rules
Replace a site's edge rate-limit rules.
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/rate-limit-rules \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "rules": <SiteCdnRateLimitRule[]> }'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
The whole list: rules not in it are removed, an empty list removes every rule of this site. Rules that are not this site's are never touched. A list the plan does not allow (too many rules, a period, block time or action outside limits) is refused with 422 (refusal.edge.rateLimitTooManyRules, refusal.edge.rateLimitRuleNotOnPlan) before anything is written. path accepts letters, digits and . _ ~ - / only; the login rule matches one page exactly. A site on a shared preview zone is refused with 422. Audited as site.cdn.rate_limit_rules_updated. Requires hosting.cdn.manage.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
rules | SiteCdnRateLimitRule[] | Yes | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
site_id | string | Yes | — |
supported | boolean | Yes | — |
rules | SiteCdnRateLimitRule[] | Yes | — |
limits | SiteCdnRateLimitLimits | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429 · 502 · 503