hosting

GET /v1/sites/{siteId}/cdn/usage

This month's CDN allowance on a pool CDN, and how much of it the site has used.

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 sites.view 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 GET https://api.zinndigital.com/v1/sites/{siteId}/cdn/usage \
  -H "Authorization: Bearer zdk_live_…"

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

Every site served by one of our pooled CDNs includes a monthly CDN allowance (the provider's cost of serving it, cap_micros, $0.25 by default, plus any top-ups bought this month). The customer is warned at warn_low_pct and warn_high_pct; at 100% the site's CDN is paused (status: paused) until the month ends or a top-up is added. A site on an unmetered CDN reads metered: false and status: unmetered (included, no cap). tiers are the one-off top-ups on sale, priced in integer minor units with their ISO currency. Requires sites.view.

Parameters

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

Response

NameTypeRequiredWhat it is
meteredbooleanYesFalse on an unmetered CDN (included, no allowance, never paused).
periodstringYesThe UTC month, YYYY-MM.
spend_microsintegerYesProvider cost of serving the site this month, in micro-USD.
cap_microsintegerYesThis month's allowance (default or override, plus top-ups), in micro-USD.
cap_sourcestring<default, override, upgraded>Yes—
percentintegerYes—
statusstring<ok, warned, paused, failed, unmetered>Yes—
warn_low_pctintegerYes—
warn_high_pctintegerYes—
last_checked_atstringYes—
tiersSiteCdnUsageTier[]Yes—

Errors this endpoint can return

401 · 403 · 404 · 429