Events and schedules
Create a single event
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.
Add a weekly series
Post to /api/events/{eventId}/series:
json
{
"weekday": 2,
"localStartTime": "17:00",
"durationMinutes": 60,
"startsOn": "2026-08-01",
"endsOn": "2026-12-31"
}weekday uses JavaScript numbering: Sunday is 0, Monday 1, and Saturday 6. Despite the current field name, the implementation calculates this time in UTC; account for the production-readiness limitation.
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.