Skip to main content

Authentication

Windback supports two authentication methods depending on your use case.

JWT Bearer Token

Used by the dashboard and web app. Obtained via login or OAuth.
curl https://api.windbackai.com/api/v1/auth/me \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

API Keys

Each project has two API keys:
TypePrefixUsed For
Publicpub_Widget, cancel flow, webhook URLs
Secretsk_Server-side SDK calls, full API access
Pass the secret key via the X-API-Key header:
curl https://api.windbackai.com/api/v1/projects/my-project/churn-events \
  -H "X-API-Key: sk_live_abc123..."

When to Use Which

ScenarioAuth Method
Dashboard / web appJWT (automatic)
Server-side SDKSecret API key (sk_)
Cancel flow widgetPublic API key (pub_)
Webhook endpointsPublic API key in URL
Email tracking pixelsNo auth (opaque IDs)

Security Best Practices

Never expose your secret key (sk_) in client-side code, public repositories, or browser requests.
  • Rotate keys regularly from Settings > API Keys
  • Use the public key for client-facing integrations
  • Configure Allowed Origins to restrict which domains can use your public key
  • Enable 2FA on your account for added security

Rate Limits

Endpoint GroupLimit
Auth (login, register)5 req/s, burst 10
Cancel flow10 req/15s per key
Event trackingPlan-based per key
General API10 req/s, burst 30