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

  1. Select a project and environment, then open API keys in the menu.
  2. Select Create API key.
  3. Enter a Name (e.g. Production server (send)).
  4. Under Scopes, choose Send only, Read only, All or Custom.
  5. Under Expiration, choose Never, 30 days, 90 days or 1 year, then select Create.
  6. 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

ScopeShown asAllows
messages:sendSendSending messages
messages:retryRetryRetrying deliveries
logs:readRead messagesReading messages, customers and endpoints
endpoints:writeManage endpointsAdding, changing and deleting endpoints, and rotating signing secrets
consumers:writeManage customersAdding 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.

  1. Select Revoke on the key.
  2. 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.