Authentication
All API endpoints (except health checks) require authentication via theX-API-Key header. API keys are issued per customer and hashed with SHA-256 before database lookup.
Making Authenticated Requests
Include theX-API-Key header in every request:
API Key Format
Keys follow the formatsk-{customer}-{random}:
Rate Limits
Rate limits are enforced per customer based on their model tier:| Tier | Rate Limit (events/day) |
|---|---|
starter | 10,000 |
pro | 100,000 |
enterprise | 1,000,000 |
429 Too Many Requests.
Error Responses
- Missing API Key
- Invalid API Key
- Rate Limited
Unauthenticated Endpoints
These endpoints do not require theX-API-Key header:
GET /health— Simple health checkGET /health/detailed— Detailed system healthGET /docs— OpenAPI documentationGET /openapi.json— OpenAPI spec
Middleware Stack
Requests pass through middleware in this order:- CORSMiddleware — CORS headers for cross-origin requests
- IsolationMiddleware — Enforces data isolation between customers
- AuthMiddleware — Validates
X-API-Keyand resolves customer context