API Keys
Create, rotate and revoke Muin API keys. Owners and admins choose Read or Write scope and an expiry, and see how each key is used.
API keys let a script, a CI job or another system call the Muin API as your organization. Owners and admins manage them.
Creating an API Key
- Go to Settings → Integrations → API Keys
- Click Create API Key
- Fill in:
- Name: say what uses the key and where, for example “Nightly Report Export” or “Zapier Prod”
- Scopes: Read lets the key look up data. Add Write only if the key must change data.
- Expires: 30 days, 90 days (the default), 180 days, 1 year, or no expiration
- Click Create. If you have not confirmed multi-factor authentication recently, Muin asks you to.
- Copy the key. It is shown once and cannot be retrieved later.
Using an API Key
Send the key as a bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Request examples and error codes are in API Keys and Authentication.
Rotating and Revoking Keys
Click a key in Settings → Integrations → API Keys to open it.
- Rotate replaces the key with a new one straight away. Update every integration that uses it.
- Revoke stops the key working immediately. Anything still using it gets
401 Unauthorized. This cannot be undone.
Seeing How a Key Is Used
The key’s page shows when it was created, when it expires, when it was last used, and its call counts (Total Calls, Today, This Week).
Key Security Best Practices
- Never commit API keys to source control: use environment variables or a secrets manager
- Give each integration its own key, so you can revoke one without breaking the others
- Choose Read unless the integration must change data
- Set an expiry and rotate keys you keep
- Revoke immediately if a key is exposed or an integration is retired
Next Steps
- API Keys and Authentication: make requests and fix 401, 403 and 429 errors
- Security Overview: the full security model