Skip to content

Authentication

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:

  1. Validates the caller credential (API key or equivalent)
  2. Applies rate limits and quota checks where configured
  3. Adds internal trust headers (X-Internal-Sig, X-Tenant-Id)
  4. Forwards the request to core-api over a service binding
  1. Sign in to your dashboard
  2. Navigate to API Keys
  3. Click Create API key, set a name and expiry
  4. Copy the key — it is shown only once

Add the key to every request in the Authorization (or X-API-Key) header:

Terminal window
curl https://api.example.com/v1/projects \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json"
StatusCodeMeaning
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDEN / UNTRUSTED_REQUESTMissing permission or invalid trust signature
429RATE_LIMITEDToo many requests — check your plan quota
{
"error": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
ScopePermissions
read-onlyGET requests only
read-writeGET, POST, PATCH, DELETE
adminAll operations including schema management

Delete the old key from the dashboard and create a new one. Keys are invalidated immediately on deletion.