How API keys, environments, and scopes work - and how to keep credentials safe.
All API requests authenticate with a Bearer API key in the Authorization header. Keys are scoped to an environment (test or live) and can be restricted to specific permissions.
Authorization: Bearer mrnd_test_4f8e2c1a9b7d3e5f6a0c| Type | Prefix | Environment | Use |
|---|---|---|---|
| Secret key | mrnd_test_… | test | Server-side development and CI |
| Secret key | mrnd_live_… | live | Production server-side calls |
| Restricted key | mrnd_rk_… | either | Scoped to specific resources/permissions |
There are no publishable keys. Meridian keys must never appear in browsers, mobile apps, or other client-side code - there is no safe client-side key.
Restricted keys limit what a credential can do. Create them in Dashboard → Developers → API keys → Create restricted key:
projects:read, webhooks:write, events:readA restricted key calling outside its scope returns 403 forbidden with error code insufficient_scope.
Keys can be rotated without downtime:
DELETE /keys/:id.Revoked keys stop working within ~30 seconds. Requests with a revoked key return 401 unauthorized (invalid_api_key).
test environment for anything that isn't production traffic.| Status | Code | Meaning |
|---|---|---|
401 | missing_api_key | No Authorization header sent |
401 | invalid_api_key | Key is malformed, revoked, or expired |
403 | insufficient_scope | Restricted key lacks the required scope |
403 | environment_mismatch | Test key used against live-only resource |
See Error handling for retry guidance and the full error reference.