Authentication
Overview
Section titled “Overview”External callers authenticate with an API key at the edge.
You should not call the core-api Worker as a public origin. Production traffic goes through edge-gateway, which:
- Validates the caller credential (API key or equivalent)
- Applies rate limits and quota checks where configured
- Adds internal trust headers (
X-Internal-Sig,X-Tenant-Id) - Forwards the request to
core-apiover a service binding
Obtaining an API key
Section titled “Obtaining an API key”- Sign in to your dashboard
- Navigate to API Keys
- Click Create API key, set a name and expiry
- Copy the key — it is shown only once
Using the API key
Section titled “Using the API key”Add the key to every request in the Authorization (or X-API-Key) header:
curl https://api.example.com/v1/projects \ -H "Authorization: Bearer $YOUR_API_KEY" \ -H "Content-Type: application/json"Error responses
Section titled “Error responses”| Status | Code | Meaning |
|---|---|---|
401 | UNAUTHORIZED | Missing or invalid API key |
403 | FORBIDDEN / UNTRUSTED_REQUEST | Missing permission or invalid trust signature |
429 | RATE_LIMITED | Too many requests — check your plan quota |
{ "error": "UNAUTHORIZED", "message": "Invalid or missing API key"}Key scopes
Section titled “Key scopes”| Scope | Permissions |
|---|---|
read-only | GET requests only |
read-write | GET, POST, PATCH, DELETE |
admin | All operations including schema management |
Rotating keys
Section titled “Rotating keys”Delete the old key from the dashboard and create a new one. Keys are invalidated immediately on deletion.