orbit.test · mail.orbit.test · Local lab · merged demo project
Developer · documentation
Authentication
How project API keys should authenticate requests and constrain access. No key exists and no authentication service is running in this milestone.
Authorization header
The only supported header in the intended contract.
GET /v1/emails/job_01HZX4K8Y3 HTTP/1.1
Host: api.cognova.test
Authorization: Bearer cnv_live_5f0c…masked…
Accept: application/jsonProject-scoped by design
Key properties
Secret — high-entropy, generated server-side and shown once.
Scopes — explicit, least-privilege and enforced per request.
Status — active, expired or revoked; revocation takes effect quickly.
Audit — creation, use and revocation leave an attributable record.
Scopes
A key should carry only what its integration needs.
emails:sendSubmit transactional messages and inspect their jobs.
emails:read-eventsRead message state and delivery event metadata.
templates:readRead template metadata and rendered previews.
templates:writeCreate and edit template drafts.
webhooks:manageCreate endpoints and replay deliveries.
contacts:readRead contact and consent metadata.
analytics:readRead aggregate delivery and usage metrics.
Rotation
A rotation sequence that avoids downtime.
Create replacement
Step 1
Issue a new key with the same or narrower scopes.
Deploy the new key
Step 2
Update the integration secret store; do not commit it.
Confirm traffic
Step 3
Observe successful authenticated requests from the new key.
Revoke the old key
Step 4
Revocation must be immediate and auditable.
Rotation is not available here
Failure responses
Authentication failures should be distinguishable without leaking whether a resource exists.
Missing or invalid key — 401
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
"error": {
"code": "unauthorized",
"message": "A project API key is required.",
"request_id": "req_demo_401"
}
}Valid key, insufficient scope — 403
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"error": {
"code": "unauthorized_scope",
"message": "This key does not include emails:send.",
"request_id": "req_demo_403"
}
}Storage checklist
Store keys in a secret manager or server-side environment, never in source control.
Use separate keys per environment and per integration.
Restrict outbound use to the documented API host.
Alert on unusual volumes, scopes or source regions.
Revoke a key immediately when a person or integration no longer needs it.
No authentication has been tested