API v1
One contract for the console and CLI.
The public API is JSON over HTTPS. Customer-only endpoints use an MFA-authenticated session cookie; automation uses a scoped rasp_live_… bearer key.
Conventions
Send Idempotency-Key on zone creation and purge requests. Reusing a key with the same body returns the original result; reusing it with a different body returns 409. Zone updates use expectedVersion, and deletion uses If-Match.
curl https://api.rasp-cdn.dev/api/v1/organizations/$ORG/zones \
-H "Authorization: Bearer $RASP_API_TOKEN"
curl -X POST https://api.rasp-cdn.dev/api/v1/organizations/$ORG/zones \
-H "Authorization: Bearer $RASP_API_TOKEN" \
-H "Idempotency-Key: deploy-2026-09-03-assets" \
-H "Content-Type: application/json" \
--data '{"name":"Assets","hostname":"assets.example.com","origin":"https://origin.example.com","defaultTtlSeconds":3600,"maximumTtlSeconds":86400}'/api/v1API discovery
/api/v1/auth/invitations/inspectInspect a pending invitation
/api/v1/auth/invitations/acceptAccept a single-use invitation
/api/v1/auth/loginVerify password and start MFA
/api/v1/auth/mfa/totp/enrollmentBegin TOTP enrollment
/api/v1/auth/mfa/totp/verifyVerify TOTP and issue a session
/api/v1/auth/mfa/recovery/verifyConsume a recovery code
/api/v1/customer/sessionRead the customer session
/api/v1/customer/sessionRevoke the customer session
/api/v1/organizations/{organizationId}/invitationsInvite an organization member
/api/v1/organizations/{organizationId}/api-keysList API keys without secrets
/api/v1/organizations/{organizationId}/api-keysCreate a one-time API key
/api/v1/organizations/{organizationId}/api-keys/{keyId}Revoke an API key
/api/v1/organizations/{organizationId}/zonesList zones
/api/v1/organizations/{organizationId}/zonesCreate and publish a zone
/api/v1/organizations/{organizationId}/zones/{zoneId}Update with an expected version
/api/v1/organizations/{organizationId}/zones/{zoneId}Delete with If-Match
/api/v1/organizations/{organizationId}/zones/{zoneId}/purgesQueue a durable purge
/api/v1/organizations/{organizationId}/purgesRead purge completion
/api/v1/organizations/{organizationId}/configuration/latestRead the published snapshot
/api/v1/organizations/{organizationId}/usageRead rolling 30-day usage
/api/v1/organizations/{organizationId}/audit-eventsRead audit events
/api/v1/organizations/{organizationId}/billingRead beta entitlements
/api/v1/organizations/{organizationId}/support-accessRead active staff support access
Errors and retries
Error bodies contain a stable code and human-readable message. Retry network errors, 429, and transient 5xx responses with capped exponential backoff. Do not retry validation or authorization failures unchanged.
{
"error": {
"code": "zone_version_conflict",
"message": "The zone changed since it was read."
}
}The machine-readable OpenAPI 3.1 contract is versioned in docs/api/openapi.yaml. Internal staff, certificate, configuration-distribution, purge-worker, and telemetry routes are deliberately excluded from the public API.