Documentation

API keys

Every request authenticates with an API key. Keys can be scoped down to least privilege so a leaked key does as little damage as possible.

Create a key

curl -X POST https://api.raanse.com/v1/keys \
  -H "Authorization: Bearer rk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "production",
        "scope": "send"
      }'
The plaintext key (plaintextKey) is returned once, on creation. Store it as a secret — we only keep a hash and can never show it again.

Scopes

  • Full (default) — can send and manage domains, keys, webhooks, templates, and suppressions.
  • Send — can only send email. Use this for app servers that never need to manage configuration.
  • Domain-scoped — set sendingDomainId to lock a key to one verified domain. It can only send from that domain.

Using a key

Pass the key as a bearer token (or the X-Api-Key header):

  • Authorization: Bearer rk_your_api_key

Revoke a key any time with revoke API key — it stops working immediately.