Letterbook
All docs

Letterbook Docs

API authentication

Authenticate server-side requests to the Letterbook API.

Last updated June 3, 2026

What this guide covers

Authenticate API requests with a server-side key. Keep API keys out of browsers, mobile apps, and client-side bundles.

Setup steps

  • Create an API key
  • Store the key in a server-side environment variable
  • Send authenticated requests
  • Rotate a key
  • Revoke a leaked key

Example request

curl https://api.letterbook.ai/api/example \
  -H "Authorization: Bearer LETTERBOOK_API_KEY"