Skip to content

Events and schedules

Create a single event

Create reusable locations with POST /api/locations; each location has a default capacity and can be edited with PATCH /api/locations/{locationId}. Likewise, create common class lengths such as 60 and 90 minutes through /api/duration-presets. Consumers should still offer a custom positive duration.

bash
curl -X POST "$BOOKING_URL/api/events" \
  -H "Authorization: Bearer $BOOKING_SESSION" \
  -H "Content-Type: application/json" \
  -d '{
    "title":"Evening Yin",
    "description":"A quiet 60-minute class",
    "location":"Studio A",
    "capacity":16,
    "status":"published",
    "startsAt":"2026-08-04T17:00:00.000Z",
    "durationMinutes":60
  }'

Supplying startsAt creates one concrete instance. Omitting it creates only the reusable event definition. Supplying locationId copies the location name and defaults capacity from that location unless the request explicitly supplies another capacity.

Add a recurrence series

Post to /api/events/{eventId}/series:

json
{
  "frequency": "weekly",
  "interval": 1,
  "weekdays": [2, 4],
  "localStartTime": "17:00",
  "durationMinutes": 60,
  "timezone": "Europe/Copenhagen",
  "startsOn": "2026-08-01",
  "endsOn": "2026-12-31"
}

weekdays uses JavaScript numbering: Sunday is 0, Monday 1, and Saturday 6. Recurrence is evaluated in the supplied IANA timezone, so the studio-local start time remains stable across daylight-saving transitions.

Use daily, weekly, or monthly frequency. A rule must be bounded by endsOn or count; monthly rules may set monthDay.

Edit, pause, or end a series with PATCH /api/series/{seriesId}. Ordinary future occurrences are regenerated while elapsed instances and explicit move or cancellation exceptions are retained.

For a weekly calendar, request only its interval:

http
GET /api/instances?from=2026-08-03T00:00:00.000Z&to=2026-08-10T00:00:00.000Z

The optional seriesId query parameter narrows the result further.

Make an instance bookable

bash
curl -X PATCH "$BOOKING_URL/api/instances/INSTANCE_ID" \
  -H "Authorization: Bearer $BOOKING_SESSION" \
  -H "Content-Type: application/json" \
  -d '{"action":"bookability","audience":"everyone"}'

Use audience: "groups" with groupIds, or audience: "nobody". The same endpoint supports action: "cancel" and action: "move" with a replacement ISO timestamp.

Teachers and elevated administrators retrieve confirmed attendance with GET /api/instances/{instanceId}/roster. The response joins each confirmed booking to its attendee.

Booking SaaS implementation documentation