hosting

POST /v1/sites/{siteId}/cdn/usage/top-ups

Add a one-off CDN top-up to this site for the rest of the month.

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 POST https://api.zinndigital.com/v1/sites/{siteId}/cdn/usage/top-ups \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "tier": <string>, "request_id": <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

Paid from the organization's Zinn® credit — never a card charge, and nothing renews. Idempotent on request_id: a retry with the same id returns the same top-up and debits nothing more. A paused site whose new allowance covers its spend is switched back on in the same call. Refused (422) for a site with no allowance, an unknown tier, an account not in good standing, a tier too small to lift the site back under its allowance (enough: false), or credit that does not cover the price. Requires hosting.cdn.manage.

Parameters

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

Request body

NameTypeRequiredWhat it is
tierstringYes—
request_idstringYesClient-generated idempotency key; a retry with the same id is a no-op.

Response

NameTypeRequiredWhat it is
tierstringYes—
extra_microsintegerYes—
price_minorintegerYes—
currencystringYes—
periodstringYes—
usageSiteCdnUsageYes—

Errors this endpoint can return

401 · 403 · 404 · 422 · 429