Get started

Create an API key

Authenticate every request with a scoped bearer token.

Sendtern authenticates requests with API keys. Each key belongs to one workspace and carries one permission level.

Create a key

  1. 1

    Open API Keys

    Go to API Keys and press Create API key.

  2. 2

    Name it

    Use a name that says where it lives, for example production-web or staging-worker. You'll thank yourself when you need to revoke one.

  3. 3

    Choose a permission

    Pick Sending only unless the key must manage domains or other keys.

  4. 4

    Copy it once

    The full token is shown a single time. Sendtern stores only a hash, so a lost key can't be recovered. Create a new one instead.

Permissions

PermissionCan callUse it for
Sending onlyPOST /emails, POST /emails/batch, POST /test/emailsApps, background jobs, AI agents
Full accessEvery endpoint: emails, domains, API keysInfrastructure scripts and CI only

Use the key

Send the key in the Authorization header with the Bearer scheme. Requests without it fail with 401.

1Authorization: Bearer st_your_api_key

Rotate and revoke

  • Create the new key first, deploy it, then revoke the old one. There is no downtime.
  • Revoking takes effect immediately. Requests with a revoked key return 401 invalid_api_key.
  • Every key shows when it was last used, so you can spot keys nobody needs anymore.

Never ship an API key to a browser or mobile app, and never commit it to a repository. Anyone holding a key can send email as you. See Key security.