Authenticate a request
Pass the key in the Authorization header. The scheme is case-sensitive and must be Bearer.
Authorization: Bearer ey_test_your_secret_key
Missing, revoked, or invalid credentials return HTTP 401. A key can access only messages belonging to its Emailyt account.
Test and live keys
| Prefix | Behavior | Use |
|---|---|---|
| ey_test_ | Validates, stores, queues, records activity, and emits signed test events. Never calls SES. | Development, CI, staging, integration tests. |
| ey_live_ | Sends through SES after domain verification and account approval. | Production server workloads. |
Keys are displayed once. Emailyt stores a one-way hash, suffix, name, mode, and status—not the recoverable secret.
Store keys safely
- Use a managed secret store in production.
- Inject keys at runtime through protected environment configuration.
- Never embed a key in React, browser JavaScript, a mobile bundle, or a desktop binary.
- Never send keys in query strings or log the Authorization header.
- Create separate keys per environment and revoke a key immediately if exposure is suspected.
Rotate a key
- Create a replacement key in the dashboard.
- Deploy the replacement to every sending service.
- Confirm traffic is using the replacement.
- Revoke the old key from the dashboard.
Up to 10 active keys are allowed per account.