Skip to content

Authentication

Every request carries a bearer token. Keys are 192 bits of random data, stored only as a SHA-256 hash, and shown to you exactly once.

bash
curl https://api.sreemail.com/v1/emails \
  -H "Authorization: Bearer sre_live_xxxxxxxxxxxx"

Key format

Keys are prefixed sre_live_ in production and sre_test_ otherwise. The prefix and last four characters are stored for display, so you can identify a key in a list without it ever being retrievable.

There is no recovery

A lost key cannot be shown again, because we do not store it. Revoke it and issue another. Revocation takes effect immediately — the cached credential is evicted rather than left to expire.

Scopes

Keys carry explicit scopes, and a key can never mint another key with scopes it lacks.

ScopeGrants
emails:sendSend mail, manage templates and suppressions
emails:readRead the message log and event history
domains:readList domains and inspect DNS record status
domains:writeAdd and remove domains, manage API keys
webhooks:readList webhook endpoints
webhooks:writeCreate endpoints and replay events

Rate limits

Limits are applied per organization, with a burst allowance of ten times the sustained rate so a batch of notifications is not rejected for arriving at once.

PlanSustainedBurst
Free10 req/s100
Starter20 req/s200
Pro50 req/s500
Enterprise100 req/s1,000

Responses carry RateLimit-Limit and RateLimit-Remaining. A 429 includes Retry-After in seconds.