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"
| Endpoint | Method | Purpose |
|---|---|---|
/v1/me | GET | Account and plan |
/v1/sites | GET, POST | List or create sites |
/v1/sites/{site}/builds/current | PUT | Commit a build |
/v1/purge | POST | Purge by path, prefix or tag |
/v1/metrics | GET | Traffic and hit ratio |
/v1/status | GET | Public 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.
| Status | Code | Meaning |
|---|---|---|
| 401 | token_invalid | Token missing, revoked or wrong scope |
| 403 | signature_expired | Signed URL past its expiry |
| 409 | build_in_progress | Another commit for the same site |
| 429 | rate_limited | Retry after the value in Retry-After |