X-API-Key header:
401 Unauthorized.
Getting an API key
- Sign in to the Memic dashboard
- Navigate to your environment (for example
production) - Go to API Keys, click Create key
- Copy the key — it’s shown only once
What an API key represents
Every Memic API key is bound to exactly one environment. When Memic receives a request, it resolves the full context (organization, project, environment, folder access) from the key alone. That’s why endpoint URLs don’t takeorg_id, project_id, or environment_slug as path parameters.
GET /me to see exactly what context your key resolves to:
Switching environments
Because each key is tied to one environment, switching environments means swapping keys — not changing URLs:Rotating keys
Best practice:- Create a new key in the dashboard
- Deploy it to your application
- Delete the old key
Revoking a compromised key
Deleting a key in the dashboard takes effect immediately. Any in-flight requests using the old key will complete, but new requests will return401 Unauthorized within seconds.
Related
Errors
Error response format and codes.
Core concepts
How environments isolate tenants.