{"openapi":"3.1.0","info":{"title":"dCal API","version":"2.0.0","description":"Book meetings from your own systems: list event types, read open times, then create, reschedule and cancel bookings. The API runs on the same engine as the booking page, so it offers the same times and keeps the same rules.\n\n**Base URL:** `https://api.dcal.ai`\n\n**OpenAPI document:** [`https://api.dcal.ai/openapi.json`](https://api.dcal.ai/openapi.json), to import into an API client or a code generator.\n\n## Authentication\n\nSend an API key in the `Authorization` header of every request:\n\n```http\nAuthorization: Bearer dcl_<prefix>_<secret>\n```\n\nCreate a key on the [API keys](https://app.dcal.ai/admin/developers/keys) page of your dashboard. A key reaches only what its scopes allow. Call the API from your server, never from a web page, and never put a key in a URL.\n\n## Two APIs\n\n- **REST API**, under `/v1/machine`: read open times, then book, list, reschedule and cancel. The simplest start for a new integration.\n- **Cal.com-compatible API**, under `/v2`: the paths, headers and field names of Cal.com's API v2, so a tool that already speaks Cal.com works with your key. It adds one extension: open times across several of your connected calendars (`POST /v2/calendars/availability`).\n\nBoth share the same booking engine, so they offer the same times.\n\n## Version header\n\nEach `/v2` operation below needs a `cal-api-version` header with exactly this value. A missing or different value answers `400 UNSUPPORTED_API_VERSION`. The calendar endpoints and `/v1/machine` take no version header.\n\n| Operation | `cal-api-version` |\n| --- | --- |\n| `GET /v2/event-types` | `2024-06-14` |\n| `GET /v2/slots` | `2024-09-04` |\n| `POST /v2/bookings` | `2026-02-25` |\n| `GET /v2/bookings/{uid}` | `2026-02-25` |\n| `POST /v2/bookings/{uid}/reschedule` | `2026-02-25` |\n| `POST /v2/bookings/{uid}/cancel` | `2026-02-25` |\n| `POST /v2/bookings/{uid}/guests` | `2024-08-13` |\n\n## Safe retries\n\nBooking, rescheduling and cancelling accept an `Idempotency-Key` header, and so does adding guests on `/v2`. Use one key per real-world action, built from something stable on your side, of up to 128 characters. Sending the same key again returns the original result instead of acting twice. On `/v2`, the same key with a different body answers `409 IDEMPOTENCY_KEY_REUSED`.\n\n## More\n\nAI assistants and agents can book through the MCP server at `https://mcp.dcal.ai/mcp`, on the same engine.\n\nStep-by-step guides with examples: [developer docs](https://docs.dapta.ai/dcal/developers).","license":{"name":"MIT"}},"servers":[{"url":"https://api.dcal.ai","description":"This deployment"}],"tags":[{"name":"REST API","description":"Read open times, then book, list, reschedule and cancel bookings with an API key. The simplest start for a new integration."},{"name":"Cal.com-compatible API","description":"The paths, headers and field names of Cal.com's API v2, so a tool that already speaks Cal.com works with your key. Each operation needs its `cal-api-version` header."},{"name":"Calendar availability","description":"An addition to the Cal.com shape: open times across up to 100 of your connected calendars in one call."},{"name":"Booking page","description":"The public endpoints behind the booking page and the invitee's manage link. They take no API key; a manage link's token reaches only its own booking."},{"name":"Health","description":"Whether this deployment and its database are up."}],"x-dapta-compatibility":{"implemented":["GET /v2/calendars","POST /v2/calendars/availability","GET /v2/event-types","GET /v2/slots","POST /v2/bookings","GET /v2/bookings/{uid}","POST /v2/bookings/{uid}/reschedule","POST /v2/bookings/{uid}/guests","POST /v2/bookings/{uid}/cancel"],"deferred":["booking list","slot reservations","selected/destination calendar mutations"],"unsupportedVariants":["recurrence","seats","instant meetings","routing","variable duration","reschedule exclusion"]},"components":{"securitySchemes":{"dclBearer":{"type":"http","scheme":"bearer","bearerFormat":"dcl_ API key","description":"Authorization: Bearer dcl_<prefix>_<secret>. Never put a key in a URL."},"apiKey":{"type":"http","scheme":"bearer","description":"dcl_ API key (Authorization: Bearer …)."},"hostSession":{"type":"apiKey","in":"header","name":"authorization","description":"Host session (AuthProvider)."}},"schemas":{"Attendee":{"type":"object","required":["name","email"],"properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","format":"email"},"timeZone":{"type":"string","description":"IANA zone (validated); defaults to UTC on the machine surface."},"notes":{"type":"string","maxLength":2000},"phone":{"type":"string","maxLength":32,"description":"E.164 preferred."},"language":{"type":"string","enum":["en","es"],"description":"Notification/.ics language."}}},"ErrorEnvelope":{"type":"object","required":["status","error"],"properties":{"status":{"type":"string","const":"error"},"error":{"type":"object","required":["code","message","details","requestId"],"properties":{"code":{"type":"string","examples":["INVALID_REQUEST","INVALID_TIMEZONE","UNSUPPORTED_API_VERSION","AUTHENTICATION_REQUIRED","INVALID_API_KEY","INSUFFICIENT_SCOPE","RESOURCE_NOT_FOUND","SLOT_TAKEN","IDEMPOTENCY_KEY_REUSED","CALENDAR_READ_ONLY","CALENDAR_READ_FORBIDDEN","PROVIDER_UNAVAILABLE","BOOKING_FIELDS_INVALID","FEATURE_NOT_SUPPORTED"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}}}}},"Slot":{"type":"object","required":["start"],"properties":{"start":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"end":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."}}},"SlotsSuccess":{"type":"object","required":["status","data"],"properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/Slot"}}}}},"CalAttendeeInput":{"type":"object","required":["name","email","timeZone"],"additionalProperties":false,"properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","format":"email"},"timeZone":{"type":"string","example":"America/Bogota"},"language":{"type":"string","enum":["en","es"],"description":"Only en and es are supported. Other Cal.com locales return FEATURE_NOT_SUPPORTED."},"phoneNumber":{"type":"string","maxLength":32}}},"Booking":{"type":"object","required":["id","uid","title","status","start","end","duration","eventTypeId","eventType","hosts","attendees","guests","metadata","bookingFieldsResponses"],"properties":{"id":{"type":"integer","description":"Stable numeric compatibility alias. Lifecycle operations use uid."},"uid":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["accepted","pending","cancelled","rejected"]},"start":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"end":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"duration":{"type":"integer"},"eventTypeId":{"type":["integer","null"],"description":"Null for an event a host put on their own calendar (the MCP create_event tool), which has no event type."},"eventType":{"type":["object","null"],"description":"Null for a host's own event, as eventTypeId.","required":["id","slug"],"properties":{"id":{"type":"integer"},"slug":{"type":"string"}}},"hosts":{"type":"array","items":{"type":"object","additionalProperties":true}},"attendees":{"type":"array","items":{"type":"object","additionalProperties":true}},"guests":{"type":"array","items":{"type":"string","format":"email"}},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"bookingFieldsResponses":{"type":"object","additionalProperties":true},"location":{"type":["string","null"]},"meetingUrl":{"type":["string","null"]},"destinationCalendarId":{"type":["string","null"]},"cancellationReason":{"type":["string","null"]},"cancelledByEmail":{"type":["string","null"]},"reschedulingReason":{"type":["string","null"]},"rescheduledByEmail":{"type":["string","null"]},"rescheduledFromUid":{"type":["string","null"]},"rescheduledToUid":{"type":["string","null"]},"icsUid":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"updatedAt":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"utm":{"type":["object","null"],"description":"The campaign the booking came from: the utm_* parameters of the booking page address, or null when it had none.","additionalProperties":false,"properties":{"utm_source":{"type":"string","maxLength":128},"utm_medium":{"type":"string","maxLength":128},"utm_campaign":{"type":"string","maxLength":128},"utm_term":{"type":"string","maxLength":128},"utm_content":{"type":"string","maxLength":128}}}}},"BookingSuccess":{"type":"object","required":["status","data"],"properties":{"status":{"type":"string","const":"success"},"data":{"$ref":"#/components/schemas/Booking"}}},"EventType":{"type":"object","required":["id","lengthInMinutes","title","slug","bookingFields","locations","type"],"properties":{"id":{"type":"integer"},"daptaId":{"type":"string","description":"Native stable Dapta identifier."},"lengthInMinutes":{"type":"integer"},"title":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"locations":{"type":"array","items":{}},"bookingFields":{"type":"array","items":{"type":"object","additionalProperties":true}},"type":{"type":"string","enum":["personal","team"]},"schedulingType":{"type":["string","null"],"enum":["round_robin","collective","fixed_round_robin",null]},"username":{"type":["string","null"]},"team":{"oneOf":[{"type":"null"},{"type":"object","required":["id","slug","name"],"properties":{"id":{"type":"integer"},"daptaId":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}}}]}}},"Calendar":{"type":"object","required":["id","externalId","credentialId","integration","provider","name","primary","readOnly","isSelected","accessRole","source","capabilities","syncStatus"],"properties":{"id":{"type":"string","description":"Tenant-scoped Dapta calendar ID used by batch availability."},"externalId":{"type":"string"},"credentialId":{"type":"integer"},"delegationCredentialId":{"type":["string","null"]},"integration":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"email":{"type":["string","null"]},"primary":{"type":"boolean"},"readOnly":{"type":"boolean"},"isSelected":{"type":"boolean"},"accessRole":{"type":"string","enum":["owner","writer","reader","freeBusyReader","none"]},"source":{"type":"string","enum":["primary","owned","shared","subscribed","delegated"]},"capabilities":{"type":"object","required":["canRead","canReadFreeBusy","canCreate","canUpdate","canDelete"],"properties":{"canRead":{"type":"boolean"},"canReadFreeBusy":{"type":"boolean"},"canCreate":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canDelete":{"type":"boolean"}}},"syncStatus":{"type":"string","enum":["healthy","stale","error"]},"lastSyncedAt":{"type":["string","null"],"format":"date-time","description":"ISO-8601 UTC instant."}}},"CalendarAvailabilityInput":{"type":"object","additionalProperties":false,"required":["calendarIds","from","to","timeZone","durationMinutes","mode"],"properties":{"calendarIds":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"string"}},"from":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"to":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"timeZone":{"type":"string","example":"America/Bogota"},"durationMinutes":{"type":"integer","minimum":1,"maximum":1440},"intervalMinutes":{"type":"integer","minimum":1,"maximum":1440},"bufferBeforeMinutes":{"type":"integer","minimum":0,"maximum":1440,"default":0},"bufferAfterMinutes":{"type":"integer","minimum":0,"maximum":1440,"default":0},"mode":{"type":"string","enum":["perCalendar","allAvailable","anyAvailable"]}}},"GuestInput":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","maxLength":200},"timeZone":{"type":"string"}}}}},"paths":{"/v2/slots":{"get":{"tags":["Cal.com-compatible API"],"operationId":"getV2Slots","summary":"Get slots for a personal or team event type","description":"Current 2024-09-04 field names and date-keyed envelope. Supports personal, round-robin, collective, and fixed round-robin event types through the existing scheduling engine. format=range adds end.","security":[{"dclBearer":[]}],"parameters":[{"name":"cal-api-version","in":"header","required":true,"schema":{"type":"string","enum":["2024-09-04"]},"example":"2024-09-04"},{"name":"eventTypeId","in":"query","required":false,"schema":{"oneOf":[{"type":"integer","minimum":0},{"type":"string","minLength":1}],"description":"Cal-compatible numeric alias or the native Dapta event-type ID. Use event-type discovery when available."},"description":"Use alone, or use one of the slug selector pairs."},{"name":"eventTypeSlug","in":"query","required":false,"schema":{"type":"string"}},{"name":"username","in":"query","required":false,"schema":{"type":"string"}},{"name":"teamSlug","in":"query","required":false,"schema":{"type":"string"}},{"name":"organizationSlug","in":"query","required":false,"schema":{"type":"string"},"description":"Dapta account code/alias when organization context is used."},{"name":"start","in":"query","required":true,"schema":{"type":"string"},"example":"2026-07-24T00:00:00Z"},{"name":"end","in":"query","required":true,"schema":{"type":"string"},"example":"2026-07-31T23:59:59Z"},{"name":"timeZone","in":"query","required":false,"schema":{"type":"string","default":"UTC"},"example":"America/Bogota"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["time","range"],"default":"time"}},{"name":"bookingUidToReschedule","in":"query","required":false,"schema":{"type":"string"},"description":"Recognized but not supported: returns 422."}],"responses":{"200":{"description":"Date-keyed available slots; data is {} when no slots are available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotsSuccess"},"example":{"status":"success","data":{"2026-07-24":[{"start":"2026-07-24T10:00:00.000-05:00"}]}}}}},"400":{"description":"Invalid input, timezone, or API version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"403":{"description":"API key lacks availability:read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"404":{"description":"Event type is absent, cross-tenant, or outside the key allowlist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"422":{"description":"A recognized Cal.com variant that is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}}}}},"/v2/bookings":{"post":{"tags":["Cal.com-compatible API"],"operationId":"createV2Booking","summary":"Create a personal or team booking","description":"Uses the current 2026-02-25 request and response names. All guests are persisted as booking attendees. Idempotency-Key is an addition to the Cal.com shape: send one so a retry never books twice.","security":[{"dclBearer":[]}],"parameters":[{"name":"cal-api-version","in":"header","required":true,"schema":{"type":"string","enum":["2026-02-25"]},"example":"2026-02-25"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":128},"description":"Stable operation key. Same key/body returns the original response; same key/different body returns 409.","example":"crm-lead-4821:create-booking"}],"x-dapta-idempotency":{"extension":true,"reuse":"same request returns original response without repeated side effects","mismatch":"409 IDEMPOTENCY_KEY_REUSED"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["start","attendee"],"anyOf":[{"required":["eventTypeId"]},{"required":["eventTypeSlug","username"]},{"required":["eventTypeSlug","teamSlug"]}],"properties":{"eventTypeId":{"oneOf":[{"type":"integer","minimum":0},{"type":"string","minLength":1}],"description":"Cal-compatible numeric alias or the native Dapta event-type ID. Use event-type discovery when available."},"eventTypeSlug":{"type":"string"},"username":{"type":"string"},"teamSlug":{"type":"string"},"organizationSlug":{"type":"string"},"start":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"attendee":{"$ref":"#/components/schemas/CalAttendeeInput"},"guests":{"type":"array","maxItems":10,"uniqueItems":true,"items":{"type":"string","format":"email"}},"bookingFieldsResponses":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"metadata":{"type":"object","maxProperties":50,"propertyNames":{"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"lengthInMinutes":{"type":"integer","minimum":1,"description":"Accepted only when equal to the event type duration."},"destinationCalendarId":{"type":"string","description":"Dapta calendar discovery ID. Supported for personal events; read-only calendars return 403."}},"example":{"eventTypeId":"replace-with-event-type-id","start":"2026-07-24T15:00:00Z","attendee":{"name":"Test Customer","email":"customer@example.com","timeZone":"America/Bogota","language":"es","phoneNumber":"+573000000000"},"guests":["guest@example.com"],"metadata":{"source":"crm"},"bookingFieldsResponses":{"notes":"Created from an automation"}}}}}},"responses":{"201":{"description":"Booking created, or the original booking returned for an idempotent retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSuccess"}}}},"400":{"description":"Invalid input, timezone, or API version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"403":{"description":"API key lacks bookings:write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"404":{"description":"Event type is absent, cross-tenant, or outside the key allowlist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"409":{"description":"Slot collision or idempotency-key mismatch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"422":{"description":"Invalid booking fields or recognized unsupported Cal variant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}}}}},"/v2/bookings/{uid}":{"get":{"tags":["Cal.com-compatible API"],"operationId":"getV2Booking","summary":"Get a booking","security":[{"dclBearer":[]}],"parameters":[{"name":"cal-api-version","in":"header","required":true,"schema":{"type":"string","enum":["2026-02-25"]},"example":"2026-02-25"},{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current booking state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSuccess"}}}},"400":{"description":"Unsupported API version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"403":{"description":"API key lacks bookings:read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"404":{"description":"Booking is absent, cross-tenant, or outside the key allowlist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}}}}},"/v2/bookings/{uid}/cancel":{"post":{"tags":["Cal.com-compatible API"],"operationId":"cancelV2Booking","summary":"Cancel a booking","description":"The booking keeps its UID. A retry returns the same UID and response.","security":[{"dclBearer":[]}],"parameters":[{"name":"cal-api-version","in":"header","required":true,"schema":{"type":"string","enum":["2026-02-25"]},"example":"2026-02-25"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":128},"description":"Stable operation key. Same key/body returns the original response; same key/different body returns 409.","example":"crm-lead-4821:cancel-booking"},{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"x-dapta-idempotency":{"extension":true,"reuse":"same request returns original response without repeated side effects","mismatch":"409 IDEMPOTENCY_KEY_REUSED"},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"cancellationReason":{"type":"string","maxLength":1000},"cancelSubsequentBookings":{"type":"boolean","const":false,"description":"Recurring bookings are not implemented."}}}}}},"responses":{"200":{"description":"Cancelled booking; retry returns the same UID and response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSuccess"}}}},"400":{"description":"Invalid body or unsupported API version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"403":{"description":"API key lacks bookings:write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"404":{"description":"Booking is absent, cross-tenant, or outside the key allowlist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"409":{"description":"Idempotency-Key was reused with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"422":{"description":"Recurring/seated cancellation is not implemented.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}}}}},"/v2/bookings/{uid}/reschedule":{"post":{"tags":["Cal.com-compatible API"],"operationId":"rescheduleV2Booking","summary":"Reschedule a booking","description":"The moved booking gets a new UID; the response links the old and the new one.","security":[{"dclBearer":[]}],"parameters":[{"name":"cal-api-version","in":"header","required":true,"schema":{"type":"string","enum":["2026-02-25"]},"example":"2026-02-25"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":128},"description":"Stable operation key. Same key/body returns the original response; same key/different body returns 409.","example":"crm-lead-4821:reschedule-booking"},{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"x-dapta-idempotency":{"extension":true,"reuse":"same request returns original response without repeated side effects","mismatch":"409 IDEMPOTENCY_KEY_REUSED"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["start"],"properties":{"start":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"rescheduledBy":{"type":"string","format":"email"},"reschedulingReason":{"type":"string","maxLength":1000}},"example":{"start":"2026-07-25T16:00:00Z","rescheduledBy":"customer@example.com","reschedulingReason":"Customer requested a later time"}}}}},"responses":{"201":{"description":"New booking UID with rescheduledFromUid; the old booking exposes rescheduledToUid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSuccess"}}}},"400":{"description":"Invalid target or unsupported API version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"403":{"description":"API key lacks bookings:write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"404":{"description":"Booking is absent, cross-tenant, or outside the key allowlist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"409":{"description":"Target slot is taken or Idempotency-Key mismatched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"422":{"description":"Seats and recurrence are not implemented.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}}}}},"/v2/bookings/{uid}/guests":{"post":{"tags":["Cal.com-compatible API"],"operationId":"addV2BookingGuests","summary":"Add guests to a booking","security":[{"dclBearer":[]}],"parameters":[{"name":"cal-api-version","in":"header","required":true,"schema":{"type":"string","enum":["2024-08-13"]},"example":"2024-08-13"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":128},"description":"Stable operation key. Same key/body returns the original response; same key/different body returns 409.","example":"crm-lead-4821:add-guests"},{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"x-dapta-idempotency":{"extension":true,"reuse":"same request returns original response without repeated side effects","mismatch":"409 IDEMPOTENCY_KEY_REUSED"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["guests"],"properties":{"guests":{"type":"array","minItems":1,"maxItems":10,"items":{"$ref":"#/components/schemas/GuestInput"}}},"example":{"guests":[{"email":"guest@example.com","name":"Guest Customer","timeZone":"America/Bogota"}]}}}}},"responses":{"200":{"description":"Updated booking. Existing guest emails are not duplicated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSuccess"}}}},"400":{"description":"Invalid guests or unsupported API version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"403":{"description":"API key lacks bookings:write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"404":{"description":"Booking is absent, cross-tenant, or outside the key allowlist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"409":{"description":"Idempotency-Key was reused with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"422":{"description":"LIMIT_EXCEEDED: the booking would hold more than 30 people in all, attendees and guests each counted once (or its event seats, when more).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}}}}},"/v2/event-types":{"get":{"tags":["Cal.com-compatible API"],"operationId":"getV2EventTypes","summary":"List event types","security":[{"dclBearer":[]}],"parameters":[{"name":"cal-api-version","in":"header","required":true,"schema":{"type":"string","enum":["2024-06-14"]},"example":"2024-06-14"},{"name":"username","in":"query","required":false,"schema":{"type":"string"}},{"name":"eventSlug","in":"query","required":false,"schema":{"type":"string"}},{"name":"teamSlug","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tenant- and key-scoped event types.","content":{"application/json":{"schema":{"type":"object","required":["status","data"],"properties":{"status":{"type":"string","const":"success"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}}}}}}},"400":{"description":"Unsupported API version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"403":{"description":"API key lacks event-types:read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}}}}},"/v2/calendars":{"get":{"tags":["Cal.com-compatible API"],"operationId":"getV2Calendars","summary":"List connected calendars","security":[{"dclBearer":[]}],"responses":{"200":{"description":"Cal-shaped connected calendar groups plus Dapta capability fields.","content":{"application/json":{"schema":{"type":"object","required":["status","data"],"properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","required":["connectedCalendars","destinationCalendar","failures"],"properties":{"connectedCalendars":{"type":"array","items":{"type":"object"}},"destinationCalendar":{"oneOf":[{"$ref":"#/components/schemas/Calendar"},{"type":"null"}]},"failures":{"type":"array","items":{"type":"object"}}}}}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"403":{"description":"API key lacks calendars:read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"503":{"description":"Calendar provider is unavailable and no cached discovery data exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}}}}},"/v2/calendars/availability":{"post":{"tags":["Calendar availability"],"operationId":"getV2CalendarAvailability","summary":"Get open times across calendars","description":"One call for one to 100 calendars from GET /v2/calendars. Every requested calendar is either represented in results or in failures; provider errors are never silently omitted.","security":[{"dclBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarAvailabilityInput","example":{"calendarIds":["cal_replace_me"],"from":"2026-07-24T00:00:00-05:00","to":"2026-07-31T23:59:59-05:00","timeZone":"America/Bogota","durationMinutes":30,"intervalMinutes":30,"bufferBeforeMinutes":0,"bufferAfterMinutes":0,"mode":"perCalendar"}}}}},"responses":{"200":{"description":"Normalized slots, explicit partial flag, and per-calendar failures.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid range, timezone, calendar count, or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"403":{"description":"API key lacks calendars:read or all calendars forbid free/busy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"404":{"description":"A calendar ID is absent or belongs to another tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}},"503":{"description":"The calendar provider is unavailable for every requested calendar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"status":"error","error":{"code":"INVALID_REQUEST","message":"The request is invalid.","details":{},"requestId":"req_example"}}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"Health check","description":"Liveness plus a database probe. Answers 200 even when the database is down, with `db: \"down\"`.","responses":{"200":{"description":"ok | degraded"}}}},"/v1/availability":{"get":{"tags":["Booking page"],"summary":"Get open times of an event","description":"The times a public booking page offers. On a group event each slot carries the seats left.","parameters":[{"name":"accountCode","in":"query","required":true,"schema":{"type":"string"}},{"name":"handle","in":"query","required":true,"schema":{"type":"string"}},{"name":"slug","in":"query","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"timeZone","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-One-Off-Token","in":"header","required":false,"schema":{"type":"string"},"description":"A one-off invite-link token (see GET /v1/public/one-off/{token}). Presenting a live one lets this request reach the single event type that token opens, including one hidden from the public booking page; a booking made with it consumes it. Ignored on API-key writes, which are not subject to the grant."}],"responses":{"200":{"description":"Availability with slots[{startUtc,spotsLeft?,capacity?}]"}}}},"/v1/public/teams/{accountCode}/{teamSlug}/availability":{"get":{"tags":["Booking page"],"summary":"Get open times of a team event","description":"Round-robin and collective team events: the team counterpart to GET /v1/availability. The window is capped at 60 days from `from`: a wider range is clamped, not rejected. `from` and `to` must be ISO-8601 instants with an offset.","parameters":[{"name":"accountCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"teamSlug","in":"path","required":true,"schema":{"type":"string"}},{"name":"slug","in":"query","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":true,"schema":{"type":"string"}},{"name":"timeZone","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-One-Off-Token","in":"header","required":false,"schema":{"type":"string"},"description":"A one-off invite-link token (see GET /v1/public/one-off/{token}). Presenting a live one lets this request reach the single event type that token opens, including one hidden from the public booking page; a booking made with it consumes it. Ignored on API-key writes, which are not subject to the grant."}],"responses":{"200":{"description":"Availability with slots[{startUtc}]"},"400":{"description":"BAD_REQUEST (missing slug, or an unparseable from/to)"},"404":{"description":"NOT_FOUND (no such team event)"},"429":{"description":"RATE_LIMITED"}}}},"/v1/public/one-off/{token}":{"get":{"tags":["Booking page"],"summary":"Resolve a one-off link","description":"A one-off invite link is a grant a host mints over an event type they already have: it books that event once and then stops working. This answers WHERE the token points and nothing else — no host name, no event title, and no indication of what other links exist. Present the token on the availability, reservation and booking routes (see the X-One-Off-Token header) to read and book the event it opens, including one hidden from the public booking page. Rate-limited per IP like every public route.","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"43-character base64url token, as minted by the host."}],"responses":{"200":{"description":"The booking target: {kind:\"personal\",accountCode,handle,slug} or {kind:\"team\",accountCode,teamSlug,slug}."},"404":{"description":"The token names nothing. Deliberately indistinguishable from any other missing route."},"410":{"description":"ONE_OFF_GONE — the link was real and is spent or revoked. A booking made against it (pending included) consumes it permanently; cancelling that booking does NOT bring it back."},"429":{"description":"RATE_LIMITED"}}}},"/v1/reservations":{"post":{"tags":["Booking page"],"summary":"Hold a time for 10 minutes","parameters":[{"name":"X-One-Off-Token","in":"header","required":false,"schema":{"type":"string"},"description":"A one-off invite-link token (see GET /v1/public/one-off/{token}). Presenting a live one lets this request reach the single event type that token opens, including one hidden from the public booking page; a booking made with it consumes it. Ignored on API-key writes, which are not subject to the grant."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["accountCode","handle","slug","startUtc"],"properties":{"accountCode":{"type":"string"},"handle":{"type":"string"},"slug":{"type":"string"},"startUtc":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."}}}}}},"responses":{"201":{"description":"{reservationUid,expiresAt}"},"400":{"description":"INVALID_SLOT"},"429":{"description":"RATE_LIMITED"}}}},"/v1/reservations/release":{"post":{"tags":["Booking page"],"summary":"Release a held time","description":"Releases a hold placed by POST /v1/reservations so the slot is offered to other visitors again, rather than waiting out its ten-minute TTL. The reservation uid is the authorisation — releasing a hold you do not hold, one that already expired, or one a booking already consumed all answer the same 200, so this is never a way to learn whether a hold exists.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reservationUid"],"properties":{"reservationUid":{"type":"string","description":"The uid returned by POST /v1/reservations."}}}}}},"responses":{"200":{"description":"{released:true} — always, when the body parses"},"400":{"description":"BAD_REQUEST (no reservationUid)"},"429":{"description":"RATE_LIMITED"}}}},"/v1/bookings":{"post":{"tags":["Booking page"],"summary":"Book a held time","description":"Consumes the hold. The event's required booking questions must be answered in `answers`.","parameters":[{"name":"X-One-Off-Token","in":"header","required":false,"schema":{"type":"string"},"description":"A one-off invite-link token (see GET /v1/public/one-off/{token}). Presenting a live one lets this request reach the single event type that token opens, including one hidden from the public booking page; a booking made with it consumes it. Ignored on API-key writes, which are not subject to the grant."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["accountCode","handle","slug","startUtc","attendee"],"properties":{"accountCode":{"type":"string"},"handle":{"type":"string"},"slug":{"type":"string"},"startUtc":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"attendee":{"$ref":"#/components/schemas/Attendee"},"answers":{"type":"object","additionalProperties":true,"description":"Answers to the event type's custom intake fields (required ones enforced)."},"locale":{"type":"string","enum":["en","es"],"description":"The language of the page the visitor booked on: the invitee's emails are written in it (attendee.language, when given, wins). Absent: the host's language."},"reservationUid":{"type":"string","description":"Consume a held reservation (slot hold) from POST /v1/reservations. It must be the hold on this event (handle + slug) at this startUtc; any other, or one past its ten minutes, answers 410 RESERVATION_EXPIRED. A matching hold stands in for the offered-time check: the time was checked (hours, interval, minimum notice) when the hold was granted."}}}}}},"responses":{"201":{"description":"BookingView (+ one-time manageUrl)"},"400":{"description":"INTAKE_INVALID"},"404":{"description":"No such booking page — or a one-off invite token that names nothing, or that opens a different event type than the one being booked."},"409":{"description":"SLOT_TAKEN | DUPLICATE_BOOKING"},"410":{"description":"RESERVATION_EXPIRED (the reservationUid names no live hold on this event at this startUtc), or ONE_OFF_GONE when a presented one-off invite link is already spent or revoked."}}}},"/v1/bookings/{uid}":{"get":{"tags":["Booking page"],"summary":"Get a booking from its manage link","description":"The manage token goes in the X-Manage-Token header, the `token` query parameter or the body.","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"BookingView"},"403":{"description":"Invalid manage link"}}}},"/v1/bookings/{uid}/availability":{"get":{"tags":["Booking page"],"summary":"Get times a booking can move to","description":"Needs the manage token. Scoped to the hosts the booking already has, so the picker never offers a time the reschedule refuses.","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"timeZone","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"AvailabilityResponse"},"400":{"description":"BAD_REQUEST"},"404":{"description":"Booking not found, or an invalid manage link"}}}},"/v1/bookings/{uid}/cancel":{"post":{"tags":["Booking page"],"summary":"Cancel from the manage link","description":"Needs the manage token. Pending and accepted bookings both cancel; a retry changes nothing.","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Manage token (alternative to header/query)."},"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"{uid,status:\"cancelled\"}"},"403":{"description":"Invalid manage link"},"410":{"description":"Not cancellable (declined)"}}}},"/v1/bookings/{uid}/reschedule":{"post":{"tags":["Booking page"],"summary":"Reschedule from the manage link","description":"Needs the manage token, which is replaced by a new one on success.","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["newStartUtc"],"properties":{"newStartUtc":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"token":{"type":"string","description":"Manage token (alternative to header/query)."}}}}}},"responses":{"200":{"description":"BookingView (new manageUrl)"},"403":{"description":"Invalid manage link"},"409":{"description":"SLOT_TAKEN"}}}},"/v1/machine/availability":{"get":{"tags":["REST API"],"summary":"Get open times","description":"The open times of one event. A window longer than 60 days is cut to 60 days.","security":[{"apiKey":[]}],"parameters":[{"name":"eventTypeId","in":"query","required":false,"schema":{"type":"string"},"description":"Address by id (or use handle+slug)."},{"name":"handle","in":"query","required":false,"schema":{"type":"string"}},{"name":"slug","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"timeZone","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Availability"},"403":{"description":"out-of-scope"}}}},"/v1/machine/bookings":{"post":{"tags":["REST API"],"summary":"Create a booking","description":"Books a time for the people in `attendees`. Send an Idempotency-Key so a retry never books twice.","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["startUtc","attendees"],"properties":{"eventTypeId":{"type":"string","description":"Address by id (or use handle+slug)."},"handle":{"type":"string"},"slug":{"type":"string"},"startUtc":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."},"attendees":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Attendee"}},"answers":{"type":"object","additionalProperties":true}}}}}},"responses":{"201":{"description":"{uid,status,startUtc,endUtc}"}}},"get":{"tags":["REST API"],"summary":"List bookings","security":[{"apiKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"{items,nextCursor}"},"400":{"description":"from or to is not a date, or limit is not an integer"}}}},"/v1/machine/bookings/{uid}":{"patch":{"tags":["REST API"],"summary":"Reschedule a booking","security":[{"apiKey":[]}],"parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["newStartUtc"],"properties":{"newStartUtc":{"type":"string","format":"date-time","description":"ISO-8601 UTC instant."}}}}}},"responses":{"200":{"description":"rescheduled"},"403":{"description":"out-of-scope"}}}},"/v1/machine/bookings/{uid}/cancel":{"post":{"tags":["REST API"],"summary":"Cancel a booking","description":"Pending and accepted bookings both cancel; a retry changes nothing and says it was already applied.","security":[{"apiKey":[]}],"parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"{uid,status:\"cancelled\"} (retries return alreadyApplied)"},"400":{"description":"Idempotency-Key is invalid (over 200 characters)"},"403":{"description":"out-of-scope"},"410":{"description":"Not cancellable (declined)"}}}},"/v1/machine/bookings/{uid}/attendees":{"post":{"tags":["REST API"],"summary":"Add a guest to a booking","security":[{"apiKey":[]}],"parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["attendee"],"properties":{"attendee":{"$ref":"#/components/schemas/Attendee"}}}}}},"responses":{"201":{"description":"attendee added, or already on the booking (nothing written again)"},"403":{"description":"out-of-scope"},"410":{"description":"the booking is cancelled or otherwise no longer active"},"422":{"description":"LIMIT_EXCEEDED: the booking already holds 30 attendees and guests (or its event seats, when more)"}}}}}}