Skip to content

Authentication

The VerifyEmail API uses API keys to authenticate requests. Pass your secret key as a Bearer token in the Authorization header.

Authorization: Bearer sk_your_api_key
Terminal window
curl https://api.tryverifyemail.com/v1/dmarc/domains \
-H "Authorization: Bearer sk_your_api_key"

Keys are managed from API Keys in the dashboard. Give the key a name you’ll recognise later — one key per service means you can rotate that service’s key without touching anything else.

Revoking takes effect immediately — the next request made with that key gets a 401.

Key Prefix Where it’s used Exposable?
Secret API key sk_ Server-side API requests No — keep it secret
Widget (publishable) key pk_ Browser / the widget Yes

A secret key acts for your account across the whole API — single verification, bulk jobs, and DMARC monitoring all accept the same key.

One thing it cannot do is manage keys. Creating and revoking keys requires signing in to the dashboard, so an attacker holding a leaked key cannot issue themselves a replacement before you turn the original off.

  • Never ship a secret key in client-side code, a mobile app, or a public repo.
  • Store keys in environment variables or a secrets manager.
  • Use separate keys per environment (e.g. test vs. production) and per service, so you can rotate or revoke independently.
  • Rotate immediately if a key is exposed — create a new key, deploy it, then revoke the old one.
Status Meaning
401 The key is missing, malformed, revoked, or not a key we issued.

A request that sends Authorization: Bearer sk_… is always authenticated as that key. If the key is invalid we return 401 rather than falling back to any session cookie that happened to ride along, so a broken key never silently acts as somebody else.