Booking Codes

Mint a single-use booking code

Changed on

Mint a single-use booking / reschedule / cancel code scoped to a calendar or appointment type. Collapses GraphQL's six create*BookingCode mutations into one endpoint. The plaintext code is returned exactly once in this response and is never retrievable afterwards. Org admins may mint for any calendar or appointment type in the organization; other members may mint only for a calendar they own or an appointment type they participate in. A target in another organization is answered 404, never 403.

post/booking-codes/

Request

  • The document declares no server URL.
  • Auth: one of:
    • HTTP bearer
    • API key in cookie sessionid

Headers

X-Organization-Idstring

Selects the active organization for this request. Optional for callers that belong to exactly one active organization — the single membership is resolved implicitly. Required when the caller has two or more active memberships; omitting it in that case returns 400. If the header names an organization the caller is not an active member of, the server returns 403.

Request body

purpose'book' | 'reschedule' | 'cancel' required
  • book - book
  • reschedule - reschedule
  • cancel - cancel
calendarinteger nullable
appointment_typeinteger nullable
eventinteger nullable
expires_atstring date-time nullable

Response

idinteger required
codestring required
purpose'book' | 'reschedule' | 'cancel' required
  • book - book
  • reschedule - reschedule
  • cancel - cancel
calendarinteger nullable required
appointment_typeinteger nullable required
eventinteger nullable required
expires_atstring date-time nullable required

Changes

    • ▲

      removed the required property from the response with the status

    • ●

      removed the request property (media type: application/json)

    • ●

      removed the request property (media type: application/x-www-form-urlencoded)

    • ●

      removed the request property (media type: multipart/form-data)

    • ○

      added the new optional request property (media type: application/json)

    • ○

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • ○

      added the new optional request property (media type: multipart/form-data)

    • ○

      added the required property to the response with the status

    • ○

      endpoint added