Documentation

API reference

The CacheNova API is organized around REST. All requests are made over HTTPS to the regional API gateway and return JSON.

Base URL

All endpoints live under the /v1 namespace of the API gateway. Requests are automatically routed to the nearest edge.

https://api.cachenova.com/v1

Regional gateways accept the same paths under /api, e.g. https://eu.cachenova.com/api/v1/zones — useful for pinning calls to a region.

Authentication

Authenticate with a bearer token from your dashboard. Pass it in the Authorization header.

curl https://api.cachenova.com/v1/zones \
  -H "Authorization: Bearer cn_live_3f9a...c21"

Zones

GET /v1/zones
POST /v1/zones
GET /v1/zones/{zone_id}
POST /v1/zones
{
  "domain": "assets.example.com",
  "origin": "https://origin.example.com",
  "cache": { "default_ttl": 3600, "stale_while_revalidate": 86400 }
}

Cache purge

Invalidate cached objects globally by URL or surrogate key. Purges propagate to all 34 PoPs in under 150 ms.

POST /v1/zones/{zone_id}/purge
curl -X POST https://api.cachenova.com/v1/zones/zn_8kd2/purge \
  -H "Authorization: Bearer cn_live_3f9a...c21" \
  -d '{ "keys": ["/img/hero.jpg", "tag:product-42"] }'

Analytics

GET /v1/analytics?zone={zone_id}&metric=cache_hit_ratio
{
  "zone": "zn_8kd2",
  "window": "1h",
  "series": [
    { "region": "us",  "cache_hit_ratio": 0.94, "p95_ms": 22 },
    { "region": "eu",  "cache_hit_ratio": 0.96, "p95_ms": 18 },
    { "region": "kz",  "cache_hit_ratio": 0.91, "p95_ms": 27 }
  ]
}

Errors

CacheNova uses conventional HTTP status codes. 2xx success, 4xx client error, 5xx edge error. Error bodies include a machine-readable code and human message.

{ "error": { "code": "zone_not_found", "message": "No zone with that id." } }