API

JSON over HTTPS. Admin routes require Authorization: Bearer <token> (create one with slot-scheduler gen-token). Errors are {"error": code, "message": text} with HTTP 400 (invalid), 401 (no/bad token), 403 (wrong manage token), 404, 409 (slot taken, email already holds a slot, config version conflict, or config change would remove claimed slots).

MethodPathAuthDescription
GET/api/v1/calendarpublicCalendar metadata and day-grouped slots with claimed/past flags
POST/api/v1/claimspublicClaim a slot: {name, email, slot_id}; returns claim_id and manage_url
DELETE/api/v1/claims/<claim_id>?token=manage tokenRelease your own claim
POST/api/v1/resendpublicRe-send the manage link for {email} (always 202)
GET/api/v1/routespublicThis list
GET/api/v1/admin/statusbearerVersion, backends, counts
GET/api/v1/admin/configbearerCurrent calendar spec and its version
PUT/api/v1/admin/configbearerReplace spec: {config, expected_version?, force?, notify?, dry_run?}
PATCH/api/v1/admin/configbearerMerge top-level fields into the spec (same options as PUT)
POST/api/v1/admin/config/validatebearerValidate a spec and list the slots it generates
GET/api/v1/admin/slotsbearerSlots with claimant details
GET/api/v1/admin/claimsbearerAll claims
POST/api/v1/admin/claimsbearerClaim on someone's behalf: {name, email, slot_id, notify?, note?} (bypasses open/past/domain checks)
DELETE/api/v1/admin/claims/<claim_id>?notify=1&reason=bearerRelease any claim
POST/api/v1/admin/claims/<claim_id>/resendbearerRotate manage token, re-send invitation to the claimant
GET/api/v1/admin/exportbearerJSON dump of config and claims
POST/api/v1/admin/import?replace_claims=0bearerRestore a JSON dump (no mail sent)

HTML routes

See the sitemap.

Example

curl -s -H "Authorization: Bearer $SLOT_SCHEDULER_API_TOKEN" \
     -X PATCH -H 'Content-Type: application/json' \
     -d '{"config": {"open": false}}' https://schedule-me.andrewnorman.org/api/v1/admin/config