Integrations

API Reference

Public REST API endpoints, authentication, rate limits, and webhook events.

Authentication

BookingMachine uses two authentication methods:

MethodEndpointsHow It Works
No auth (public)/api/v1/public/*Public endpoints require no authentication. Rate-limited by IP.
Session (business)/api/v1/business/*Requires an authenticated NextAuth.js session (JWT). Used by the dashboard.
Info: API access for programmatic integrations is available on Business plans. Public endpoints are available on all plans.

Base URL

https://bookingmachine.io/api/v1/

Public Endpoints

These endpoints require no authentication and are used by the widget. Paths are relative to the base URL above:

MethodPath (after the base URL)Description
GETpublic/businesses/:slug/configBusiness configuration, services, and widget settings
GETpublic/businesses/:slug/availabilityAvailable time slots for a date range
POSTpublic/businesses/:slug/bookingsCreate a new booking
GETpublic/businesses/:slug/reviewsPublic reviews for the business
POSTpublic/businesses/:slug/quotesCalculate a quote based on selections
POSTpublic/businesses/:slug/leadsSubmit a lead (quote-mode capture)
GETpublic/bookings/:idGet booking details by ID (public view)
GETpublic/tiersAvailable plan tiers and pricing

Business Endpoints

Require an authenticated session. These power the dashboard. Paths are relative to the base URL above:

MethodPath (after the base URL)Description
GETbusinessCurrent business profile and settings
GETbusiness/bookingsList bookings with filters
PUTbusiness/bookings/:id/statusUpdate booking status
GETbusiness/customersList customers
GETbusiness/servicesList services and pricing
GETbusiness/analyticsRevenue and booking analytics
GETbusiness/teamList team members
GET/PUTbusiness/notification-preferencesNotification settings

Rate Limiting

All API endpoints are rate-limited using an in-memory sliding window per IP + endpoint. Typical limits:

  • Public endpoints: 60 requests per minute per IP

  • Business endpoints: 120 requests per minute per session

When rate-limited, the API returns HTTP 429 with a JSON error body.

Webhook Events

BookingMachine sends webhook events for Stripe payment processing. Stripe webhooks are handled at /api/v1/webhooks/stripe.