NjanggoNjanggoDocumentation API
Pro

Migration /api → /v1

Correspondance entre l’API dashboard actuelle (Clerk Bearer) et l’API premium cible (clés Pro, namespace /v1).

Aujourd’hui, le dashboard consomme /api/* avec Clerk Bearer. L’API Pro expose /api/v1/* avec x-njanggo-api-key partiellement déployée (calendrier, guests, export, check-ins). Gestion des clés : /api/calendars/:slug/api-keys.

Les intégrations Plus (webhooks par événement, widget iframe) ne nécessitent pas de clé API — secret webhook ou aucune auth.

Légende statuts

LiveDivergentPreviewPlanned

Authentification

ContexteHeaderUsage
Dashboard / PlusAuthorization: Bearer <clerk_jwt>Config webhooks par événement, widget, clés API (gestion)
API Pro (live)x-njanggo-api-key: nj_live_…/api/v1/… — calendrier, guests, export, check-ins
API Pro (cible)x-njanggo-api-key: nj_live_…CRUD events, billing, logs webhooks
Webhooks entrants (actuel)X-Njanggo-Webhook-Signature: t=…,v1=…HMAC de "{timestamp}.{body}"
Webhooks entrants (cible)X-Njanggo-Signature: sha256=…HMAC du corps brut

Table de correspondance

StatutMéthodeActuel (/api)CibleAuth cibleScopes
divergentGET/api/events/:eventId/webhooks/api/calendars/:slug/webhooksBearer (dashboard)
divergentPOST/api/events/:eventId/webhooks/api/calendars/:slug/webhooksBearer (dashboard)
divergentPOST/api/events/:eventId/webhooks/:id/test/api/calendars/:slug/webhooks/:id/testBearer (dashboard)
divergentGET/api/calendars/:slug/events/api/calendars/:slug/embed.jsonnone
liveGET/api/v1/calendars/:slug/api/v1/calendars/:slugx-njanggo-api-keyevents:read
liveGET/api/calendars/:slug/api-keys/api/v1/api-keysBearer (dashboard)
livePOST/api/calendars/:slug/api-keys/api/v1/api-keysBearer (dashboard)
livePATCH/api/calendars/:slug/api-keys/:keyId/api/calendars/:slug/api-keys/:keyIdBearer (dashboard)
liveDELETE/api/calendars/:slug/api-keys/:keyId/api/calendars/:slug/api-keys/:keyIdBearer (dashboard)
divergentPOST/api/events/api/v1/eventsx-njanggo-api-keyevents:write
divergentGET/api/events/api/v1/calendars/:slug/eventsx-njanggo-api-keyevents:read
divergentGET/api/events/slug/:slug/api/v1/events/:slugx-njanggo-api-key ou noneevents:read
liveGET/api/v1/events/:eventId/guests/api/v1/events/:eventId/guestsx-njanggo-api-keyguests:read
divergentPOST/api/events/:eventId/guests/api/v1/events/:eventId/guestsx-njanggo-api-keyguests:write
liveGET/api/v1/events/:eventId/export/api/v1/events/:eventId/exportx-njanggo-api-keyguests:read
livePOST/api/v1/events/:eventId/checkins/api/v1/events/:eventId/checkinsx-njanggo-api-keycheckins:write
liveGET/api/v1/events/:eventId/checkins/lookup/api/v1/events/:eventId/checkins/lookupx-njanggo-api-keycheckins:read
liveGET/api/v1/events/:eventId/checkins/api/v1/events/:eventId/checkinsx-njanggo-api-keycheckins:read
previewGET/api/v1/webhook-deliveriesx-njanggo-api-keywebhooks:read
previewPOST/api/v1/webhook-deliveries/:id/retryx-njanggo-api-keywebhooks:write
divergentGET/api/events/:eventId/orders/api/v1/events/:eventId/ordersx-njanggo-api-keybilling:read
divergentPOST/api/events/:eventId/orders/:orderId/refund/api/v1/events/:eventId/orders/:orderId/refundx-njanggo-api-keybilling:write
divergentGET/api/coupons/calendar/:slug/api/v1/calendars/:slug/couponsx-njanggo-api-keyevents:read
liveGET/api/health/api/healthnone

Formats de réponse

Pagination actuelle (@njanggo/types PaginatedResponse) : { data, total, page, limit, totalPages }

Pagination cible Pro : { data, meta: { page, limit, total, totalPages } } — convergence prévue phase Pro.

Erreurs actuelles : { statusCode, message, path, timestamp }

Erreurs cibles : { statusCode, message, errors: [{ field, message }] }

Consultez Schémas ressource pour les objets Event, Guest, WebhookDelivery, etc.

OpenAPI

Le contrat machine-readable est disponible à /v1/openapi.json. Chaque opération inclut x-njanggo-status et x-njanggo-current-path quand applicable.