Authentication
Mittr supports two authentication methods. Both can be used simultaneously.
API key
Section titled “API key”Include your API key in any of these locations (checked in order):
X-API-Keyheader (recommended)Authorization: Bearer {key}header?key={key}query parameter (WebSocket only)
curl https://app.mittr.io/api/v1/events \ -H "X-API-Key: mtr_your_key"API keys are scoped to a client and optionally to a project. The project scope is resolved automatically from the key.
Session cookie
Section titled “Session cookie”For browser-based access (dashboard), authenticate via email/password login:
# Login — sets mittr_session cookiecurl -X POST https://app.mittr.io/auth/login \ -H "Content-Type: application/json" \ -c cookies.txt
# Subsequent requests use the cookiecurl https://app.mittr.io/api/v1/events -b cookies.txtSessions expire after 24 hours by default.
Project scoping
Section titled “Project scoping”- API keys: Project is embedded in the key. Resolved automatically during auth.
- Session auth: Send
X-Project-IDheader to scope requests to a specific project.
curl https://app.mittr.io/api/v1/endpoints \ -b cookies.txt \ -H "X-Project-ID: your-project-uuid"Without project scoping, queries return data across all projects for the client.
Auth flow (CombinedMiddleware)
Section titled “Auth flow (CombinedMiddleware)”The server checks authentication in order:
- Session cookie (
mittr_session) → if valid, authenticated - API key (
X-API-Key/Bearer/?key=) → if valid, authenticated - Neither →
401 Unauthorized
Public endpoints
Section titled “Public endpoints”These endpoints require no authentication:
POST /auth/signup,/auth/login,/auth/verify-emailPOST /auth/forgot-password,/auth/reset-passwordPOST /auth/accept-invitePOST /inbound/{pathSuffix}(inbound webhooks)POST /webhooks/billing(provider-signed)GET /health,/health/live,/health/readyGET /docs/,/openapi.yaml,/openapi.json