Docs
Creating and revoking API keys
Required role and plan
- View
- Viewer or higher
- Create, revoke
- Developer or higher
- Plan
- All plans
Create an API key
- Select a project and environment, then open API keys in the menu.
- Select Create API key.
- Enter a Name (e.g. Production server (send)).
- Under Scopes, choose Send only, Read only, All or Custom.
- Under Expiration, choose Never, 30 days, 90 days or 1 year, then select Create.
- Copy the key and keep it somewhere safe. It is shown only once.
Live environments get sk_live_… keys and test environments get sk_test_… keys.
Scopes
| Scope | Shown as | Allows |
|---|---|---|
messages:send | Send | Sending messages |
messages:retry | Retry | Retrying deliveries |
logs:read | Read messages | Reading messages, customers and endpoints |
endpoints:write | Manage endpoints | Adding, changing and deleting endpoints, and rotating signing secrets |
consumers:write | Manage customers | Adding and deleting customers |
Review and revoke keys
The list shows each key’s name, prefix, scopes, last use and expiration. Keys unused for 30 days and expired keys are marked. For keys that expire, Owners and Admins get an email 7 days before.
- Select Revoke on the key.
- Select Revoke in the confirmation dialog.
Requests using a revoked key fail with 401 right away. Revoked keys are removed from the list and cannot be restored. Logs for this key shows that key’s failed requests.