hosting

PUT /v1/sites/{siteId}/cdn/rate-limit-rules

Replace a site's edge rate-limit rules.

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/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

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

Request body

NameTypeRequiredWhat it is
rulesSiteCdnRateLimitRule[]Yes—

Response

NameTypeRequiredWhat it is
site_idstringYes—
supportedbooleanYes—
rulesSiteCdnRateLimitRule[]Yes—
limitsSiteCdnRateLimitLimitsYes—

Errors this endpoint can return

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