{
  "openapi": "3.1.0",
  "info": {
    "title": "EMBRK.AI API",
    "version": "v1",
    "description": "Read and act on one EMBRK.AI account from your own code.\n\n**Authentication.** Send `Authorization: Bearer <credential>`. The credential is either an API key (`dk_live_…`, created in Settings → Integrations → API keys, shown once) or an OAuth 2.1 access token obtained from this server's authorization endpoint with the resource `<origin>/api/v1` (RFC 8707). A token minted for the MCP endpoint (`/api/mcp`) is not valid here and vice versa. Access tokens are short-lived; refresh tokens rotate on every use.\n\n**Permissions.** Every credential is a grant: a tier (Reporting, Marketing, Operations, Full) that pre-fills a set of per-endpoint toggles, never wider than the person who created it can do right now. An endpoint answers 403 `insufficient_scope` when its toggle is off; the `scope` in the response names it (`tool:<operationId>`). Tools added later arrive switched off.\n\n**Pending actions.** Endpoints that change data are queued unless the toggle's consent mode is \"Auto\": the call answers 202 with a `pendingId`, a person approves or denies it in EMBRK.AI, and `GET /pending-actions/{id}` reports the outcome. Money endpoints are draft-only and always queued.\n\n**Envelopes.** Success is `{ data }`; errors are `{ error, message }`. Dates are YYYY-MM-DD in the account's timezone; money is in minor units (cents). No list returns more than 200 rows per call.",
    "contact": {
      "name": "EMBRK.AI",
      "url": "https://docklinehq.com/developers"
    }
  },
  "servers": [
    {
      "url": "https://docklinehq.com/api/v1"
    }
  ],
  "externalDocs": {
    "description": "Developer guide",
    "url": "https://docklinehq.com/developers"
  },
  "tags": [
    {
      "name": "Reporting",
      "description": "Sales, finance, tax, payouts and marketing reports for a date range."
    },
    {
      "name": "Bookings",
      "description": "Bookings, the manifest, calendar, availability, quotes and waivers."
    },
    {
      "name": "Operations",
      "description": "Changes to bookings, customers and the catalog — queued for approval unless set to Auto."
    },
    {
      "name": "Money",
      "description": "Refund reads and drafts. Nothing here moves money on its own."
    },
    {
      "name": "Customers",
      "description": "Customer records and the sales pipeline."
    },
    {
      "name": "Catalog",
      "description": "Products, schedules and pricing."
    },
    {
      "name": "Marketing",
      "description": "Segments, campaigns and reviews."
    },
    {
      "name": "Comms",
      "description": "Guest messaging and the AI concierge."
    },
    {
      "name": "System",
      "description": "Pending-action status and this document."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "oauth2": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "A EMBRK.AI API key (dk_live_…) from Settings → Integrations → API keys."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.1 with PKCE (S256). Register a client dynamically (RFC 7591) or by URL (client-id metadata documents); request the resource <origin>/api/v1 (RFC 8707). Scopes are one per endpoint; the person consenting chooses which are on.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://docklinehq.com/oauth/authorize",
            "tokenUrl": "https://docklinehq.com/oauth/token",
            "refreshUrl": "https://docklinehq.com/oauth/token",
            "scopes": {
              "tool:report_summary": "Sales summary — Revenue, bookings, guests and refunds for a date range.",
              "tool:report_financial": "Financial report — Collected, fees, tax, tips and net for a date range.",
              "tool:report_sales_by_date": "Sales by date — Daily sales by booking date or by tour date.",
              "tool:report_channel_mix": "Channel mix — Bookings and revenue by source channel and campaign.",
              "tool:report_utilization": "Utilization — Seats sold versus capacity per product and departure.",
              "tool:report_cancellations": "Cancellations — Cancelled and refunded bookings with reasons.",
              "tool:report_discounts": "Discounts — Coupon and promotion usage and the revenue given up.",
              "tool:report_ticket_types": "Ticket types — Sales by ticket type (adult, child, unit, add-on).",
              "tool:report_partners": "Partners and resellers — Bookings and commissions by partner.",
              "tool:report_tax": "Tax report — Tax collected by rate and jurisdiction.",
              "tool:report_payouts": "Payouts and balance — Stripe payouts, balance and processing fees.",
              "tool:report_customers": "Customer report — New versus returning customers and lifetime value. Contact detail masked unless PII is consented.",
              "tool:report_abandoned_carts": "Abandoned carts — Checkouts started and not completed, with recovery status.",
              "tool:report_email_engagement": "Email engagement — Opens, clicks and bounces for customer email.",
              "tool:list_bookings": "Search bookings — Bookings by date range, status, product or customer search.",
              "tool:get_booking": "Booking detail — One booking by id or code, with items, payments and waivers.",
              "tool:get_manifest": "Manifest — The run sheet for a day: departures, parties, check-in state.",
              "tool:get_calendar": "Calendar — Departures and rental blocks with load for a date range.",
              "tool:list_customers": "Search customers — Customers by name, tag or recency. Contact detail masked unless PII is consented.",
              "tool:get_customer": "Customer detail — One customer with bookings, notes and tags.",
              "tool:get_pipeline": "Sales pipeline — Open quotes and group inquiries by stage.",
              "tool:list_products": "List products — Published tours and rentals with base pricing.",
              "tool:get_product": "Product detail — One product with tickets, add-ons and schedule.",
              "tool:get_availability": "Availability — Bookable departures or units for a product on a date.",
              "tool:quote": "Price quote — What a booking would cost — the real quote engine, no hold placed.",
              "tool:list_waivers": "Waivers — Signed waivers by booking. Signer contact masked unless PII is consented.",
              "tool:create_payment_request": "Create a payment request — A secure pay link (the same /pay/<code> page the ops UI uses) for an unpaid booking, so you can text or email it. The booking must be pending. No charge is made.",
              "tool:get_refund_options": "Refund options — What the refund engine would do for a booking — amount, fees, policy. Read only.",
              "tool:list_segments": "List segments — Saved audiences with live counts.",
              "tool:count_segment": "Segment count — How many customers match a segment right now.",
              "tool:list_segment_customers": "Segment members — Customers in a segment. Contact masked unless PII is consented.",
              "tool:list_campaigns": "List campaigns — Broadcasts and automations by state.",
              "tool:campaign_stats": "Campaign stats — Sends, opens, clicks, bookings attributed for one campaign.",
              "tool:list_reviews": "Reviews — Public reviews with rating and source.",
              "tool:review_funnel": "Review-request funnel — Requests sent, opened, clicked and reviews left over a window.",
              "tool:list_private_feedback": "Private feedback — Guest feedback that stayed private, by resolution state.",
              "tool:list_ai_conversations": "AI conversations — Recent website-chat and phone conversations handled by the concierge.",
              "tool:draft_campaign": "Draft a campaign — Create an email broadcast as a DRAFT in Marketing → Campaigns. Pass full `html` for a custom design, or `headline` + `body` for the standard template. Never schedules or sends.",
              "tool:draft_guest_message": "Draft a guest message — Write an SMS or email to a guest into their inbox thread as a DRAFT note for a person to send. Nothing is sent.",
              "tool:create_booking": "Create a booking — Book a departure (tour) or a rental for a guest through the walk-up path: atomic hold, real quote, confirmed with the full amount as an at-venue balance — no card is charged; the response carries the /pay link. `party` is { ticketTypeId or label: qty } (tours); `units` and `endTime` are for rentals. The guest needs a phone number.",
              "tool:modify_booking_seats": "Add seats — Add guests to a seat line on a booking: availability is re-checked and the price delta is added to the balance (the service is add-only). `add` = extra guests, or `tickets` = { ticketTypeId: extra qty }. `item` picks the line when the booking has several.",
              "tool:set_rental_units": "Change rental units — Set the number of units on a rental line (target count, not a delta). Adding claims inventory atomically.",
              "tool:set_party_size": "Change party size — Set the headcount on a booking line (price untouched).",
              "tool:set_booking_addon": "Set an add-on — Add, change or remove a catalog add-on on a booking (quantity 0 removes).",
              "tool:reschedule_booking": "Reschedule a booking — Move a seat line to another departure of the same product (by date + time or window id), or shift a rental line to a new start. Inventory moves atomically. The guest is NOT notified — send that from EMBRK.AI.",
              "tool:check_in": "Check in — Mark a booking checked in (rentals: checked out). A required unsigned waiver blocks unless `waiverOverrideReason` is given, which is logged.",
              "tool:undo_check_in": "Undo check-in — Reverse a check-in or check-out.",
              "tool:mark_no_show": "Mark no-show — Mark a booking as a no-show.",
              "tool:cancel_booking_to_credit": "Cancel to credit — Cancel a booking and issue store credit for what was collected (or `amountMinor`); inventory is released. Card refunds are not available here — use draft_refund.",
              "tool:update_customer": "Update a customer — Edit a customer’s name, tags, notes or VIP flag. Email and phone are identity keys and cannot be changed through the API.",
              "tool:add_customer_note": "Add a customer note — Append a note to a customer’s notes log.",
              "tool:save_product": "Update a product — Update an existing product’s listing, pricing and booking settings through the catalog service (publishes on save). Creating products is not available through the API.",
              "tool:set_schedule": "Set a schedule — Add one departure, generate departures over a date range, or edit a departure’s capacity/status — for a tour product.",
              "tool:set_pricing_rule": "Set a promo code — Create or update a promo code (coupon). Pricing-engine rules are managed in EMBRK.AI only.",
              "tool:draft_refund": "Draft a refund — Queue a refund for a person with refund permission to approve in EMBRK.AI. Never executes on its own.",
              "tool:get_pending_action": "Pending action status — Whether a queued action was approved, denied or is still waiting."
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Machine-readable code."
          },
          "message": {
            "type": "string",
            "description": "A sentence a developer can act on."
          }
        }
      },
      "Pending": {
        "type": "object",
        "required": [
          "status",
          "pendingId",
          "expiresAt",
          "message"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "pending"
          },
          "pendingId": {
            "type": "string",
            "description": "Poll GET /pending-actions/{id} with this."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "The request is denied automatically after this."
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ReportSummaryInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportFinancialInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportSalesByDateInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "basis": {
            "type": "string",
            "enum": [
              "booking",
              "tour"
            ]
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportChannelMixInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportUtilizationInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportCancellationsInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportDiscountsInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportTicketTypesInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportPartnersInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportTaxInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportPayoutsInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportCustomersInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportAbandonedCartsInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReportEmailEngagementInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ListBookingsInput": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "status": {
            "type": "string"
          },
          "q": {
            "type": "string",
            "maxLength": 200
          },
          "product": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        }
      },
      "CreateBookingInput": {
        "type": "object",
        "properties": {
          "product": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "time": {
            "type": "string",
            "pattern": "^\\d{1,2}:\\d{2}$"
          },
          "window": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "party": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "units": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          },
          "endTime": {
            "type": "string",
            "pattern": "^\\d{1,2}:\\d{2}$"
          },
          "customer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              }
            }
          },
          "coupon": {
            "type": "string",
            "maxLength": 32
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "product",
          "date",
          "party",
          "customer"
        ]
      },
      "GetBookingInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "booking"
        ]
      },
      "GetRefundOptionsInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "booking"
        ]
      },
      "DraftRefundInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "amountMinor": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "booking",
          "amountMinor",
          "reason"
        ]
      },
      "ModifyBookingSeatsInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "item": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "add": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "tickets": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        },
        "required": [
          "booking"
        ]
      },
      "SetRentalUnitsInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "item": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "units": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        },
        "required": [
          "booking",
          "units"
        ]
      },
      "SetPartySizeInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "leg": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "riders": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          }
        },
        "required": [
          "booking",
          "riders"
        ]
      },
      "SetBookingAddonInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "addon": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "size": {
            "type": "string",
            "maxLength": 40
          }
        },
        "required": [
          "booking",
          "addon",
          "quantity"
        ]
      },
      "RescheduleBookingInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "leg": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "time": {
            "type": "string",
            "pattern": "^\\d{1,2}:\\d{2}$"
          },
          "window": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "booking",
          "date"
        ]
      },
      "CheckInInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "waiverOverrideReason": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "booking"
        ]
      },
      "UndoCheckInInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "booking"
        ]
      },
      "MarkNoShowInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "booking"
        ]
      },
      "CancelBookingToCreditInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "amountMinor": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string",
            "enum": [
              "weather_credit",
              "cancellation_credit",
              "goodwill"
            ]
          }
        },
        "required": [
          "booking"
        ]
      },
      "CreatePaymentRequestInput": {
        "type": "object",
        "properties": {
          "booking": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "booking"
        ]
      },
      "GetManifestInput": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "date"
        ]
      },
      "GetCalendarInput": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "GetAvailabilityInput": {
        "type": "object",
        "properties": {
          "product": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "product",
          "date"
        ]
      },
      "QuoteInput": {
        "type": "object",
        "properties": {
          "product": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "time": {
            "type": "string"
          },
          "party": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "coupon": {
            "type": "string"
          }
        },
        "required": [
          "product",
          "date",
          "party"
        ]
      },
      "ListWaiversInput": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        }
      },
      "ListCustomersInput": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "q": {
            "type": "string",
            "maxLength": 200
          },
          "tag": {
            "type": "string"
          }
        }
      },
      "GetCustomerInput": {
        "type": "object",
        "properties": {
          "customer": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "customer"
        ]
      },
      "UpdateCustomerInput": {
        "type": "object",
        "properties": {
          "customer": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "patch": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "tags": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                }
              },
              "notes": {
                "type": "string",
                "maxLength": 4000
              },
              "isVip": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "customer",
          "patch"
        ]
      },
      "AddCustomerNoteInput": {
        "type": "object",
        "properties": {
          "customer": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000
          }
        },
        "required": [
          "customer",
          "note"
        ]
      },
      "GetPipelineInput": {
        "type": "object",
        "properties": {}
      },
      "ListProductsInput": {
        "type": "object",
        "properties": {}
      },
      "SaveProductInput": {
        "type": "object",
        "properties": {
          "product": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "patch": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "internalName": {
                "type": "string",
                "maxLength": 120
              },
              "category": {
                "type": "string",
                "maxLength": 80
              },
              "listingStatus": {
                "type": "string",
                "enum": [
                  "live",
                  "unlisted"
                ]
              },
              "hideFromConcierge": {
                "type": "boolean"
              },
              "displayColor": {
                "type": "string",
                "maxLength": 20
              },
              "advertisedLength": {
                "type": "string",
                "maxLength": 60
              },
              "minAge": {
                "type": "integer",
                "minimum": 0,
                "maximum": 120
              },
              "basePriceMinor": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "memberPriceMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tagline": {
                "type": "string",
                "maxLength": 200
              },
              "shortDescription": {
                "type": "string",
                "maxLength": 1000
              },
              "overview": {
                "type": "string",
                "maxLength": 5000
              },
              "whatToBring": {
                "type": "string",
                "maxLength": 5000
              },
              "whatsIncluded": {
                "type": "string",
                "maxLength": 5000
              },
              "guestRequirements": {
                "type": "string",
                "maxLength": 5000
              },
              "meetingPoint": {
                "type": "string",
                "maxLength": 5000
              },
              "cancellationPolicy": {
                "type": "string",
                "maxLength": 5000
              },
              "otherConsiderations": {
                "type": "string",
                "maxLength": 5000
              },
              "heroImageUrl": {
                "type": "string",
                "maxLength": 600
              },
              "heroVideoUrl": {
                "type": "string",
                "maxLength": 600
              },
              "galleryImageUrls": {
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 600
                }
              },
              "galleryLayout": {
                "type": "string",
                "enum": [
                  "featured",
                  "grid",
                  "spotlight",
                  "carousel"
                ]
              },
              "checkoutStyle": {
                "type": "string",
                "enum": [
                  "standard",
                  "stepped"
                ]
              },
              "highlights": {
                "maxItems": 12,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 120
                }
              },
              "pricingModel": {
                "type": "string",
                "enum": [
                  "per_person",
                  "flat"
                ]
              },
              "flat": {
                "type": "object",
                "properties": {
                  "includedGuests": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "perExtraGuestMinor": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "partySizeMax": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "includedGuests",
                  "perExtraGuestMinor",
                  "partySizeMax"
                ]
              },
              "depositOverride": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "inherit",
                      "full",
                      "percent",
                      "per_seat"
                    ]
                  },
                  "percent": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "perSeatMinor": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "mode",
                  "percent",
                  "perSeatMinor"
                ]
              },
              "privateUpgrade": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "priceMinor": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "enabled",
                  "priceMinor"
                ]
              },
              "bookingCutoffMinutes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "afterCutoff": {
                "type": "string",
                "enum": [
                  "closed",
                  "call_to_book"
                ]
              },
              "bookingPhone": {
                "type": "string",
                "maxLength": 40
              },
              "upsell": {
                "type": "object",
                "properties": {
                  "eligible": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "eligible"
                ]
              }
            }
          }
        },
        "required": [
          "product",
          "patch"
        ]
      },
      "GetProductInput": {
        "type": "object",
        "properties": {
          "product": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "product"
        ]
      },
      "SetScheduleInput": {
        "type": "object",
        "properties": {
          "product": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "add": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "startTime": {
                "type": "string",
                "pattern": "^\\d{1,2}:\\d{2}$"
              },
              "endTime": {
                "type": "string",
                "pattern": "^\\d{1,2}:\\d{2}$"
              },
              "capacity": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "date",
              "startTime",
              "capacity"
            ]
          },
          "generate": {
            "type": "object",
            "properties": {
              "waterfallPercent": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "startDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "endDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "days": {
                "minItems": 1,
                "maxItems": 7,
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 6
                }
              },
              "blocks": {
                "minItems": 1,
                "maxItems": 24,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "string",
                      "pattern": "^\\d{1,2}:\\d{2}$"
                    },
                    "end": {
                      "type": "string",
                      "pattern": "^\\d{1,2}:\\d{2}$"
                    },
                    "capacity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "start",
                    "capacity"
                  ]
                }
              }
            },
            "required": [
              "startDate",
              "endDate",
              "days",
              "blocks"
            ]
          },
          "update": {
            "type": "object",
            "properties": {
              "window": {
                "anyOf": [
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "string",
                    "minLength": 1
                  }
                ]
              },
              "capacity": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "cancelled",
                  "weather_hold"
                ]
              }
            },
            "required": [
              "window"
            ]
          }
        },
        "required": [
          "product"
        ]
      },
      "SetPricingRuleInput": {
        "type": "object",
        "properties": {
          "rule": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "patch": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "minLength": 2,
                "maxLength": 32
              },
              "label": {
                "type": "string",
                "maxLength": 120
              },
              "discountType": {
                "type": "string",
                "enum": [
                  "percent",
                  "flat"
                ]
              },
              "amount": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "active": {
                "type": "boolean"
              },
              "productIds": {
                "maxItems": 200,
                "type": "array",
                "items": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "startsAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "endsAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "minSubtotalMinor": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "maxRedemptions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "applyMode": {
                "type": "string",
                "enum": [
                  "reservation",
                  "person"
                ]
              },
              "reuseMode": {
                "type": "string",
                "enum": [
                  "reservation",
                  "customer"
                ]
              }
            },
            "required": [
              "code",
              "discountType",
              "amount"
            ]
          }
        },
        "required": [
          "patch"
        ]
      },
      "ListSegmentsInput": {
        "type": "object",
        "properties": {}
      },
      "CountSegmentInput": {
        "type": "object",
        "properties": {
          "segment": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "segment"
        ]
      },
      "ListSegmentCustomersInput": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "segment": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "segment"
        ]
      },
      "ListCampaignsInput": {
        "type": "object",
        "properties": {
          "view": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "sent",
              "all"
            ]
          }
        }
      },
      "DraftCampaignInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 140
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "html": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500000
          },
          "preheader": {
            "type": "string",
            "maxLength": 200
          },
          "headline": {
            "type": "string",
            "maxLength": 200
          },
          "body": {
            "type": "string",
            "maxLength": 4000
          },
          "segment": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "name",
          "subject"
        ]
      },
      "CampaignStatsInput": {
        "type": "object",
        "properties": {
          "campaign": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          }
        },
        "required": [
          "campaign"
        ]
      },
      "ListReviewsInput": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "minRating": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          }
        }
      },
      "ReviewFunnelInput": {
        "type": "object",
        "properties": {
          "days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365
          }
        }
      },
      "ListPrivateFeedbackInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved",
              "all"
            ]
          }
        }
      },
      "ListAiConversationsInput": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "channel": {
            "type": "string",
            "enum": [
              "chat",
              "voice",
              "all"
            ]
          }
        }
      },
      "DraftGuestMessageInput": {
        "type": "object",
        "properties": {
          "customer": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "channel": {
            "type": "string",
            "enum": [
              "sms",
              "email"
            ]
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "subject": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "customer",
          "channel",
          "body"
        ]
      },
      "GetPendingActionInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id"
        ]
      }
    },
    "responses": {
      "Pending": {
        "description": "Accepted — the action is waiting for a person to approve it in EMBRK.AI (Settings → Integrations → Pending actions). Repeat the call with the same Idempotency-Key to get the same pending action back.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Pending"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "No credential, an invalid or expired one, a token minted for another audience, or a credential whose creator can no longer act. `WWW-Authenticate` points at the protected-resource metadata.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            },
            "description": "Bearer error=\"invalid_token\", resource_metadata=\"…/.well-known/oauth-protected-resource/api/v1\""
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The credential exists but this tool is switched off for it, or the person who created it no longer holds the permission it needs. The `scope` names the toggle to enable.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            },
            "description": "Bearer error=\"insufficient_scope\", scope=\"tool:<id>\""
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "NotFound": {
        "description": "The endpoint is not available on this deployment yet, or the thing asked for does not exist in this account (cross-account ids are indistinguishable from missing ones).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InvalidArgs": {
        "description": "The arguments failed the endpoint schema. The message names the first failing field.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Over the per-credential (300 / 5 min) or per-account (1500 / 5 min) limit.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait."
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ToolFailed": {
        "description": "The operation failed inside EMBRK.AI. The message is a sentence; nothing internal is exposed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/reports/summary": {
      "get": {
        "operationId": "report_summary",
        "summary": "Sales summary",
        "description": "Revenue, bookings, guests and refunds for a date range.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_summary"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Sales summary result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/financial": {
      "get": {
        "operationId": "report_financial",
        "summary": "Financial report",
        "description": "Collected, fees, tax, tips and net for a date range.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_financial"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Financial report result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/sales": {
      "get": {
        "operationId": "report_sales_by_date",
        "summary": "Sales by date",
        "description": "Daily sales by booking date or by tour date.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_sales_by_date"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "basis",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "booking",
                "tour"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Sales by date result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/channels": {
      "get": {
        "operationId": "report_channel_mix",
        "summary": "Channel mix",
        "description": "Bookings and revenue by source channel and campaign.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_channel_mix"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Channel mix result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/utilization": {
      "get": {
        "operationId": "report_utilization",
        "summary": "Utilization",
        "description": "Seats sold versus capacity per product and departure.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_utilization"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Utilization result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/cancellations": {
      "get": {
        "operationId": "report_cancellations",
        "summary": "Cancellations",
        "description": "Cancelled and refunded bookings with reasons.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_cancellations"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Cancellations result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/discounts": {
      "get": {
        "operationId": "report_discounts",
        "summary": "Discounts",
        "description": "Coupon and promotion usage and the revenue given up.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_discounts"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Discounts result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/ticket-types": {
      "get": {
        "operationId": "report_ticket_types",
        "summary": "Ticket types",
        "description": "Sales by ticket type (adult, child, unit, add-on).",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_ticket_types"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Ticket types result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/partners": {
      "get": {
        "operationId": "report_partners",
        "summary": "Partners and resellers",
        "description": "Bookings and commissions by partner.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_partners"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Partners and resellers result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/tax": {
      "get": {
        "operationId": "report_tax",
        "summary": "Tax report",
        "description": "Tax collected by rate and jurisdiction.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_tax"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Tax report result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/payouts": {
      "get": {
        "operationId": "report_payouts",
        "summary": "Payouts and balance",
        "description": "Stripe payouts, balance and processing fees.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Full",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_payouts"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Payouts and balance result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/customers": {
      "get": {
        "operationId": "report_customers",
        "summary": "Customer report",
        "description": "New versus returning customers and lifetime value. Contact detail masked unless PII is consented. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_customers"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Customer report result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/abandoned-carts": {
      "get": {
        "operationId": "report_abandoned_carts",
        "summary": "Abandoned carts",
        "description": "Checkouts started and not completed, with recovery status.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_abandoned_carts"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Abandoned carts result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reports/email-engagement": {
      "get": {
        "operationId": "report_email_engagement",
        "summary": "Email engagement",
        "description": "Opens, clicks and bounces for customer email.",
        "tags": [
          "Reporting"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:report_email_engagement"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Email engagement result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings": {
      "get": {
        "operationId": "list_bookings",
        "summary": "Search bookings",
        "description": "Bookings by date range, status, product or customer search. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii.",
        "tags": [
          "Bookings"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_bookings"
            ]
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Search bookings result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      },
      "post": {
        "operationId": "create_booking",
        "summary": "Create a booking",
        "description": "Book a departure (tour) or a rental for a guest through the walk-up path: atomic hold, real quote, confirmed with the full amount as an at-venue balance — no card is charged; the response carries the /pay link. `party` is { ticketTypeId or label: qty } (tours); `units` and `endTime` are for rentals. The guest needs a phone number. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii. Available once the write tools ship; until then answers 404 not_available.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:create_booking"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBookingInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Create a booking result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}": {
      "get": {
        "operationId": "get_booking",
        "summary": "Booking detail",
        "description": "One booking by id or code, with items, payments and waivers. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii. The path parameter fills `booking`; a `booking` in the query is ignored.",
        "tags": [
          "Bookings"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:get_booking"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Booking detail result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/refund-options": {
      "get": {
        "operationId": "get_refund_options",
        "summary": "Refund options",
        "description": "What the refund engine would do for a booking — amount, fees, policy. Read only. The path parameter fills `booking`; a `booking` in the query is ignored.",
        "tags": [
          "Money"
        ],
        "x-risk": "read",
        "x-tier": "Full",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:get_refund_options"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Refund options result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/refund-drafts": {
      "post": {
        "operationId": "draft_refund",
        "summary": "Draft a refund",
        "description": "Queue a refund for a person with refund permission to approve in EMBRK.AI. Never executes on its own. Money: always queued as a pending action for a person with refund permission to approve — never auto-approved. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Money"
        ],
        "x-risk": "money",
        "x-tier": "none",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:draft_refund"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftRefundInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Draft a refund result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/seats": {
      "post": {
        "operationId": "modify_booking_seats",
        "summary": "Add seats",
        "description": "Add guests to a seat line on a booking: availability is re-checked and the price delta is added to the balance (the service is add-only). `add` = extra guests, or `tickets` = { ticketTypeId: extra qty }. `item` picks the line when the booking has several. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:modify_booking_seats"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModifyBookingSeatsInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Add seats result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/units": {
      "post": {
        "operationId": "set_rental_units",
        "summary": "Change rental units",
        "description": "Set the number of units on a rental line (target count, not a delta). Adding claims inventory atomically. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:set_rental_units"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRentalUnitsInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Change rental units result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/party": {
      "post": {
        "operationId": "set_party_size",
        "summary": "Change party size",
        "description": "Set the headcount on a booking line (price untouched). Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:set_party_size"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPartySizeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Change party size result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/add-ons": {
      "post": {
        "operationId": "set_booking_addon",
        "summary": "Set an add-on",
        "description": "Add, change or remove a catalog add-on on a booking (quantity 0 removes). Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:set_booking_addon"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetBookingAddonInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Set an add-on result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/reschedule": {
      "post": {
        "operationId": "reschedule_booking",
        "summary": "Reschedule a booking",
        "description": "Move a seat line to another departure of the same product (by date + time or window id), or shift a rental line to a new start. Inventory moves atomically. The guest is NOT notified — send that from EMBRK.AI. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:reschedule_booking"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RescheduleBookingInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Reschedule a booking result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/check-in": {
      "post": {
        "operationId": "check_in",
        "summary": "Check in",
        "description": "Mark a booking checked in (rentals: checked out). A required unsigned waiver blocks unless `waiverOverrideReason` is given, which is logged. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:check_in"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckInInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Check in result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/undo-check-in": {
      "post": {
        "operationId": "undo_check_in",
        "summary": "Undo check-in",
        "description": "Reverse a check-in or check-out. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:undo_check_in"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UndoCheckInInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Undo check-in result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/no-show": {
      "post": {
        "operationId": "mark_no_show",
        "summary": "Mark no-show",
        "description": "Mark a booking as a no-show. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:mark_no_show"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkNoShowInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Mark no-show result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/bookings/{id}/cancel-to-credit": {
      "post": {
        "operationId": "cancel_booking_to_credit",
        "summary": "Cancel to credit",
        "description": "Cancel a booking and issue store credit for what was collected (or `amountMinor`); inventory is released. Card refunds are not available here — use draft_refund. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `booking`; a `booking` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:cancel_booking_to_credit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Booking id or booking code.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelBookingToCreditInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Cancel to credit result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/payment-requests": {
      "post": {
        "operationId": "create_payment_request",
        "summary": "Create a payment request",
        "description": "A secure pay link (the same /pay/<code> page the ops UI uses) for an unpaid booking, so you can text or email it. The booking must be pending. No charge is made. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available.",
        "tags": [
          "Bookings"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:create_payment_request"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentRequestInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Create a payment request result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/manifest": {
      "get": {
        "operationId": "get_manifest",
        "summary": "Manifest",
        "description": "The run sheet for a day: departures, parties, check-in state. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii.",
        "tags": [
          "Bookings"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:get_manifest"
            ]
          }
        ],
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Manifest result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/calendar": {
      "get": {
        "operationId": "get_calendar",
        "summary": "Calendar",
        "description": "Departures and rental blocks with load for a date range.",
        "tags": [
          "Bookings"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:get_calendar"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Calendar result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/availability": {
      "get": {
        "operationId": "get_availability",
        "summary": "Availability",
        "description": "Bookable departures or units for a product on a date.",
        "tags": [
          "Bookings"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:get_availability"
            ]
          }
        ],
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Availability result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/quote": {
      "post": {
        "operationId": "quote",
        "summary": "Price quote",
        "description": "What a booking would cost — the real quote engine, no hold placed.",
        "tags": [
          "Bookings"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:quote"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Price quote result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/waivers": {
      "get": {
        "operationId": "list_waivers",
        "summary": "Waivers",
        "description": "Signed waivers by booking. Signer contact masked unless PII is consented. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii.",
        "tags": [
          "Bookings"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_waivers"
            ]
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Waivers result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/customers": {
      "get": {
        "operationId": "list_customers",
        "summary": "Search customers",
        "description": "Customers by name, tag or recency. Contact detail masked unless PII is consented. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii.",
        "tags": [
          "Customers"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_customers"
            ]
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Search customers result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/customers/{id}": {
      "get": {
        "operationId": "get_customer",
        "summary": "Customer detail",
        "description": "One customer with bookings, notes and tags. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii. The path parameter fills `customer`; a `customer` in the query is ignored.",
        "tags": [
          "Customers"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:get_customer"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Customer id.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Customer detail result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      },
      "post": {
        "operationId": "update_customer",
        "summary": "Update a customer",
        "description": "Edit a customer’s name, tags, notes or VIP flag. Email and phone are identity keys and cannot be changed through the API. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `customer`; a `customer` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:update_customer"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Customer id.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomerInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Update a customer result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/customers/{id}/notes": {
      "post": {
        "operationId": "add_customer_note",
        "summary": "Add a customer note",
        "description": "Append a note to a customer’s notes log. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `customer`; a `customer` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:add_customer_note"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Customer id.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddCustomerNoteInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Add a customer note result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/pipeline": {
      "get": {
        "operationId": "get_pipeline",
        "summary": "Sales pipeline",
        "description": "Open quotes and group inquiries by stage.",
        "tags": [
          "Customers"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:get_pipeline"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Sales pipeline result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/products": {
      "get": {
        "operationId": "list_products",
        "summary": "List products",
        "description": "Published tours and rentals with base pricing.",
        "tags": [
          "Catalog"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_products"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "List products result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      },
      "post": {
        "operationId": "save_product",
        "summary": "Update a product",
        "description": "Update an existing product’s listing, pricing and booking settings through the catalog service (publishes on save). Creating products is not available through the API. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:save_product"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProductInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Update a product result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/products/{id}": {
      "get": {
        "operationId": "get_product",
        "summary": "Product detail",
        "description": "One product with tickets, add-ons and schedule. The path parameter fills `product`; a `product` in the query is ignored.",
        "tags": [
          "Catalog"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:get_product"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Product id.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Product detail result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/products/{id}/schedule": {
      "post": {
        "operationId": "set_schedule",
        "summary": "Set a schedule",
        "description": "Add one departure, generate departures over a date range, or edit a departure’s capacity/status — for a tour product. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available. The path parameter fills `product`; a `product` in the body is ignored.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:set_schedule"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Product id.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetScheduleInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Set a schedule result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/pricing-rules": {
      "post": {
        "operationId": "set_pricing_rule",
        "summary": "Set a promo code",
        "description": "Create or update a promo code (coupon). Pricing-engine rules are managed in EMBRK.AI only. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available.",
        "tags": [
          "Operations"
        ],
        "x-risk": "write",
        "x-tier": "Operations",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:set_pricing_rule"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPricingRuleInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Set a promo code result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/segments": {
      "get": {
        "operationId": "list_segments",
        "summary": "List segments",
        "description": "Saved audiences with live counts.",
        "tags": [
          "Marketing"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_segments"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "List segments result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/segments/{id}": {
      "get": {
        "operationId": "count_segment",
        "summary": "Segment count",
        "description": "How many customers match a segment right now. The path parameter fills `segment`; a `segment` in the query is ignored.",
        "tags": [
          "Marketing"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:count_segment"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Segment id.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Segment count result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/segments/{id}/customers": {
      "get": {
        "operationId": "list_segment_customers",
        "summary": "Segment members",
        "description": "Customers in a segment. Contact masked unless PII is consented. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii. The path parameter fills `segment`; a `segment` in the query is ignored.",
        "tags": [
          "Marketing"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_segment_customers"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Segment id.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Segment members result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/campaigns": {
      "get": {
        "operationId": "list_campaigns",
        "summary": "List campaigns",
        "description": "Broadcasts and automations by state.",
        "tags": [
          "Marketing"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_campaigns"
            ]
          }
        ],
        "parameters": [
          {
            "name": "view",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "scheduled",
                "sent",
                "all"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "List campaigns result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      },
      "post": {
        "operationId": "draft_campaign",
        "summary": "Draft a campaign",
        "description": "Create an email broadcast as a DRAFT in Marketing → Campaigns. Pass full `html` for a custom design, or `headline` + `body` for the standard template. Never schedules or sends. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Available once the write tools ship; until then answers 404 not_available.",
        "tags": [
          "Marketing"
        ],
        "x-risk": "write",
        "x-tier": "Marketing",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:draft_campaign"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftCampaignInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Draft a campaign result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/campaigns/{id}/stats": {
      "get": {
        "operationId": "campaign_stats",
        "summary": "Campaign stats",
        "description": "Sends, opens, clicks, bookings attributed for one campaign. The path parameter fills `campaign`; a `campaign` in the query is ignored.",
        "tags": [
          "Marketing"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:campaign_stats"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Campaign id.",
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Campaign stats result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reviews": {
      "get": {
        "operationId": "list_reviews",
        "summary": "Reviews",
        "description": "Public reviews with rating and source.",
        "tags": [
          "Marketing"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_reviews"
            ]
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "minRating",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Reviews result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reviews/funnel": {
      "get": {
        "operationId": "review_funnel",
        "summary": "Review-request funnel",
        "description": "Requests sent, opened, clicked and reviews left over a window.",
        "tags": [
          "Marketing"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:review_funnel"
            ]
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Review-request funnel result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/reviews/private-feedback": {
      "get": {
        "operationId": "list_private_feedback",
        "summary": "Private feedback",
        "description": "Guest feedback that stayed private, by resolution state. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii.",
        "tags": [
          "Marketing"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_private_feedback"
            ]
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "resolved",
                "all"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Private feedback result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/ai-conversations": {
      "get": {
        "operationId": "list_ai_conversations",
        "summary": "AI conversations",
        "description": "Recent website-chat and phone conversations handled by the concierge. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii.",
        "tags": [
          "Comms"
        ],
        "x-risk": "read",
        "x-tier": "Marketing",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:list_ai_conversations"
            ]
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "chat",
                "voice",
                "all"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "AI conversations result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/messages/drafts": {
      "post": {
        "operationId": "draft_guest_message",
        "summary": "Draft a guest message",
        "description": "Write an SMS or email to a guest into their inbox thread as a DRAFT note for a person to send. Nothing is sent. Mutating: with consent mode \"Ask every time\" (the default) the call returns 202 and a person approves it in EMBRK.AI; with \"Auto\" it runs at once. Customer contact fields are masked unless the credential was granted PII access and its creator holds customers.pii. Available once the write tools ship; until then answers 404 not_available.",
        "tags": [
          "Comms"
        ],
        "x-risk": "write",
        "x-tier": "Marketing",
        "x-mutating": true,
        "x-status": "v2",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:draft_guest_message"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeat a mutating call safely: the same key returns the same result or pending action instead of acting twice.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftGuestMessageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Draft a guest message result."
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Pending"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/pending-actions/{id}": {
      "get": {
        "operationId": "get_pending_action",
        "summary": "Pending action status",
        "description": "Whether a queued action was approved, denied or is still waiting. The path parameter fills `id`; a `id` in the query is ignored.",
        "tags": [
          "System"
        ],
        "x-risk": "read",
        "x-tier": "Reporting",
        "x-mutating": false,
        "x-status": "v1",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "tool:get_pending_action"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Pending action id (from a 202 response).",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Pending action status result."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidArgs"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ToolFailed"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "openapi",
        "summary": "This document",
        "description": "The OpenAPI 3.1 description of the API, generated from the live catalog. No credential needed.",
        "tags": [
          "System"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-mcp": {
    "endpoint": "https://docklinehq.com/api/mcp",
    "protectedResourceMetadata": "https://docklinehq.com/.well-known/oauth-protected-resource/api/mcp",
    "authorizationServerMetadata": "https://docklinehq.com/.well-known/oauth-authorization-server"
  }
}