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:

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

Business Endpoints

Require an authenticated session. These power the dashboard:

MethodPathDescription
GET/businessCurrent business profile and settings
GET/business/bookingsList bookings with filters
PUT/business/bookings/:id/statusUpdate booking status
GET/business/customersList customers
GET/business/servicesList services and pricing
GET/business/analyticsRevenue and booking analytics
GET/business/teamList team members
GET/PUT/business/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.