CloudCDN Quickstart

Documentation

Everything is a plain HTTPS API. Tokens are scoped per site, requests are idempotent, and the same calls are used by the CLI.

Quickstart

A token is created in the panel; it is shown once and stored as a hash.

authenticationHTTP
export CLOUDCDN_TOKEN="cd_live_..."

# who am I
curl -s https://api.cloudcdn.example/v1/me \
  -H "Authorization: Bearer $CLOUDCDN_TOKEN"

{ "account": "acme", "sites": 2, "plan": "pro" }

Publishing builds

Pushes are content-addressed: unchanged files are not uploaded again, and a build becomes visible only after the manifest is committed.

publishCLI / HTTP
# CLI
cloudcdn push ./dist --site docs --tag release-2026-12-02

# equivalent HTTP upload
curl -X PUT https://api.cloudcdn.example/v1/sites/docs/builds/current \
  -H "Authorization: Bearer $CLOUDCDN_TOKEN" \
  -F "manifest=@dist/manifest.json" \
  -F "file=@dist/index.html;filename=index.html"
EndpointMethodPurpose
/v1/meGETAccount and plan
/v1/sitesGET, POSTList or create sites
/v1/sites/{site}/builds/currentPUTCommit a build
/v1/purgePOSTPurge by path, prefix or tag
/v1/metricsGETTraffic and hit ratio
/v1/statusGETPublic network status (no auth)

Signed URLs and purge

signed urlHMAC-SHA256
# expires in 10 minutes, bound to one IP
GET /media/clip.mp4
  ?exp=1796256000
  &ip=203.0.113.7
  &sig=9f1c...e2

# the edge recomputes the digest and rejects
# expired links with 403, without hitting origin
purgePOST /v1/purge
curl -X POST https://api.cloudcdn.example/v1/purge \
  -H "Authorization: Bearer $CLOUDCDN_TOKEN" \
  -d '{ "site": "docs", "prefix": "/assets/" }'

{ "accepted": 41, "nodes": 24, "eta_ms": 380 }

Errors

Standard status codes, a stable machine-readable code and a human-readable message. Nothing else.

StatusCodeMeaning
401token_invalidToken missing, revoked or wrong scope
403signature_expiredSigned URL past its expiry
409build_in_progressAnother commit for the same site
429rate_limitedRetry after the value in Retry-After