Getting started
Authentication
Authenticate API requests with bearer API keys, and choose the right key permissions.
All API requests are authenticated with an API key sent as a bearer token:
Authorization: Bearer se_live_xxxxxxxxxxxx
The base URL is https://stackemails.com/v1. All requests must use HTTPS and JSON bodies (Content-Type: application/json).
Key permissions
| Permission | Can do |
|---|---|
full_access |
Every endpoint: emails, domains, contacts, broadcasts and more |
sending_access |
Only send endpoints: POST /emails, POST /emails/batch, POST /events |
Sending-access keys can also be restricted to one domain. A key restricted to mail.acme.com is rejected if it tries to send from any other domain, ideal for production services, SMTP integrations and AI agents.
Test mode
Keys created in test mode (se_test_) behave like live keys but are labelled separately in logs, so you can keep development traffic apart.
Keeping keys safe
- Never expose a key in client-side code or a public repository.
- Use one key per service so you can revoke it independently.
- Revoke a key instantly under API Keys; requests using it fail with
401immediately.