Skip to main content

API Keys

All API requests require authentication via an API key. You can create and manage keys in your dashboard.

Key Types

Using a Key over SMTP

The same keys authenticate SMTP connections — there is no separate SMTP credential. Use apikey as the username and the key as the password. See Sending over SMTP.

Authenticating Requests

Include your API key in the x-api-key header:
Or with SDKs:

Key Permissions

API keys have full access to all endpoints for your domain. To restrict access:
  • Create separate keys for different applications
  • Revoke unused keys immediately
  • Rotate keys periodically

Security Best Practices

Never expose your API key in client-side code, public repositories, or logs.

Do

  • Store keys in environment variables
  • Use secret management systems (e.g., AWS Secrets Manager, Vault)
  • Rotate keys after team member departures
  • Use test keys for development

Don’t

  • Commit keys to version control
  • Share keys via email or chat
  • Use production keys in CI/CD logs
  • Hardcode keys in source code

Environment Variables

Store your API key in an environment variable:

Error Responses

Authentication errors return a 401 Unauthorized status:

Rate Limits

API requests are rate limited to 100 requests per minute per API key. Rate limit headers are included in all responses:
When exceeded, you’ll receive a 429 Too Many Requests response with a Retry-After header indicating seconds until reset.