{
  "openapi": "3.1.0",
  "info": {
    "title": "Meetzi Booking Automation API",
    "version": "2026-09-30",
    "description": "All seven API key authenticated endpoints under /v1 for Zapier and custom server integrations. Validate an account, list booking pages, read recent bookings, and subscribe to booking events. Booking data is scoped to pages owned by the key owner. This reference does not cover product session APIs. No request quota or rate-limit headers are specified."
  },
  "servers": [
    {
      "url": "https://api.meetzi.co"
    }
  ],
  "externalDocs": {
    "description": "Meetzi API documentation",
    "url": "https://docs.meetzi.co/api/"
  },
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "Booking pages"
    },
    {
      "name": "Booking triggers"
    },
    {
      "name": "Subscriptions"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/me": {
      "get": {
        "operationId": "getConnectionIdentity",
        "summary": "Get connection identity",
        "tags": [
          "Account"
        ],
        "description": "Validate the key and return its user identity. displayLabel falls back from email to name to user ID.",
        "responses": {
          "200": {
            "description": "Connected account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                },
                "example": {
                  "userId": "11111111-1111-4111-8111-111111111111",
                  "email": "alex@example.com",
                  "name": "Alex Morgan",
                  "displayLabel": "alex@example.com",
                  "apiKeyId": "22222222-2222-4222-8222-222222222222",
                  "provider": "zapier"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid API key"
                }
              }
            }
          },
          "500": {
            "description": "Authentication failed, or Failed to load Zapier connection info.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Failed to load Zapier connection info"
                }
              }
            }
          }
        }
      }
    },
    "/v1/booking-pages": {
      "get": {
        "operationId": "listBookingPages",
        "summary": "List owned booking pages",
        "tags": [
          "Booking pages"
        ],
        "description": "Lists public and private non-deleted pages owned by the user, newest created first. Question order is not guaranteed. No pagination parameters.",
        "responses": {
          "200": {
            "description": "Owned booking pages, or an empty data array.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingPageList"
                },
                "example": {
                  "data": [
                    {
                      "id": "33333333-3333-4333-8333-333333333333",
                      "name": "Discovery Call",
                      "slug": "discovery-call",
                      "is_public": true,
                      "created_at": "2026-09-01T09:00:00.000Z",
                      "questions": [
                        {
                          "id": "44444444-4444-4444-8444-444444444444",
                          "question": "What would you like to discuss?",
                          "order": 0
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid API key"
                }
              }
            }
          },
          "500": {
            "description": "Authentication failed, or Failed to list booking pages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Failed to list booking pages"
                }
              }
            }
          }
        }
      }
    },
    "/v1/triggers/new-bookings": {
      "get": {
        "operationId": "listNewBookings",
        "summary": "List new bookings",
        "tags": [
          "Booking triggers"
        ],
        "description": "Recent bookings with current status booked, ordered by created_at descending. Scoped to owned pages. Not an event history. Returns an empty array if no records match.",
        "responses": {
          "200": {
            "description": "Recent matching booking records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewBookingList"
                },
                "example": {
                  "data": [
                    {
                      "booking_id": "55555555-5555-4555-8555-555555555555",
                      "booking_page_id": "33333333-3333-4333-8333-333333333333",
                      "booking_page_name": "Discovery Call",
                      "booking_page_slug": "discovery-call",
                      "assigned_user_id": "11111111-1111-4111-8111-111111111111",
                      "assigned_user_name": "Alex Morgan",
                      "assigned_user_email": "alex@example.com",
                      "guest_fullname": "Jamie Taylor",
                      "guest_email": "jamie@example.com",
                      "language": "en",
                      "date": "2026-10-05",
                      "start_datetime": "2026-10-05T14:00:00.000Z",
                      "end_datetime": "2026-10-05T14:30:00.000Z",
                      "duration": 30,
                      "status": "booked",
                      "approval_status": null,
                      "meeting_option_type": "video",
                      "meeting_option_provider": "google_meet",
                      "meeting_option_url": "https://meet.google.com/example",
                      "meeting_option_location": null,
                      "meeting_option_instructions": null,
                      "meeting_option_phone": null,
                      "created_at": "2026-09-30T13:00:00.000Z",
                      "updated_at": "2026-09-30T13:00:00.000Z",
                      "answer_44444444-4444-4444-8444-444444444444": "A new project"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid API key"
                }
              }
            }
          },
          "500": {
            "description": "Authentication failed, or Failed to list bookings for Zapier trigger.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Failed to list bookings for Zapier trigger"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Zapier booking trigger query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "404": {
            "description": "Booking page not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Booking page not found"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "booking_page_id",
            "in": "query",
            "required": false,
            "description": "Owned, non-deleted page ID. Omit for all owned pages.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum recent records; no cursor or offset pagination.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          }
        ]
      }
    },
    "/v1/triggers/cancelled-bookings": {
      "get": {
        "operationId": "listCancelledBookings",
        "summary": "List cancelled bookings",
        "tags": [
          "Booking triggers"
        ],
        "description": "Recent bookings with current status cancelled, ordered by cancelled_at descending. Scoped to owned pages. Not an event history. Returns an empty array if no records match.",
        "responses": {
          "200": {
            "description": "Recent matching booking records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelledBookingList"
                },
                "example": {
                  "data": [
                    {
                      "booking_id": "55555555-5555-4555-8555-555555555555",
                      "booking_page_id": "33333333-3333-4333-8333-333333333333",
                      "booking_page_name": "Discovery Call",
                      "booking_page_slug": "discovery-call",
                      "assigned_user_id": "11111111-1111-4111-8111-111111111111",
                      "assigned_user_name": "Alex Morgan",
                      "assigned_user_email": "alex@example.com",
                      "guest_fullname": "Jamie Taylor",
                      "guest_email": "jamie@example.com",
                      "language": "en",
                      "start_datetime": "2026-10-05T14:00:00.000Z",
                      "end_datetime": "2026-10-05T14:30:00.000Z",
                      "duration": 30,
                      "status": "cancelled",
                      "cancelled_at": "2026-10-01T09:00:00.000Z",
                      "cancellation_reason": "I am unavailable at this time.",
                      "cancelled_by": "guest",
                      "created_at": "2026-09-30T13:00:00.000Z",
                      "updated_at": "2026-10-01T09:00:00.000Z",
                      "answer_44444444-4444-4444-8444-444444444444": "A new project"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid API key"
                }
              }
            }
          },
          "500": {
            "description": "Authentication failed, or Failed to list cancelled bookings for Zapier trigger.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Failed to list cancelled bookings for Zapier trigger"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Zapier cancelled booking trigger query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "404": {
            "description": "Booking page not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Booking page not found"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "booking_page_id",
            "in": "query",
            "required": false,
            "description": "Owned, non-deleted page ID. Omit for all owned pages.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum recent records; no cursor or offset pagination.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          }
        ]
      }
    },
    "/v1/triggers/updated-bookings": {
      "get": {
        "operationId": "listRescheduledBookings",
        "summary": "List rescheduled bookings",
        "tags": [
          "Booking triggers"
        ],
        "description": "Recent bookings with current status rescheduled, ordered by updated_at descending, nulls last. Scoped to owned pages. Not an event history. Returns an empty array if no records match.",
        "responses": {
          "200": {
            "description": "Recent matching booking records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RescheduledBookingList"
                },
                "example": {
                  "data": [
                    {
                      "booking_id": "55555555-5555-4555-8555-555555555555",
                      "booking_page_id": "33333333-3333-4333-8333-333333333333",
                      "booking_page_name": "Discovery Call",
                      "booking_page_slug": "discovery-call",
                      "assigned_user_id": "11111111-1111-4111-8111-111111111111",
                      "assigned_user_name": "Alex Morgan",
                      "assigned_user_email": "alex@example.com",
                      "guest_fullname": "Jamie Taylor",
                      "guest_email": "jamie@example.com",
                      "language": "en",
                      "start_datetime": "2026-10-06T15:00:00.000Z",
                      "end_datetime": "2026-10-06T15:30:00.000Z",
                      "duration": 30,
                      "status": "rescheduled",
                      "approval_status": null,
                      "meeting_option_type": "video",
                      "meeting_option_provider": "google_meet",
                      "meeting_option_url": "https://meet.google.com/example",
                      "meeting_option_location": null,
                      "meeting_option_instructions": null,
                      "meeting_option_phone": null,
                      "updated_at": "2026-10-01T09:00:00.000Z",
                      "created_at": "2026-09-30T13:00:00.000Z",
                      "answer_44444444-4444-4444-8444-444444444444": "A new project"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid API key"
                }
              }
            }
          },
          "500": {
            "description": "Authentication failed, or Failed to list updated bookings for Zapier trigger.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Failed to list updated bookings for Zapier trigger"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Zapier updated booking trigger query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "404": {
            "description": "Booking page not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Booking page not found"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "booking_page_id",
            "in": "query",
            "required": false,
            "description": "Owned, non-deleted page ID. Omit for all owned pages.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum recent records; no cursor or offset pagination.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          }
        ]
      }
    },
    "/v1/subscriptions": {
      "post": {
        "operationId": "createSubscription",
        "summary": "Create webhook subscription",
        "tags": [
          "Subscriptions"
        ],
        "description": "Creates a subscription for one event type. A matching active subscription for the same user, event, URL, and page filter is returned with 201 without updating it. Null or omitted page filter covers all owned pages, including future pages.",
        "responses": {
          "201": {
            "description": "New or existing active subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                },
                "example": {
                  "id": "66666666-6666-4666-8666-666666666666",
                  "is_active": true
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid API key"
                }
              }
            }
          },
          "500": {
            "description": "Authentication failed, or Failed to create Zapier subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Failed to create Zapier subscription"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Zapier subscription request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "404": {
            "description": "Booking page not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Booking page not found"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionInput"
              },
              "example": {
                "trigger_type": "new_booking",
                "target_url": "https://example.com/webhooks/meetzi",
                "booking_page_id": null
              }
            }
          }
        },
        "callbacks": {
          "bookingEvent": {
            "{$request.body#/target_url}": {
              "post": {
                "summary": "Receive one booking event",
                "description": "One booking object without a data wrapper or event envelope. Payload shape follows trigger_type. No webhook signature or Authorization header. One delivery attempt; no automatic retry or replay. HTTP 410 triggers an attempt to deactivate the subscription.",
                "security": [],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/NewBooking"
                          },
                          {
                            "$ref": "#/components/schemas/CancelledBooking"
                          },
                          {
                            "$ref": "#/components/schemas/RescheduledBooking"
                          }
                        ]
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx acknowledges delivery."
                  },
                  "410": {
                    "description": "Receiver is gone; Meetzi attempts to deactivate this subscription."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/subscriptions/{id}": {
      "delete": {
        "operationId": "deleteSubscription",
        "summary": "Deactivate webhook subscription",
        "tags": [
          "Subscriptions"
        ],
        "description": "Deactivates an active subscription owned by the user. Repeating a successful deletion returns 404.",
        "responses": {
          "204": {
            "description": "Deactivated successfully. Empty body."
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid API key"
                }
              }
            }
          },
          "500": {
            "description": "Authentication failed, or Failed to delete Zapier subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Failed to delete Zapier subscription"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Zapier subscription id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Subscription not found"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Active subscription ID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Meetzi API key generated in Integrations \u2192 Zapier. The same key authenticates /v1 requests from Zapier and custom server integrations."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "ValidationError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "const": "ERR_VALIDATION"
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "properties": {
              "formErrors": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "fieldErrors": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "formErrors",
              "fieldErrors"
            ]
          }
        },
        "required": [
          "code",
          "message",
          "details"
        ]
      },
      "Identity": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "displayLabel": {
            "type": "string"
          },
          "apiKeyId": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "email",
          "name",
          "displayLabel",
          "apiKeyId",
          "provider"
        ]
      },
      "Question": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "question": {
            "type": [
              "string",
              "null"
            ]
          },
          "order": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "question",
          "order"
        ]
      },
      "BookingPage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_public": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Question"
            }
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "is_public",
          "created_at",
          "questions"
        ]
      },
      "NewBooking": {
        "type": "object",
        "properties": {
          "booking_id": {
            "type": "string",
            "description": "Booking ID, shared across events for the same booking."
          },
          "booking_page_id": {
            "type": "string",
            "description": "Booking page ID."
          },
          "booking_page_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "booking_page_slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_user_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_user_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "guest_fullname": {
            "type": "string"
          },
          "guest_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": "string"
          },
          "start_datetime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Appointment start in UTC."
          },
          "end_datetime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start plus duration, in UTC."
          },
          "duration": {
            "type": "number",
            "description": "Duration in minutes."
          },
          "status": {
            "type": "string",
            "const": "booked"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "approval_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_location": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_instructions": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        },
        "required": [
          "booking_id",
          "booking_page_id",
          "booking_page_name",
          "booking_page_slug",
          "assigned_user_id",
          "assigned_user_name",
          "assigned_user_email",
          "guest_fullname",
          "guest_email",
          "language",
          "start_datetime",
          "end_datetime",
          "duration",
          "status",
          "created_at",
          "updated_at",
          "approval_status",
          "meeting_option_type",
          "meeting_option_provider",
          "meeting_option_url",
          "meeting_option_location",
          "meeting_option_instructions",
          "meeting_option_phone",
          "date"
        ],
        "patternProperties": {
          "^answer_.+$": {
            "type": "string",
            "description": "Flattened custom question answer. Array answers are joined with comma and space."
          }
        }
      },
      "CancelledBooking": {
        "type": "object",
        "properties": {
          "booking_id": {
            "type": "string",
            "description": "Booking ID, shared across events for the same booking."
          },
          "booking_page_id": {
            "type": "string",
            "description": "Booking page ID."
          },
          "booking_page_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "booking_page_slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_user_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_user_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "guest_fullname": {
            "type": "string"
          },
          "guest_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": "string"
          },
          "start_datetime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Appointment start in UTC."
          },
          "end_datetime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start plus duration, in UTC."
          },
          "duration": {
            "type": "number",
            "description": "Duration in minutes."
          },
          "status": {
            "type": "string",
            "const": "cancelled"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cancellation_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "cancelled_by": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "booking_id",
          "booking_page_id",
          "booking_page_name",
          "booking_page_slug",
          "assigned_user_id",
          "assigned_user_name",
          "assigned_user_email",
          "guest_fullname",
          "guest_email",
          "language",
          "start_datetime",
          "end_datetime",
          "duration",
          "status",
          "created_at",
          "updated_at",
          "cancelled_at",
          "cancellation_reason",
          "cancelled_by"
        ],
        "patternProperties": {
          "^answer_.+$": {
            "type": "string",
            "description": "Flattened custom question answer. Array answers are joined with comma and space."
          }
        }
      },
      "RescheduledBooking": {
        "type": "object",
        "properties": {
          "booking_id": {
            "type": "string",
            "description": "Booking ID, shared across events for the same booking."
          },
          "booking_page_id": {
            "type": "string",
            "description": "Booking page ID."
          },
          "booking_page_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "booking_page_slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_user_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_user_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "guest_fullname": {
            "type": "string"
          },
          "guest_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": "string"
          },
          "start_datetime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Appointment start in UTC."
          },
          "end_datetime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start plus duration, in UTC."
          },
          "duration": {
            "type": "number",
            "description": "Duration in minutes."
          },
          "status": {
            "type": "string",
            "const": "rescheduled"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "approval_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_location": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_instructions": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_option_phone": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "booking_id",
          "booking_page_id",
          "booking_page_name",
          "booking_page_slug",
          "assigned_user_id",
          "assigned_user_name",
          "assigned_user_email",
          "guest_fullname",
          "guest_email",
          "language",
          "start_datetime",
          "end_datetime",
          "duration",
          "status",
          "created_at",
          "updated_at",
          "approval_status",
          "meeting_option_type",
          "meeting_option_provider",
          "meeting_option_url",
          "meeting_option_location",
          "meeting_option_instructions",
          "meeting_option_phone"
        ],
        "patternProperties": {
          "^answer_.+$": {
            "type": "string",
            "description": "Flattened custom question answer. Array answers are joined with comma and space."
          }
        }
      },
      "SubscriptionInput": {
        "type": "object",
        "properties": {
          "trigger_type": {
            "type": "string",
            "enum": [
              "new_booking",
              "booking_cancelled",
              "booking_updated"
            ]
          },
          "target_url": {
            "type": "string",
            "format": "uri",
            "description": "Absolute callback URL. Use HTTPS. Delivered requests have no signature or Authorization header."
          },
          "booking_page_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Owned booking page ID. Omit or use null for all owned pages. Empty string is invalid."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional stored reference. Not returned or included in deliveries."
          }
        },
        "required": [
          "trigger_type",
          "target_url"
        ]
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "is_active"
        ]
      },
      "BookingPageList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingPage"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "NewBookingList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NewBooking"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "CancelledBookingList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CancelledBooking"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "RescheduledBookingList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RescheduledBooking"
            }
          }
        },
        "required": [
          "data"
        ]
      }
    }
  }
}
