API reference
Endpoints
Base URL is your deployment origin. All paths are relative to it (e.g. https://your-app.vercel.app).
Authentication legend
- Session — Supabase session cookie; user must be logged in on this app.
- Publishable key —
x-publishable-key,Authorization: Bearer, or?key=.
Dashboard & tenant (session)
Typical use: dashboard UI or authenticated pages on the same origin.
GET
/api/tenantSessionTenant profile and company fields for the current user.
PATCH
/api/tenantSessionUpdate allowed tenant / company fields.
GET
/api/resourcesSessionList resources for the tenant.
POST
/api/resourcesSessionCreate a resource (
type, name, capacity, meta).GET
/api/resources/[id]SessionGet one resource.
PATCH
/api/resources/[id]SessionUpdate resource.
DELETE
/api/resources/[id]SessionDelete resource.
GET
/api/schedulesSessionList schedules (optional filters).
POST
/api/schedulesSessionCreate schedule.
GET
/api/schedules/[id]SessionGet schedule.
PATCH
/api/schedules/[id]SessionUpdate schedule.
DELETE
/api/schedules/[id]SessionDelete schedule.
GET
/api/availabilitySessionAvailability for tenant resources (query: dates,
resource_id, etc.).GET
/api/bookingsSessionList bookings with optional filters (
status, resource_id, dates, search).POST
/api/bookingsSessionCreate booking (dashboard flow).
GET
/api/bookings/[id]SessionGet booking.
PATCH
/api/bookings/[id]SessionUpdate booking.
POST
/api/bookings/[id]/statusSessionTransition booking status.
GET
/api/bookings/by-sessionPublishable keyLook up booking by legacy Stripe Checkout session id (older embed return URLs).
GET
/api/api-keysSessionList API keys (metadata).
POST
/api/api-keysSessionCreate API key.
GET
/api/api-keys/baseSessionBase publishable key handling (per product rules).
GET
/api/widget-configsSessionList widget configurations.
POST
/api/widget-configsSessionCreate widget configuration.
GET
/api/widget-configs/[id]SessionGet widget configuration.
PATCH
/api/widget-configs/[id]SessionUpdate widget configuration.
DELETE
/api/widget-configs/[id]SessionDelete widget configuration.
POST
/api/widget-configs/[id]/set-defaultSessionSet default widget config.
POST
/api/widget-configs/[id]/duplicateSessionDuplicate widget config.
GET
/api/webhooks/subscriptionsSessionList webhook subscriptions.
POST
/api/webhooks/subscriptionsSessionCreate webhook (returns secret once).
DELETE
/api/webhooks/subscriptions?id=SessionDelete webhook by id query param (owner/admin).
GET
/api/usersSessionList users in tenant.
POST
/api/usersSessionInvite / create user (per handler rules).
PATCH
/api/users/[id]SessionUpdate user.
DELETE
/api/users/[id]SessionRemove user.
GET
/api/analyticsSessionAnalytics summary.
POST
/api/slots/generateSessionGenerate slots.
POST
/api/slots/ensureSessionEnsure slots exist.
POST
/api/slots/deleteSessionDelete slots (bulk/helper).
POST
/api/payments/create-sessionSessionCreate Mollie payment for a booking (connected Mollie account).
GET
/api/payments/mollie-fee-configSessionConnect application-fee readiness: live OAuth org id vs platform org, ineligibility codes, no API keys.
GET
/api/mollie/connectSessionMollie Connect OAuth:
?action=authorize or ?action=status.GET
/api/mollie/connect/callbackSessionMollie Connect OAuth callback (Mollie redirects here after authorization).
POST
/api/mollie/connect/client-linkSessionMollie Client Link prefilled onboarding: returns
url and sets an OAuth state cookie.POST
/api/mollie/connectSessionOptional token exchange: body
code + state (must match signed-in tenant).PATCH
/api/mollie/connect/profileSessionChoose Mollie website profile when the connected organization has multiple profiles.
GET
/api/stripe/connectSessionLegacy: Stripe Connect onboarding (if still enabled).
GET
/api/stripe/connect/callbackSessionLegacy: Stripe Connect OAuth callback.
GET
/api/email/templatesSessionList email templates.
POST
/api/email/templatesSessionCreate email template.
GET
/api/email/templates/[id]SessionGet template.
PATCH
/api/email/templates/[id]SessionUpdate template.
DELETE
/api/email/templates/[id]SessionDelete template.
GET
/api/email/preferencesSessionEmail notification preferences.
PATCH
/api/email/preferencesSessionUpdate preferences.
POST
/api/uploadSessionUpload asset (e.g. logos), per handler.
GET
/api/onboardingSessionOnboarding state; creates tenant for new OAuth users when needed.
POST
/api/onboardingSessionSave onboarding progress.
PATCH
/api/onboardingSessionComplete onboarding.
POST
/api/account/deleteSessionPermanently delete tenant (owner-only, confirmation phrases).
Public widget API (publishable key)
Use from embeds, SPAs, or mobile clients. Requires correct scopes on the key.
GET
/api/widget/availabilityPublishable keySlots / availability for a resource and date range (query params).
GET
/api/widget/configPublishable keyWidget configuration JSON for branding and flow.
POST
/api/widget/bookingPublishable keyCreate booking / start payment flow (
bookings:write).POST
/api/widget/verifyPublishable keyStart email/SMS verification if enabled on widget.
POST
/api/widget/verify/confirmPublishable keyConfirm verification code.
Platform webhooks (incoming to your app)
POST
/api/webhooks/mollieMollieMollie webhook endpoint (payment state updates).
POST
/api/webhooks/stripeStripe signatureLegacy Stripe webhook endpoint (if still in use).
Auth & registration (public)
POST
/api/auth/send-codePublicSend email verification code (registration flow).
POST
/api/auth/verify-codePublicVerify code.
POST
/api/auth/create-tenantPublicCreate tenant after verified signup (server validates auth user).
Cron and admin routes exist for operations and migrations; they are not listed here. See Authentication and Webhooks for related behavior.