Authentification
Deux modes d'authentification selon votre cas d'usage : intégration serveur (clé API) ou dashboard (JWT).
Modes d'authentification
| Mode | Usage | Header |
|---|---|---|
| Clé API | Ingestion events, customers, webhooks | X-API-Key |
| JWT | Dashboard, billing, settings, campagnes | Authorization: Bearer |
| Public | Health, register, login, plans | — |
Clé API (intégration)
Préfixes protégés : /events, /customers, /churn, /webhooks.
curl https://zedcheckout.com/api/v1/events \
-H "X-API-Key: api_zedcheckout_xxxxxxxx"JWT (dashboard)
Après POST /auth/login, le token est disponible via cookie auth_token (httpOnly, secure, SameSite=Lax) ou header Bearer.
// Cookie automatique depuis le BFF Next.js
// Ou explicitement :
fetch('/api/v1/dashboard/customers', {
headers: { Authorization: 'Bearer <access_token>' },
credentials: 'include',
});La 2FA TOTP est requise à l'activation — fournissez totp_code au login si activée.