{"openapi":"3.1.0","info":{"title":"Maison Public API","version":"1.0.0","description":"Tools for operating Maison, the AI hotel concierge platform. Each tool performs one operation (for example `create_client` provisions the hotel, its website source, the first scrape and the preview site). Every tool is reachable three ways with the same name: its REST binding below, as an MCP tool at `/mcp`, and as an A2A skill at `/a2a`. Authentication is an API key in `x-api-key` or an OAuth 2.1 access token in `Authorization: Bearer`; both reach `/api/v1`, `/mcp` and `/a2a`. The key's user must hold every grant a tool declares, or the call is refused as a whole. Agent Skills that teach an AI agent how to use each tool group are published by the docs site (see `x-maison-skills`)."},"servers":[{"url":"https://maison-labs.com","description":"Production"}],"tags":[{"name":"account","description":"Who the API key belongs to and what it may do.","x-maison-guidance":{"title":"Account and discovery","summary":"Discover what the calling API key may do before planning anything: who the key belongs to, whether they are Maison staff, every feature grant they hold globally or per hotel, and which hotel ids they can act on; and manage the caller's own API keys and connected apps. Use at the start of any session with the Maison public API, when a call returned 403, or when choosing which hotel id to pass. Also read or clear your own operator notices (agent replies, guest messages in conversations you handle, conversations needing attention, agent notices).","whenToUse":["First call of a session: learn the user, grants and reachable client ids.","After a 403: compare `details.missing` with the grants `whoami` reports.","To choose a `clientId` for client-scoped tools when the user did not name one.","Catch up on what needs you — `get_notice_summary`, `list_notices`, then `mark_notices_read` (by `ids`, subject or `category`).","Review or stop your own access — `list_my_api_keys` / `disable_my_api_key`, `list_my_connected_apps` / `revoke_my_connected_app` (no grant needed; they only ever act on you)."],"workflows":[{"title":"Start a session","steps":["Call `whoami` (GET /api/v1/me). Note `isMaisonAdmin`, `grants[]` and `clientIds[]`.","Call `GET /api/v1/tools` to see the catalogue filtered to this key — every tool listed is executable somewhere; client-scoped ones still need a permitted `clientId`.","If exactly one client id is reachable, use it by default; otherwise ask the user which hotel."]}],"tips":["`grants[].global` is null for a feature the user holds only on specific clients; `clients` maps client id → level.","A level of EXECUTE implies WRITE implies READ."],"pitfalls":["Do not infer permissions from a tool being present in the OpenAPI document — the document is public and lists everything; only `GET /api/v1/tools` is filtered.","`disable_my_api_key` on the key you are calling with stops this session's key at once — use another credential to continue."]}},{"name":"clients","description":"Hotels (clients): create, read, update, enable/disable, operations.","x-maison-guidance":{"title":"Clients (hotels)","summary":"Create and manage hotels on Maison: provision a new client in one call (website, default configuration, first scrape, preview site), read or update a client record, disable or re-enable it, rescrape its website, deploy its demo preview site, read its workspace overview, metrics and activity timeline, and inspect or stop running background jobs. Use for onboarding a hotel, changing its settings, or operating it day to day.","whenToUse":["Onboard a new hotel — `create_client` does the whole provisioning in one call, plan included.","Look a hotel up by name or list a portfolio — `list_clients`, `get_client`.","Find live hotels without conversations (or any live/activity mix) in one call — `list_clients` with `liveStatus` and `activity` (conversations in the last `activityDays` days, default 30), sorted by last activity date (orderBy); read the total, never page the whole portfolio.","See a hotel at a glance (setup, jobs, knowledge, people, group, latest activity) — `get_client_overview`, the workspace Overview in one read.","Change name, description, demo flag, website, scrape language, manual-knowledge or multi-property flag, or report schedules — `update_client`.","Diagnose what happened to a hotel — `get_client_activity`, `list_client_jobs`.","Tell whether a hotel is live (the chat widget loads on its own website) — the live_status field on `get_client` / `list_clients`; count live hotels for a month, optionally under one group — `get_live_clients_report`."],"workflows":[{"title":"Count live member hotels for an invoice","steps":["`get_live_clients_report` with `month` (`YYYY-MM`) and the group's `nodeId` (the group client id; `get_client_hierarchy` shows its tree).","Bill on `liveDuringMonthCount` (LIVE at any point in the month) or `liveAtMonthEndCount`, as the contract says; `clients` lists each hotel with its status at month end."]},{"title":"Onboard a hotel","steps":["`create_client` with `name` and the public `website` URL (a bare domain is stored as https). Put it on a plan in the same call: `planTemplateId` (with optional `featureOverrides`), or `noTemplate: true` with exactly `features`. Leave `scrapeWebsite` true unless the knowledge base will be curated by hand.","Set `multiProperty: true` ONLY for a group/brand site with several properties; it switches the first run to property discovery (see the `maison-hierarchy` skill) and the site is never scraped whole.","Poll `list_client_jobs` (Maison staff) or `get_client_activity` until the first scrape finishes; then `get_client_metrics` to confirm the knowledge base has content.","Share the preview site from `deploy_preview_site` (or the `client.previewUrl` returned) and the embed code from `get_widget_embed_code` (platform skill)."]},{"title":"Refresh a hotel's knowledge from its website","steps":["`rescrape_client_website` (optionally `force: true` to re-ingest unchanged pages).","Track progress with `get_client_activity` filtered to `category: \"knowledge\"`."]}],"tips":["`list_clients` returns only hotels the key's user may read; a Maison admin sees all.","`update_client` changes the client record; hotel configuration (address, hours, policies) lives in the `maison-configuration` skill (`update_hotel_config`).","`disable_client` is a soft disable — nothing is deleted and `enable_client` reverses it.","`get_client_activity` filters by `category` (or all but one with `excludeCategory`), knowledge `source`, date range and failures; `reference` resolves an `MX-…` support reference to its event.","Every client write (including `update_client` and `stop_client_job`) is recorded in the hotel's activity feed, exactly as a console change."],"pitfalls":["Do not call `create_client` twice for the same hotel; it provisions a new client each time. `list_clients` with `search` first.","`create_client`, `disable_client` and `enable_client` need a GLOBAL `clients` WRITE grant (Maison staff). A hotel user updating their own hotel uses `update_client`.","`update_client` changes a report schedule only with the Maison-only `schedules` WRITE grant (403 otherwise, nothing written).","live_status is recomputed once a day; a widget load shows up the next day. MANUAL_NOT_LIVE is an override set in the console and wins until it is cleared. `get_live_clients_report` needs a GLOBAL `clients` READ grant."]}},{"name":"knowledge","description":"Knowledge base: websites, documents, Q&A pairs and knowledge gaps.","x-maison-guidance":{"title":"Knowledge base","summary":"Manage what a hotel's concierge knows: website and document knowledge sources (add, sync, rescrape, disable/reactivate, follow a run and its log and report, rediscover booking links, versions, download, large uploads), curated Q&A pairs (add, update, publish, unpublish, delete, version history), unanswered-question gaps (list, detect, answer, dismiss, reopen) and knowledge quality runs (deduplicate, consistency check, their reports). Use when a hotel's answers are missing, wrong or stale, or when adding new content.","whenToUse":["Add a page or site to a hotel's knowledge — `add_website_source`.","Upload a PDF/brochure/policy — `add_document_source` (≤ 64 KiB inline as `bytesBase64`).","Upload a document over 64 KiB — `create_document_upload`, PUT the file to its `url` with its `headers`, then `add_document_source` (or `add_document_version`) with the `uploadId`.","Take a source out of the agent's knowledge without losing it — `disable_source`; undo with `reactivate_source`.","Follow a scrape, sync or ingestion — `list_source_runs` (the source's `id` from `list_knowledge_sources`), then `get_source_run_logs` with `after: lastSeq` until `finished`; `get_website_scrape` for the step-by-step view of a website run.","Read what a finished website scrape or sync changed — `get_source_run_report` (the run's `sessionId`): the report inline, or `format: \"pdf\"` for a download link to the PDF the report email attaches.","A hotel changed booking engine — `discover_booking_links` (no full rescrape).","Fix a specific wrong answer — `list_qa_pairs` with `search`, then `update_qa_pair`.","Find what guests asked that the concierge could not answer — `list_knowledge_gaps`, then `answer_knowledge_gap`.","Find conflicting or duplicate answers — `check_knowledge_consistency` or `deduplicate_knowledge` (each returns a `sessionId`), then `get_knowledge_quality_run` until `finished` for the report; `list_knowledge_quality_runs` for past runs."],"workflows":[{"title":"Add content and make it live","steps":["`add_website_source` (domain URL) or `add_document_source` (name, filename, mimeType, and `bytesBase64` or an `uploadId` from `create_document_upload`).","Ingestion is queued; `list_knowledge_sources` shows `scrapeStatus` / `lastSuccessfulIngestAt` when it has landed.","For hand-written facts use `add_qa_pairs` — new pairs are published on creation; `unpublish_qa_pairs` takes one out of answers without deleting it (unpublished pairs are not used)."]},{"title":"Close knowledge gaps","steps":["`detect_knowledge_gaps` answers 202 `{ queued: true }` at once; poll `list_knowledge_gaps` (its `lastSession`) with `status: \"OPEN\"`.","For each gap: `answer_knowledge_gap` with an `answer` (optionally a reworded `question`) to create the Q&A pair — live at once, new pairs are stored published — or with `qaId` to link a pair that already answers it (nothing is created, its publish state is unchanged); `dismiss_knowledge_gap` when it is noise (`gapIds` dismisses many in one call); `reopen_knowledge_gap` to undo either.","Run `deduplicate_knowledge` and `check_knowledge_consistency` after a large import; read each report with `get_knowledge_quality_run` and fix the conflicting pairs with `update_qa_pair`."]}],"tips":["Q&A versions are kept: `list_qa_versions` + `restore_qa_version` undo a bad edit.","`set_main_website_source` marks the website that also drives the preview site; `set_source_sync_schedule` is Maison-staff only."],"pitfalls":["A `sync_source` on a document re-ingests the stored file; a `scrape_website_source` fetches the live site. Do not confuse them.","`list_qa_pairs` can return 503 when semantic search is down — retry later rather than concluding the knowledge base is empty.","Inline base64 uploads over 64 KiB are rejected with 413 `too_large` — use `create_document_upload`.","`download_document` returns `bytesBase64` up to 64 KiB, else `downloadUrl` + `expiresAt` (15 minutes).","`update_qa_pair` takes `question`, `answer` or both; the field left out keeps its stored value.","`sync_source` / `scrape_website_source` / `discover_booking_links` answer 409 for a disabled source — `reactivate_source` first.","`add_website_source` with a `syncSchedule` other than NONE needs Maison-staff `schedules` WRITE (403 otherwise, nothing created)."]}},{"name":"conversations","description":"Talk to a hotel's concierge and read conversations.","x-maison-guidance":{"title":"Conversations and the concierge","summary":"Talk to a hotel's AI concierge, read its conversations and work the operator inbox: send a message and get the reply, fetch, list, search and export conversations, rank the most common guest questions (FAQs, topics: amenities, parking, check-in), see who holds each conversation and what needs an operator across hotels, take over or hand back, reply to the guest, whisper to the agent, stop its turn, mark read, and look up the known guest. Use to test answers after a knowledge change, to review or answer guests, to build a website FAQ, or to pull transcripts.","whenToUse":["Verify a knowledge fix — `send_message` with the guest's question and read the reply.","Find what guests ask most (amenities, booking dates, parking, check-in) — `get_common_questions`.","Build or refresh a website FAQ from real guest questions — `get_common_questions` + `list_knowledge_gaps`, then `add_qa_pairs`.","Review recent guest conversations — `list_conversations` then `get_conversation`.","Find conversations by meaning — `search_conversations`, then `get_conversation` for a chosen session.","Hand the team a transcript export — `export_chat_logs`.","Work the operator inbox — `get_conversation_attention` across hotels, then `list_conversation_inbox` with `unread` or `attention` for one hotel.","Answer a guest yourself — `reply_to_conversation` (a reply takes the conversation over, so the agent stops replying), later `set_conversation_mode` with `agent` to hand back; the agent then answers what the guest asked meanwhile.","Steer the agent without the guest seeing it — `whisper_to_agent`; stop it with `stop_conversation_turn` (`kind: whisper`, the returned `whisperId`).","Who is this guest — `get_conversation_guest`, then `list_guest_conversations` with its `guestRef`. Both need `guest-identity` access on the hotel besides conversation access; without it they are not offered and `guestName` is null on `list_recent_conversations`."],"workflows":[{"title":"Build an FAQ from what guests really ask","steps":["`get_common_questions` for the hotel (default last 30 days; raise `limit`, or `search` for a topic such as \"parking\") — each group has the most common phrasing, how often it was asked and in how many conversations.","`list_knowledge_gaps` with `status: \"OPEN\"` — the questions the concierge could NOT answer, with occurrence counts. These are the highest-value FAQ entries.","For each FAQ item draft the answer; check the hotel's current wording with `get_conversation` on a `sampleSessionIds` entry or `list_qa_pairs` with `search`.","Publish the answers to the concierge with `add_qa_pairs` (knowledge skill) so the website FAQ and the chat stay consistent; `answer_knowledge_gap` with an `answer` closes a gap and creates the live Q&A pair in one call."]},{"title":"Test an answer end to end","steps":["`send_message` with `clientId` and `message`; keep the returned `sessionId`.","Send follow-ups with the same `sessionId` to test multi-turn behaviour.","If the answer is wrong, fix it in the `maison-knowledge` skill and re-send in a NEW session (answers are cached per session)."]},{"title":"Take over a conversation and hand it back","steps":["`get_conversation_attention` (optionally `clientIds`) — how many conversations need an operator, per hotel.","`list_conversation_inbox` for the hotel with `attention: true` or `unread: true`; `get_conversation` to read one.","`reply_to_conversation` — while the agent is answering, records the takeover in the activity feed and pauses the agent first, then delivers your reply on the guest's channel and clears your unread count.","Keep replying with `reply_to_conversation`; `mark_conversation_read` clears unread and attention without replying.","`set_conversation_mode` with `mode: \"agent\"` hands the conversation back to the agent, which answers any guest messages left waiting."]}],"tips":["`send_message` runs as the operator (client audience), so it may surface tools and data a guest would not see.","`list_conversations` defaults to the last 7 days; narrow with `from`/`to` and raise `limit` (max 500). For operator work use `list_conversation_inbox`, which adds who holds each conversation, unread and attention.","`search_conversations` returns session references and semantic similarity scores, not transcripts; a 503 means the separate conversations index is unavailable, not that no chats match."],"pitfalls":["Conversations are keyed by (clientId, sessionId): a session id from one hotel is not found under another.","`export_chat_logs` returns the file inline as base64 and refuses exports over 8 MiB — narrow the date window.","`whisper_to_agent` answers 409 `verified_session` on a signed-in guest's web chat and 409 `no_route` on email conversations; take over and `reply_to_conversation` instead.","`whisper_to_agent` needs the agent to be answering: 409 `operator_mode` once the conversation is taken over (hand back first, or reply yourself), and 409 `agent_unavailable` when the agent could not answer on WhatsApp, Instagram or Messenger (nothing reached the guest).","`set_conversation_mode` is idempotent: asking for the current mode returns `changed: false` and does nothing. A takeover another operator won or already holds is 409 `mode_conflict`, naming who holds it.","A web whisper returns 202 before the agent answers; the reply appears in the transcript asynchronously."]}},{"name":"users","description":"Platform users and invitations.","x-maison-guidance":{"title":"Users and invitations","summary":"Manage people on Maison: list and read platform users, invite new users with roles and groups in one call, update, disable, enable, re-invite or force a password reset, read a user's activity, hotels, masked API keys and connected apps (and disable a key or revoke an app); and manage a hotel's own users — add a person to a hotel with roles (a new email gets an account in the same call), change their roles or groups, resend or revoke a hotel invite, remove them. Use for onboarding staff, access reviews and offboarding.","whenToUse":["Before creating a user (`add_client_user`, `invite_user`) ask the operator what they have not said: \"Create only, or send an invitation? If inviting, should the link open the Admin Dashboard or the demo site with the QA editor?\" Never default either silently.","Give a hotel employee access — `add_client_user` (any email: an existing user is invited, a new one gets an account and the invite), or `invite_user` for roles at several hotels or Maison-wide.","To add someone without any email (they cannot open an invite link yet), call `invite_user` with `mode: \"create\"` and `auth` (base64 of a password of at least 8 characters): the account is active at once with that password, and you share it with them yourself. An invite (the default mode) refuses `auth`.","Audit who can act on a hotel — `list_client_users`, `get_client_user_access`.","Offboard — `remove_client_user` (one hotel) or `disable_user` (platform-wide, Maison staff).","Offboard completely — `disable_user`, then `revoke_user_connected_app` for any app still connected (`list_user_connected_apps`); `enable_user` undoes a disable.","See every hotel a person can reach — `list_user_clients` (paged with `cursor`).","Find out who reset a password, minted or disabled an API key, or revoked an app, and when — `list_credential_audit` (every user, Maison staff) or `get_user_activity` with `source: credentials` (one user).","Reconstruct what one person did and when — `get_user_activity` with a `from` / `to` window (at most 366 days): who invited them, their sign-ins and sign-outs, every record they created, changed or deleted, and their hotel activity, in plain words with console links."],"workflows":[{"title":"Add someone to a hotel","steps":["Ask the operator both choices they have not stated, then map them: create only = `mode: \"create\"` with `auth`; an invite = `mode: \"invite\"` with `destination` `{ kind: \"admin\" }` (Admin Dashboard) or `{ kind: \"demo\", preview_website_id }` (demo site with the QA editor; a `demoSites[].id` from `get_client_overview`).","`list_client_roles` for the hotel to pick the role ids to assign.","`add_client_user` with the email, `roleIds` (and/or `groupIds`; optional `firstName` / `lastName` for a new account), `mode` and, on an invite, `destination`. It invites an existing user or creates and invites a new one — no second call. Invites are per hotel: a person who already has accepted access at this hotel gets the roles added directly (`kind: \"attached\"`, no email). 409 means the person is disabled, already has every chosen role here, or is only invited here so far (`resend_client_invite`). A refused role (403 \"… cannot be assigned here\", also from `set_client_user_roles`) is not available at this hotel, retired, or Maison-only: pick from `list_client_roles` — roles available to all clients or to this hotel.","`get_client_user_access` to confirm the effective access."]}],"tips":["`get_user` is one shot: profile + roles + groups + clients.","`list_user_api_keys` returns masked keys only; keys cannot be created through the public API. `disable_user_api_key` stops another person's key (needs `api-keys` WRITE global); your own: `disable_my_api_key`.","`list_credential_audit` pages every credential and account event (password set or reset, API key created or disabled, connected app revoked, user invited, created, enabled or disabled) newest first with the exact time, the acting user, how they authenticated and where from; filter by `type`, `category`, `actorUserId`, `targetUserId` and a `from`/`to` window. It never carries a password or a full key — only the masked form."],"pitfalls":["Every users tool takes the `maison-users` grant — at the hotel for the `*_client_user*` tools and for roles given at a hotel (`invite_user`, `assign_role`), globally for links at all clients and for `update_user`, `disable_user`, `force_password_reset` and the platform directory. `clients` WRITE grants nothing here.","A pending invite grants nothing until accepted — a 'user cannot see the hotel' report is often an unaccepted invite; `resend_client_invite` re-sends that hotel's invite (409 `not_pending` when nothing waits there; 502 `email_failed` when the email could not be sent — call again). To change where a sent invite opens (Admin Dashboard or the demo site with the QA editor), resend it with `destination`: the new link replaces the earlier one. Ask the operator which destination before resending when they have not said it; without `destination` the tool answers a needs-input result listing the choices.","`add_client_user` answers 502 `email_failed` when the invitation was saved but the email could not be sent — do not call it again (409); call `resend_client_invite`.","Inviting an existing person (`add_client_user`, `reinvite_user`, `resend_client_invite`) checks their sign-in account first and sends nothing when it fails: 409 `invite_account_mismatch` means the sign-in account does not match their Maison user — calling again will not help, it needs a Maison support fix; 502 `invite_account_unavailable` means the account could not be checked — retry later.","`disable_user` on an already disabled user is 409, not a no-op.","Setting another person's password directly is not a public tool: it is the admin console's, for Maison admins only (`maison-users` WRITE global), and is audited. Use `force_password_reset` — the person sets their own.","`list_credential_audit` needs `maison-users` READ at GLOBAL scope; a grant at one hotel is refused (403) because the audit spans every hotel's people."]}},{"name":"access","description":"Roles, policies, groups and effective access.","x-maison-guidance":{"title":"Roles, policies and groups","summary":"Shape permissions on Maison: roles, policies and user groups, each available to one hotel or to all clients (roles and policies may be Maison only). A policy is a list of rules (feature + level) and is never applied to a client directly — a role applies each of its policies at all clients or at named clients (Applies to). Also the feature catalogue and effective-access views. Use when designing who may do what, troubleshooting a 403, or granting a team a bundle of permissions.","whenToUse":["Set what a policy allows from a description (\"can view conversations and analytics but change nothing\"): `set_policy_rules` (Maison policy) or `set_client_policy_rules` (hotel policy) save the full rule list in one call.","Create a reusable permission bundle for a hotel — `create_client_policy` with statements, attach it to a role with `attach_client_role_policy`.","Explain a 403 — `get_client_user_access` (users skill) or `get_client_role` / `get_client_policy` effective access.","Roles and groups available to all clients — `create_role` (clientId null), `create_group`, `update_group_roles`; apply a shared policy at chosen hotels with `attach_role_policy` and change it with `set_role_policy_applies_to`.","Bring a retired role back — `restore_role`. Page a role's holders past `get_role`'s first 50 — `list_role_users`, `list_role_groups`.","Maison policies end to end — `create_policy`, `set_policy_rules`, `attach_role_policy`; `update_policy` renames or re-describes; `delete_policy` once no role applies it.","Rename a hotel group or drop it — `update_client_group`, `delete_client_group`."],"workflows":[{"title":"Set a policy's rules from what the person describes","steps":["`get_policy` (or `get_client_policy`) for the current rules; `list_features` (or `list_client_features_catalogue`) for each feature's id, label and purpose.","Map the words to levels: view → READ, change or manage → WRITE, run, send or act → EXECUTE, never or block → DENY. Name the specific features; the every-feature rule (featureId null) only when they mean everything.","Ambiguous (which features, which level)? Show the rules as a short Feature / Level list and ask before saving.","`set_policy_rules` (or `set_client_policy_rules`) with the FULL list: the current rules you keep plus the changes, one rule per feature. A rule left out is removed."]},{"title":"Grant a hotel team a defined set of features","steps":["`list_client_features_catalogue` to see which features the hotel's plan allows for roles.","`create_client_policy` with `statements: [{ featureId, permission }]` (or `create_client_role` with inline rules; add or remove one later with `add_client_role_rule` / `remove_client_role_rule`); a rule names no client.","`create_client_group` with `memberIds` and `roleId`, or assign per user with `set_client_user_roles`.","Verify with `get_client_group` / `get_client_role` effective access."]}],"tips":["Levels: READ < WRITE < EXECUTE; DENY wins over any grant at the same scope. A policy holds at most one rule per feature (and at most one every-feature rule), at exactly one of READ, WRITE, EXECUTE or DENY; a higher level includes the lower ones (WRITE already includes READ).","Nobody can grant a feature level they do not hold themselves on that hotel (no-escalation rule) — a 403 while adding a statement usually means that.","A rule granting a Maison-only feature (flagged maison_only in `list_features`), an every-feature rule, and attaching a policy that grants a Maison-only feature all need `allow-maison-only` WRITE held globally and by name — an ALL wildcard never counts (403 names `allow-maison-only`). A DENY rule needs nothing extra."],"pitfalls":["The rules tools replace the whole list, and one rule beyond your own access refuses the whole save (403 names the feature and level; nothing changed). One feature at two levels in the list is a 400 (nothing saved).","`add_role_policy`, `add_client_role_rule` and `add_client_policy_statement` set the feature's one rule: a different level replaces the current rule, the same level changes nothing.","Each kind has one grant, at the hotel for a row available to that hotel and GLOBAL for a row available to all clients (or Maison only): roles → `maison-roles` (also attaching policies to a role), groups → `groups`, policies → `policies` (and their rules), giving or revoking a role or a membership → `maison-users`. `clients` WRITE grants nothing in access management. Read with the same feature at READ.","A role's own inline rules (`add_role_policy`, `create_role` with `policies`) need GLOBAL `policies` WRITE; a hotel's rules (`set_client_policy_rules`, `add_client_policy_statement`) need `policies` WRITE on the hotel.","A policy available to one hotel applies only there; a role available to one hotel applies its policies there only (`appliesTo` null). A rule input naming a client, region, department or tag is a validation error — scope lives on the role, never on a rule.","Disabling a role is soft (`disable_role`); the role's users lose the permissions immediately.","`delete_client_group` is 409 while the group has members (pending invitations included) and `delete_policy` is 409 while a role applies it: empty or detach first.","`unassign_role` without `linkScope` removes the role at every scope; pass `linkScope: \"global\"` or a client id to remove one link."]}},{"name":"analytics","description":"Metrics, reports and exports.","x-maison-guidance":{"title":"Analytics and reports","summary":"Measure and report: the Analytics page figures for one hotel and the Portfolio page figures across every hotel the caller may read (conversations, answered without handoff, knowledge gaps, daily channels, top unanswered questions, needs-you items), a portfolio overview, per-hotel dashboard statistics, and chat-log and AI-visibility reports (run, list runs across hotels, read as HTML or download as a spreadsheet, rerun). Use when asked how a hotel or portfolio is performing, to produce a periodic report, or to email a report to recipients.","whenToUse":["Portfolio health over a period — `get_portfolio_overview` with `from`/`to`.","One hotel's numbers — `get_dashboard_stats`.","Produce and deliver a report — `run_chatlog_report` or `run_ai_visibility_report` with `recipients`.","One hotel's conversation figures against the previous period — `get_conversation_analytics` with ISO `from`/`to`.","Every hotel at once, with what needs attention — `get_portfolio_analytics`.","Report runs across hotels, failed ones first — `list_report_runs` with `status: \"ERROR\"`."],"workflows":[{"title":"Run and read a chat-log report","steps":["`run_chatlog_report` with optional `startDate`/`endDate` and `recipients.to[]` (202, returns `analyticsId`).","Poll `list_chatlog_reports` (or `list_report_runs`) until the run's status is `DONE` (`ERROR` = failed; `QUEUED`/`IN_PROGRESS` = still running).","`get_chatlog_report` with the `analyticsId` for the HTML, or `format: \"xlsx\"` for a 5-minute download URL of the spreadsheet; `rerun_chatlog_report` to regenerate."]}],"tips":["Reports are per type with their own grants: chat-log tools need `chat-log-analytics`, AI-visibility tools need `ai-visibility-analytics`.","Report and overview dates are ISO `YYYY-MM-DD`; the portfolio overview is inclusive of both ends.","`get_conversation_analytics` / `get_portfolio_analytics` take ISO 8601 date-times (with offset), at most 400 UTC days; `previous` is null — not zero — when the earlier window predates the hotel's indexed history.","The unanswered-question lists need conversation read access (`chat-logs`); without it `unanswered` is null."],"pitfalls":["A 409 from `run_*_report` means a run is already in flight for that hotel — poll the history instead of retrying.","`get_*_report` returns HTML inline and refuses documents over 2 MiB — use `format: \"xlsx\"` for a download link instead; the link expires after 5 minutes.","Run status values are exactly QUEUED, IN_PROGRESS, ERROR, DONE.","In `get_portfolio_overview`, a `null` conversation count means that period's chat history is not available for that hotel; it is not zero. `conversationCoverage` says how many hotels report."]}},{"name":"channels","description":"Messaging channels (Instagram, Messenger, WhatsApp, email).","x-maison-guidance":{"title":"Messaging channels","summary":"Operate a hotel's messaging channels: list connected Instagram, Messenger, WhatsApp and email channels with their auto-reply state, change auto-reply or draft-only settings, disconnect a channel, manage per-channel reply instructions, get the browser link that starts a channel connection, and opt a hotel into the ChatGPT guest app. Use when a hotel wants the concierge on a social or email channel, or when replies on a channel misbehave.","whenToUse":["See which channels a hotel has connected — `list_channels`.","Pause automatic replies on a channel — `update_channel_settings` with `autoReplyEnabled: false` or `draftOnly: true`.","Give channel-specific tone or rules — `add_channel_instruction`."],"workflows":[{"title":"Connect a channel","steps":["`get_channel_connect_link` for the channel; it returns a URL that a signed-in operator must open in a browser (OAuth cannot be completed through the API).","After the operator finishes, `list_channels` shows the connection; set `update_channel_settings` as wanted."]}],"tips":["`list_channels` reports `entitled` (channels in the plan), `guestappEntitled` and `guestMcpAvailable` — `connect_chatgpt_channel` works only when the last two are both true.","`connect_chatgpt_channel` answers 503 where the guest app does not exist (checked first) and 403 `not_entitled` without the `guestapp` plan feature.","Pass `returnTo` (a console, QA editor or admin `/clients/` URL) to `get_channel_connect_link` to land the operator back where they started; other URLs are refused with 400."],"pitfalls":["Disconnecting a channel deletes its tokens; reconnecting requires the browser flow again.","Every channel write is recorded in the hotel's activity feed as `channel_updated`."]}},{"name":"integrations","description":"PMS, payments and other third-party integrations.","x-maison-guidance":{"title":"Integrations (PMS, payments, events)","summary":"Connect third-party systems to a hotel in one call: browse the provider catalogue, list a hotel's integrations (credentials masked), add or update an integration with credentials, config and tool audiences, enable, disable or remove it, verify a config value against the provider, list provider properties (rezStream, Mews, ResNexus), email a hotel's account holder the consent link for rezStream or STS Cloud, and list the PMS rate plans. Use when onboarding a hotel's PMS, payment gateway or booking system, or when a booking tool stops working.","whenToUse":["Find the right provider and its required fields — `list_integration_catalog`.","Connect or update — `add_integration` (idempotent upsert).","Check why a provider call fails — `check_integration_config`, `list_integration_properties`.","Connect rezStream or STS Cloud — `add_integration` with the account holder's `emailId`, then `send_integration_connect_link`.","Pick a rate plan for a booking link or offer — `list_pms_rate_plans`."],"workflows":[{"title":"Connect a PMS","steps":["`list_integration_catalog` → read the provider's `credentialFields`, `configFields` and tools.","`add_integration` with `credentials` and `config` exactly as the catalogue names them; set `toolAudiences` to control which tools guests may use.","For rezStream / STS Cloud: `send_integration_connect_link`; the hotel's account holder approves in their browser and the integration turns Connected (poll `list_client_integrations`).","`list_integration_properties` (rezstream/mews/resnexus) to pick the property/service/business id when the provider has several; it also refreshes the stored name of the selected one. Mews: `refresh: true` re-syncs the booking-engine configuration.","`check_integration_config` for fields the catalogue marks as verifiable, then `enable_integration`."]}],"tips":["Only one PMS-type integration may be active per hotel; `add_integration` answers 409 when another is active.","Credentials are never returned; `list_client_integrations` shows masked values and connection state.","Stripe: `add_integration` with `credentials.secretKey` creates the hotel's Stripe webhook endpoint in the same call; a refused key is 422 `stripe_key_invalid` and nothing is saved. `remove_integration` deletes the endpoint.","`disable_integration` / `enable_integration` take effect at once on the instance that served the call; others follow within a minute."],"pitfalls":["rezStream and STS Cloud connect only when the hotel's own account holder approves: `send_integration_connect_link` emails them (409 until `emailId` — and for STS Cloud the OAuth Client Secret — is saved; 503 where the flow is not configured). Each call issues a new link.","Never log or echo credentials back to the user."]}},{"name":"configuration","description":"Hotel configuration, tone, translations and theme.","x-maison-guidance":{"title":"Hotel configuration, branding and content","summary":"Configure how a hotel's concierge behaves and looks: the hotel configuration document (set/unset fields), the chatbot tone, the chat widget's runtime switches and full style map, guest-facing translations with machine translation, theme colour and visuals, media assets, the sales agent configuration and lead recipients, internal client notes, the email log, settings catalogues (regions, departments, tags) and report subscribers. Use for any 'change what the concierge says/looks like' request or to read a hotel's current setup.","whenToUse":["Update address, hours, policies or any hotel fact the concierge should know — `update_hotel_config`.","Change the agent's voice — `set_chatbot_tone`; `get_chatbot_tone` returns `defaultTone` and `set_chatbot_tone` with `reset: true` restores it.","Localise — `get_translations`, `translate_text`, `update_translations`.","Brand the widget — `set_theme_color`, `upload_theme_visual`; the full style map with `get_chat_styles` / `set_chat_styles`.","To make a chat icon in the brand colour call `generate_theme_icon`; it replaces the current icon.","Switch the custom theme or document answers on or off — `get_chat_runtime` / `update_chat_runtime` (`branding`, `documents`)."],"workflows":[{"title":"Change a hotel fact safely","steps":["`get_hotel_config` to read the current document and exact field names.","`update_hotel_config` with `set: { field: value }` (and `unset: [field]` to remove); only the fields sent change.","Confirm with `send_message` (conversations skill) in a new session."]},{"title":"Add a language","steps":["`get_translations` for the current map and keys.","`translate_text` in batches to draft the new locale, review, then `update_translations` with the merged map."]}],"tips":["Notes support optimistic concurrency: send the `updatedDate` you read, and retry on 409.","Theme visuals and media images up to 64 KiB go inline as `bytesBase64`; larger ones (≤ 5 MB): `create_theme_visual_upload` / `create_media_upload`, PUT the file to `uploadUrl` with exactly `headers`, then `upload_theme_visual` / `upload_media_asset` with the `uploadId`. `get_theme` returns visual URLs."],"pitfalls":["`update_translations` replaces the whole map — always merge into the result of `get_translations`. It is validated exactly like the console (≤ 60 languages, identifier phrase keys, the default must be active).","`set_chat_styles` replaces the whole style map — send every token you want kept (read it with `get_chat_styles` first).","Agents tools require the hotel's plan to include `agents`, for Maison staff too; without it they answer 403 `not_entitled`."]}},{"name":"features","description":"Feature entitlements and plan templates (Maison staff).","x-maison-guidance":{"title":"Feature plans and entitlements (Maison staff)","summary":"Control what a hotel's plan includes: read the caller's per-feature access snapshot for a hotel, list and change the hotel's entitled features (grant/revoke in one call), push a feature to every child property, and manage plan templates (create, update, assign, apply with optional pruning, drift report, per-client overrides, plan history), Maison's payment gateway fees and the feature catalogue. Each plan feature is on or locked (shown to the hotel locked, with the plan's message); a feature left out is off. Use when a hotel upgrades or downgrades, when a tool answers 403 not_entitled, or when standardising plans across a group.","whenToUse":["A tool returned `not_entitled` — `get_client_access` shows what the plan lacks; `set_client_features` fixes it.","Roll out a plan — `set_client_plan` (assign + apply) or `apply_plan_template`.","Who changed a plan and when — `list_plan_template_history` / `list_client_plan_history`.","Invoice hotels for payments — `get_gateway_fee_totals` with `from`/`to` (optionally `clientId`)."],"workflows":[{"title":"Upgrade a hotel to a plan template","steps":["`list_plan_templates` → pick the template id.","`set_client_plan` with `templateId` and `prune: false` (keeps extra grants) or `true` (exact match).","`get_client_plan` to review drift afterwards."]},{"title":"Give one hotel an exception to its plan","steps":["`set_client_feature_override` with `state` `\"on\"`, `\"off\"` or `\"locked\"` — it wins over the plan and the hotel's features are reconciled at once.","`clear_client_feature_override` returns the feature to the plan default.","`get_client_plan` lists the hotel's overrides and its `locked` features."]}],"tips":["`get_client_access` is the fastest way to answer 'what can I do for this hotel?' — it merges plan entitlement with the caller's grants.","Plan history pages by offset (`limit`, `offset`) and returns `total`.","Gateway fees: a client's own fee wins over its plan's fee (`source` says which applies); setting and clearing fees is Maison staff only (global `clients` WRITE).","`create_feature` / `update_feature` / `deprecate_feature` change the platform feature catalogue (global `maison-roles` WRITE) — prefer an existing feature."],"pitfalls":["All plan tools except `get_client_access` need the GLOBAL `client-feature-management` grant (Maison staff).","`apply_plan_template` with `prune: true` revokes features not in the template — confirm with the user first.","A Maison-only feature cannot be locked (400) — use off instead.","`delete_plan_template` answers 409 while any hotel is on the plan — `list_plan_template_clients` lists them; move them to another plan first."]}},{"name":"hierarchy","description":"Multi-property groups and property discovery (Maison staff).","x-maison-guidance":{"title":"Multi-property groups (Maison staff)","summary":"Manage hotel groups: read a hotel's parent and children, find attachable candidates, attach or detach child properties, and run property discovery on a group website (start, read, edit candidates, approve/reject in bulk, approve to provision). Use when onboarding a brand or group site with several hotels, or when a property must move between groups.","whenToUse":["A group website was onboarded with `multiProperty: true` — `start_property_discovery` then review candidates.","Link an existing hotel under a group — `attach_child_property`."],"workflows":[{"title":"Discover and provision a group's properties","steps":["`start_property_discovery` on the parent (202; 409 if a run is active).","Poll `get_property_discovery` until candidates appear; fix names/URLs with `update_property_candidate`.","`decide_property_candidates` with `decision: \"APPROVED\"` (all, or `candidateIds`), then `approve_property_discovery` — 202 `{ status: \"PROVISIONING\", sessionId, approved }` at once; the run continues in the background.","Poll `get_property_discovery` until PROVISIONING turns COMPLETED (or FAILED); `get_client_hierarchy` shows the resulting children."]}],"tips":["`grant_feature_to_children` (features skill) propagates a plan feature to every child; `list_children_feature_counts` first shows which features are only partly rolled out."],"pitfalls":["Hierarchy tools need GLOBAL `clients` grants; discovery additionally requires the parent's plan to include `property-discovery` (waived for Maison staff holding it globally).","Attaching a child that is already a parent elsewhere, or would create a cycle, answers 409.","`approve_property_discovery` answers 409 when the run is not awaiting review or no candidate is approved."]}},{"name":"quality","description":"Chat tests, golden FAQ runs and chat feedback.","x-maison-guidance":{"title":"Quality: tests and Guest Agent quality review","summary":"Measure answer quality: run and read golden-FAQ test runs and chat test runs for a hotel, list the golden questions and chat tests, and (Maison staff) work the Guest Agent quality review queue (`chat-feedback`) — list items, run the classifier, resolve, dismiss or reopen. Use after knowledge changes to prove nothing regressed, or to triage conversations the classifier flagged as poor.","whenToUse":["Regression-test a hotel after content changes — `run_golden_faq_test`, then `get_test_report`.","Triage flagged conversations — `list_chat_feedback` with `status: \"OPEN\"`."],"workflows":[{"title":"Golden FAQ run","steps":["`list_golden_questions` (optional, to pick `questionIds`).","`run_golden_faq_test` (202) → returns the session id.","Poll `list_test_runs`; when complete, `get_test_report` for per-question scores."]}],"tips":["Test tools need the hotel's plan to include `test-session` and the caller's `test-session` grant."],"pitfalls":["Guest Agent quality review tools are Maison-wide (`chat-feedback` global grant) — they are not per-hotel permissions.","A 409 on a status change means the item is already in that state."]}},{"name":"hubspot","description":"Maison's own HubSpot company links (Maison staff).","x-maison-guidance":{"title":"HubSpot company links (Maison staff)","summary":"Link Maison hotels to companies in Maison's own HubSpot portal: search companies, read a hotel's link and last push outcome, link by id or create-and-link in one call, unlink, and push the last week's chat volume. Use for Maison's internal CRM upkeep; these tools are absent when HubSpot is switched off in the environment.","whenToUse":["Keep CRM records in sync after onboarding a hotel — `link_hubspot_company`."],"workflows":[{"title":"Link a hotel","steps":["`search_hubspot_companies` with the hotel name or domain.","`link_hubspot_company` with `hubspotCompanyId` (or `create: { name, domain }` when none exists).","`push_hubspot_chat_volume` with `dryRun: true` to preview, then without."]}],"tips":["`get_hubspot_link` reports the outcome of the last weekly push."],"pitfalls":["A 409 from `link_hubspot_company` means the company is already linked to another hotel, or a company was created but the link failed (the id is in `details`).","503 means HubSpot is not configured in this environment."]}},{"name":"platform","description":"Documentation, status and discovery.","x-maison-guidance":{"title":"Platform, documentation and diagnostics","summary":"Orient and verify: the documentation index with machine-readable discovery URLs, the exact widget embed code for a hotel, a website check (framework, widget present, client id), the AI site diagnostic (start, read findings, ask follow-ups) and a live platform health summary. Use when installing the widget on a hotel's site, when a site seems not to load the concierge, or to find the right documentation page.","whenToUse":["Install the widget — `get_widget_embed_code`, then `check_website` to verify.","A hotel site misbehaves — `start_site_diagnostic` → `get_site_diagnostic` → `chat_site_diagnostic`.","Find documentation — `get_documentation`."],"workflows":[{"title":"Install and verify the widget","steps":["`get_widget_embed_code` for the hotel; give the operator the `html` block.","After they publish, `check_website` with the site URL: `hasAgentScript` and the detected client id confirm the install.","If something is off, `start_site_diagnostic` and read the findings."]}],"tips":["`get_platform_status` is a quick way to tell an API outage from a hotel-specific problem."],"pitfalls":["Diagnostics run against public URLs only; private or password-protected sites cannot be checked."]}},{"name":"agents","description":"Agent Ledger: create, configure and monitor AI agents that act on guest conversations.","x-maison-guidance":{"title":"Agents","summary":"Configure per-hotel AI agents that evaluate every guest turn and take actions (send emails, fire webhooks, reply in chat, etc.) when their match criteria are met. Use to create, read, update, enable, disable and dry-test agents, and to browse execution history.","whenToUse":["Set up a sales-lead capture agent that emails staff when a guest expresses purchase intent.","Configure a custom trigger that fires a webhook whenever a guest asks about a specific topic.","Find sessions for a particular agent and date range, compare exact outcomes, and explain what caused a response.","Dry-run an agent against a transcript before enabling it in production.","Choose which integration tools an agent may call — `list_agent_tools`, then `resources.tools` on `create_agent` / `update_agent`.","Start an agent from an external system's events — `list_webhooks` (webhooks skill) for the id, then `scope.webhookIds` on `create_agent` / `update_agent`."],"workflows":[{"title":"Create and enable an agent","steps":["Call `list_agent_templates` to see predefined templates (e.g. `sales_lead`).","Call `create_agent` with the chosen `templateId`, a `name`, `criteria`, `action`, `outputs` and optional `channels`/`threshold`/`repeat`.","Call `enable_agent` to start evaluating live turns.","Call `list_agent_sessions` with clientId, agentId, from and to to monitor results."]},{"title":"Investigate agent sessions and decisions","steps":["Call `list_agent_sessions` with clientId, agentId, from and to: the sessions where the agent triggered. The date window includes from and excludes to; analytics cover the full window rather than just the current page.","Follow nextOffset until null to retrieve every matching session. Keep the same date and agent filters between pages.","Call `list_agent_execution_history` with the sessionId to inspect its triggered runs. Set executionsOnly=false only when diagnosing why an agent did not trigger (nonmatches, below-threshold and dedupe decisions).","Use `get_agent_execution_history` for one execution's configuration version, trigger prompt, confidence/reason, extracted fields and output references. Distinguish the model's explanation from verified delivery evidence."]},{"title":"Dry-run before enabling","steps":["Build a representative transcript array (role + message + optional datetime).","Call `test_agent` — returns verdicts without writing any execution row or firing any output.","Adjust `criteria` and `threshold` based on the confidence scores, then enable."]}],"tips":["`channels: ['*']` means the agent applies to every channel; narrow it to `['web', 'whatsapp']` to limit scope.","`threshold` (0–1, default 0.70) sets the minimum confidence for a match; raise it to reduce false positives.","`repeat.mode = 'once_per_session'` prevents duplicate firings within a single conversation; use `cooldown` for cross-session rate limiting.","SQL history tools accept at most 366 days and 100 rows per page. Configured agent ids are UUIDs — never pass 'guest' as agentId. History remains queryable after an agent is deleted.","The Guest agent is always on and is not written to the execution ledger. Use list_agents' builtInAgents field for its identity, and get_guest_agent_settings/update_guest_agent_settings for its resources.","The router excludes agents that do not match the channel or scope before evaluation. Excluded agents are never written to execution history.","`list_agents` returns each agent's `counter`, the Guest agent's settings under `guest`, and the template catalogue; `get_agent` adds `attention` (a failed or errored run in the last 24 h).","Every create, update, enable and disable is recorded in the hotel's activity feed (`agent_created`, …), exactly as a console change."],"pitfalls":["An agent is evaluated only when it is `enabled`; creating an agent does not start evaluation.","The `version` field is required for `update_agent` — always re-read before updating to avoid a 409 conflict.","`outputs` with `kind: 'email'` require at least one recipient; `kind: 'sms'` is accepted but always returns `no_transport` until a provider is wired.","A matched/pending action is not a successful delivery. Report success only from an acted record and successful output results; partial, failed and evaluation errors must stay distinct.","`agentId` in history tools must be a configured UUID. Passing 'guest' returns an input error.","Webhook outputs must be `https://` URLs; `http://` is refused with 400."]}},{"name":"usage","description":"LLM usage records and cost summaries.","x-maison-guidance":{"title":"LLM usage","summary":"Answer spend questions about LLM calls across the platform: total tokens and estimated costs by day, model, purpose or client, and individual call records for a date window. Costs are list-price estimates. Use get_llm_usage_summary to chart trends (line or bar block); use list_llm_usage to inspect individual records. Windows must not exceed 31 days.","whenToUse":["Summarise token spend by model or purpose over the last week — `get_llm_usage_summary` with `groupBy: 'model'`.","Chart daily cost trends — `get_llm_usage_summary` with `groupBy: 'day'`.","Inspect individual LLM calls for a session or run — `list_llm_usage` with `clientId` or `purpose`."],"workflows":[{"title":"Chart spend over a period","steps":["`get_llm_usage_summary` with `from`/`to` (YYYY-MM-DD) and `groupBy: 'day'`.","Use the returned `buckets[]` to render a line or bar block — each bucket has `key` (date), `inputTokens`, `outputTokens`, `totalTokens` and `costUsd`.","Narrow by `clientId` or `purpose` to isolate a hotel or call type."]}],"tips":["Costs (`costUsd`) are list-price estimates computed at record time; actual invoiced amounts may differ.","`groupBy: 'client'` shows spend per hotel; `groupBy: 'purpose'` breaks down by call type (guest_chat, translate, etc.)."],"pitfalls":["Windows exceeding 31 days are rejected with a 400 error — split into smaller ranges.","Both tools require a global `llm-usage` READ grant (Maison staff only)."]}},{"name":"webhooks","description":"Incoming client webhooks: named inboxes a hotel's other systems POST to, which start the agents that list them as inputs; their keys and request log.","x-maison-guidance":{"title":"Incoming webhooks","summary":"Manage a hotel's incoming webhooks: named inboxes its other systems (survey tools, CRMs, form builders, automation platforms) POST to, which start the agents that list them as inputs. Create, read, update and delete webhooks; add, rename, reveal, rotate and revoke their named keys; read the request log and delivery analytics. Use when wiring an external system to a hotel's agents or diagnosing why a sender's requests are refused.","whenToUse":["Give an external system an address to send events to — `create_webhook`, then list it in the agent's `scope.webhookIds`.","Issue a separate key per sending app, or replace a leaked one — `add_webhook_key`, `rotate_webhook_key`, `revoke_webhook_key`.","Find out why a sender's requests fail or what it sent — `list_webhook_requests`, `get_webhook_request`, `get_webhook_analytics`."],"workflows":[{"title":"Connect a sending system","steps":["`create_webhook` with a name, a `slug` (the permanent address segment) and an access mode (`api_key` by default). The response carries the webhook's address and its first key, `Default` — the key secret is returned once, so hand it to the sender straight away.","Configure the sender to POST to the address with the key in `X-Maison-Key` (or `Authorization: Bearer`).","`add_webhook_key` for each further sending app, so the request log shows which app called.","Point an agent at it: `update_agent` with the webhook id in `scope.webhookIds`.","`list_webhook_requests` to confirm the first request arrived and was accepted."]},{"title":"Rotate or recover a key","steps":["`reveal_webhook_key` returns a live key's secret again (the reveal is recorded in the hotel's activity log; it rotates the key first when automatic rotation is due).","`rotate_webhook_key` with the key's `version` issues a new secret; the previous one keeps working for 24 hours so the sender can switch.","`revoke_webhook_key` stops a key at once."]}],"tips":["Automatic rotation is lazy: a due key rotates on its next inbound request or reveal, never on a schedule.","Request bodies are kept for 90 days; the log row stays after that with `body: null`.","A webhook does nothing on its own — it starts work only when an enabled agent lists it as an input."],"pitfalls":["The address (`/webhooks/{clientId}/{slug}`) never changes; to get a new one, create a new webhook.","The last live key of an `api_key` webhook cannot be revoked (409 `last_key`); switch the webhook to `open` access instead.","Switching a webhook to `open` revokes every live key; switching back creates a new `Default` key, returned once.","Never log or echo a key secret back to the user beyond the one hand-off they asked for.","Revealing, rotating and adding keys need WRITE on `update-client`; a READ-only key can list webhooks and the request log but never sees a secret."]}},{"name":"apps","description":"Developer apps (OAuth clients) a hotel registers for the public API, and Maison's administration of them.","x-maison-guidance":{"title":"Developer apps","summary":"Manage the developer apps (OAuth clients) a hotel registers to call the Maison public API on its behalf: register, read, edit, revoke and reinstate apps, read each app's analytics, request log and audit trail; and, for Maison staff, verify, suspend, revoke or reinstate any app on the platform. Use when a hotel wants its own software or a partner to call the API, or when an app must be stopped.","whenToUse":["Register an app for a hotel's own integration — `create_client_app`.","See a hotel's apps or change one — `list_client_apps`, `get_client_app`, `update_client_app` (name, redirect URIs, scopes; live apps only).","Stop an app and everyone connected through it — `revoke_client_app` (or `revoke_oauth_app` as Maison staff).","Audit what an app did and who changed it — `get_client_app_analytics`, `list_client_app_requests`, `list_client_app_audit`.","Review apps across the platform (Maison staff) — `list_oauth_apps`, `verify_oauth_app`, `suspend_oauth_app`; `reinstate_oauth_app` undoes `revoke_oauth_app`."],"workflows":[{"title":"Register an app","steps":["`create_client_app` with a name, redirect URIs, the scopes it needs and its client type (public, or confidential with a client secret). Use a user's own API key: an OAuth access token is refused, so one app can never register another.","A confidential app's client secret is returned once in the response and can never be read again — hand it over straight away. There is no secret rotation: revoke the app and register a new one.","The app starts unverified; people can still approve it, with an \"Unverified app\" warning on the consent screen until Maison verifies it."]},{"title":"Stop an app","steps":["`revoke_client_app` revokes the app and fans out to revoke every person's grant to it; access tokens are refused within 30 seconds.","`reinstate_client_app` brings the app back, but consents stay revoked — people connect again.","Maison staff use `suspend_oauth_app` for a temporary stop that keeps consents (tokens already issued run out within 15 minutes); `unsuspend_oauth_app` lifts it."]}],"tips":["An app is never deleted: revoke is the delete, and every change and every access is kept for audits.","Verification (`verify_oauth_app` / `unverify_oauth_app`) is a consent-screen badge only; it never gates the flow.","Scopes cap what an app may ask for; each person's own grants still cap what a token can do.","`list_oauth_apps` (Maison staff) includes Claude / ChatGPT style CIMD and DCR registrations; revoked apps join the list only with `includeRevoked` or `status: revoked`."],"pitfalls":["Only a live app can be edited; reinstate a revoked app first.","Reinstating answers 409 `client_id_in_use` when another live app now holds the same OAuth client id.","Never log or echo a client secret.","The per-hotel tools need the hotel's `oauth-apps` plan entitlement (403 `not_entitled`) as well as the `oauth-apps` grant; `canWrite` on the reads says whether you may change the hotel's apps."]}}],"x-maison-skills":{"docs":"https://docs.maison-labs.com/skills/","index":"https://docs.maison-labs.com/.well-known/agent-skills/index.json","root":"https://docs.maison-labs.com/skill.md","umbrella":{"name":"maison-public-api","title":"Maison public API","summary":"Operate Maison, the AI hotel concierge platform, through its public tool API: one-shot tools for provisioning hotels, managing knowledge, talking to a hotel's concierge, users and access, analytics and reports, channels, integrations, configuration, plans, groups and quality. The same tools are callable over REST, MCP and A2A with an API key. Use whenever a task involves Maison hotels, their concierge, or the Maison admin console.","whyNotGuess":["Every tool completes a whole intent; chaining low-level calls is unnecessary and usually wrong.","Permissions are all-or-nothing per tool and the catalogue is filtered per key — discover before you plan.","Each category skill lists the workflow order, the pitfalls and the exact input fields, so the first call succeeds."]}},"security":[{"apiKey":[]},{"oauth2":[]}],"paths":{"/api/v1/me":{"get":{"operationId":"whoami","tags":["account"],"summary":"Who am I","description":"The user behind the API key, whether they are Maison staff, every feature grant they hold (global or per client) and the client ids they can act on. Call this first to discover what the key may do; `GET /api/v1/tools` lists the callable tools.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"whoami","mcp":{"tool":"whoami","endpoint":"/mcp"},"a2a":{"skill":"whoami","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/notices/summary":{"get":{"operationId":"get_notice_summary","tags":["account"],"summary":"Count my unread notices","description":"Your unread operator notices by category, across every hotel you can read conversations of: agent replies (your Maison agent sessions), guest messages (conversations you are handling, with message and conversation counts), conversations needing attention, and agent notices (notify_operator actions), each with per-hotel counts, plus `total`. Use list_notices for the items.\n\n**Requires:** `chat-logs` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_notice_summary","mcp":{"tool":"get_notice_summary","endpoint":"/mcp"},"a2a":{"skill":"get_notice_summary","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/notices":{"get":{"operationId":"list_notices","tags":["account"],"summary":"List my unread notices","description":"Your unread operator notices, newest first: id, category, tone, summary, subject (an agent session, a conversation or an agent execution), hotel, count and times, plus `subjectTitle` (an agent session's title, null otherwise) and `clientName` (the hotel's name, null without one). Guest-message items are one per conversation (id `conversation:<clientId>:<sessionId>`). Filter by category or hotel; page with `cursor` (the previous page's `nextCursor`). Mark them read with mark_notices_read.\n\n**Requires:** `chat-logs` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"description":"Only this category","type":"string","enum":["agent_reply","guest_message","attention","agent_notice"]},"description":"Only this category"},{"name":"clientId","in":"query","required":false,"schema":{"description":"Only notices for this hotel","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Only notices for this hotel"},{"name":"cursor","in":"query","required":false,"schema":{"description":"nextCursor from the previous page","type":"string","minLength":1,"maxLength":400},"description":"nextCursor from the previous page"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_notices","mcp":{"tool":"list_notices","endpoint":"/mcp"},"a2a":{"skill":"list_notices","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/notices/read":{"post":{"operationId":"mark_notices_read","tags":["account"],"summary":"Mark my notices read","description":"Mark your unread operator notices read. Give exactly one of: `ids` (notice ids from list_notices), `subjectKind` + `subjectId` (everything about one agent session, conversation or agent execution), or `category` (every unread item of that category). A shared notice (attention) is resolved for every other operator by the first read. Returns `read` (items read) and the summary after the read, as get_notice_summary.\n\n**Requires:** `chat-logs` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"mark_notices_read","mcp":{"tool":"mark_notices_read","endpoint":"/mcp"},"a2a":{"skill":"mark_notices_read","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"description":"Notice ids to mark read","minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"subjectKind":{"description":"With subjectId: what the notices are about","type":"string","enum":["agent_session","conversation","agent_execution"]},"subjectId":{"description":"With subjectKind: its id","type":"string","minLength":1,"maxLength":200},"category":{"description":"Every unread item of this category","type":"string","enum":["agent_reply","guest_message","attention","agent_notice"]}},"additionalProperties":false}}}}}},"/api/v1/me/apikeys":{"get":{"operationId":"list_my_api_keys","tags":["account"],"summary":"List my API keys","description":"Your own API keys, masked (prefix and last 4 characters — never the key itself), each with its description, creation, last use and whether it is disabled. Needs no grant. Use `disable_my_api_key` to stop one; keys are created from your profile in the console.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_my_api_keys","mcp":{"tool":"list_my_api_keys","endpoint":"/mcp"},"a2a":{"skill":"list_my_api_keys","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/me/apikey/{keyId}":{"delete":{"operationId":"disable_my_api_key","tags":["account"],"summary":"Disable my API key","description":"Disable one of your own API keys (an id from `list_my_api_keys`); calls with it are refused at once — including this call's key if you name it. Needs no grant. 404 when you have no active key with that id. Use `disable_user_api_key` for someone else's key.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"API key id (from list_my_api_keys)"},"description":"API key id (from list_my_api_keys)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disable_my_api_key","mcp":{"tool":"disable_my_api_key","endpoint":"/mcp"},"a2a":{"skill":"disable_my_api_key","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/me/connectedapps":{"get":{"operationId":"list_my_connected_apps","tags":["account"],"summary":"List my connected apps","description":"The apps you have connected to your Maison account with OAuth (your active consents): each with the app, the scopes you granted (grouped by area), the hotels it may act on (`all` or a list), when you granted it and when it was last used. Needs no grant. Use `revoke_my_connected_app` to disconnect one.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_my_connected_apps","mcp":{"tool":"list_my_connected_apps","endpoint":"/mcp"},"a2a":{"skill":"list_my_connected_apps","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/me/connectedapp/{grantId}/revoke":{"post":{"operationId":"revoke_my_connected_app","tags":["account"],"summary":"Disconnect one of my apps","description":"Revoke one of your own OAuth consents (a grant id from `list_my_connected_apps`): the app's access tokens are refused within 30 seconds and it cannot refresh; connecting again asks for consent again. Idempotent. Needs no grant. 404 when the grant is unknown; 403 when it is someone else's.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[{"name":"grantId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Grant id"},"description":"Grant id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"revoke_my_connected_app","mcp":{"tool":"revoke_my_connected_app","endpoint":"/mcp"},"a2a":{"skill":"revoke_my_connected_app","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/clients":{"get":{"operationId":"list_clients","tags":["clients"],"summary":"List clients","description":"Page through the hotels the caller can see, with search, status filter and sort. Returns only clients the key's user holds `clients` READ on (or all, with a global grant). Each row carries its automatic live status (`live_status`: LIVE, NOT_LIVE, CHURN_RISK or MANUAL_NOT_LIVE; `live_since`, `live_last_seen_at`, `live_last_seen_host`). Use `get_client` for one hotel's full record. Filter server-side instead of paging the portfolio: `liveStatus` (live | not_live) and `activity` (none | some = conversations in the last `activityDays` days, default 30; widget loads never count) — e.g. live hotels without conversations = `liveStatus: live, activity: none`; `total` is the full count, so answer with it and the first page. With an activity filter or `orderBy: last_activity_date`, rows also carry `conversations_in_window` and `last_activity_date` (last day with a conversation).\n\n**Requires:** `clients` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"},{"name":"search","in":"query","required":false,"schema":{"description":"Case-insensitive match on name or website","type":"string","maxLength":200},"description":"Case-insensitive match on name or website"},{"name":"status","in":"query","required":false,"schema":{"default":"active","type":"string","enum":["active","disabled","all"]}},{"name":"orderBy","in":"query","required":false,"schema":{"default":"name","type":"string","enum":["name","created_date","demo_client","last_scraped_date","primary_scrape_status","scrape_schedule","ai_visibility_schedule","last_activity_date"]}},{"name":"sort","in":"query","required":false,"schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"liveStatus","in":"query","required":false,"schema":{"description":"`live` = live_status LIVE; `not_live` = any other status; omit or `any` for all","type":"string","enum":["live","not_live","any"]},"description":"`live` = live_status LIVE; `not_live` = any other status; omit or `any` for all"},{"name":"activity","in":"query","required":false,"schema":{"description":"Conversations in the last `activityDays` days: `none` = zero, `some` = at least one; omit or `any` for all","type":"string","enum":["none","some","any"]},"description":"Conversations in the last `activityDays` days: `none` = zero, `some` = at least one; omit or `any` for all"},{"name":"activityDays","in":"query","required":false,"schema":{"description":"Window of the `activity` filter and `conversations_in_window`, in days (default 30)","type":"integer","minimum":1,"maximum":365},"description":"Window of the `activity` filter and `conversations_in_window`, in days (default 30)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_clients","mcp":{"tool":"list_clients","endpoint":"/mcp"},"a2a":{"skill":"list_clients","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/clients/summary":{"get":{"operationId":"get_clients_summary","tags":["clients"],"summary":"Clients summary","description":"Counts of active, disabled, demo and recently created clients across the caller's portfolio. Use for a dashboard headline; use `list_clients` for rows.\n\n**Requires:** `clients` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_clients_summary","mcp":{"tool":"get_clients_summary","endpoint":"/mcp"},"a2a":{"skill":"get_clients_summary","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}":{"get":{"operationId":"get_client","tags":["clients"],"summary":"Get a client","description":"The full client record (settings, website, scrape state, schedules, IANA timezone, computed flags) and its automatic live status: `live_status` (LIVE = the chat widget loaded on the hotel's own website in the last 7 days; CHURN_RISK = no load for 14 days; NOT_LIVE; MANUAL_NOT_LIVE = the override in Settings), `live_since`, `live_last_seen_at`, `live_last_seen_host`, `live_manual_not_live`. 404 when the id is unknown or disabled-and-hidden.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client","mcp":{"tool":"get_client","endpoint":"/mcp"},"a2a":{"skill":"get_client","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_client","tags":["clients"],"summary":"Update a client","description":"Partial update of the client record: name, description, demo flag, website, scrape language, manual-knowledge and multi-property flags, report schedules, and the hotel's IANA timezone (400 `invalid_timezone` for a zone outside the runtime's Intl list). Only the fields sent are changed. Changing a schedule also needs the Maison-only `schedules` WRITE grant (403 otherwise). Recorded in the activity feed. Hotel configuration (address, hours, …) lives in `update_hotel_config`.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_client","mcp":{"tool":"update_client","endpoint":"/mcp"},"a2a":{"skill":"update_client","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"demoClient":{"type":"boolean"},"websiteId":{"description":"Website record the client is linked to","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scrapeLanguage":{"anyOf":[{"type":"string","maxLength":25},{"type":"null"}]},"manualKnowledge":{"description":"True = the knowledge base is curated by hand, never scraped","type":"boolean"},"multiProperty":{"description":"The website is a multi-property group/brand site","type":"boolean"},"chatLogsAnalyticsSchedule":{"description":"Needs the `schedules` WRITE grant","type":"string","enum":["NONE","DAILY","WEEKLY","BI_WEEKLY","MONTHLY"]},"aiVisibilitySchedule":{"description":"Needs the `schedules` WRITE grant","type":"string","enum":["NONE","DAILY","WEEKLY","BI_WEEKLY","MONTHLY"]},"timezone":{"description":"The hotel's IANA timezone, e.g. \"Europe/Paris\"; every time the console shows for this client is in it. null clears it.","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"additionalProperties":false}}}}}},"/api/v1/clients/livereport":{"get":{"operationId":"get_live_clients_report","tags":["clients"],"summary":"Live clients report","description":"For one month (`YYYY-MM`, UTC), the clients that were LIVE at any point in it and how many were still LIVE at month end, optionally limited to the clients under one hierarchy node (`nodeId`: every descendant in `client_hierarchy`, the node itself excluded). LIVE = the chat widget loaded on the client's own website (never a Maison host) in the last 7 days, recomputed daily; derived from the recorded `live_status_changed` transitions and the current status. Use it for rep-co invoices (live member hotels per month). 404 when `nodeId` is unknown.\n\n**Requires:** `clients` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"month","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"The month, e.g. \"2026-10\""},"description":"The month, e.g. \"2026-10\""},{"name":"nodeId","in":"query","required":false,"schema":{"description":"A hierarchy node (group client): only its descendants are counted","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"description":"A hierarchy node (group client): only its descendants are counted"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_live_clients_report","mcp":{"tool":"get_live_clients_report","endpoint":"/mcp"},"a2a":{"skill":"get_live_clients_report","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client":{"post":{"operationId":"create_client","tags":["clients"],"summary":"Create a client","description":"Provision a hotel in one call: creates the client on its feature plan, links its website as the main knowledge source, seeds the default hotel configuration and chatbot tone, queues the first website scrape (or property discovery for a multi-property group), and deploys the demo preview site. The plan: `planTemplateId` puts the client on a plan template with optional `featureOverrides` winning over its defaults; `noTemplate: true` grants exactly `features`; neither gives the baseline set. A website without a scheme is stored as https. 409 when a client with the same name exists; 404 for an unknown plan template. Returns the new client record.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_client","mcp":{"tool":"create_client","endpoint":"/mcp"},"a2a":{"skill":"create_client","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Hotel name"},"website":{"type":"string","minLength":1,"maxLength":500,"description":"Public website URL, e.g. https://example-hotel.com (https:// is added if missing)"},"scrapeWebsite":{"default":true,"description":"Queue the first scrape immediately (ignored for multi-property, which always runs discovery)","type":"boolean"},"scrapeLanguage":{"default":null,"description":"Language the scraper writes in, e.g. English","anyOf":[{"type":"string","maxLength":25},{"type":"null"}]},"multiProperty":{"default":false,"description":"The website is a group/brand site with several properties — never scraped whole","type":"boolean"},"demoClient":{"default":false,"type":"boolean"},"hotelConfig":{"description":"Extra hotelConfig fields merged on top of name + website (address, phone, …)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"planTemplateId":{"description":"Plan template to put the client on (see `list_plan_templates`)","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"featureOverrides":{"description":"With `planTemplateId`: features switched on or off against the plan","maxItems":500,"type":"array","items":{"type":"object","properties":{"feature":{"type":"string","minLength":1,"maxLength":64},"enabled":{"type":"boolean"}},"required":["feature","enabled"],"additionalProperties":false}},"noTemplate":{"description":"No plan template: the client gets exactly `features`","type":"boolean"},"features":{"description":"With `noTemplate: true`: the features the client is entitled to","maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["name","website"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/disable":{"post":{"operationId":"disable_client","tags":["clients"],"summary":"Disable a client","description":"Switch a hotel off as if its account were deleted; nothing is deleted. Its chat widget no longer appears and its chats stop answering; its Instagram, Messenger, WhatsApp and email channels and its guest MCP listing go silent; its agents, scheduled reports, website syncs and every other job stop; incoming webhooks for it are refused; and the public API refuses every call for it except `get_client`, `enable_client` and `disable_client`. Staff keep their logins but lose the hotel (within ten minutes at most). Payments already in flight still settle. Calling it again re-applies the switch. Reverse with `enable_client`.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disable_client","mcp":{"tool":"disable_client","endpoint":"/mcp"},"a2a":{"skill":"disable_client","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/enable":{"post":{"operationId":"enable_client","tags":["clients"],"summary":"Re-enable a client","description":"Switch a disabled hotel back on: its chat widget, chats, channels, agents, jobs, webhooks and public API access resume, and it appears in active listings again. Guests routed to it from a shared brand channel choose again. Calling it again re-applies the switch.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"enable_client","mcp":{"tool":"enable_client","endpoint":"/mcp"},"a2a":{"skill":"enable_client","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/rescrape":{"post":{"operationId":"rescrape_client_website","tags":["clients"],"summary":"Rescrape the main website","description":"Queue a fresh scrape of the client's main website into its knowledge base. `force` re-ingests pages even when unchanged. Progress is visible in `list_client_jobs` and `get_client_activity`.\n\n**Requires:** `document-source` EXECUTE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"rescrape_client_website","mcp":{"tool":"rescrape_client_website","endpoint":"/mcp"},"a2a":{"skill":"rescrape_client_website","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"EXECUTE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"default":null,"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"force":{"default":false,"type":"boolean"}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/previewsite":{"post":{"operationId":"deploy_preview_site","tags":["clients"],"summary":"Deploy the demo preview site","description":"Create or recreate the hosted demo page that embeds the client's chat widget, and return its URL. `name` and `website` override the client's stored values for the page (a website without a scheme gets https://). 503 when this environment has no preview-site hosting. Safe to repeat.\n\n**Requires:** `clients` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"deploy_preview_site","mcp":{"tool":"deploy_preview_site","endpoint":"/mcp"},"a2a":{"skill":"deploy_preview_site","endpoint":"/a2a"},"access":[{"feature":"clients","level":"EXECUTE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name shown on the demo page","type":"string","minLength":1,"maxLength":200},"website":{"description":"Website the page links to","type":"string","minLength":1,"maxLength":500}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/overview":{"get":{"operationId":"get_client_overview","tags":["clients"],"summary":"Client overview","description":"The client workspace Overview in one read: identity (name, website, demo site), setup progress, scheduled and recent jobs, knowledge, people, group (parent/children), latest activity, latest note and a timeline. A section the client is not entitled to or the caller cannot read is omitted; a section that failed alone is `{ error: true }`. For headline counts only use `get_client_metrics`.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_overview","mcp":{"tool":"get_client_overview","endpoint":"/mcp"},"a2a":{"skill":"get_client_overview","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/metrics":{"get":{"operationId":"get_client_metrics","tags":["clients"],"summary":"Client metrics","description":"Headline numbers for one hotel: conversations, knowledge size, last scrape, channel counts. For time-series analytics use `get_portfolio_overview`.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_metrics","mcp":{"tool":"get_client_metrics","endpoint":"/mcp"},"a2a":{"skill":"get_client_metrics","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/activity":{"get":{"operationId":"get_client_activity","tags":["clients"],"summary":"Client activity feed","description":"The audit/activity timeline for a hotel (knowledge, configuration, brand, connections, access, reports, account, health, notes), newest first, with cursor paging (`direction: newer` pages towards the present) and filters: one category or all but one (`excludeCategory`), failed only, a date range, one knowledge source (`source`), or one event by its `MX-…` support reference. Requires the client-activity entitlement.\n\n**Requires:** `client-activity` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `client-activity` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"default":"older","description":"Page towards older events (default) or newer ones from the cursor","type":"string","enum":["older","newer"]},"description":"Page towards older events (default) or newer ones from the cursor"},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["knowledge","configuration","brand","connections","access","reports","account","health","notes"]}},{"name":"excludeCategory","in":"query","required":false,"schema":{"description":"Hide one category","type":"string","enum":["knowledge","configuration","brand","connections","access","reports","account","health","notes"]},"description":"Hide one category"},{"name":"failedOnly","in":"query","required":false,"schema":{"default":false,"type":"boolean"}},{"name":"from","in":"query","required":false,"schema":{"description":"Inclusive lower bound: ISO date or date-time","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]},"description":"Inclusive lower bound: ISO date or date-time"},{"name":"to","in":"query","required":false,"schema":{"description":"Exclusive upper bound: ISO date or date-time","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]},"description":"Exclusive upper bound: ISO date or date-time"},{"name":"source","in":"query","required":false,"schema":{"description":"Only events of this knowledge source link","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Only events of this knowledge source link"},{"name":"reference","in":"query","required":false,"schema":{"description":"A support reference (MX-…) to resolve to its event","type":"string","pattern":"^MX-[0-9A-Za-z-]{1,40}$"},"description":"A support reference (MX-…) to resolve to its event"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_activity","mcp":{"tool":"get_client_activity","endpoint":"/mcp"},"a2a":{"skill":"get_client_activity","endpoint":"/a2a"},"access":[{"feature":"client-activity","level":"READ","scope":"client"}],"entitlement":"client-activity","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/jobs":{"get":{"operationId":"list_client_jobs","tags":["clients"],"summary":"List running jobs","description":"Pipeline jobs (scrapes, ingests, reports) currently running for a hotel, with task ids usable by `stop_client_job`. Maison staff only.\n\n**Requires:** `jobs` EXECUTE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","jobs:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_jobs","mcp":{"tool":"list_client_jobs","endpoint":"/mcp"},"a2a":{"skill":"list_client_jobs","endpoint":"/a2a"},"access":[{"feature":"jobs","level":"EXECUTE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/job/{taskId}":{"delete":{"operationId":"stop_client_job","tags":["clients"],"summary":"Stop a running job","description":"Stop one running pipeline job for a hotel (a stopped scrape is marked canceled). A task belonging to another client is reported as not found. Recorded in the activity feed. Maison staff only.\n\n**Requires:** `jobs` EXECUTE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","jobs:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{32}$","description":"ECS task id (32 lowercase hex)"},"description":"ECS task id (32 lowercase hex)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"stop_client_job","mcp":{"tool":"stop_client_job","endpoint":"/mcp"},"a2a":{"skill":"stop_client_job","endpoint":"/a2a"},"access":[{"feature":"jobs","level":"EXECUTE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/sources":{"get":{"operationId":"list_knowledge_sources","tags":["knowledge"],"summary":"List knowledge sources","description":"List every website and document knowledge source attached to a hotel, including scrape/sync status, schedule and current version. `activeRun` names the run a source is busy with — `{ kind: scrape | rescrape | sync | ingest, status: queued | running, sessionId }` — or is null when its latest run finished. Use this to inspect the knowledge pipeline before scraping or uploading.\n\n**Requires:** `document-source` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_knowledge_sources","mcp":{"tool":"list_knowledge_sources","endpoint":"/mcp"},"a2a":{"skill":"list_knowledge_sources","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"READ","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/source/website":{"post":{"operationId":"add_website_source","tags":["knowledge"],"summary":"Add a website source","description":"Add a website as a knowledge source for a hotel and queue its first scrape. An optional `syncSchedule` other than NONE needs the Maison-staff `schedules` WRITE grant (403 without it; the source is not created); otherwise set it later with `set_source_sync_schedule`. Returns the created source and whether the scrape was queued (`scrapeQueued` is false when the queue did not take it or the hotel's knowledge is managed manually).\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Composite of:** `set_source_sync_schedule`.\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_website_source","mcp":{"tool":"add_website_source","endpoint":"/mcp"},"a2a":{"skill":"add_website_source","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":["set_source_sync_schedule"],"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":2048,"format":"uri","description":"Website URL"},"updateClientWebsite":{"default":false,"description":"Make this the main knowledge website for the hotel","type":"boolean"},"language":{"description":"Scrape language hint, e.g. en","type":"string","maxLength":50},"syncSchedule":{"default":"NONE","description":"Automatic sync schedule; anything but NONE needs Maison-staff `schedules` WRITE","type":"string","enum":["NONE","DAILY","WEEKLY","BI_WEEKLY","MONTHLY"]}},"required":["domain"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/website/{websiteId}/main":{"patch":{"operationId":"set_main_website_source","tags":["knowledge"],"summary":"Set the main website source","description":"Mark a website source as the main knowledge website for the hotel. Only one website is the main source at a time. Use after adding multiple website sources to pick the canonical one.\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Website source id"},"description":"Website source id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_main_website_source","mcp":{"tool":"set_main_website_source","endpoint":"/mcp"},"a2a":{"skill":"set_main_website_source","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/website/{websiteId}/scrape":{"post":{"operationId":"scrape_website_source","tags":["knowledge"],"summary":"Scrape a website source now","description":"Queue an immediate scrape of a specific website source. Returns whether the pipeline task was accepted (queued). 409 when the source is disabled (`reactivate_source` first). Follow the run with `get_website_scrape` or `list_source_runs`.\n\n**Requires:** `document-source` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Website source id"},"description":"Website source id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"scrape_website_source","mcp":{"tool":"scrape_website_source","endpoint":"/mcp"},"a2a":{"skill":"scrape_website_source","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"EXECUTE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"description":"Language hint for this scrape run","type":"string","maxLength":50}},"additionalProperties":false}}}}},"get":{"operationId":"get_website_scrape","tags":["knowledge"],"summary":"Get a website scrape","description":"The latest scrape or sync of a linked website source, told step by step: status, the running step, countable progress, a bounded message log and stalled/stopped state; `scrape: null` when it never ran. Pass `sessionId` (a run from `list_source_runs`) to open that run instead. Use after `scrape_website_source` or `sync_source` to follow progress.\n\n**Requires:** `document-source` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Website source id"},"description":"Website source id"},{"name":"sessionId","in":"query","required":false,"schema":{"description":"A specific run; omit for the latest","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"A specific run; omit for the latest"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_website_scrape","mcp":{"tool":"get_website_scrape","endpoint":"/mcp"},"a2a":{"skill":"get_website_scrape","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"READ","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/source/website/{websiteId}/schedule":{"patch":{"operationId":"set_source_sync_schedule","tags":["knowledge"],"summary":"Set the sync schedule for a website source","description":"Change the automatic sync schedule for a website source (NONE, DAILY, WEEKLY, BI_WEEKLY, MONTHLY). Requires Maison-staff `schedules` WRITE in addition to `document-source` WRITE. Use `add_website_source` to create new sources (schedule is always NONE on creation).\n\n**Requires:** `document-source` WRITE (client), `schedules` WRITE (global). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","knowledge:write","schedules:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Website source id"},"description":"Website source id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_source_sync_schedule","mcp":{"tool":"set_source_sync_schedule","endpoint":"/mcp"},"a2a":{"skill":"set_source_sync_schedule","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"},{"feature":"schedules","level":"WRITE","scope":"global"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"syncSchedule":{"type":"string","enum":["NONE","DAILY","WEEKLY","BI_WEEKLY","MONTHLY"],"description":"New automatic sync schedule"}},"required":["syncSchedule"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/{kind}/{sourceId}/sync":{"post":{"operationId":"sync_source","tags":["knowledge"],"summary":"Sync a knowledge source","description":"Queue an on-demand sync for a website (`kind: website`) or document (`kind: document`) source. `language` applies to a website sync only. Returns whether the pipeline task was queued; 409 when the source is disabled (`reactivate_source` first).\n\n**Requires:** `document-source` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["website","document"],"description":"Source type"},"description":"Source type"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Website or document source id"},"description":"Website or document source id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"sync_source","mcp":{"tool":"sync_source","endpoint":"/mcp"},"a2a":{"skill":"sync_source","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"EXECUTE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"description":"Language for a website sync, e.g. en (ignored for documents)","type":"string","minLength":1,"maxLength":50}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/{kind}/{sourceId}":{"delete":{"operationId":"remove_source","tags":["knowledge"],"summary":"Remove a knowledge source","description":"Permanently remove a website (`kind: website`) or document (`kind: document`) source from a hotel. This deletes the source record and all associated scrape history. Irreversible.\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["website","document"],"description":"Source type"},"description":"Source type"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Website or document source id"},"description":"Website or document source id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_source","mcp":{"tool":"remove_source","endpoint":"/mcp"},"a2a":{"skill":"remove_source","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/source/document":{"post":{"operationId":"add_document_source","tags":["knowledge"],"summary":"Add a document source","description":"Add a document (PDF, DOCX, etc.) as a knowledge source and queue its ingestion. Send the file inline as canonical base64 (`bytesBase64`, ≤ 64 KiB decoded) or, for anything larger (≤ 50 MiB), PUT it to the URL from `create_document_upload` and pass that `uploadId` — exactly one of the two. A file attached to a Maison Agent message is staged for the person, not for a client: pass its `uploadId` with the `clientId` of any client the caller may write knowledge for (document-source WRITE) to add it there. Returns the document record and whether ingestion was queued.\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_document_source","mcp":{"tool":"add_document_source","endpoint":"/mcp"},"a2a":{"skill":"add_document_source","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the document"},"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Original filename"},"mimeType":{"type":"string","minLength":1,"maxLength":200,"description":"MIME type, e.g. application/pdf"},"bytesBase64":{"description":"File content as canonical base64 (≤ 64 KiB decoded). Give this OR `uploadId`, never both.","type":"string","minLength":1,"maxLength":87384},"uploadId":{"description":"Id from `create_document_upload` once the file was PUT to its URL (≤ 50 MiB). Give this OR `bytesBase64`, never both.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["name","filename","mimeType"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/document/{documentId}/version":{"post":{"operationId":"add_document_version","tags":["knowledge"],"summary":"Upload a new document version","description":"Upload a new version of an existing document source and queue its ingestion. Send the file inline as canonical base64 (`bytesBase64`, ≤ 64 KiB decoded) or pass the `uploadId` of a `create_document_upload` (≤ 50 MiB) — exactly one of the two. Returns the updated document record and whether ingestion was queued.\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Document source id"},"description":"Document source id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_document_version","mcp":{"tool":"add_document_version","endpoint":"/mcp"},"a2a":{"skill":"add_document_version","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Original filename"},"mimeType":{"type":"string","minLength":1,"maxLength":200,"description":"MIME type, e.g. application/pdf"},"bytesBase64":{"description":"File content as canonical base64 (≤ 64 KiB decoded). Give this OR `uploadId`, never both.","type":"string","minLength":1,"maxLength":87384},"uploadId":{"description":"Id from `create_document_upload` once the file was PUT to its URL (≤ 50 MiB). Give this OR `bytesBase64`, never both.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["filename","mimeType"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/document/{documentId}":{"patch":{"operationId":"rename_document_source","tags":["knowledge"],"summary":"Rename a document source","description":"Change the display name of a document source without changing its content or version.\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Document source id"},"description":"Document source id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"rename_document_source","mcp":{"tool":"rename_document_source","endpoint":"/mcp"},"a2a":{"skill":"rename_document_source","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"New display name"}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/document/{documentId}/versions":{"get":{"operationId":"list_document_versions","tags":["knowledge"],"summary":"List document versions","description":"List all versions of a document source, newest first. Use this before restoring or deleting a specific version.\n\n**Requires:** `document-source` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Document source id"},"description":"Document source id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_document_versions","mcp":{"tool":"list_document_versions","endpoint":"/mcp"},"a2a":{"skill":"list_document_versions","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"READ","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/source/document/{documentId}/version/{version}/restore":{"post":{"operationId":"restore_document_version","tags":["knowledge"],"summary":"Restore a document version","description":"Restore a previous version of a document source by creating a new version with the old content, then re-queueing ingestion. Returns the new version number and whether re-ingestion was queued.\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Document source id"},"description":"Document source id"},{"name":"version","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Version number to restore"},"description":"Version number to restore"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"restore_document_version","mcp":{"tool":"restore_document_version","endpoint":"/mcp"},"a2a":{"skill":"restore_document_version","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/document/{documentId}/version/{version}":{"delete":{"operationId":"delete_document_version","tags":["knowledge"],"summary":"Delete a document version","description":"Soft-delete a non-current version of a document. The current (newest) version cannot be deleted. Use this to remove old versions you no longer need.\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Document source id"},"description":"Document source id"},{"name":"version","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Version number to delete"},"description":"Version number to delete"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_document_version","mcp":{"tool":"delete_document_version","endpoint":"/mcp"},"a2a":{"skill":"delete_document_version","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/source/document/{documentId}/download":{"get":{"operationId":"download_document","tags":["knowledge"],"summary":"Download a document","description":"Download a document source. Up to 64 KiB the content comes back inline as canonical base64 (`bytesBase64`); above that the answer carries a short-lived presigned `downloadUrl` (GET it, no credentials) and its `expiresAt` instead. An optional `version` selects a specific revision; omit for the current version.\n\n**Requires:** `document-source` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Document source id"},"description":"Document source id"},{"name":"version","in":"query","required":false,"schema":{"description":"Version number; omit for the current version","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"description":"Version number; omit for the current version"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"download_document","mcp":{"tool":"download_document","endpoint":"/mcp"},"a2a":{"skill":"download_document","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"READ","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/source/{kind}/{sourceId}/disable":{"post":{"operationId":"disable_source","tags":["knowledge"],"summary":"Disable a knowledge source","description":"Disable a website (`kind: website`) or document (`kind: document`) source: it stays linked with its history, its answers are frozen (the agent stops using them; they cannot be edited, published or deleted) and it is left out of syncs. Reversible with `reactivate_source`, which restores every answer exactly as it was. Returns `{ disabled, changed, answers }`; `changed: false` when it was already disabled. 502 when the knowledge base did not take the change (nothing recorded; retry).\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["website","document"],"description":"Source type"},"description":"Source type"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Website id or document id"},"description":"Website id or document id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disable_source","mcp":{"tool":"disable_source","endpoint":"/mcp"},"a2a":{"skill":"disable_source","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/{kind}/{sourceId}/reactivate":{"post":{"operationId":"reactivate_source","tags":["knowledge"],"summary":"Reactivate a knowledge source","description":"Reactivate a disabled website or document source: its answers come back exactly as they were before `disable_source`, and syncs and rescrapes are allowed again. Returns `{ disabled, changed, answers }`; `changed: false` when it was already active. 502 when the knowledge base did not take the change (nothing recorded; retry).\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["website","document"],"description":"Source type"},"description":"Source type"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Website id or document id"},"description":"Website id or document id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"reactivate_source","mcp":{"tool":"reactivate_source","endpoint":"/mcp"},"a2a":{"skill":"reactivate_source","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/{sourceId}/runs":{"get":{"operationId":"list_source_runs","tags":["knowledge"],"summary":"List a source's runs","description":"The runs of one knowledge source, newest first: website scrapes and syncs or document ingestions, each with its steps, countable progress, who started it and its headline. `sourceId` is the source's `id` from `list_knowledge_sources` (the hotel's link to it). Page with `cursor` from `nextCursor`. Read a run's log lines with `get_source_run_logs`.\n\n**Requires:** `document-source` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The source's `id` from `list_knowledge_sources`"},"description":"The source's `id` from `list_knowledge_sources`"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size","type":"integer","minimum":1,"maximum":50},"description":"Page size"},{"name":"cursor","in":"query","required":false,"schema":{"description":"`nextCursor` of the previous page; omit for the first","type":"string","minLength":1,"maxLength":200},"description":"`nextCursor` of the previous page; omit for the first"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_source_runs","mcp":{"tool":"list_source_runs","endpoint":"/mcp"},"a2a":{"skill":"list_source_runs","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"READ","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/source/run/{sessionId}/logs":{"get":{"operationId":"get_source_run_logs","tags":["knowledge"],"summary":"Read a source run's log","description":"The log lines of one knowledge-source run (a `sessionId` from `list_source_runs`), oldest first, after line `after` (its `seq`; omit for the start). Poll with the returned `lastSeq` until `finished` is true. Each line's `data` is included only for callers with `document-source` WRITE.\n\n**Requires:** `document-source` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Run id from `list_source_runs`"},"description":"Run id from `list_source_runs`"},{"name":"after","in":"query","required":false,"schema":{"description":"Return lines after this `seq`","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Return lines after this `seq`"},{"name":"limit","in":"query","required":false,"schema":{"default":500,"description":"Most lines to return","type":"integer","minimum":1,"maximum":500},"description":"Most lines to return"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_source_run_logs","mcp":{"tool":"get_source_run_logs","endpoint":"/mcp"},"a2a":{"skill":"get_source_run_logs","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"READ","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/source/run/{sessionId}/report":{"get":{"operationId":"get_source_run_report","tags":["knowledge"],"summary":"Fetch a website run's report","description":"The report of one website scrape or sync run (a `sessionId` from `list_source_runs`): with `format: \"json\"` (default) the stored report (`summary`, `added`, `updated`, `deleted`, `merged`, `conflicts`, `unreadable`, `failedUpdates`, `needsRescrape`), `generatedAt` and `pdfUrl`, a download link for the PDF version valid for 15 minutes (null when no PDF was stored); with `format: \"pdf\"` only the download `url` and its `expiresAt`. 404 when the run is not a website run of this hotel, has no report yet, or (pdf) has no PDF.\n\n**Requires:** `document-source` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Run id from `list_source_runs`"},"description":"Run id from `list_source_runs`"},{"name":"format","in":"query","required":false,"schema":{"default":"json","description":"json: the report inline. pdf: a 15-minute download URL for the PDF version","type":"string","enum":["json","pdf"]},"description":"json: the report inline. pdf: a 15-minute download URL for the PDF version"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_source_run_report","mcp":{"tool":"get_source_run_report","endpoint":"/mcp"},"a2a":{"skill":"get_source_run_report","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"READ","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/source/website/{websiteId}/bookinglinks":{"post":{"operationId":"discover_booking_links","tags":["knowledge"],"summary":"Rediscover a website's booking links","description":"Re-run booking-link discovery for one website source without a full re-scrape — after the hotel changed booking engine, say. The pipeline is idempotent: an unchanged link costs nothing and hand-tuned booking instructions are kept. Returns 202 with whether the task was queued (`queued: false` with `reason: manual_knowledge` when the hotel's knowledge is managed manually). 409 when the source is disabled.\n\n**Requires:** `document-source` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Website source id"},"description":"Website source id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"discover_booking_links","mcp":{"tool":"discover_booking_links","endpoint":"/mcp"},"a2a":{"skill":"discover_booking_links","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"EXECUTE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/source/document/upload":{"post":{"operationId":"create_document_upload","tags":["knowledge"],"summary":"Start a document upload","description":"Get a presigned URL to upload a document larger than the 64 KiB inline limit (up to 50 MiB). PUT the raw file bytes to `url` with the returned `headers` before `expiresAt` (no credentials), then pass `uploadId` to `add_document_source` or `add_document_version`, which ingest it. An upload is bound to this hotel and is consumed by the call that ingests it.\n\n**Requires:** `document-source` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `document-source` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_document_upload","mcp":{"tool":"create_document_upload","endpoint":"/mcp"},"a2a":{"skill":"create_document_upload","endpoint":"/a2a"},"access":[{"feature":"document-source","level":"WRITE","scope":"client"}],"entitlement":"document-source","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mimeType":{"type":"string","minLength":1,"maxLength":200,"description":"MIME type of the file, e.g. application/pdf (sent back as the PUT Content-Type)"},"sizeBytes":{"type":"integer","minimum":1,"maximum":52428800,"description":"File size in bytes (at most 50 MiB)"}},"required":["mimeType","sizeBytes"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/qapairs":{"get":{"operationId":"list_qa_pairs","tags":["knowledge"],"summary":"List Q&A pairs","description":"Page through the Q&A knowledge base for a hotel with optional text search, source and origin filters, a creation-time window, publish-state filter, exact ids and sort. Returns a paginationToken when there are more results. Use `get_qa_pair` for a single item.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque pagination cursor from the previous page","type":"string"},"description":"Opaque pagination cursor from the previous page"},{"name":"search","in":"query","required":false,"schema":{"description":"Text search across question and answer","type":"string","maxLength":200},"description":"Text search across question and answer"},{"name":"sources","in":"query","required":false,"schema":{"description":"Filter by source ids (SHA-256 hex) or the special value 'manual'","type":"array","items":{"type":"string"}},"description":"Filter by source ids (SHA-256 hex) or the special value 'manual'"},{"name":"filterStatus","in":"query","required":false,"schema":{"description":"Filter by publish state","type":"string","enum":["published","unpublished"]},"description":"Filter by publish state"},{"name":"source","in":"query","required":false,"schema":{"description":"Filter by origin: website-sourced, document-sourced or written by a user","type":"string","enum":["Website","Document","User"]},"description":"Filter by origin: website-sourced, document-sourced or written by a user"},{"name":"createdFrom","in":"query","required":false,"schema":{"description":"Created at or after this time (epoch milliseconds)","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Created at or after this time (epoch milliseconds)"},{"name":"createdTo","in":"query","required":false,"schema":{"description":"Created at or before this time (epoch milliseconds)","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Created at or before this time (epoch milliseconds)"},{"name":"ids","in":"query","required":false,"schema":{"description":"Exact pair ids (1–50), e.g. a conversation turn's retrieval ids; without a sort the result keeps this order","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9-]{8,64}$"}},"description":"Exact pair ids (1–50), e.g. a conversation turn's retrieval ids; without a sort the result keeps this order"},{"name":"includeDeleted","in":"query","required":false,"schema":{"default":false,"description":"Include soft-deleted pairs","type":"boolean"},"description":"Include soft-deleted pairs"},{"name":"sortBy","in":"query","required":false,"schema":{"description":"Sort field","type":"string","enum":["version","created","updated","source","status"]},"description":"Sort field"},{"name":"sortDir","in":"query","required":false,"schema":{"description":"Sort direction (default: descending)","type":"string","enum":["ascending","descending"]},"description":"Sort direction (default: descending)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_qa_pairs","mcp":{"tool":"list_qa_pairs","endpoint":"/mcp"},"a2a":{"skill":"list_qa_pairs","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"post":{"operationId":"add_qa_pairs","tags":["knowledge"],"summary":"Add Q&A pairs","description":"Create one or more Q&A pairs. When `publish` is true, pairs are published immediately after creation. Returns the raw llm-service response. Use `publish_qa_pairs` separately to publish later.\n\n**Requires:** `qa-editor` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_qa_pairs","mcp":{"tool":"add_qa_pairs","endpoint":"/mcp"},"a2a":{"skill":"add_qa_pairs","endpoint":"/a2a"},"access":[{"feature":"qa-editor","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":5000},"answer":{"type":"string","minLength":1,"maxLength":50000}},"required":["question","answer"]},"description":"Q&A pairs to create"},"publish":{"default":false,"description":"Publish each pair immediately after creation","type":"boolean"}},"required":["items"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/qapair/{qaId}":{"get":{"operationId":"get_qa_pair","tags":["knowledge"],"summary":"Get a Q&A pair","description":"Fetch a single Q&A pair by id. 404 when the id is unknown or the record is deleted. Use `list_qa_pairs` to search.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9-]{8,64}$","description":"Q&A pair id (UUID or legacy 24-hex)"},"description":"Q&A pair id (UUID or legacy 24-hex)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_qa_pair","mcp":{"tool":"get_qa_pair","endpoint":"/mcp"},"a2a":{"skill":"get_qa_pair","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_qa_pair","tags":["knowledge"],"summary":"Update a Q&A pair","description":"Change the question, the answer or both of an existing Q&A pair. A field left out keeps its stored value (the pair is read and merged for you); give at least one. 404 when the pair is unknown or deleted, 409 when its source is disabled.\n\n**Requires:** `qa-editor` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9-]{8,64}$","description":"Q&A pair id (UUID or legacy 24-hex)"},"description":"Q&A pair id (UUID or legacy 24-hex)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_qa_pair","mcp":{"tool":"update_qa_pair","endpoint":"/mcp"},"a2a":{"skill":"update_qa_pair","endpoint":"/a2a"},"access":[{"feature":"qa-editor","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"description":"New question text","type":"string","minLength":1,"maxLength":5000},"answer":{"description":"New answer text","type":"string","minLength":1,"maxLength":50000}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/qapairs/counts":{"get":{"operationId":"get_qa_counts","tags":["knowledge"],"summary":"Q&A counts","description":"Active, deleted and total Q&A pair counts for a hotel's knowledge base. Use as a quick health check before listing or as a dashboard metric.\n\n**Requires:** `qa-editor` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_qa_counts","mcp":{"tool":"get_qa_counts","endpoint":"/mcp"},"a2a":{"skill":"get_qa_counts","endpoint":"/a2a"},"access":[{"feature":"qa-editor","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/qapairs/delete":{"post":{"operationId":"delete_qa_pairs","tags":["knowledge"],"summary":"Delete Q&A pairs","description":"Soft-delete one or more Q&A pairs by id. Deleted pairs are hidden from `list_qa_pairs` by default but visible with `includeDeleted: true`.\n\n**Requires:** `qa-editor` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_qa_pairs","mcp":{"tool":"delete_qa_pairs","endpoint":"/mcp"},"a2a":{"skill":"delete_qa_pairs","endpoint":"/a2a"},"access":[{"feature":"qa-editor","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9-]{8,64}$"},"description":"Q&A pair ids"}},"required":["ids"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/qapairs/publish":{"post":{"operationId":"publish_qa_pairs","tags":["knowledge"],"summary":"Publish Q&A pairs","description":"Publish one or more Q&A pairs so the chat agent uses them. Returns succeeded and failed id lists. Use `unpublish_qa_pairs` to revert.\n\n**Requires:** `qa-editor` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"publish_qa_pairs","mcp":{"tool":"publish_qa_pairs","endpoint":"/mcp"},"a2a":{"skill":"publish_qa_pairs","endpoint":"/a2a"},"access":[{"feature":"qa-editor","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9-]{8,64}$"},"description":"Q&A pair ids"}},"required":["ids"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/qapairs/unpublish":{"post":{"operationId":"unpublish_qa_pairs","tags":["knowledge"],"summary":"Unpublish Q&A pairs","description":"Unpublish one or more Q&A pairs so the agent no longer uses them without deleting them. Returns succeeded and failed id lists.\n\n**Requires:** `qa-editor` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"unpublish_qa_pairs","mcp":{"tool":"unpublish_qa_pairs","endpoint":"/mcp"},"a2a":{"skill":"unpublish_qa_pairs","endpoint":"/a2a"},"access":[{"feature":"qa-editor","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9-]{8,64}$"},"description":"Q&A pair ids"}},"required":["ids"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/qapair/{qaId}/versions":{"get":{"operationId":"list_qa_versions","tags":["knowledge"],"summary":"List Q&A version history","description":"Page through the version history of a Q&A pair (DynamoDB-backed audit log), newest first. Each version names its `actor`: the person whose edit wrote it (`kind: \"person\"`, `userId`, `name`), or the run that did (`kind` sync, scrape, rescrape, ingestion, dedup, quality or run, with its `sessionId` and the `websiteId` or `documentId` it read). Use `restore_qa_version` to roll back to a previous version.\n\n**Requires:** `clients` READ (client), `qa-editor` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read","knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9-]{8,64}$","description":"Q&A pair id (UUID or legacy 24-hex)"},"description":"Q&A pair id (UUID or legacy 24-hex)"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_qa_versions","mcp":{"tool":"list_qa_versions","endpoint":"/mcp"},"a2a":{"skill":"list_qa_versions","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"},{"feature":"qa-editor","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/qapair/{qaId}/version/{version}/restore":{"post":{"operationId":"restore_qa_version","tags":["knowledge"],"summary":"Restore a Q&A version","description":"Restore a Q&A pair to a previous version by copying its question and answer into a new update. Fetch the version history with `list_qa_versions` first to find the target version number.\n\n**Requires:** `clients` READ (client), `qa-editor` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read","knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"qaId","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9-]{8,64}$","description":"Q&A pair id (UUID or legacy 24-hex)"},"description":"Q&A pair id (UUID or legacy 24-hex)"},{"name":"version","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Version number to restore"},"description":"Version number to restore"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"restore_qa_version","mcp":{"tool":"restore_qa_version","endpoint":"/mcp"},"a2a":{"skill":"restore_qa_version","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"},{"feature":"qa-editor","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/knowledgegaps":{"get":{"operationId":"list_knowledge_gaps","tags":["knowledge"],"summary":"List knowledge gaps","description":"List unanswered questions detected in guest chat sessions, ordered by occurrence count. Includes the last gap-detection run. Use `answer_knowledge_gap` or `dismiss_knowledge_gap` to resolve them.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `unanswered-questions` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"status","in":"query","required":false,"schema":{"description":"Filter by status; CLOSED = ANSWERED + DISMISSED","type":"string","enum":["OPEN","ANSWERED","DISMISSED","CLOSED"]},"description":"Filter by status; CLOSED = ANSWERED + DISMISSED"},{"name":"limit","in":"query","required":false,"schema":{"description":"Page size (default 50, max 200)","type":"integer","minimum":1,"maximum":200},"description":"Page size (default 50, max 200)"},{"name":"paginationToken","in":"query","required":false,"schema":{"description":"Opaque pagination cursor","type":"string"},"description":"Opaque pagination cursor"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_knowledge_gaps","mcp":{"tool":"list_knowledge_gaps","endpoint":"/mcp"},"a2a":{"skill":"list_knowledge_gaps","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":"unanswered-questions","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/knowledgegaps/detect":{"post":{"operationId":"detect_knowledge_gaps","tags":["knowledge"],"summary":"Detect knowledge gaps","description":"Start a manual knowledge-gap detection run for a hotel and return at once (202 `{ queued: true }`); the run analyses recent guest chats in the background and inserts or updates gap records. Follow it with `list_knowledge_gaps` (its `lastSession`).\n\n**Requires:** `clients` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `unanswered-questions` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"detect_knowledge_gaps","mcp":{"tool":"detect_knowledge_gaps","endpoint":"/mcp"},"a2a":{"skill":"detect_knowledge_gaps","endpoint":"/a2a"},"access":[{"feature":"clients","level":"EXECUTE","scope":"client"}],"entitlement":"unanswered-questions","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/knowledgegap/{gapId}/answer":{"post":{"operationId":"answer_knowledge_gap","tags":["knowledge"],"summary":"Answer a knowledge gap","description":"Answer an open knowledge gap and mark it ANSWERED. Either give `answer` (optionally with a reworded `question`; the gap's own question otherwise) and a new Q&A pair is created, or give `qaId` to link a pair that already answers it (nothing is created). 409 if the gap is already resolved.\n\n**Requires:** `qa-editor` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `unanswered-questions` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"gapId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Knowledge gap id"},"description":"Knowledge gap id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"answer_knowledge_gap","mcp":{"tool":"answer_knowledge_gap","endpoint":"/mcp"},"a2a":{"skill":"answer_knowledge_gap","endpoint":"/a2a"},"access":[{"feature":"qa-editor","level":"WRITE","scope":"client"}],"entitlement":"unanswered-questions","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"description":"Answer text for a new Q&A pair (omit when linking `qaId`)","type":"string","minLength":1,"maxLength":50000},"question":{"description":"Question for the new pair; defaults to the gap's question","type":"string","minLength":1,"maxLength":5000},"qaId":{"description":"Link this existing Q&A pair instead of creating one (no `answer`/`question`)","type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9-]{8,64}$"}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/knowledgegap/{gapId}/dismiss":{"post":{"operationId":"dismiss_knowledge_gap","tags":["knowledge"],"summary":"Dismiss a knowledge gap","description":"Mark an open knowledge gap as DISMISSED without creating a Q&A pair; 404 unknown, 409 already resolved. Pass `gapIds` to dismiss more gaps in the same call: the answer then lists `dismissed`, `notFound` and `conflicts` per id instead of failing. Use `answer_knowledge_gap` to resolve it with new knowledge, `reopen_knowledge_gap` to undo.\n\n**Requires:** `qa-editor` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `unanswered-questions` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"gapId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Knowledge gap id"},"description":"Knowledge gap id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"dismiss_knowledge_gap","mcp":{"tool":"dismiss_knowledge_gap","endpoint":"/mcp"},"a2a":{"skill":"dismiss_knowledge_gap","endpoint":"/a2a"},"access":[{"feature":"qa-editor","level":"WRITE","scope":"client"}],"entitlement":"unanswered-questions","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"gapIds":{"description":"More gap ids to dismiss with this one (bulk; per-id outcome)","minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/knowledgegap/{gapId}/reopen":{"post":{"operationId":"reopen_knowledge_gap","tags":["knowledge"],"summary":"Reopen a knowledge gap","description":"Move an answered or dismissed knowledge gap back to OPEN, clearing its resolution (the Q&A pair that answered it is kept). Reopening an open gap simply restamps it. Returns the gap as it now stands; 404 when it is not this hotel's.\n\n**Requires:** `qa-editor` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `unanswered-questions` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"gapId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Knowledge gap id"},"description":"Knowledge gap id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"reopen_knowledge_gap","mcp":{"tool":"reopen_knowledge_gap","endpoint":"/mcp"},"a2a":{"skill":"reopen_knowledge_gap","endpoint":"/a2a"},"access":[{"feature":"qa-editor","level":"WRITE","scope":"client"}],"entitlement":"unanswered-questions","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/qapairs/deduplicate":{"post":{"operationId":"deduplicate_knowledge","tags":["knowledge"],"summary":"Deduplicate knowledge base","description":"Start a deduplication run: a pipeline task that finds and merges near-duplicate Q&A pairs in the knowledge base, optionally with a `similarityThreshold` (0–1) and `batchSize`. Requires `deduplication` EXECUTE. Returns the run's `sessionId`; follow it with `get_knowledge_quality_run` (steps, then the report with answers before, after and removed) and read its log with `get_source_run_logs`. Recorded in the hotel's activity.\n\n**Requires:** `deduplication` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `deduplication` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"deduplicate_knowledge","mcp":{"tool":"deduplicate_knowledge","endpoint":"/mcp"},"a2a":{"skill":"deduplicate_knowledge","endpoint":"/a2a"},"access":[{"feature":"deduplication","level":"EXECUTE","scope":"client"}],"entitlement":"deduplication","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"similarityThreshold":{"description":"How alike two pairs must be to count as duplicates (0–1)","type":"number","minimum":0,"maximum":1},"batchSize":{"description":"Pairs compared per batch","type":"integer","minimum":1,"maximum":9007199254740991}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/qapairs/consistencycheck":{"post":{"operationId":"check_knowledge_consistency","tags":["knowledge"],"summary":"Check knowledge consistency","description":"Start a consistency-check run: a pipeline task that checks Q&A pairs for answers that conflict or are ambiguous. Requires `consistency-check` EXECUTE. Returns the run's `sessionId`; follow it with `get_knowledge_quality_run` (steps, then the report listing each conflict and ambiguity) and read its log with `get_source_run_logs`. Recorded in the hotel's activity.\n\n**Requires:** `consistency-check` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `consistency-check` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"check_knowledge_consistency","mcp":{"tool":"check_knowledge_consistency","endpoint":"/mcp"},"a2a":{"skill":"check_knowledge_consistency","endpoint":"/a2a"},"access":[{"feature":"consistency-check","level":"EXECUTE","scope":"client"}],"entitlement":"consistency-check","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/knowledge/quality/runs":{"get":{"operationId":"list_knowledge_quality_runs","tags":["knowledge"],"summary":"List knowledge quality runs","description":"The hotel's deduplication and consistency-check runs, newest first: each with its kind, status, steps, countable progress, who started it, its headline and, once reported, the report's summary and counts (conflicts and ambiguities, or answers before, after and removed). Page with `cursor` from `nextCursor`. Open one with `get_knowledge_quality_run`.\n\n**Requires:** `test-session` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `test-session` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size","type":"integer","minimum":1,"maximum":50},"description":"Page size"},{"name":"cursor","in":"query","required":false,"schema":{"description":"`nextCursor` of the previous page; omit for the first","type":"string","minLength":1,"maxLength":200},"description":"`nextCursor` of the previous page; omit for the first"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_knowledge_quality_runs","mcp":{"tool":"list_knowledge_quality_runs","endpoint":"/mcp"},"a2a":{"skill":"list_knowledge_quality_runs","endpoint":"/a2a"},"access":[{"feature":"test-session","level":"READ","scope":"client"}],"entitlement":"test-session","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/knowledge/quality/run/{sessionId}":{"get":{"operationId":"get_knowledge_quality_run","tags":["knowledge"],"summary":"Get a knowledge quality run","description":"One deduplication or consistency-check run (a `sessionId` from `deduplicate_knowledge`, `check_knowledge_consistency` or `list_knowledge_quality_runs`) with its full report: for a consistency check each conflict and ambiguity (the questions involved, why, and the Q&A pair ids when known); for a deduplication the answer counts at each stage. `report` is null until the run reported. 404 when the run is not this hotel's.\n\n**Requires:** `test-session` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `test-session` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Run id from `list_knowledge_quality_runs`"},"description":"Run id from `list_knowledge_quality_runs`"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_knowledge_quality_run","mcp":{"tool":"get_knowledge_quality_run","endpoint":"/mcp"},"a2a":{"skill":"get_knowledge_quality_run","endpoint":"/a2a"},"access":[{"feature":"test-session","level":"READ","scope":"client"}],"entitlement":"test-session","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/message":{"post":{"operationId":"send_message","tags":["conversations"],"summary":"Send a message to the hotel concierge","description":"Send one message to a hotel's AI concierge (the same brain as the guest chat widget) as an operator and receive its reply. Optionally supply a sessionId to continue a prior conversation; omit it to start a new one. Returns the reply text, its type, the sessionId to continue with, and whether a new session was created. Use get_conversation to read the full transcript of a session.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"send_message","mcp":{"tool":"send_message","endpoint":"/mcp"},"a2a":{"skill":"send_message","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000,"description":"The message text to send to the hotel concierge"},"sessionId":{"description":"Existing session id to continue; omit to start a new conversation","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"locale":{"description":"BCP 47 locale hint, e.g. en-US; omit for the client default","type":"string","maxLength":20}},"required":["message"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/conversation/{sessionId}":{"get":{"operationId":"get_conversation","tags":["conversations"],"summary":"Get a conversation session","description":"Retrieve a full chat session transcript from DynamoDB by session id. Returns the raw session record including all messages, timestamps, and session metadata. Use list_conversations to browse multiple sessions; this fetches a single known session.\n\n**Requires:** `chat-logs` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})$","description":"The web UUID or channel 32-hex session id to retrieve"},"description":"The web UUID or channel 32-hex session id to retrieve"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_conversation","mcp":{"tool":"get_conversation","endpoint":"/mcp"},"a2a":{"skill":"get_conversation","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/conversations/search":{"get":{"operationId":"search_conversations","tags":["conversations"],"summary":"Search conversation topics","description":"Find a hotel's conversations by the meaning of guest-visible messages. Returns session references and semantic relevance scores, not transcripts. Use get_conversation to read a result.\n\n**Requires:** `chat-logs` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":500}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":20}},{"name":"channel","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":32}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"search_conversations","mcp":{"tool":"search_conversations","endpoint":"/mcp"},"a2a":{"skill":"search_conversations","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/conversations":{"get":{"operationId":"list_conversations","tags":["conversations"],"summary":"List conversation sessions","description":"Return raw chat session rows for a client within a date window. Defaults to the last 7 days. Optionally filter out admin, test and fresh (first-message-only) sessions. Returns items, total count and the window used. Use export_chat_logs for an XLSX workbook or get_conversation for a single session. For operator work (who holds a conversation, unread and attention, one row per conversation) use list_conversation_inbox instead.\n\n**Requires:** `chat-logs` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"from","in":"query","required":false,"schema":{"description":"Window start as ISO 8601 datetime or epoch ms; default 7 days ago","type":"string"},"description":"Window start as ISO 8601 datetime or epoch ms; default 7 days ago"},{"name":"to","in":"query","required":false,"schema":{"description":"Window end as ISO 8601 datetime or epoch ms; default now","type":"string"},"description":"Window end as ISO 8601 datetime or epoch ms; default now"},{"name":"limit","in":"query","required":false,"schema":{"default":100,"description":"Maximum number of rows to return (1–500)","type":"integer","minimum":1,"maximum":500},"description":"Maximum number of rows to return (1–500)"},{"name":"skipAdmin","in":"query","required":false,"schema":{"description":"Exclude sessions created by authenticated operators","type":"boolean"},"description":"Exclude sessions created by authenticated operators"},{"name":"skipTestSessions","in":"query","required":false,"schema":{"description":"Exclude test sessions","type":"boolean"},"description":"Exclude test sessions"},{"name":"skipFresh","in":"query","required":false,"schema":{"description":"Exclude sessions with only one message","type":"boolean"},"description":"Exclude sessions with only one message"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_conversations","mcp":{"tool":"list_conversations","endpoint":"/mcp"},"a2a":{"skill":"list_conversations","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/conversations/export":{"get":{"operationId":"export_chat_logs","tags":["conversations"],"summary":"Export chat logs as XLSX","description":"Export a hotel's conversation history as a base64-encoded XLSX workbook. Includes channel attribution and routed multi-property sessions. Returns filename, MIME type and base64 bytes. Throws a 413 error when the workbook exceeds 8 MiB; use a shorter date window. list_conversations returns the same rows as JSON.\n\n**Requires:** `chat-logs` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","description":"Export window start as ISO 8601 date or datetime (e.g. 2024-01-01)"},"description":"Export window start as ISO 8601 date or datetime (e.g. 2024-01-01)"},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","description":"Export window end as ISO 8601 date or datetime"},"description":"Export window end as ISO 8601 date or datetime"},{"name":"skipAdmin","in":"query","required":false,"schema":{"description":"Exclude sessions created by authenticated operators","type":"boolean"},"description":"Exclude sessions created by authenticated operators"},{"name":"skipTestSessions","in":"query","required":false,"schema":{"description":"Exclude test sessions","type":"boolean"},"description":"Exclude test sessions"},{"name":"skipFresh","in":"query","required":false,"schema":{"description":"Exclude sessions with only one message","type":"boolean"},"description":"Exclude sessions with only one message"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"export_chat_logs","mcp":{"tool":"export_chat_logs","endpoint":"/mcp"},"a2a":{"skill":"export_chat_logs","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/conversations/questions":{"get":{"operationId":"get_common_questions","tags":["conversations"],"summary":"Most common guest questions","description":"What guests actually ask a hotel's concierge: every guest message in a date window, grouped by normalised wording and ranked by how often it was asked and in how many conversations. Use it to build or refresh a website FAQ, to spot recurring topics (amenities, booking dates, parking, check-in), or to decide what knowledge to add. Combine with list_knowledge_gaps (questions the concierge could not answer) and add_qa_pairs to publish the answers. Defaults to the last 30 days.\n\n**Requires:** `chat-logs` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"from","in":"query","required":false,"schema":{"description":"Window start as ISO 8601 datetime or epoch ms; default 30 days ago","type":"string"},"description":"Window start as ISO 8601 datetime or epoch ms; default 30 days ago"},{"name":"to","in":"query","required":false,"schema":{"description":"Window end as ISO 8601 datetime or epoch ms; default now","type":"string"},"description":"Window end as ISO 8601 datetime or epoch ms; default now"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"How many question groups to return (1–200)","type":"integer","minimum":1,"maximum":200},"description":"How many question groups to return (1–200)"},{"name":"search","in":"query","required":false,"schema":{"description":"Only questions containing this text (case-insensitive), e.g. parking","type":"string","maxLength":100},"description":"Only questions containing this text (case-insensitive), e.g. parking"},{"name":"minLength","in":"query","required":false,"schema":{"default":8,"description":"Ignore guest messages shorter than this many characters","type":"integer","minimum":1,"maximum":200},"description":"Ignore guest messages shorter than this many characters"},{"name":"skipAdmin","in":"query","required":false,"schema":{"default":true,"description":"Exclude operator test chats","type":"boolean"},"description":"Exclude operator test chats"},{"name":"skipTestSessions","in":"query","required":false,"schema":{"default":true,"description":"Exclude automated test sessions","type":"boolean"},"description":"Exclude automated test sessions"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_common_questions","mcp":{"tool":"get_common_questions","endpoint":"/mcp"},"a2a":{"skill":"get_common_questions","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/conversations/inbox":{"get":{"operationId":"list_conversation_inbox","tags":["conversations"],"summary":"List a hotel's conversation inbox","description":"One summary per guest conversation for a hotel, newest activity first: channel, message count, first and latest message preview, topic, whether the guest is identified (`guestLinked`; the identity itself needs get_conversation_guest and the guest-identity grant), who holds it (agent or an operator), unread count and attention flag. Filter by date window, channel, operator-held, needing attention or unread; page with `cursor` (the previous page's `nextCursor`). Use this for operator work; list_conversations returns raw message rows instead, and get_conversation reads one transcript.\n\n**Requires:** `chat-logs` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"from","in":"query","required":false,"schema":{"description":"Last activity on or after this ISO 8601 datetime","type":"string"},"description":"Last activity on or after this ISO 8601 datetime"},{"name":"to","in":"query","required":false,"schema":{"description":"Last activity on or before this ISO 8601 datetime","type":"string"},"description":"Last activity on or before this ISO 8601 datetime"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"cursor","in":"query","required":false,"schema":{"description":"nextCursor from the previous page","type":"string","minLength":1,"maxLength":512},"description":"nextCursor from the previous page"},{"name":"channel","in":"query","required":false,"schema":{"description":"Only this channel, e.g. web, whatsapp","type":"string","minLength":1,"maxLength":64},"description":"Only this channel, e.g. web, whatsapp"},{"name":"mode","in":"query","required":false,"schema":{"description":"operator: only conversations an operator holds","type":"string","enum":["operator"]},"description":"operator: only conversations an operator holds"},{"name":"attention","in":"query","required":false,"schema":{"description":"true: only conversations flagged for attention","type":"boolean"},"description":"true: only conversations flagged for attention"},{"name":"unread","in":"query","required":false,"schema":{"description":"true: only conversations with unread guest messages","type":"boolean"},"description":"true: only conversations with unread guest messages"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_conversation_inbox","mcp":{"tool":"list_conversation_inbox","endpoint":"/mcp"},"a2a":{"skill":"list_conversation_inbox","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/conversations/recent":{"get":{"operationId":"list_recent_conversations","tags":["conversations"],"summary":"List recent conversations across hotels","description":"The most recently active guest conversations across every hotel you can read conversations of (or the `clientIds` you name), newest first, each with its hotel id and name, preview, topic, guest name (null for a hotel where you lack guest-identity access), who holds it, unread count and attention. Also returns `clients`, the hotels that have conversations (for a filter). Use list_conversation_inbox for one hotel with paging.\n\n**Requires:** `chat-logs` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[{"name":"clientIds","in":"query","required":false,"schema":{"description":"Only these hotels (at most 25); intersected with the hotels you can read","maxItems":25,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"description":"Only these hotels (at most 25); intersected with the hotels you can read"},{"name":"from","in":"query","required":false,"schema":{"description":"Last activity on or after","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"Last activity on or after"},{"name":"to","in":"query","required":false,"schema":{"description":"Last activity before","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"Last activity before"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"How many conversations (1–100)","type":"integer","minimum":1,"maximum":100},"description":"How many conversations (1–100)"},{"name":"channel","in":"query","required":false,"schema":{"description":"Only this channel","type":"string","minLength":1,"maxLength":64},"description":"Only this channel"},{"name":"unread","in":"query","required":false,"schema":{"description":"true: only conversations with unread guest messages","type":"boolean"},"description":"true: only conversations with unread guest messages"},{"name":"attention","in":"query","required":false,"schema":{"description":"true: only conversations flagged for attention","type":"boolean"},"description":"true: only conversations flagged for attention"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_recent_conversations","mcp":{"tool":"list_recent_conversations","endpoint":"/mcp"},"a2a":{"skill":"list_recent_conversations","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/conversations/attention":{"get":{"operationId":"get_conversation_attention","tags":["conversations"],"summary":"Count conversations needing an operator","description":"How many guest conversations need an operator across the hotels you can read (or the `clientIds` you name): `needsOperator` (unread or flagged), `unread`, `flagged`, and the same per hotel in `byClient`. Every number counts conversations, not messages. Use list_recent_conversations with `unread` or `attention` to list them.\n\n**Requires:** `chat-logs` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["conversations:read"]}],"parameters":[{"name":"clientIds","in":"query","required":false,"schema":{"description":"Only these hotels (at most 25); intersected with the hotels you can read","maxItems":25,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"description":"Only these hotels (at most 25); intersected with the hotels you can read"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_conversation_attention","mcp":{"tool":"get_conversation_attention","endpoint":"/mcp"},"a2a":{"skill":"get_conversation_attention","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/conversation/{sessionId}/mode":{"put":{"operationId":"set_conversation_mode","tags":["conversations"],"summary":"Take over or hand back a conversation","description":"Switch who answers a guest conversation: `operator` takes it over (the agent stops replying to the guest; you reply with reply_to_conversation), `agent` hands it back and the agent answers whatever the guest asked while it was held. Records the takeover or hand-back in the hotel's activity feed, tells a web-chat guest that a team member joined or left, and updates the console live. Idempotent and atomic: asking for the mode the conversation is already in changes nothing (`changed: false`), and of two simultaneous changes only one takes effect; a takeover that another operator won, or already holds, is 409 (`mode_conflict`, with the mode and operator now holding it). Returns the mode, the operator name recorded (the current holder's when unchanged, null when the agent holds it) and `changed`.\n\n**Requires:** `chat-logs` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","conversations:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})$","description":"The web UUID or channel 32-hex conversation id"},"description":"The web UUID or channel 32-hex conversation id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_conversation_mode","mcp":{"tool":"set_conversation_mode","endpoint":"/mcp"},"a2a":{"skill":"set_conversation_mode","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"WRITE","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["agent","operator"],"description":"operator: take over; agent: hand back"}},"required":["mode"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/conversation/{sessionId}/reply":{"post":{"operationId":"reply_to_conversation","tags":["conversations"],"summary":"Reply to a guest as an operator","description":"Send a message to the guest in a conversation as yourself (an operator), delivered on the conversation's channel (web chat, WhatsApp, Instagram, Messenger, email). A reply is a takeover: when the agent is still answering, the conversation is taken over first (as set_conversation_mode with `operator`) so the agent and you never both answer the guest; `tookOver` says whether it happened. The guest sees your first name on the reply. Clears your unread count for it. 409 when the channel cannot be reached. Use whisper_to_agent to instruct the agent privately instead.\n\n**Requires:** `chat-logs` EXECUTE (client). All are required (403 otherwise).\n\n**Composite of:** `set_conversation_mode`.\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","conversations:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})$","description":"The web UUID or channel 32-hex conversation id"},"description":"The web UUID or channel 32-hex conversation id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"reply_to_conversation","mcp":{"tool":"reply_to_conversation","endpoint":"/mcp"},"a2a":{"skill":"reply_to_conversation","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"EXECUTE","scope":"client"}],"entitlement":"chat-logs","composite":["set_conversation_mode"],"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4096,"description":"The message the guest receives"},"takeOver":{"default":false,"description":"Accepted for compatibility and no longer needed: every reply takes the conversation over while the agent is answering","type":"boolean"}},"required":["text"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/conversation/{sessionId}/whisper":{"post":{"operationId":"whisper_to_agent","tags":["conversations"],"summary":"Whisper an instruction to the agent","description":"Send a private instruction to the agent in a guest conversation (the guest never sees it); the agent answers the guest with it in mind. Needs a live agent: 409 (`operator_mode`) while the conversation is taken over. Returns 202 with a `whisperId` at once: on web chat the agent's reply follows asynchronously, on WhatsApp, Instagram and Messenger it is delivered before the call returns, and 409 (`agent_unavailable`) when the agent could not answer there (nothing reaches the guest). 409 on email conversations (no route) and on a signed-in guest's web chat (take over and reply_to_conversation instead). Stop it with stop_conversation_turn (`kind: whisper`).\n\n**Requires:** `chat-logs` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","conversations:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})$","description":"The web UUID or channel 32-hex conversation id"},"description":"The web UUID or channel 32-hex conversation id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"whisper_to_agent","mcp":{"tool":"whisper_to_agent","endpoint":"/mcp"},"a2a":{"skill":"whisper_to_agent","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"EXECUTE","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4096,"description":"The instruction for the agent"}},"required":["text"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/conversation/{sessionId}/turn/{turnId}/stop":{"post":{"operationId":"stop_conversation_turn","tags":["conversations"],"summary":"Stop the agent's turn in a conversation","description":"Stop the agent while it is working on a turn: its reply is discarded and the agent run is cancelled. `kind: guest` stops a turn answering a guest message (turnId from the live thinking event), `kind: whisper` stops the turn a whisper started (the whisperId from whisper_to_agent). Returns `{ stopped: true }`.\n\n**Requires:** `chat-logs` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","conversations:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})$","description":"The web UUID or channel 32-hex conversation id"},"description":"The web UUID or channel 32-hex conversation id"},{"name":"turnId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The turn id, or the whisperId for a whisper"},"description":"The turn id, or the whisperId for a whisper"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"stop_conversation_turn","mcp":{"tool":"stop_conversation_turn","endpoint":"/mcp"},"a2a":{"skill":"stop_conversation_turn","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"WRITE","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"default":"guest","description":"What started the turn","type":"string","enum":["guest","whisper"]}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/conversation/{sessionId}/read":{"post":{"operationId":"mark_conversation_read","tags":["conversations"],"summary":"Mark a conversation read","description":"Mark a guest conversation read: clears its unread count and attention, resolves its shared attention notice and catches up your guest-message notices. Does not change who holds the conversation. Returns `cleared`, the unread count that was cleared (0 when nothing was unread).\n\n**Requires:** `chat-logs` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-logs` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","conversations:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})$","description":"The web UUID or channel 32-hex conversation id"},"description":"The web UUID or channel 32-hex conversation id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"mark_conversation_read","mcp":{"tool":"mark_conversation_read","endpoint":"/mcp"},"a2a":{"skill":"mark_conversation_read","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"WRITE","scope":"client"}],"entitlement":"chat-logs","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/conversation/{sessionId}/guest":{"get":{"operationId":"get_conversation_guest","tags":["conversations"],"summary":"Get the guest behind a conversation","description":"The known guest behind a conversation: `guestRef` (a guest id, or `identity:<id>` for a guest known only by a claimed email or phone), display name, the decrypted identities (kind and value) and how many conversations they have at the hotel. Needs guest-identity access (separate from conversation access). 404 when the conversation has no linked guest. Use list_guest_conversations with the guestRef for their other conversations.\n\n**Requires:** `chat-logs` READ (client), `guest-identity` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `guest-identity` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","conversations:read","guest-identity:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})$","description":"The web UUID or channel 32-hex conversation id"},"description":"The web UUID or channel 32-hex conversation id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_conversation_guest","mcp":{"tool":"get_conversation_guest","endpoint":"/mcp"},"a2a":{"skill":"get_conversation_guest","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"client"},{"feature":"guest-identity","level":"READ","scope":"client"}],"entitlement":"guest-identity","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/guest/{guestRef}/conversations":{"get":{"operationId":"list_guest_conversations","tags":["conversations"],"summary":"List one guest's conversations","description":"Every conversation of one guest at a hotel, newest activity first: session id, channel, started and last activity times, message count and the first guest message (120 characters). `guestRef` comes from get_conversation_guest. Needs guest-identity access. Use get_conversation to read one.\n\n**Requires:** `chat-logs` READ (client), `guest-identity` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `guest-identity` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","conversations:read","guest-identity:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"guestRef","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:identity:)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"A guest id or identity:<id>"},"description":"A guest id or identity:<id>"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_guest_conversations","mcp":{"tool":"list_guest_conversations","endpoint":"/mcp"},"a2a":{"skill":"list_guest_conversations","endpoint":"/a2a"},"access":[{"feature":"chat-logs","level":"READ","scope":"client"},{"feature":"guest-identity","level":"READ","scope":"client"}],"entitlement":"guest-identity","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/users":{"get":{"operationId":"list_users","tags":["users"],"summary":"List users","description":"Page through every Maison user with optional search, status filter, and sort. Returns masked API-key counts but never raw keys. Use `get_user` for the full profile of one user.\n\n**Requires:** `maison-users` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"},{"name":"search","in":"query","required":false,"schema":{"description":"Case-insensitive match on name or email","type":"string","maxLength":200},"description":"Case-insensitive match on name or email"},{"name":"status","in":"query","required":false,"schema":{"description":"Filter by computed status","type":"string","enum":["active","disabled","invited","expired"]},"description":"Filter by computed status"},{"name":"orderBy","in":"query","required":false,"schema":{"default":"created_date","description":"Sort column","type":"string","enum":["email","first_name","last_name","created_date","last_login_date","status"]},"description":"Sort column"},{"name":"sort","in":"query","required":false,"schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_users","mcp":{"tool":"list_users","endpoint":"/mcp"},"a2a":{"skill":"list_users","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/user/{userId}":{"get":{"operationId":"get_user","tags":["users"],"summary":"Get a user","description":"Fetch a user's full profile: identity fields, computed status, direct and inherited roles, groups, client access, and masked API-key list. 404 when the id is unknown or the user is inaccessible.\n\n**Requires:** `maison-users` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:read"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_user","mcp":{"tool":"get_user","endpoint":"/mcp"},"a2a":{"skill":"get_user","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_user","tags":["users"],"summary":"Update a user","description":"Patch a user's first name, last name (at most 25 characters each), or phone number. 404 when the user is unknown.\n\n**Requires:** `maison-users` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_user","mcp":{"tool":"update_user","endpoint":"/mcp"},"a2a":{"skill":"update_user","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"description":"At most 25 characters","type":"string","maxLength":25},"lastName":{"description":"At most 25 characters","type":"string","maxLength":25},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]}},"additionalProperties":false}}}}}},"/api/v1/user/invite":{"post":{"operationId":"invite_user","tags":["users"],"summary":"Invite a Maison user","description":"Create a new Maison account and send an invite email, giving it roles (each at a client, or at all clients with clientId null) and groups. firstName / lastName are optional, at most 25 characters each. Needs the users grant where each role or group is given — globally for all clients; a caller without the global grant must give at least one role or group. 201 on success. With mode \"create\" (create only) the account is active at once with the password you give in `auth` (base64 of the password, at least 8 characters once decoded) and no email of any kind is sent — share the password with the person yourself; mode \"invite\" emails an accept link and refuses `auth`. On an invite, `destination` picks where the link lands: the Admin Dashboard (`{ kind: \"admin\" }`) or the demo site of the client with the QA editor open (`{ kind: \"demo\", preview_website_id }`, only for roles at exactly one client and no groups; 400 otherwise). The `invitationFor` field names the product the invite opens (`Admin Dashboard` or `Demo site (QA editor)`; null in create mode). Ask the operator both choices (create only or invite; Admin Dashboard or demo site with the QA editor) before calling when they were not stated. A person whose roles administer a client is added to the chat log analytics subscribers of that client. Use `add_client_user` to give an existing user access to a specific hotel.\n\n**Requires:** `maison-users` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"invite_user","mcp":{"tool":"invite_user","endpoint":"/mcp"},"a2a":{"skill":"invite_user","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":500,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Email address for the new account"},"firstName":{"default":null,"description":"At most 25 characters","anyOf":[{"type":"string","maxLength":25},{"type":"null"}]},"lastName":{"default":null,"description":"At most 25 characters","anyOf":[{"type":"string","maxLength":25},{"type":"null"}]},"roles":{"default":[],"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id to assign"},"clientId":{"default":null,"description":"Client scope for the role; null for a global grant","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["roleId"]}},"groupIds":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"inviteExpiryDays":{"default":7,"description":"Days before the invite link expires","type":"integer","minimum":1,"maximum":90},"mode":{"description":"invite: email an accept link. create: create only — account active at once with the password in `auth`, no email sent. API callers default to invite; the Maison agent must send it (without it the tool returns `status: \"needs_input\"` with the question to ask). Ask the operator before calling when they have not said it: create only, or send an invitation; and if inviting, should the link open the Admin Dashboard or the demo site with the QA editor open. Never pick either silently.","type":"string","enum":["invite","create"]},"auth":{"description":"mode create only (required there): the account's password, base64-encoded UTF-8, at least 8 characters decoded","type":"string","minLength":1,"maxLength":4096},"destination":{"description":"mode invite only: API callers default to `{ kind: 'admin' }`; the Maison agent must send it on an invite. Where the accept link lands — `{ kind: 'admin' }` the Admin Dashboard, or `{ kind: 'demo', preview_website_id }` the client's demo site with the QA editor open (the id is a `demoSites[].id` from `get_client_overview`). 404 when that demo site is not this client's.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"admin"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"demo"},"preview_website_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["kind","preview_website_id"],"additionalProperties":false}]}},"required":["email"],"additionalProperties":false}}}}}},"/api/v1/user/{userId}/disable":{"post":{"operationId":"disable_user","tags":["users"],"summary":"Disable a user","description":"Soft-disable a user account (sets disabled_date; the sign-in account is NOT deleted) and stop their API keys at once. The user cannot log in until `enable_user`. 404 when the user is unknown; 409 when already disabled.\n\n**Requires:** `maison-users` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disable_user","mcp":{"tool":"disable_user","endpoint":"/mcp"},"a2a":{"skill":"disable_user","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/user/{userId}/reinvite":{"post":{"operationId":"reinvite_user","tags":["users"],"summary":"Re-invite a user","description":"Refresh the invite and resend the invite email for a pending (invited but not yet accepted) user — the caller becomes the inviter on every refreshed link, with today's date and a new expiry; the previous invite stays in the user's audit history; needs the users grant at the scope of every pending link it refreshes. 404 when the user is unknown or has already accepted. 409 `invite_account_mismatch` when the person's sign-in account does not match their Maison user (a Maison support fix; no email is sent); 502 `invite_account_unavailable` when the sign-in account cannot be checked (no email is sent; retry).\n\n**Requires:** `maison-users` EXECUTE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:execute"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"reinvite_user","mcp":{"tool":"reinvite_user","endpoint":"/mcp"},"a2a":{"skill":"reinvite_user","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"EXECUTE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"inviteExpiryDays":{"default":7,"type":"integer","minimum":1,"maximum":90}},"additionalProperties":false}}}}}},"/api/v1/user/{userId}/forcereset":{"post":{"operationId":"force_password_reset","tags":["users"],"summary":"Force a password reset","description":"Flag a user's account so they must set a new password, and email them a link to the reset-code page. 404 when the user is unknown; 409 when the user is disabled or has not accepted their invite.\n\n**Requires:** `maison-users` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"force_password_reset","mcp":{"tool":"force_password_reset","endpoint":"/mcp"},"a2a":{"skill":"force_password_reset","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/user/{userId}/activity":{"get":{"operationId":"get_user_activity","tags":["users"],"summary":"User activity","description":"One user's full activity trail for a date range, newest first, each row in plain words (`summary`) with a closed `kind`, its `source`, the hotel and a console link (`href`). Four sources merged: `credentials` (invites sent and resent, passwords set or reset, API keys created or disabled — masked, never the key — connected apps revoked, the account created, enabled or disabled; done to the user or by them, with who, how and the request id), `sessions` (sign-in, sign-out, every session ended by a password reset), `changes` (everything the user created, updated, deleted or disabled, from every table's audit columns) and `activity` (hotel activity events they performed). `from` and `to` are required (ISO 8601, at most 366 days apart); `source` keeps one source; page with `nextCursor`. For every user's credential events at once use `list_credential_audit`.\n\n**Requires:** `maison-users` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:read"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Start of the window, inclusive (ISO 8601)"},"description":"Start of the window, inclusive (ISO 8601)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"End of the window, exclusive (ISO 8601); at most 366 days after `from`"},"description":"End of the window, exclusive (ISO 8601); at most 366 days after `from`"},{"name":"source","in":"query","required":false,"schema":{"description":"`credentials`, `sessions`, `changes` or `activity`; omit to read all four","type":"string","enum":["credentials","sessions","changes","activity"]},"description":"`credentials`, `sessions`, `changes` or `activity`; omit to read all four"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"cursor","in":"query","required":false,"schema":{"description":"`nextCursor` of the previous page","type":"string","minLength":1,"maxLength":1024},"description":"`nextCursor` of the previous page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_user_activity","mcp":{"tool":"get_user_activity","endpoint":"/mcp"},"a2a":{"skill":"get_user_activity","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/audit/credentials":{"get":{"operationId":"list_credential_audit","tags":["users"],"summary":"Credential and account audit","description":"Maison staff only. Every credential, account and access event across all users, newest first, with exact timestamps: who set or reset whose password, who created or disabled whose API key (masked, never the key), connected apps revoked, users invited, created, enabled or disabled — each with the acting user, how they authenticated (`session`, `api_key`, `oauth_token`) and the source — and, in the same time order, every user's access changes read from the role and group links (category `access`: `access_granted`, `access_invited`, `invite_accepted`, `access_removed`; one row per change with `detail.client_id`, `detail.roles` and `detail.groups` by name; Maison-only roles hidden without `maison-roles` READ) — plus `summary` (the event in the activity trail's words; a re-invite names the previous invite), `client_name` and, for a re-invite, the refreshed `links` by name and client. Filter by event `type`, `actorUserId`, `targetUserId` and a `from`/`to` window; page with `nextCursor`. For one user's whole activity use `get_user_activity`.\n\n**Requires:** `maison-users` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:read"]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"description":"One event type","type":"string","enum":["password_set","password_changed_self","password_reset_forced","api_key_created","api_key_disabled","connected_app_revoked","user_invited","user_reinvited","user_created","user_enabled","user_disabled","client_deleted","access_granted","access_invited","invite_accepted","access_removed"]},"description":"One event type"},{"name":"category","in":"query","required":false,"schema":{"description":"Every event of a category: credential, account or access","type":"string","enum":["credential","account","access"]},"description":"Every event of a category: credential, account or access"},{"name":"actorUserId","in":"query","required":false,"schema":{"description":"Who did it","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Who did it"},{"name":"targetUserId","in":"query","required":false,"schema":{"description":"Whose account it was done to","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Whose account it was done to"},{"name":"from","in":"query","required":false,"schema":{"description":"Earliest time, inclusive (ISO 8601)","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"Earliest time, inclusive (ISO 8601)"},{"name":"to","in":"query","required":false,"schema":{"description":"Latest time, exclusive (ISO 8601)","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"Latest time, exclusive (ISO 8601)"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"cursor","in":"query","required":false,"schema":{"description":"`nextCursor` of the previous page","type":"string","minLength":1,"maxLength":512},"description":"`nextCursor` of the previous page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_credential_audit","mcp":{"tool":"list_credential_audit","endpoint":"/mcp"},"a2a":{"skill":"list_credential_audit","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/user/{userId}/apikeys":{"get":{"operationId":"list_user_api_keys","tags":["users"],"summary":"List a user's API keys","description":"Returns the masked API-key records for one user (prefix + last-4 characters only — never the raw key). Use to audit access or find a key for `disable_user_api_key`; your own keys need no grant through `list_my_api_keys`.\n\n**Requires:** `maison-users` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:read"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_user_api_keys","mcp":{"tool":"list_user_api_keys","endpoint":"/mcp"},"a2a":{"skill":"list_user_api_keys","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/user/{userId}/enable":{"post":{"operationId":"enable_user","tags":["users"],"summary":"Enable a user","description":"Re-enable a disabled user account so they can sign in again (clears disabled_date). Returns the user's full profile. Re-enabling a holder of a Maison-only role also needs the global roles grant. 404 when the user is unknown. Use `disable_user` to switch an account off.\n\n**Requires:** `maison-users` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"enable_user","mcp":{"tool":"enable_user","endpoint":"/mcp"},"a2a":{"skill":"enable_user","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/user/{userId}/clients":{"get":{"operationId":"list_user_clients","tags":["users"],"summary":"List a user's hotels","description":"Page through the hotels a user can act on through their direct roles, one row per (hotel, role), ordered by hotel name. Returns `items`, `total`, `nextCursor` and `hasMore`. Use `get_client_user_access` for what the user may do at one hotel.\n\n**Requires:** `maison-users` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:read"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"cursor","in":"query","required":false,"schema":{"description":"`nextCursor` of the previous page","type":"string","minLength":1,"maxLength":512},"description":"`nextCursor` of the previous page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_user_clients","mcp":{"tool":"list_user_clients","endpoint":"/mcp"},"a2a":{"skill":"list_user_clients","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/user/{userId}/apikey/{keyId}":{"delete":{"operationId":"disable_user_api_key","tags":["users"],"summary":"Disable a user's API key","description":"Disable one of a user's API keys; calls with it are refused at once. Needs the global API-keys grant (disabling your own key needs none: `disable_my_api_key`). Find the key id with `list_user_api_keys`. 404 when the user has no active key with that id. Keys are never re-enabled: the user creates a new one from their profile.\n\n**Requires:** `api-keys` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"API key id (from list_user_api_keys)"},"description":"API key id (from list_user_api_keys)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disable_user_api_key","mcp":{"tool":"disable_user_api_key","endpoint":"/mcp"},"a2a":{"skill":"disable_user_api_key","endpoint":"/a2a"},"access":[{"feature":"api-keys","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/user/{userId}/connectedapps":{"get":{"operationId":"list_user_connected_apps","tags":["users"],"summary":"List a user's connected apps","description":"The apps a user has connected to their Maison account with OAuth (their active consents): each with the app, the scopes it was granted (grouped by area), the hotels it may act on (`all` or a list), when it was granted and last used. Use `revoke_user_connected_app` to cut one off; `list_my_connected_apps` for your own.\n\n**Requires:** `maison-users` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:read"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_user_connected_apps","mcp":{"tool":"list_user_connected_apps","endpoint":"/mcp"},"a2a":{"skill":"list_user_connected_apps","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/user/{userId}/connectedapp/{grantId}/revoke":{"post":{"operationId":"revoke_user_connected_app","tags":["users"],"summary":"Revoke a user's connected app","description":"Revoke one of a user's OAuth consents (a grant id from `list_user_connected_apps`): the app's access tokens are refused within 30 seconds and it cannot refresh. Idempotent for an already revoked grant. Recorded in the app owner's audit log. 404 when the grant is unknown or belongs to someone else.\n\n**Requires:** `maison-users` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"},{"name":"grantId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Grant id"},"description":"Grant id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"revoke_user_connected_app","mcp":{"tool":"revoke_user_connected_app","endpoint":"/mcp"},"a2a":{"skill":"revoke_user_connected_app","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/users":{"get":{"operationId":"list_client_users","tags":["users"],"summary":"List a hotel's users","description":"All users with access to a specific hotel, both direct role-links and group-inherited memberships. Use `get_client_user_access` for one user's detailed grant breakdown.\n\n**Requires:** `maison-users` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_users","mcp":{"tool":"list_client_users","endpoint":"/mcp"},"a2a":{"skill":"list_client_users","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/user":{"post":{"operationId":"add_client_user","tags":["users"],"summary":"Add a user to a hotel","description":"Give a person access to a hotel with roles and groups, in one call, whether or not they have a Maison account. Invites are per hotel: an existing user not yet at this hotel gets pending links and an invite email; one who already has accepted access here gets the roles and groups added directly, live at once, with no invite and no email (`kind: 'attached'`, `emailSent: null`); an email new to Maison gets an account (optional firstName / lastName, at most 25 characters each), the links and the invite email. `mode` 'create' (create only) makes a new account active at once with the password in `auth` (base64, at least 8 characters decoded), every link live, no email of any kind (409 when the email already has an account — give access instead); mode 'invite' refuses `auth`. On an invite, `destination` picks where the accept link lands: the Admin Dashboard (`{ kind: 'admin' }`) or this hotel's demo site with the QA editor open (`{ kind: 'demo', preview_website_id }`, a `demoSites[].id` from `get_client_overview`; 404 when it is not this hotel's). Ask the operator both choices (create only or invite; Admin Dashboard or demo site with the QA editor) before calling when they were not stated. Returns `{ kind: 'invited' | 'attached', userId, created, emailSent, invitationFor }` — `invitationFor` names the product the invite email opens (`'Admin Dashboard'` or `'Demo site (QA editor)'`; null when no invite was sent). A person whose roles administer the hotel is added to its chat log analytics subscribers. Every role and group must be assignable here (403 names the refused one). 409 when the person is disabled, already has every chosen role and group here, reaches every hotel through a Maison-wide role, or is only invited here so far (use `resend_client_invite`). 502 when the invite was written but the email could not be sent (call `resend_client_invite`). Use `invite_user` for roles at several hotels or Maison-wide. For an existing user, 409 `invite_account_mismatch` when the person's sign-in account does not match their Maison user (a Maison support fix; no email is sent); 502 `invite_account_unavailable` when the sign-in account cannot be checked (no email is sent; retry).\n\n**Requires:** `maison-users` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_client_user","mcp":{"tool":"add_client_user","endpoint":"/mcp"},"a2a":{"skill":"add_client_user","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The person's email address"},"roleIds":{"default":[],"description":"Role ids to give at this hotel","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"groupIds":{"default":[],"description":"This hotel's group ids to add them to","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"firstName":{"description":"Only for a new account; at most 25 characters","type":"string","minLength":1,"maxLength":25},"lastName":{"description":"Only for a new account; at most 25 characters","type":"string","minLength":1,"maxLength":25},"mode":{"description":"invite: email an accept link. create: create only — account active at once with the password in `auth`, no email sent. API callers default to invite; the Maison agent must send it (without it the tool returns `status: \"needs_input\"` with the question to ask). Ask the operator before calling when they have not said it: create only, or send an invitation; and if inviting, should the link open the Admin Dashboard or the demo site with the QA editor open. Never pick either silently.","type":"string","enum":["invite","create"]},"auth":{"description":"mode create only (required there): the account's password, base64-encoded UTF-8, at least 8 characters decoded","type":"string","minLength":1,"maxLength":4096},"destination":{"description":"mode invite only: API callers default to `{ kind: 'admin' }`; the Maison agent must send it on an invite. Where the accept link lands — `{ kind: 'admin' }` the Admin Dashboard, or `{ kind: 'demo', preview_website_id }` the client's demo site with the QA editor open (the id is a `demoSites[].id` from `get_client_overview`). 404 when that demo site is not this client's.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"admin"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"demo"},"preview_website_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["kind","preview_website_id"],"additionalProperties":false}]}},"required":["email"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/user/{userId}":{"delete":{"operationId":"remove_client_user","tags":["users"],"summary":"Remove a user from a hotel","description":"Soft-delete all direct role-links for a user at a hotel and end every session the user holds (they must sign in again). Group-inherited access is not affected. Returns the number of links removed.\n\n**Requires:** `maison-users` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_client_user","mcp":{"tool":"remove_client_user","endpoint":"/mcp"},"a2a":{"skill":"remove_client_user","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/user/{userId}/roles":{"put":{"operationId":"set_client_user_roles","tags":["users"],"summary":"Set a user's roles at a hotel","description":"Replace all direct role-links for a user at a specific hotel. Existing links not in the new list are soft-deleted; new links are upserted. Pass an empty array to revoke all direct access.\n\n**Requires:** `maison-users` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_client_user_roles","mcp":{"tool":"set_client_user_roles","endpoint":"/mcp"},"a2a":{"skill":"set_client_user_roles","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roleIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"The complete set of role ids to assign"}},"required":["roleIds"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/user/{userId}/groups":{"put":{"operationId":"set_client_user_groups","tags":["users"],"summary":"Set a user's groups at a hotel","description":"Replace all client-owned group memberships for a user at a specific hotel. Groups not in the new list are removed; groups in the new list are added if absent.\n\n**Requires:** `maison-users` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_client_user_groups","mcp":{"tool":"set_client_user_groups","endpoint":"/mcp"},"a2a":{"skill":"set_client_user_groups","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"The complete set of client group ids"}},"required":["groupIds"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/user/{userId}/access":{"get":{"operationId":"get_client_user_access","tags":["users"],"summary":"Get a user's effective access at a hotel","description":"The full set of feature permissions a user holds at a specific hotel — direct roles and group-inherited grants combined. 404 when the user is not found in the hotel roster.\n\n**Requires:** `maison-users` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_user_access","mcp":{"tool":"get_client_user_access","endpoint":"/mcp"},"a2a":{"skill":"get_client_user_access","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/user/{userId}/reinvite":{"post":{"operationId":"resend_client_invite","tags":["users"],"summary":"Resend a hotel invite","description":"Re-invite a user to a hotel: refresh every pending (not yet accepted, open or expired) invite link at the hotel together — the caller becomes the inviter, with today's date and a new expiry — and send one invite email naming them. The new email's link replaces the earlier one (an earlier link no longer accepts). `destination` sets where the new link lands: the Admin Dashboard (`{ kind: 'admin' }`) or this hotel's demo site with the QA editor open (`{ kind: 'demo', preview_website_id }`, a `demoSites[].id` from `get_client_overview`; 404 when it is not this hotel's); without it API callers keep the current invitation's destination, and the Maison agent gets `status: \"needs_input\"` with the choices to ask the operator. Returns `{ sent, invitationFor }` — the product the new link opens (`'Admin Dashboard'` or `'Demo site (QA editor)'`). The previous invite (who, when, its expiry) stays in the user's audit history. 404 when the user or hotel is unknown. 409 `not_pending` when the user has no pending invite at the hotel (accepted, added directly, or never invited there). 502 `email_failed` when the links were refreshed but the email could not be sent (call again). 409 `invite_account_mismatch` when the person's sign-in account does not match their Maison user (a Maison support fix; no email is sent); 502 `invite_account_unavailable` when the sign-in account cannot be checked (no email is sent; retry).\n\n**Requires:** `maison-users` EXECUTE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"resend_client_invite","mcp":{"tool":"resend_client_invite","endpoint":"/mcp"},"a2a":{"skill":"resend_client_invite","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"EXECUTE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"destination":{"description":"Where the new link lands — `{ kind: 'admin' }` the Admin Dashboard, or `{ kind: 'demo', preview_website_id }` this hotel's demo site with the QA editor open. API callers: omit to keep the current invitation's destination. The Maison agent must send it (without it the tool returns `status: \"needs_input\"` with the choices); ask the operator when they have not said.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"admin"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"demo"},"preview_website_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["kind","preview_website_id"],"additionalProperties":false}]}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/user/{userId}/invite":{"delete":{"operationId":"revoke_client_invite","tags":["users"],"summary":"Revoke a pending hotel invite","description":"Soft-delete all pending (not yet accepted) invite links for a user at a hotel. Idempotent — returns revoked count (0 when there are no pending links).\n\n**Requires:** `maison-users` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"description":"User id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"revoke_client_invite","mcp":{"tool":"revoke_client_invite","endpoint":"/mcp"},"a2a":{"skill":"revoke_client_invite","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/roles":{"get":{"operationId":"list_roles","tags":["access"],"summary":"List roles","description":"Page through the roles you can see, with optional search, sort and filters (`scope`, `ownerClientId`, `includeRetired`): roles available to all clients, Maison-only roles (with the global roles grant) and the roles of each client you read — never another client's. Each row carries its client and whether you can manage it. Use `get_role` for one role's policies and members.\n\n**Requires:** `maison-roles` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–200)","type":"integer","minimum":1,"maximum":200},"description":"Page size (1–200)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"},{"name":"offset","in":"query","required":false,"schema":{"description":"Rows to skip (after the cursor, when both are given)","type":"integer","minimum":0,"maximum":100000},"description":"Rows to skip (after the cursor, when both are given)"},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"orderBy","in":"query","required":false,"schema":{"default":"created_date","type":"string","enum":["name","created_date"]}},{"name":"sort","in":"query","required":false,"schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"scope","in":"query","required":false,"schema":{"description":"`global`: roles available to all clients; `client`: roles of one client","type":"string","enum":["global","client"]},"description":"`global`: roles available to all clients; `client`: roles of one client"},{"name":"ownerClientId","in":"query","required":false,"schema":{"description":"Only the roles available to this client (its own roles)","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Only the roles available to this client (its own roles)"},{"name":"includeRetired","in":"query","required":false,"schema":{"default":false,"description":"Also list retired roles","type":"boolean"},"description":"Also list retired roles"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_roles","mcp":{"tool":"list_roles","endpoint":"/mcp"},"a2a":{"skill":"list_roles","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/role/{roleId}":{"get":{"operationId":"get_role","tags":["access"],"summary":"Get a role","description":"Fetch a role's detail — its attached policies, each with `applies_to` (`all: true`, or the named `clients` where the role applies it) and rule count — its first page of direct users, and its first page of groups. 404 when the role is unknown, or available to a client you do not read.\n\n**Requires:** `maison-roles` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:read"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_role","mcp":{"tool":"get_role","endpoint":"/mcp"},"a2a":{"skill":"get_role","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_role","tags":["access"],"summary":"Update a role","description":"Patch a role's name, description or Maison-only flag (`visibilityMaisonOnly`, which needs the global roles grant). Needs the roles grant where the role is available (its client, or globally). 404 when the role is unknown.\n\n**Requires:** `maison-roles` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_role","mcp":{"tool":"update_role","endpoint":"/mcp"},"a2a":{"skill":"update_role","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"visibilityMaisonOnly":{"description":"Set or clear Maison only (a role available to all clients; global roles grant)","type":"boolean"}},"additionalProperties":false}}}}}},"/api/v1/role":{"post":{"operationId":"create_role","tags":["access"],"summary":"Create a role","description":"Create a role available to one client (`clientId`) or to all clients (`clientId` null; `visibilityMaisonOnly` makes it Maison only), optionally seeded with rules on its own policy. Returns the new role id. A role available to a client needs the roles grant there; one available to all clients, or Maison only, the global grant. Seed rules need the global policies grant (checked before the role is written). Attach shared policies later with `attach_role_policy`.\n\n**Requires:** `maison-roles` WRITE (client). All are required (403 otherwise).\n\n**Composite of:** `add_role_policy`.","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_role","mcp":{"tool":"create_role","endpoint":"/mcp"},"a2a":{"skill":"create_role","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"client"}],"entitlement":null,"composite":["add_role_policy"],"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"clientId":{"default":null,"description":"Available to: a client id, or null for all clients","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"visibilityMaisonOnly":{"description":"Only with clientId null: the role is Maison only (global roles grant)","type":"boolean"},"policies":{"description":"Seed rules for the role's own policy","type":"array","items":{"type":"object","properties":{"featureId":{"description":"Feature id; omit for an ALL-features wildcard rule","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permission":{"type":"string","enum":["READ","WRITE","EXECUTE","DENY"],"description":"Permission level for the rule"}},"required":["permission"],"additionalProperties":false}}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/role/{roleId}/disable":{"post":{"operationId":"disable_role","tags":["access"],"summary":"Disable a role","description":"Retire a role (sets disabled_date); needs the roles grant where the role is available. Holders lose their grants at the next permission-cache refresh. 404 when the role is unknown or already disabled.\n\n**Requires:** `maison-roles` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disable_role","mcp":{"tool":"disable_role","endpoint":"/mcp"},"a2a":{"skill":"disable_role","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/role/{roleId}/restore":{"post":{"operationId":"restore_role","tags":["access"],"summary":"Restore a retired role","description":"Bring a retired role back (clears disabled_date) so it can be assigned again; its policies and links are as they were. Needs the roles grant where the role is available. 404 when the role is unknown or not retired. Use `disable_role` to retire one.\n\n**Requires:** `maison-roles` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"restore_role","mcp":{"tool":"restore_role","endpoint":"/mcp"},"a2a":{"skill":"restore_role","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/role/{roleId}/policy":{"post":{"operationId":"add_role_policy","tags":["access"],"summary":"Add a policy statement to a role","description":"Set one rule (a feature and a level — a rule has no client; where it applies is the role's Applies to) in the role's own policy. A policy holds at most one rule per feature (and at most one every-feature rule): its level is exactly one of READ, WRITE, EXECUTE or DENY, and a higher level includes the lower ones (EXECUTE includes WRITE and READ). Adding a rule for a feature that already has one replaces the feature's current rule; the same level again changes nothing and answers the existing rule's id. Use `remove_role_policy` to remove it later, `attach_role_policy` to attach a shared policy.\n\n**Requires:** `maison-roles` WRITE (global), `policies` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write","roles:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_role_policy","mcp":{"tool":"add_role_policy","endpoint":"/mcp"},"a2a":{"skill":"add_role_policy","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"global"},{"feature":"policies","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"featureId":{"description":"Feature id; omit for an ALL-features wildcard","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permission":{"type":"string","enum":["READ","WRITE","EXECUTE","DENY"]}},"required":["permission"],"additionalProperties":false}}}}}},"/api/v1/role/{roleId}/policy/{policyId}":{"delete":{"operationId":"remove_role_policy","tags":["access"],"summary":"Remove a policy statement from a role","description":"Soft-delete one rule from the role's own policy; needs the roles and policies grants where the role is available. The `policyId` here is the rule id returned by `add_role_policy`.\n\n**Requires:** `maison-roles` WRITE (any), `policies` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write","roles:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Rule id (returned by add_role_policy)"},"description":"Rule id (returned by add_role_policy)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_role_policy","mcp":{"tool":"remove_role_policy","endpoint":"/mcp"},"a2a":{"skill":"remove_role_policy","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"any"},{"feature":"policies","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/role/{roleId}/policy/{policyId}/attach":{"post":{"operationId":"attach_role_policy","tags":["access"],"summary":"Attach a policy to a role","description":"Attach an existing policy to a role and say where the role applies it (`appliesTo`: null = all clients, or client ids). A policy is never applied to a client directly — the role applies it. The policy must be available where it applies (a client's policy only at that client); a role available to one client applies its policies there only (null). Idempotent for rows already applied; to replace where it applies use `set_role_policy_applies_to`. Needs the roles grant where the role is available.\n\n**Requires:** `maison-roles` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"attach_role_policy","mcp":{"tool":"attach_role_policy","endpoint":"/mcp"},"a2a":{"skill":"attach_role_policy","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appliesTo":{"anyOf":[{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}],"description":"Where the role applies the policy: null = all clients, or the client ids. A role available to one client applies its policies there only (null)."}},"required":["appliesTo"],"additionalProperties":false}}}}}},"/api/v1/role/{roleId}/policy/{policyId}/appliesto":{"put":{"operationId":"set_role_policy_applies_to","tags":["access"],"summary":"Change where a role applies a policy","description":"Replace where a role applies one of its policies (`appliesTo`: null = all clients, or client ids) in one call: clients outside the new set stop, missing ones start. Attaches the policy when the role does not apply it yet. Read the current `applies_to` with `get_role` first. Needs the roles grant where the role is available.\n\n**Requires:** `maison-roles` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_role_policy_applies_to","mcp":{"tool":"set_role_policy_applies_to","endpoint":"/mcp"},"a2a":{"skill":"set_role_policy_applies_to","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appliesTo":{"anyOf":[{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}],"description":"Where the role applies the policy: null = all clients, or the client ids. A role available to one client applies its policies there only (null)."}},"required":["appliesTo"],"additionalProperties":false}}}}}},"/api/v1/role/{roleId}/policy/{policyId}/detach":{"post":{"operationId":"detach_role_policy","tags":["access"],"summary":"Detach a policy from a role","description":"Stop a role applying a policy anywhere (every client it applied at). The policy itself is kept. 404 when the role does not apply it. Needs the roles grant where the role is available.\n\n**Requires:** `maison-roles` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"detach_role_policy","mcp":{"tool":"detach_role_policy","endpoint":"/mcp"},"a2a":{"skill":"detach_role_policy","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/role/{roleId}/user":{"post":{"operationId":"assign_role","tags":["access"],"summary":"Assign a role to a user","description":"Give a user this role at one client (`clientId`) or at all clients (null). Giving a role is a users action: the users grant at that client, or globally for all clients; a Maison-only role also needs the global roles grant. The role must be available there and not retired. Idempotent — revives a soft-deleted link when one already exists.\n\n**Requires:** `maison-users` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"assign_role","mcp":{"tool":"assign_role","endpoint":"/mcp"},"a2a":{"skill":"assign_role","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id to assign the role to"},"clientId":{"default":null,"description":"Client scope for the assignment; null for a global grant","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["userId"],"additionalProperties":false}}}}}},"/api/v1/role/{roleId}/user/{userId}":{"delete":{"operationId":"unassign_role","tags":["access"],"summary":"Unassign a role from a user","description":"Take a role away from a user: every scope by default, or only one with `linkScope` (`global` for the link at all clients, or a client id). Needs the users grant at each link's scope (nothing is written otherwise). Returns the number of links affected.\n\n**Requires:** `maison-users` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id to remove the role from"},"description":"User id to remove the role from"},{"name":"linkScope","in":"query","required":false,"schema":{"description":"`global` = only the link at all clients; a client id = only that client's link","anyOf":[{"type":"string","const":"global"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"description":"`global` = only the link at all clients; a client id = only that client's link"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"unassign_role","mcp":{"tool":"unassign_role","endpoint":"/mcp"},"a2a":{"skill":"unassign_role","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/role/{roleId}/group":{"post":{"operationId":"assign_role_to_group","tags":["access"],"summary":"Assign a role to a group","description":"Give a group this role at one client (`clientId`) or at all clients (null) so its members inherit it. Giving a role is a users action (the users grant at that client, or globally); a group available to one client receives roles only there. Idempotent.\n\n**Requires:** `maison-users` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","users:write"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"assign_role_to_group","mcp":{"tool":"assign_role_to_group","endpoint":"/mcp"},"a2a":{"skill":"assign_role_to_group","endpoint":"/a2a"},"access":[{"feature":"maison-users","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id to assign the role to"},"clientId":{"default":null,"description":"Client scope for the assignment; null for a global grant","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["groupId"],"additionalProperties":false}}}}}},"/api/v1/role/{roleId}/users":{"get":{"operationId":"list_role_users","tags":["access"],"summary":"List a role's users","description":"Page through the users holding a role directly, each with the client the link is at (null = all clients). `get_role` shows only the first page; use this for the rest.\n\n**Requires:** `maison-roles` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:read"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_role_users","mcp":{"tool":"list_role_users","endpoint":"/mcp"},"a2a":{"skill":"list_role_users","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/role/{roleId}/groups":{"get":{"operationId":"list_role_groups","tags":["access"],"summary":"List a role's groups","description":"Page through the groups given a role (their members inherit it), each with the client the link is at. `get_role` shows only the first page; use this for the rest.\n\n**Requires:** `maison-roles` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:read"]}],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_role_groups","mcp":{"tool":"list_role_groups","endpoint":"/mcp"},"a2a":{"skill":"list_role_groups","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/features":{"get":{"operationId":"list_features","tags":["access"],"summary":"List features","description":"Read-only catalogue of all Maison features: id, key (`name`), display `label`, `purpose` (what it does and where), description and `maison_only`. Use the ids in policy rules (`set_policy_rules`, `add_role_policy`, `create_role`); match a person's words against label, purpose and description, and skip deprecated features. A rule granting a `maison_only` feature (or attaching a policy that carries one) needs `allow-maison-only` WRITE held globally; a DENY rule does not.\n\n**Requires:** `maison-roles` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_features","mcp":{"tool":"list_features","endpoint":"/mcp"},"a2a":{"skill":"list_features","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/groups":{"get":{"operationId":"list_groups","tags":["access"],"summary":"List groups","description":"Page through the user groups you can see, with optional search and sort (name, member count or creation): groups available to all clients and those of each client you read — never another client's; Maison-only groups (`visibility_maison_only`) only with the global groups read grant. Use `get_group` for members and roles.\n\n**Requires:** `groups` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"orderBy","in":"query","required":false,"schema":{"default":"created_date","type":"string","enum":["name","member_count","created_date"]}},{"name":"sort","in":"query","required":false,"schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_groups","mcp":{"tool":"list_groups","endpoint":"/mcp"},"a2a":{"skill":"list_groups","endpoint":"/a2a"},"access":[{"feature":"groups","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/group/{groupId}":{"get":{"operationId":"get_group","tags":["access"],"summary":"Get a group","description":"Full detail of a group you can see, including members and role assignments. 404 when unknown, available to a client you do not read, or Maison only without the global groups read grant.\n\n**Requires:** `groups` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:read"]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_group","mcp":{"tool":"get_group","endpoint":"/mcp"},"a2a":{"skill":"get_group","endpoint":"/a2a"},"access":[{"feature":"groups","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_group","tags":["access"],"summary":"Update a group","description":"Patch a group's name, description or Maison-only flag (`visibilityMaisonOnly`, which needs the global groups grant and a group available to all clients — 400 on a hotel's group); needs the groups grant where the group is available. 404 when unknown.\n\n**Requires:** `groups` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:write"]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_group","mcp":{"tool":"update_group","endpoint":"/mcp"},"a2a":{"skill":"update_group","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"visibilityMaisonOnly":{"description":"Set or clear Maison only (a group available to all clients; global groups grant)","type":"boolean"}},"additionalProperties":false}}}}},"delete":{"operationId":"delete_group","tags":["access"],"summary":"Delete a group","description":"Soft-delete a group and cascade to members and role links; needs the groups grant where the group is available. 404 when not found or already deleted.\n\n**Requires:** `groups` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:write"]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_group","mcp":{"tool":"delete_group","endpoint":"/mcp"},"a2a":{"skill":"delete_group","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/group":{"post":{"operationId":"create_group","tags":["access"],"summary":"Create a group","description":"Create a user group available to all clients (needs the global groups grant) — Maison only with `visibilityMaisonOnly` — and optionally seed it with members (`update_group_members`) and role assignments (`update_group_roles`, which also need the users grant where each role is given). Returns the new group id. Use `create_client_group` for a group available to one hotel.\n\n**Requires:** `groups` WRITE (global). All are required (403 otherwise).\n\n**Composite of:** `update_group_members`, `update_group_roles`.","security":[{"apiKey":[]},{"oauth2":["admin","groups:write"]}],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_group","mcp":{"tool":"create_group","endpoint":"/mcp"},"a2a":{"skill":"create_group","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"global"}],"entitlement":null,"composite":["update_group_members","update_group_roles"],"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"visibilityMaisonOnly":{"description":"The group is Maison only (seen only with the global groups read grant)","type":"boolean"},"memberIds":{"description":"User ids to add as initial members","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"roles":{"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"clientId":{"default":null,"description":"Client scope; null for a global grant","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["roleId"]}}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/group/{groupId}/members":{"put":{"operationId":"update_group_members","tags":["access"],"summary":"Update group members","description":"Add or remove members of a group; needs the groups grant where the group is available (and the global roles grant for a group carrying a Maison-only role). Both arrays are optional; supply only the changes needed.\n\n**Requires:** `groups` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:write"]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_group_members","mcp":{"tool":"update_group_members","endpoint":"/mcp"},"a2a":{"skill":"update_group_members","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"add":{"description":"User ids to add","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"remove":{"description":"User ids to remove","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}}}},"/api/v1/group/{groupId}/roles":{"put":{"operationId":"update_group_roles","tags":["access"],"summary":"Update group roles","description":"Add or remove role assignments of a group (each at a client, or at all clients with clientId null); needs the groups grant where the group is available, and the users grant where each role is given. A group available to one client gives roles only there. Both arrays are optional.\n\n**Requires:** `groups` WRITE (any), `maison-users` WRITE (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:write","users:write"]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_group_roles","mcp":{"tool":"update_group_roles","endpoint":"/mcp"},"a2a":{"skill":"update_group_roles","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"any"},{"feature":"maison-users","level":"WRITE","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"add":{"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"clientId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["roleId"]}},"remove":{"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"clientId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["roleId"]}}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/roles":{"get":{"operationId":"list_client_roles","tags":["access"],"summary":"List assignable roles at a hotel","description":"Roles that can be assigned to users or groups at a specific hotel (excludes Maison-only and disabled roles). Use `create_client_role` to add a new hotel-owned role.\n\n**Requires:** `maison-roles` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_roles","mcp":{"tool":"list_client_roles","endpoint":"/mcp"},"a2a":{"skill":"list_client_roles","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/role/{roleId}":{"get":{"operationId":"get_client_role","tags":["access"],"summary":"Get a hotel role","description":"Fetch a hotel role's policies and its effective access summary. 404 when the role is not found or not assignable for this hotel.\n\n**Requires:** `maison-roles` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_role","mcp":{"tool":"get_client_role","endpoint":"/mcp"},"a2a":{"skill":"get_client_role","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_client_role","tags":["access"],"summary":"Update a hotel role","description":"Patch a hotel-owned role's name or description.\n\n**Requires:** `maison-roles` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_client_role","mcp":{"tool":"update_client_role","endpoint":"/mcp"},"a2a":{"skill":"update_client_role","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/role":{"post":{"operationId":"create_client_role","tags":["access"],"summary":"Create a hotel role","description":"Create a new role owned by a hotel and optionally seed it with rules (a feature and a level each; seeding also needs the policies grant at the hotel, checked before the role exists). Returns the new role id. Add or remove rules later with `add_client_role_rule` / `remove_client_role_rule`.\n\n**Requires:** `maison-roles` WRITE (client). All are required (403 otherwise).\n\n**Composite of:** `add_client_role_rule`.","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_client_role","mcp":{"tool":"create_client_role","endpoint":"/mcp"},"a2a":{"skill":"create_client_role","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"client"}],"entitlement":null,"composite":["add_client_role_rule"],"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"statements":{"type":"array","items":{"type":"object","properties":{"featureId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Feature id for the rule"},"permission":{"type":"string","enum":["READ","WRITE","EXECUTE","DENY"]}},"required":["featureId","permission"],"additionalProperties":false}}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/role/{roleId}/disable":{"post":{"operationId":"disable_client_role","tags":["access"],"summary":"Disable a hotel role","description":"Soft-disable a hotel-owned role. Holders lose their grants at the next permission-cache refresh.\n\n**Requires:** `maison-roles` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disable_client_role","mcp":{"tool":"disable_client_role","endpoint":"/mcp"},"a2a":{"skill":"disable_client_role","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/role/{roleId}/rule":{"post":{"operationId":"add_client_role_rule","tags":["access"],"summary":"Add a rule to a hotel role","description":"Set one rule (a feature and a level) in a hotel role's own policy; the role applies it at this hotel. A policy holds at most one rule per feature (and at most one every-feature rule): its level is exactly one of READ, WRITE, EXECUTE or DENY, and a higher level includes the lower ones (EXECUTE includes WRITE and READ). Adding a rule for a feature that already has one replaces the feature's current rule; the same level again changes nothing and answers the existing rule's id. Nobody grants more than they hold, and a Maison-only feature only Maison staff may grant (403 names the feature). Returns the rule id for `remove_client_role_rule`. Use `attach_client_role_policy` to apply a shared policy instead.\n\n**Requires:** `maison-roles` WRITE (client), `policies` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write","roles:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_client_role_rule","mcp":{"tool":"add_client_role_rule","endpoint":"/mcp"},"a2a":{"skill":"add_client_role_rule","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"client"},{"feature":"policies","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"featureId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Feature id (from list_client_features_catalogue)"},"permission":{"type":"string","enum":["READ","WRITE","EXECUTE","DENY"]}},"required":["featureId","permission"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/role/{roleId}/rule/{ruleId}":{"delete":{"operationId":"remove_client_role_rule","tags":["access"],"summary":"Remove a rule from a hotel role","description":"Remove one rule (the id `add_client_role_rule` returned, or from `get_client_role`) from a hotel role's own policy. 404 when the role has no such rule.\n\n**Requires:** `maison-roles` WRITE (client), `policies` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write","roles:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"},{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Rule id"},"description":"Rule id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_client_role_rule","mcp":{"tool":"remove_client_role_rule","endpoint":"/mcp"},"a2a":{"skill":"remove_client_role_rule","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"client"},{"feature":"policies","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/role/{roleId}/policy":{"post":{"operationId":"attach_client_role_policy","tags":["access"],"summary":"Attach a policy to a hotel role","description":"Attach an existing policy to a hotel role; the role applies it at this hotel. The policy must be available here (to all clients or to this hotel). Needs the roles grant at the hotel.\n\n**Requires:** `maison-roles` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"attach_client_role_policy","mcp":{"tool":"attach_client_role_policy","endpoint":"/mcp"},"a2a":{"skill":"attach_client_role_policy","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id to attach"}},"required":["policyId"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/role/{roleId}/policy/{policyId}":{"delete":{"operationId":"detach_client_role_policy","tags":["access"],"summary":"Detach a policy from a hotel role","description":"Stop a hotel role applying a policy. Needs the roles grant at the hotel; the policy itself is kept.\n\n**Requires:** `maison-roles` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"roleId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id"},"description":"Role id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"detach_client_role_policy","mcp":{"tool":"detach_client_role_policy","endpoint":"/mcp"},"a2a":{"skill":"detach_client_role_policy","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/policies":{"get":{"operationId":"list_client_policies","tags":["access"],"summary":"List hotel policies","description":"The policies available at a hotel: its own and those available to all clients (never Maison-only ones, never another hotel's). Use `get_client_policy` for its rules.\n\n**Requires:** `policies` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","policies:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_policies","mcp":{"tool":"list_client_policies","endpoint":"/mcp"},"a2a":{"skill":"list_client_policies","endpoint":"/a2a"},"access":[{"feature":"policies","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/policy/{policyId}":{"get":{"operationId":"get_client_policy","tags":["access"],"summary":"Get a hotel policy","description":"Fetch a hotel policy's rules (feature + level) and its effective access summary. 404 when not found.\n\n**Requires:** `policies` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","policies:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_policy","mcp":{"tool":"get_client_policy","endpoint":"/mcp"},"a2a":{"skill":"get_client_policy","endpoint":"/a2a"},"access":[{"feature":"policies","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_client_policy","tags":["access"],"summary":"Update a hotel policy","description":"Patch a hotel-owned policy's name or description. 404 when not found.\n\n**Requires:** `policies` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_client_policy","mcp":{"tool":"update_client_policy","endpoint":"/mcp"},"a2a":{"skill":"update_client_policy","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500}},"additionalProperties":false}}}}},"delete":{"operationId":"delete_client_policy","tags":["access"],"summary":"Delete a hotel policy","description":"Soft-delete a hotel-owned policy. 404 when not found.\n\n**Requires:** `policies` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_client_policy","mcp":{"tool":"delete_client_policy","endpoint":"/mcp"},"a2a":{"skill":"delete_client_policy","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/policy":{"post":{"operationId":"create_client_policy","tags":["access"],"summary":"Create a hotel policy","description":"Create a policy available to one hotel and optionally seed it with rules (each a feature and a level). Returns the new policy id. Roles apply it at this hotel (`attach_client_role_policy`).\n\n**Requires:** `policies` WRITE (client). All are required (403 otherwise).\n\n**Composite of:** `add_client_policy_statement`.","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_client_policy","mcp":{"tool":"create_client_policy","endpoint":"/mcp"},"a2a":{"skill":"create_client_policy","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"client"}],"entitlement":null,"composite":["add_client_policy_statement"],"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"statements":{"description":"Seed rules: a feature and a level each — a rule carries no client","type":"array","items":{"type":"object","properties":{"featureId":{"default":null,"description":"Feature id; null for an ALL-features wildcard","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"permission":{"type":"string","enum":["READ","WRITE","EXECUTE","DENY"]}},"required":["permission"],"additionalProperties":false}}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/policy/{policyId}/statement":{"post":{"operationId":"add_client_policy_statement","tags":["access"],"summary":"Add a statement to a hotel policy","description":"Set one rule (a feature and a level — a rule carries no client; where the policy applies is each role's Applies to) in a hotel-owned policy. A policy holds at most one rule per feature (and at most one every-feature rule): its level is exactly one of READ, WRITE, EXECUTE or DENY, and a higher level includes the lower ones (EXECUTE includes WRITE and READ). Adding a rule for a feature that already has one replaces the feature's current rule; the same level again changes nothing and answers the existing rule's id.\n\n**Requires:** `policies` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_client_policy_statement","mcp":{"tool":"add_client_policy_statement","endpoint":"/mcp"},"a2a":{"skill":"add_client_policy_statement","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"featureId":{"default":null,"description":"Feature id; null for ALL wildcard","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"permission":{"type":"string","enum":["READ","WRITE","EXECUTE","DENY"]}},"required":["permission"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/policy/{policyId}/statement/{stmtId}":{"delete":{"operationId":"remove_client_policy_statement","tags":["access"],"summary":"Remove a statement from a hotel policy","description":"Soft-delete one statement from a hotel-owned policy. 404 when not found.\n\n**Requires:** `policies` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"},{"name":"stmtId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Statement id to remove"},"description":"Statement id to remove"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_client_policy_statement","mcp":{"tool":"remove_client_policy_statement","endpoint":"/mcp"},"a2a":{"skill":"remove_client_policy_statement","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/groups":{"get":{"operationId":"list_client_groups","tags":["access"],"summary":"List hotel groups","description":"The access groups available at a hotel: its own and those available to all clients — never another hotel's. Use `get_client_group` for membership details.\n\n**Requires:** `groups` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_groups","mcp":{"tool":"list_client_groups","endpoint":"/mcp"},"a2a":{"skill":"list_client_groups","endpoint":"/a2a"},"access":[{"feature":"groups","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/group/{groupId}":{"get":{"operationId":"get_client_group","tags":["access"],"summary":"Get a hotel group","description":"Fetch a hotel group's members, candidate users, role assignments, and effective access summary. 404 when not found.\n\n**Requires:** `groups` READ (client), `maison-users` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:read","users:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_group","mcp":{"tool":"get_client_group","endpoint":"/mcp"},"a2a":{"skill":"get_client_group","endpoint":"/a2a"},"access":[{"feature":"groups","level":"READ","scope":"client"},{"feature":"maison-users","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_client_group","tags":["access"],"summary":"Update a hotel group","description":"Rename or re-describe a group the hotel owns (`description` null clears it). 404 when the group is not this hotel's. Change its members with `update_client_group_members`.\n\n**Requires:** `groups` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_client_group","mcp":{"tool":"update_client_group","endpoint":"/mcp"},"a2a":{"skill":"update_client_group","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false}}}}},"delete":{"operationId":"delete_client_group","tags":["access"],"summary":"Delete a hotel group","description":"Delete (soft) a group the hotel owns, with its role links. 409 while it still has members, pending invitations included: remove them first (`update_client_group_members`). 404 when the group is not this hotel's.\n\n**Requires:** `groups` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_client_group","mcp":{"tool":"delete_client_group","endpoint":"/mcp"},"a2a":{"skill":"delete_client_group","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/group":{"post":{"operationId":"create_client_group","tags":["access"],"summary":"Create a hotel group","description":"Create a new access group owned by a hotel and optionally seed it with members and a role. Returns the new group id.\n\n**Requires:** `groups` WRITE (client). All are required (403 otherwise).\n\n**Composite of:** `update_client_group_members`, `link_client_group_role`.","security":[{"apiKey":[]},{"oauth2":["admin","groups:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_client_group","mcp":{"tool":"create_client_group","endpoint":"/mcp"},"a2a":{"skill":"create_client_group","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"client"}],"entitlement":null,"composite":["update_client_group_members","link_client_group_role"],"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"memberIds":{"description":"User ids to add as initial members","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"roleId":{"description":"Role to link to the group at this hotel","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/group/{groupId}/members":{"put":{"operationId":"update_client_group_members","tags":["access"],"summary":"Update hotel group members","description":"Add or remove members in a hotel-owned access group.\n\n**Requires:** `groups` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_client_group_members","mcp":{"tool":"update_client_group_members","endpoint":"/mcp"},"a2a":{"skill":"update_client_group_members","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"add":{"description":"User ids to add","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"remove":{"description":"User ids to remove","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/usergroup":{"post":{"operationId":"link_client_group_role","tags":["access"],"summary":"Link a group to a hotel role","description":"Create a user_group_role_link so a hotel-owned group inherits a role at this hotel. Revives a soft-deleted link when one already exists.\n\n**Requires:** `groups` WRITE (client), `maison-users` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:write","users:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"link_client_group_role","mcp":{"tool":"link_client_group_role","endpoint":"/mcp"},"a2a":{"skill":"link_client_group_role","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"client"},{"feature":"maison-users","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id to link"},"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Role id to assign to the group"}},"required":["groupId","roleId"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/usergroup/{groupId}":{"delete":{"operationId":"unlink_client_group","tags":["access"],"summary":"Unlink a hotel group from its roles","description":"Soft-delete all role links for a hotel-owned group at this hotel. Returns the number of links affected.\n\n**Requires:** `groups` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","groups:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Group id"},"description":"Group id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"unlink_client_group","mcp":{"tool":"unlink_client_group","endpoint":"/mcp"},"a2a":{"skill":"unlink_client_group","endpoint":"/a2a"},"access":[{"feature":"groups","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/featurescatalogue":{"get":{"operationId":"list_client_features_catalogue","tags":["access"],"summary":"Hotel features catalogue","description":"Features available for hotel-scoped roles and policies at a specific hotel, with their display labels.\n\n**Requires:** `policies` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","policies:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_features_catalogue","mcp":{"tool":"list_client_features_catalogue","endpoint":"/mcp"},"a2a":{"skill":"list_client_features_catalogue","endpoint":"/a2a"},"access":[{"feature":"policies","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/policies":{"get":{"operationId":"list_policies","tags":["access"],"summary":"List Maison policies","description":"Page through the policies you can see (search by name or description), with rule and role counts: policies available to all clients, Maison-only ones (with the global policies grant) and those of each client you read — never another client's. Use `get_policy` for one policy's rules.\n\n**Requires:** `policies` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","policies:read"]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–200)","type":"integer","minimum":1,"maximum":200},"description":"Page size (1–200)"},{"name":"offset","in":"query","required":false,"schema":{"default":0,"description":"Rows to skip","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Rows to skip"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_policies","mcp":{"tool":"list_policies","endpoint":"/mcp"},"a2a":{"skill":"list_policies","endpoint":"/a2a"},"access":[{"feature":"policies","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/policy/{policyId}":{"get":{"operationId":"get_policy","tags":["access"],"summary":"Get a Maison policy","description":"Fetch one policy you can see with its rules (feature + level) and the roles that apply it. Read it before `set_policy_rules` so the rules you keep stay. 404 when not found, or available to a client you do not read.\n\n**Requires:** `policies` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","policies:read"]}],"parameters":[{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_policy","mcp":{"tool":"get_policy","endpoint":"/mcp"},"a2a":{"skill":"get_policy","endpoint":"/a2a"},"access":[{"feature":"policies","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_policy","tags":["access"],"summary":"Update a Maison policy","description":"Rename or re-describe a policy available to all clients, or set / clear its Maison-only flag. Needs the global policies grant. 404 when the policy is unknown or hidden. Change its rules with `set_policy_rules`.\n\n**Requires:** `policies` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_policy","mcp":{"tool":"update_policy","endpoint":"/mcp"},"a2a":{"skill":"update_policy","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"visibilityMaisonOnly":{"type":"boolean"}},"additionalProperties":false}}}}},"delete":{"operationId":"delete_policy","tags":["access"],"summary":"Delete a Maison policy","description":"Delete (soft) a policy available to all clients. 409 while any role still applies it: detach it from its roles first (`detach_role_policy`; `get_policy` lists them). Needs the global policies grant. 404 when unknown or hidden.\n\n**Requires:** `policies` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_policy","mcp":{"tool":"delete_policy","endpoint":"/mcp"},"a2a":{"skill":"delete_policy","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/policy":{"post":{"operationId":"create_policy","tags":["access"],"summary":"Create a Maison policy","description":"Create a policy available to all clients (`visibilityMaisonOnly` makes it Maison only), with no rules yet: fill them with `set_policy_rules`, then apply it with `attach_role_policy`. Needs the global policies grant. Returns the new policy id. Use `create_client_policy` for a policy of one hotel.\n\n**Requires:** `policies` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_policy","mcp":{"tool":"create_policy","endpoint":"/mcp"},"a2a":{"skill":"create_policy","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"visibilityMaisonOnly":{"description":"Only Maison staff see and use it","type":"boolean"}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/policy/{policyId}/rules":{"put":{"operationId":"set_policy_rules","tags":["access"],"summary":"Set a Maison policy's rules","description":"Save a Maison policy's complete rule list in one call (the policy page's rules table): each rule is a feature, or every feature, at READ, WRITE, EXECUTE or DENY. A policy holds at most one rule per feature (and at most one every-feature rule): its level is exactly one of READ, WRITE, EXECUTE or DENY, and a higher level includes the lower ones (EXECUTE includes WRITE and READ). READ = view it; WRITE = view and change it; EXECUTE = view, change and run or act with it (send, run a job, take an action); DENY = block it even when another policy or role grants it. How to work: (1) `get_policy` for the current rules and `list_features` for the catalogue (key, label, purpose). (2) Turn the person's words into rules: \"can view conversations and analytics but change nothing\" is READ on Conversations and READ on Analytics; \"can manage the knowledge base\" is WRITE; \"can send\" or \"can run\" is EXECUTE; \"must never see billing\" is DENY. Give a feature exactly one rule (a repeat at another level is refused, nothing saved); DENY only to block. (3) Prefer the specific features over the every-feature rule (featureId null); use it only when the person means everything. (4) Send the FULL list: keep the current rules unless the person asked to drop them. (5) When the request is ambiguous (which features, which level), show the rules you would save as a short Feature / Level list and ask before calling. Every rule is checked against your own access; one refused rule saves nothing. Answers the saved rules and how many were added and removed.\n\n**Requires:** `policies` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_policy_rules","mcp":{"tool":"set_policy_rules","endpoint":"/mcp"},"a2a":{"skill":"set_policy_rules","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"featureId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Feature id from the catalogue; null = every feature, now and later (use sparingly)"},"permission":{"type":"string","enum":["READ","WRITE","EXECUTE","DENY"],"description":"READ view, WRITE change, EXECUTE run or act, DENY block even when granted elsewhere"}},"required":["featureId","permission"]},"description":"The COMPLETE rule list after the change, one rule per feature: a current rule you leave out is removed"}},"required":["rules"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/policy/{policyId}/rules":{"put":{"operationId":"set_client_policy_rules","tags":["access"],"summary":"Set a hotel policy's rules","description":"Save a hotel-owned policy's complete rule list in one call (the client Policies tab's rules table): each rule is a feature, or every feature, at READ, WRITE, EXECUTE or DENY. A policy holds at most one rule per feature (and at most one every-feature rule): its level is exactly one of READ, WRITE, EXECUTE or DENY, and a higher level includes the lower ones (EXECUTE includes WRITE and READ). READ = view it; WRITE = view and change it; EXECUTE = view, change and run or act with it (send, run a job, take an action); DENY = block it even when another policy or role grants it. How to work: (1) `get_client_policy` for the current rules and `list_client_features_catalogue` for the features this hotel can use (id, key, label, purpose). (2) Turn the person's words into rules: \"front desk can view conversations and analytics but change nothing\" is READ on Conversations and READ on Analytics; \"can edit the knowledge base\" is WRITE; \"can send\" or \"can run\" is EXECUTE; \"must never see billing\" is DENY. Give a feature exactly one rule (a repeat at another level is refused, nothing saved); DENY only to block. (3) Prefer the specific features over the every-feature rule (featureId null). (4) Send the FULL list: keep the current rules unless the person asked to drop them. (5) When the request is ambiguous, show the rules you would save as a short Feature / Level list and ask before calling. Every rule is checked against your own access at this hotel; one refused rule saves nothing. Policies shared by Maison are read-only here (403).\n\n**Requires:** `policies` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write","policies:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Policy id"},"description":"Policy id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_client_policy_rules","mcp":{"tool":"set_client_policy_rules","endpoint":"/mcp"},"a2a":{"skill":"set_client_policy_rules","endpoint":"/a2a"},"access":[{"feature":"policies","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"featureId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Feature id from the catalogue; null = every feature, now and later (use sparingly)"},"permission":{"type":"string","enum":["READ","WRITE","EXECUTE","DENY"],"description":"READ view, WRITE change, EXECUTE run or act, DENY block even when granted elsewhere"}},"required":["featureId","permission"]},"description":"The COMPLETE rule list after the change, one rule per feature: a current rule you leave out is removed"}},"required":["rules"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/analytics/conversations":{"get":{"operationId":"get_conversation_analytics","tags":["analytics"],"summary":"Conversation analytics for one hotel","description":"The Analytics page figures for one hotel over [from, to] (ISO 8601 date-times, at most 400 UTC days): conversations and conversations answered without handoff, knowledge gaps opened / resolved / open, each compared with the equal-length previous window (`previous` is null before the hotel's first indexed conversation), the daily conversation count per channel, the median days to resolve a gap, and the top 10 open unanswered questions — `unanswered` is null unless the caller may also read conversations (chat-logs). Booking links and leads are reported as not tracked. Use get_portfolio_analytics for every hotel at once.\n\n**Requires:** `chat-log-analytics` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-log-analytics` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Window start (inclusive), ISO 8601 with offset"},"description":"Window start (inclusive), ISO 8601 with offset"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Window end (inclusive), ISO 8601 with offset"},"description":"Window end (inclusive), ISO 8601 with offset"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_conversation_analytics","mcp":{"tool":"get_conversation_analytics","endpoint":"/mcp"},"a2a":{"skill":"get_conversation_analytics","endpoint":"/a2a"},"access":[{"feature":"chat-log-analytics","level":"READ","scope":"client"}],"entitlement":"chat-log-analytics","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/portfolio/analytics":{"get":{"operationId":"get_portfolio_analytics","tags":["analytics"],"summary":"Portfolio analytics","description":"The Portfolio page figures over [from, to] (ISO 8601 date-times, at most 400 UTC days) across every enabled hotel the caller may read with analytics in its plan: summed conversations, answered without handoff and open gaps against the previous window, a per-property table, the daily conversations per channel, the top 10 unanswered questions across properties (only for hotels whose conversations the caller may read), and `needsYou` — integration or website-sync errors and open knowledge gaps, most urgent first. Use get_conversation_analytics for one hotel, get_portfolio_overview for health and trends.\n\n**Requires:** `clients` READ (any), `chat-log-analytics` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","analytics:read","clients:read"]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Window start (inclusive), ISO 8601 with offset"},"description":"Window start (inclusive), ISO 8601 with offset"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Window end (inclusive), ISO 8601 with offset"},"description":"Window end (inclusive), ISO 8601 with offset"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_portfolio_analytics","mcp":{"tool":"get_portfolio_analytics","endpoint":"/mcp"},"a2a":{"skill":"get_portfolio_analytics","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"any"},{"feature":"chat-log-analytics","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/reports":{"get":{"operationId":"list_report_runs","tags":["analytics"],"summary":"List analytics report runs","description":"Page through analytics report runs (one row per run and hotel), newest first, across every hotel the caller may read — chat-log and AI-visibility runs alike, narrowed to the report types the caller holds. Filter by `type`, `status` and `clientId`. Each row says whether a report exists (`hasReport`); fetch it with get_chatlog_report / get_ai_visibility_report. Returns `items`, `nextCursor` and `total`.\n\n**Requires:** `chat-log-analytics` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}],"parameters":[{"name":"clientId","in":"query","required":false,"schema":{"description":"Only this hotel's runs","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Only this hotel's runs"},{"name":"type","in":"query","required":false,"schema":{"description":"Report type","type":"string","enum":["CHAT_LOGS","AI_VISIBILITY"]},"description":"Report type"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["QUEUED","IN_PROGRESS","ERROR","DONE"],"description":"Filter by run status: QUEUED | IN_PROGRESS | ERROR | DONE"},"description":"Filter by run status: QUEUED | IN_PROGRESS | ERROR | DONE"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_report_runs","mcp":{"tool":"list_report_runs","endpoint":"/mcp"},"a2a":{"skill":"list_report_runs","endpoint":"/a2a"},"access":[{"feature":"chat-log-analytics","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/portfolio/overview":{"get":{"operationId":"get_portfolio_overview","tags":["analytics"],"summary":"Portfolio overview","description":"Health metrics and conversation trends across every hotel in the caller's portfolio over a date window (YYYY-MM-DD). Optionally scoped to a group (multi-property parent) by groupId. 404 when the principal has no accessible clients. Use get_dashboard_stats for a single hotel.\n\n**Requires:** `clients` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD (inclusive)"},"description":"Start date YYYY-MM-DD (inclusive)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD (inclusive)"},"description":"End date YYYY-MM-DD (inclusive)"},{"name":"groupId","in":"query","required":false,"schema":{"description":"Limit to children of this multi-property group client","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Limit to children of this multi-property group client"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_portfolio_overview","mcp":{"tool":"get_portfolio_overview","endpoint":"/mcp"},"a2a":{"skill":"get_portfolio_overview","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/dashboard":{"get":{"operationId":"get_dashboard_stats","tags":["analytics"],"summary":"Client dashboard stats","description":"System-wide counts (active clients, users) and a recent activity feed for one hotel. The activityLimit parameter controls how many activity events are returned (1–50, default 10). Use get_portfolio_overview for cross-hotel analytics.\n\n**Requires:** `dashboard` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"activityLimit","in":"query","required":false,"schema":{"default":10,"description":"Number of recent activity items to return (1–50)","type":"integer","minimum":1,"maximum":50},"description":"Number of recent activity items to return (1–50)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_dashboard_stats","mcp":{"tool":"get_dashboard_stats","endpoint":"/mcp"},"a2a":{"skill":"get_dashboard_stats","endpoint":"/a2a"},"access":[{"feature":"dashboard","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/report/chatlogs":{"post":{"operationId":"run_chatlog_report","tags":["analytics"],"summary":"Run a chat-log analytics report","description":"Trigger an asynchronous chat-log analytics report for one hotel. The pipeline processes the logs and optionally emails the HTML report to the specified recipients. Returns the analyticsId (use get_chatlog_report to retrieve the HTML when ready). Use run_ai_visibility_report for AI visibility analytics.\n\n**Requires:** `chat-log-analytics` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `chat-log-analytics` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"run_chatlog_report","mcp":{"tool":"run_chatlog_report","endpoint":"/mcp"},"a2a":{"skill":"run_chatlog_report","endpoint":"/a2a"},"access":[{"feature":"chat-log-analytics","level":"EXECUTE","scope":"client"}],"entitlement":"chat-log-analytics","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"description":"Report window start as ISO 8601 date; default: 30 days ago","type":"string"},"endDate":{"description":"Report window end as ISO 8601 date; default: today","type":"string"},"recipients":{"description":"Email delivery; omit to skip email and only store the report","type":"object","properties":{"to":{"minItems":1,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"description":"Primary recipients"},"cc":{"description":"CC recipients","type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"bcc":{"description":"BCC recipients","type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["to"]}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/report/aivisibility":{"post":{"operationId":"run_ai_visibility_report","tags":["analytics"],"summary":"Run an AI visibility analytics report","description":"Trigger an asynchronous AI-visibility report for one hotel. Returns sessionId and status. Use get_ai_visibility_report to retrieve the HTML report once the pipeline completes. Use run_chatlog_report for conversation-quality analytics.\n\n**Requires:** `ai-visibility-analytics` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `ai-visibility-analytics` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"run_ai_visibility_report","mcp":{"tool":"run_ai_visibility_report","endpoint":"/mcp"},"a2a":{"skill":"run_ai_visibility_report","endpoint":"/a2a"},"access":[{"feature":"ai-visibility-analytics","level":"EXECUTE","scope":"client"}],"entitlement":"ai-visibility-analytics","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"recipients":{"description":"Optional email delivery of the finished report","type":"object","properties":{"to":{"minItems":1,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"description":"Primary recipients"},"cc":{"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"bcc":{"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["to"]}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/reports/chatlogs":{"get":{"operationId":"list_chatlog_reports","tags":["analytics"],"summary":"List chat-log analytics report history","description":"Page through past chat-log analytics runs for a hotel ordered newest first. Use get_chatlog_report to fetch the HTML of a specific run. Use list_ai_visibility_reports for AI-visibility runs.\n\n**Requires:** `chat-log-analytics` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["QUEUED","IN_PROGRESS","ERROR","DONE"],"description":"Filter by run status: QUEUED | IN_PROGRESS | ERROR | DONE"},"description":"Filter by run status: QUEUED | IN_PROGRESS | ERROR | DONE"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_chatlog_reports","mcp":{"tool":"list_chatlog_reports","endpoint":"/mcp"},"a2a":{"skill":"list_chatlog_reports","endpoint":"/a2a"},"access":[{"feature":"chat-log-analytics","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/reports/aivisibility":{"get":{"operationId":"list_ai_visibility_reports","tags":["analytics"],"summary":"List AI visibility analytics report history","description":"Page through past AI-visibility analytics runs for a hotel ordered newest first. Use get_ai_visibility_report to fetch the HTML of a specific run. Use list_chatlog_reports for chat-log runs.\n\n**Requires:** `ai-visibility-analytics` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["QUEUED","IN_PROGRESS","ERROR","DONE"],"description":"Filter by run status: QUEUED | IN_PROGRESS | ERROR | DONE"},"description":"Filter by run status: QUEUED | IN_PROGRESS | ERROR | DONE"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_ai_visibility_reports","mcp":{"tool":"list_ai_visibility_reports","endpoint":"/mcp"},"a2a":{"skill":"list_ai_visibility_reports","endpoint":"/a2a"},"access":[{"feature":"ai-visibility-analytics","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/report/chatlogs/{analyticsId}":{"get":{"operationId":"get_chatlog_report","tags":["analytics"],"summary":"Fetch a chat-log analytics report","description":"Retrieve a completed chat-log analytics report: with `format: \"html\"` (default) the run metadata and the full HTML (up to 2 MiB); with `format: \"xlsx\"` the metadata and a download `url` for the spreadsheet, valid for 5 minutes (`expiresAt`). 404 when the report does not exist or has not yet been generated. Use get_ai_visibility_report for AI-visibility reports.\n\n**Requires:** `chat-log-analytics` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"analyticsId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Analytics session id from list_chatlog_reports"},"description":"Analytics session id from list_chatlog_reports"},{"name":"format","in":"query","required":false,"schema":{"default":"html","description":"html: the report inline (≤ 2 MiB). xlsx: a short-lived download URL for the spreadsheet version","type":"string","enum":["html","xlsx"]},"description":"html: the report inline (≤ 2 MiB). xlsx: a short-lived download URL for the spreadsheet version"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_chatlog_report","mcp":{"tool":"get_chatlog_report","endpoint":"/mcp"},"a2a":{"skill":"get_chatlog_report","endpoint":"/a2a"},"access":[{"feature":"chat-log-analytics","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/report/aivisibility/{analyticsId}":{"get":{"operationId":"get_ai_visibility_report","tags":["analytics"],"summary":"Fetch an AI visibility analytics report","description":"Retrieve a completed AI-visibility analytics report: with `format: \"html\"` (default) the run metadata and the full HTML (up to 2 MiB); with `format: \"xlsx\"` the metadata and a download `url` for the spreadsheet, valid for 5 minutes (`expiresAt`). 404 when the report does not exist. Use get_chatlog_report for chat-log reports.\n\n**Requires:** `ai-visibility-analytics` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"analyticsId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Analytics session id from list_ai_visibility_reports"},"description":"Analytics session id from list_ai_visibility_reports"},{"name":"format","in":"query","required":false,"schema":{"default":"html","description":"html: the report inline (≤ 2 MiB). xlsx: a short-lived download URL for the spreadsheet version","type":"string","enum":["html","xlsx"]},"description":"html: the report inline (≤ 2 MiB). xlsx: a short-lived download URL for the spreadsheet version"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_ai_visibility_report","mcp":{"tool":"get_ai_visibility_report","endpoint":"/mcp"},"a2a":{"skill":"get_ai_visibility_report","endpoint":"/a2a"},"access":[{"feature":"ai-visibility-analytics","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/report/chatlogs/{analyticsId}/rerun":{"post":{"operationId":"rerun_chatlog_report","tags":["analytics"],"summary":"Rerun a failed chat-log analytics report","description":"Reset errored clients in an existing chat-log analytics session back to QUEUED and requeue the pipeline. Returns scheduled and (for AI_VISIBILITY sessions, which this tool rejects via type mismatch) failed counts. 404 when the session does not exist. Use rerun_ai_visibility_report for AI-visibility sessions.\n\n**Requires:** `chat-log-analytics` EXECUTE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"analyticsId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Analytics session id to rerun"},"description":"Analytics session id to rerun"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"rerun_chatlog_report","mcp":{"tool":"rerun_chatlog_report","endpoint":"/mcp"},"a2a":{"skill":"rerun_chatlog_report","endpoint":"/a2a"},"access":[{"feature":"chat-log-analytics","level":"EXECUTE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/report/aivisibility/{analyticsId}/rerun":{"post":{"operationId":"rerun_ai_visibility_report","tags":["analytics"],"summary":"Rerun a failed AI visibility analytics report","description":"Reset errored clients in an existing AI-visibility analytics session back to QUEUED and requeue the SQS pipeline. Returns scheduled and failed counts. 404 when the session does not exist. Use rerun_chatlog_report for chat-log sessions.\n\n**Requires:** `ai-visibility-analytics` EXECUTE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["analytics:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"analyticsId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Analytics session id to rerun"},"description":"Analytics session id to rerun"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"rerun_ai_visibility_report","mcp":{"tool":"rerun_ai_visibility_report","endpoint":"/mcp"},"a2a":{"skill":"rerun_ai_visibility_report","endpoint":"/a2a"},"access":[{"feature":"ai-visibility-analytics","level":"EXECUTE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/channels":{"get":{"operationId":"list_channels","tags":["channels"],"summary":"List connected channels","description":"Returns every messaging channel connected to a hotel (Instagram, Messenger, Gmail, Outlook, WhatsApp, ChatGPT guest app, …), with the reply-mode settings of each. Also returns `entitled` (channels feature in the plan), `guestappEntitled` (ChatGPT guest-app entitlement) and `guestMcpAvailable` (the ChatGPT guest app exists in this environment) — `connect_chatgpt_channel` works only when both of the last two are true. Use before connecting a channel to see what is already active.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_channels","mcp":{"tool":"list_channels","endpoint":"/mcp"},"a2a":{"skill":"list_channels","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/channels/instructions":{"get":{"operationId":"list_channel_instructions","tags":["channels"],"summary":"List channel instructions","description":"Returns all operator-authored style instructions for every channel type (WEB, GMAIL, OUTLOOK, INSTAGRAM, MESSENGER, WHATSAPP, SMS, CHATGPT). Each key holds an ordered list of titled notes the AI follows when responding on that channel. Use `add_channel_instruction` to add a note.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_channel_instructions","mcp":{"tool":"list_channel_instructions","endpoint":"/mcp"},"a2a":{"skill":"list_channel_instructions","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/channel/{channelType}/instruction":{"post":{"operationId":"add_channel_instruction","tags":["channels"],"summary":"Add a channel instruction","description":"Appends one titled operator instruction to a channel's ordered list. The AI follows these notes whenever it responds on that channel. Returns the new instruction object with its assigned id. Use `update_channel_instruction` to edit an existing note.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"channelType","in":"path","required":true,"schema":{"type":"string","enum":["WEB","GMAIL","OUTLOOK","INSTAGRAM","MESSENGER","WHATSAPP","SMS","CHATGPT"],"description":"Channel type: WEB | GMAIL | OUTLOOK | INSTAGRAM | MESSENGER | WHATSAPP | SMS | CHATGPT"},"description":"Channel type: WEB | GMAIL | OUTLOOK | INSTAGRAM | MESSENGER | WHATSAPP | SMS | CHATGPT"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_channel_instruction","mcp":{"tool":"add_channel_instruction","endpoint":"/mcp"},"a2a":{"skill":"add_channel_instruction","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":100,"description":"Short label shown in the console (max 100 chars)"},"text":{"type":"string","maxLength":1000,"description":"Instruction text the AI reads when responding on this channel (max 1000 chars)"}},"required":["title","text"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/channel/{channelType}/instruction/{instructionId}":{"put":{"operationId":"update_channel_instruction","tags":["channels"],"summary":"Update a channel instruction","description":"Replaces the title and text of one instruction by its id. Returns the updated instruction. 404 when the id is not found on that channel type.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"channelType","in":"path","required":true,"schema":{"type":"string","enum":["WEB","GMAIL","OUTLOOK","INSTAGRAM","MESSENGER","WHATSAPP","SMS","CHATGPT"],"description":"Channel type"},"description":"Channel type"},{"name":"instructionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Instruction id returned by add_channel_instruction"},"description":"Instruction id returned by add_channel_instruction"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_channel_instruction","mcp":{"tool":"update_channel_instruction","endpoint":"/mcp"},"a2a":{"skill":"update_channel_instruction","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":100,"description":"Replacement title"},"text":{"type":"string","maxLength":1000,"description":"Replacement text"}},"required":["title","text"],"additionalProperties":false}}}}},"delete":{"operationId":"delete_channel_instruction","tags":["channels"],"summary":"Delete a channel instruction","description":"Removes one instruction from a channel's list by its id. Removing an id that is already absent is a no-op. `update_channel_instruction` edits an existing instruction.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"channelType","in":"path","required":true,"schema":{"type":"string","enum":["WEB","GMAIL","OUTLOOK","INSTAGRAM","MESSENGER","WHATSAPP","SMS","CHATGPT"],"description":"Channel type"},"description":"Channel type"},{"name":"instructionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Instruction id to remove"},"description":"Instruction id to remove"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_channel_instruction","mcp":{"tool":"delete_channel_instruction","endpoint":"/mcp"},"a2a":{"skill":"delete_channel_instruction","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/channel/{channelId}":{"patch":{"operationId":"update_channel_settings","tags":["channels"],"summary":"Update channel settings","description":"Changes the reply mode of a connected channel: `autoReplyEnabled` turns automatic responses on/off; `draftOnly` puts replies in draft mode instead of sending. At least one field must be supplied. 404 when the channel connection is not found.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"channelId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Channel connection id (from list_channels)"},"description":"Channel connection id (from list_channels)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_channel_settings","mcp":{"tool":"update_channel_settings","endpoint":"/mcp"},"a2a":{"skill":"update_channel_settings","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"autoReplyEnabled":{"description":"Enable or disable automatic replies on this connection","type":"boolean"},"draftOnly":{"description":"When true, replies are placed in draft mode instead of sent","type":"boolean"}},"additionalProperties":false}}}}},"delete":{"operationId":"disconnect_channel","tags":["channels"],"summary":"Disconnect a channel","description":"Permanently disconnects and deletes a channel connection. The widget will no longer respond on that channel. Reconnect via the admin console or `get_channel_connect_link`. 404 when the connection id is not found.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"channelId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Channel connection id (from list_channels)"},"description":"Channel connection id (from list_channels)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disconnect_channel","mcp":{"tool":"disconnect_channel","endpoint":"/mcp"},"a2a":{"skill":"disconnect_channel","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/channel/{channel}/connectlink":{"get":{"operationId":"get_channel_connect_link","tags":["channels"],"summary":"Get channel connect link","description":"Returns the URL the operator must open in a signed-in browser to start an OAuth channel connection (Instagram, Messenger, Gmail, Outlook) — the connection is the third party's consent screen, so it cannot complete over the API. Optional `returnTo` (a Maison console, QA editor or admin client URL) is where the browser lands after consent; any other URL is refused with 400. WhatsApp uses Facebook Embedded Signup — the returned URL is the admin-console Channels tab where the operator completes that flow interactively. `requiresBrowserSession` is always true.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"channel","in":"path","required":true,"schema":{"type":"string","enum":["instagram","messenger","gmail","outlook","whatsapp"],"description":"Channel to connect: instagram | messenger | gmail | outlook | whatsapp"},"description":"Channel to connect: instagram | messenger | gmail | outlook | whatsapp"},{"name":"returnTo","in":"query","required":false,"schema":{"description":"Where the browser returns after consent: a URL under {SITE_HOST}/console/, {SITE_HOST}/qa/ or the admin host's /clients/ (OAuth channels only)","type":"string","maxLength":2000,"format":"uri"},"description":"Where the browser returns after consent: a URL under {SITE_HOST}/console/, {SITE_HOST}/qa/ or the admin host's /clients/ (OAuth channels only)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_channel_connect_link","mcp":{"tool":"get_channel_connect_link","endpoint":"/mcp"},"a2a":{"skill":"get_channel_connect_link","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/channel/chatgpt/connect":{"post":{"operationId":"connect_chatgpt_channel","tags":["channels"],"summary":"Connect the ChatGPT guest app","description":"Opts the hotel into the ChatGPT guest-app integration — records the connection in client_channels. 503 when the ChatGPT guest app does not exist in this environment (checked first, so it reveals nothing about the plan); 403 `not_entitled` when the `guestapp` feature is not in the plan. Use `list_channels` first: both `guestMcpAvailable` and `guestappEntitled` must be true. Returns the connection result; `alreadyConnected: true` when the opt-in already existed.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"connect_chatgpt_channel","mcp":{"tool":"connect_chatgpt_channel","endpoint":"/mcp"},"a2a":{"skill":"connect_chatgpt_channel","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/integrations/catalog":{"get":{"operationId":"list_integration_catalog","tags":["integrations"],"summary":"Integration catalog","description":"Returns the full integration provider catalog grouped by type (pms, bookingengine, payments, …), including credential/config fields and available tools for each provider, plus announced coming-soon placeholders. Use before `add_integration` to discover provider slugs and required fields.\n\n**Requires:** `clients` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_integration_catalog","mcp":{"tool":"list_integration_catalog","endpoint":"/mcp"},"a2a":{"skill":"list_integration_catalog","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/integrations":{"get":{"operationId":"list_client_integrations","tags":["integrations"],"summary":"List client integrations","description":"Returns all active integrations for a hotel with credentials MASKED (last 4 characters only — never decrypted). Optionally includes soft-deleted history rows via `includeRemoved`. Use `list_integration_catalog` to map provider slugs to human names.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"includeRemoved","in":"query","required":false,"schema":{"default":false,"description":"When true, the response also includes a `removed` array of historical rows","type":"boolean"},"description":"When true, the response also includes a `removed` array of historical rows"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_integrations","mcp":{"tool":"list_client_integrations","endpoint":"/mcp"},"a2a":{"skill":"list_client_integrations","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/integration/{provider}":{"put":{"operationId":"add_integration","tags":["integrations"],"summary":"Connect or update an integration","description":"Create or update a hotel's integration: creates a new integration row for the provider, or replaces an existing one's credentials, config, and tool audiences. Validates the provider against the registry, required config fields against the manifest, and toolAudiences keys. For `stripe` with a `secretKey`, also creates (or rotates) the hotel's Stripe webhook endpoint and stores its signing secret — 422 `stripe_key_invalid` / `stripe_webhook_failed` when Stripe refuses, with nothing saved. Re-run to update credentials or config. Returns the masked integration row after upsert.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$","description":"Provider slug, e.g. rezstream, mews, stscloud (from list_integration_catalog)"},"description":"Provider slug, e.g. rezstream, mews, stscloud (from list_integration_catalog)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_integration","mcp":{"tool":"add_integration","endpoint":"/mcp"},"a2a":{"skill":"add_integration","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"credentials":{"description":"Provider credential key-value pairs (encrypted at rest)","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"config":{"description":"Provider config values (e.g. propertyId, rfpFormId)","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"enabledToolIds":{"description":"Tool ids to enable; null = use manifest defaults","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"toolAudiences":{"description":"Per-tool audience map: deny | client | guest | all. Null clears the map.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["deny","client","guest","all"]}},{"type":"null"}]}},"additionalProperties":false}}}}},"delete":{"operationId":"remove_integration","tags":["integrations"],"summary":"Disconnect an integration","description":"Soft-deletes the active integration row and wipes all stored credentials and tokens; for `stripe` it also deletes the hotel's Stripe webhook endpoint (best-effort). The integration can be reconnected with `add_integration`. 404 when no active integration exists for the provider.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$","description":"Provider slug to disconnect"},"description":"Provider slug to disconnect"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_integration","mcp":{"tool":"remove_integration","endpoint":"/mcp"},"a2a":{"skill":"remove_integration","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/integration/{provider}/enable":{"post":{"operationId":"enable_integration","tags":["integrations"],"summary":"Enable an integration","description":"Re-enables a previously disabled integration — credentials and config are restored exactly as they were and its tools are served again at once. Idempotent: already-enabled is a no-op. 404 when no active integration exists.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$","description":"Provider slug"},"description":"Provider slug"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"enable_integration","mcp":{"tool":"enable_integration","endpoint":"/mcp"},"a2a":{"skill":"enable_integration","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/integration/{provider}/disable":{"post":{"operationId":"disable_integration","tags":["integrations"],"summary":"Disable an integration","description":"Pauses an integration — config and credentials are preserved but the integration is excluded from tool delivery at once, until re-enabled. Idempotent: already-disabled is a no-op. 404 when no active integration exists.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$","description":"Provider slug"},"description":"Provider slug"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disable_integration","mcp":{"tool":"disable_integration","endpoint":"/mcp"},"a2a":{"skill":"disable_integration","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/integration/{provider}/configcheck":{"get":{"operationId":"check_integration_config","tags":["integrations"],"summary":"Check an integration config value","description":"Validates one operator-entered config value against the provider before it can silently break a guest conversation. Returns the resolved object name, id and any required fields the operator still needs to supply. 404 when the value does not exist at the vendor. 409 when the integration is not saved or not yet connected.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9_]+$","description":"Provider slug, e.g. stscloud"},"description":"Provider slug, e.g. stscloud"},{"name":"field","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Config field key to check, e.g. rfpFormId"},"description":"Config field key to check, e.g. rfpFormId"},{"name":"value","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":256,"description":"The field value to validate against the provider"},"description":"The field value to validate against the provider"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"check_integration_config","mcp":{"tool":"check_integration_config","endpoint":"/mcp"},"a2a":{"skill":"check_integration_config","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/integration/{provider}/properties":{"get":{"operationId":"list_integration_properties","tags":["integrations"],"summary":"List integration properties","description":"Returns the properties (rezStream), bookable services (Mews) or businesses (ResNexus) of the connected account, as `properties: [{ id, name, timezone, currency, address, bookablePeriod? }]` — the choices for the integration's property field (`propertyId`, `serviceId`, `businessId`; set it with `add_integration`). Also refreshes the stored name and metadata of the currently selected item and clears an Error status the list proves stale. Mews: `refresh: true` also re-syncs the booking-engine configuration bypassing its cache. 409 when the integration is not saved or not yet connected; 502 when the vendor call fails.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"provider","in":"path","required":true,"schema":{"type":"string","enum":["rezstream","mews","resnexus"],"description":"Provider: rezstream | mews | resnexus"},"description":"Provider: rezstream | mews | resnexus"},{"name":"refresh","in":"query","required":false,"schema":{"default":false,"description":"Mews: re-sync the booking-engine configuration, bypassing its cache","type":"boolean"},"description":"Mews: re-sync the booking-engine configuration, bypassing its cache"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_integration_properties","mcp":{"tool":"list_integration_properties","endpoint":"/mcp"},"a2a":{"skill":"list_integration_properties","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/integration/{provider}/connectlink":{"post":{"operationId":"send_integration_connect_link","tags":["integrations"],"summary":"Email an integration connect invitation","description":"Emails the hotel's own account holder a one-time link to grant Maison access to their rezStream or STS Cloud account — the only way these integrations connect, because consent must come from the hotel. The recipient is the `emailId` saved on the integration (never a request value); STS Cloud also needs its OAuth Client Secret saved first. Returns `{ message, sentTo }`. 404 when the integration is not saved; 409 when the saved email (or STS secret) is missing; 503 when the connect flow is not configured in this environment; 502 when the email could not be sent. Each call issues a new link.\n\n**Requires:** `update-client` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"provider","in":"path","required":true,"schema":{"type":"string","enum":["rezstream","stscloud"],"description":"Provider: rezstream | stscloud"},"description":"Provider: rezstream | stscloud"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"send_integration_connect_link","mcp":{"tool":"send_integration_connect_link","endpoint":"/mcp"},"a2a":{"skill":"send_integration_connect_link","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"EXECUTE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/pms/rateplans":{"get":{"operationId":"list_pms_rate_plans","tags":["integrations"],"summary":"List PMS rate plans","description":"Returns the rate plans of the hotel's connected PMS (the provider's own response shape), e.g. to choose the rate a booking link or offer should use. Filters are passed to the PMS as given; Mews takes `serviceIds`. `rates` (default true), `rateGroups` and `availabilityBlockAssignments` (default false) select what Mews includes. 404 when the hotel has no active PMS.\n\n**Requires:** `hotel-config` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `hotel-config` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"serviceIds","in":"query","required":false,"schema":{"description":"Comma-separated PMS service ids (Mews)","type":"string","maxLength":1000},"description":"Comma-separated PMS service ids (Mews)"},{"name":"rateId","in":"query","required":false,"schema":{"description":"One rate plan id","type":"string","maxLength":200},"description":"One rate plan id"},{"name":"roomTypeId","in":"query","required":false,"schema":{"description":"Room type id","type":"string","maxLength":200},"description":"Room type id"},{"name":"hotelId","in":"query","required":false,"schema":{"description":"PMS hotel/property id","type":"string","maxLength":200},"description":"PMS hotel/property id"},{"name":"checkIn","in":"query","required":false,"schema":{"description":"Check-in date (YYYY-MM-DD)","type":"string","maxLength":40},"description":"Check-in date (YYYY-MM-DD)"},{"name":"checkOut","in":"query","required":false,"schema":{"description":"Check-out date (YYYY-MM-DD)","type":"string","maxLength":40},"description":"Check-out date (YYYY-MM-DD)"},{"name":"adults","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":50}},{"name":"children","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":50}},{"name":"rateCategories","in":"query","required":false,"schema":{"description":"Rate categories filter","type":"string","maxLength":500},"description":"Rate categories filter"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"rates","in":"query","required":false,"schema":{"default":true,"type":"boolean"}},{"name":"rateGroups","in":"query","required":false,"schema":{"default":false,"type":"boolean"}},{"name":"availabilityBlockAssignments","in":"query","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_pms_rate_plans","mcp":{"tool":"list_pms_rate_plans","endpoint":"/mcp"},"a2a":{"skill":"list_pms_rate_plans","endpoint":"/a2a"},"access":[{"feature":"hotel-config","level":"READ","scope":"client"}],"entitlement":"hotel-config","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/config":{"get":{"operationId":"get_hotel_config","tags":["configuration"],"summary":"Get hotel config","description":"Fetch the hotel configuration document (property fields such as name, address, phone, hours, policies). Does NOT include the chatbot tone; use `get_chatbot_tone` for that.\n\n**Requires:** `hotel-config` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_hotel_config","mcp":{"tool":"get_hotel_config","endpoint":"/mcp"},"a2a":{"skill":"get_hotel_config","endpoint":"/a2a"},"access":[{"feature":"hotel-config","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_hotel_config","tags":["configuration"],"summary":"Update hotel config","description":"Merge new fields into the hotel config (`set`), remove keys (`unset`), or declare value types (`types`). At least one of `set`, `unset`, or `types` must be provided. Returns the full updated hotel config.\n\n**Requires:** `hotel-config` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_hotel_config","mcp":{"tool":"update_hotel_config","endpoint":"/mcp"},"a2a":{"skill":"update_hotel_config","endpoint":"/a2a"},"access":[{"feature":"hotel-config","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"set":{"description":"Fields to add or update in the hotel config","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"unset":{"description":"Field keys to remove from the hotel config","type":"array","items":{"type":"string"}},"types":{"description":"Value-type declarations for new custom fields (e.g. { myField: 'string' })","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/config/tone":{"get":{"operationId":"get_chatbot_tone","tags":["configuration"],"summary":"Get chatbot tone","description":"Fetch the chatbot tone instructions for the hotel. Returns `{ tone, defaultTone }`: the current tone as a plain string and the platform default that `set_chatbot_tone` with `reset: true` writes. Use `set_chatbot_tone` to update it.\n\n**Requires:** `chatbot-tone` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_chatbot_tone","mcp":{"tool":"get_chatbot_tone","endpoint":"/mcp"},"a2a":{"skill":"get_chatbot_tone","endpoint":"/a2a"},"access":[{"feature":"chatbot-tone","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"set_chatbot_tone","tags":["configuration"],"summary":"Set chatbot tone","description":"Replace the chatbot tone instructions for the hotel (a free-text prompt that shapes the agent's voice and personality), or send `reset: true` to restore the platform default (`defaultTone` from `get_chatbot_tone`). Send exactly one of `tone` or `reset`. Returns the tone now stored.\n\n**Requires:** `chatbot-tone` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_chatbot_tone","mcp":{"tool":"set_chatbot_tone","endpoint":"/mcp"},"a2a":{"skill":"set_chatbot_tone","endpoint":"/a2a"},"access":[{"feature":"chatbot-tone","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"tone":{"description":"New tone instructions; replaces the existing value entirely","type":"string","maxLength":10000},"reset":{"description":"Restore the platform default tone instead of sending one","type":"boolean","const":true}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/config/runtime":{"get":{"operationId":"get_chat_runtime","tags":["configuration"],"summary":"Get chat runtime switches","description":"Read the chat widget's runtime switches: `branding.enabled` (the hotel's custom theme is applied) and `documents.enabled` (the agent may answer from uploaded documents). Use `update_chat_runtime` to change them; the theme itself is `get_theme` / `get_chat_styles`.\n\n**Requires:** `hotel-config` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_chat_runtime","mcp":{"tool":"get_chat_runtime","endpoint":"/mcp"},"a2a":{"skill":"get_chat_runtime","endpoint":"/a2a"},"access":[{"feature":"hotel-config","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_chat_runtime","tags":["configuration"],"summary":"Update chat runtime switches","description":"Switch the chat widget's custom theme (`branding`) and/or document answers (`documents`) on or off. Only the switches sent change; at least one is required. Recorded in the client activity feed. Returns the switches written.\n\n**Requires:** `hotel-config` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_chat_runtime","mcp":{"tool":"update_chat_runtime","endpoint":"/mcp"},"a2a":{"skill":"update_chat_runtime","endpoint":"/a2a"},"access":[{"feature":"hotel-config","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"branding":{"description":"Apply the hotel's custom chat theme","type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"documents":{"description":"Let the agent answer from uploaded documents","type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/translations":{"get":{"operationId":"get_translations","tags":["configuration"],"summary":"Get translations","description":"Fetch the full chat-widget translation map for the hotel. Returns `{ translations: { defaultLocale, languages: { <code>: {...} | false } } }`. Requires the translations entitlement.\n\n**Requires:** `translations` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `translations` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_translations","mcp":{"tool":"get_translations","endpoint":"/mcp"},"a2a":{"skill":"get_translations","endpoint":"/a2a"},"access":[{"feature":"translations","level":"READ","scope":"client"}],"entitlement":"translations","composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_translations","tags":["configuration"],"summary":"Update translations","description":"Replace the entire chat-widget translation map: `{ defaultLocale, languages }` where each language code (e.g. `en`, `pt_BR`) maps to its phrases or `false` (removed). At most 60 languages and 200 phrases each; phrase keys are identifiers; `openingMessages` is a string list; the default must be an active language. Validated exactly as the console's save; recorded in the activity feed. Requires the translations entitlement.\n\n**Requires:** `translations` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `translations` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["knowledge:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_translations","mcp":{"tool":"update_translations","endpoint":"/mcp"},"a2a":{"skill":"update_translations","endpoint":"/a2a"},"access":[{"feature":"translations","level":"WRITE","scope":"client"}],"entitlement":"translations","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"translations":{"type":"object","properties":{"defaultLocale":{"type":"string","pattern":"^[a-z]{2,3}(_[A-Z]{2})?$"},"languages":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2,3}(_[A-Z]{2})?$"},"additionalProperties":{"anyOf":[{"type":"boolean","const":false},{"type":"object","properties":{"openingMessages":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":4000}}},"additionalProperties":{"type":"string","maxLength":4000}}]}}},"required":["defaultLocale","languages"],"additionalProperties":false,"description":"Full translations object: `defaultLocale` and the `languages` map"}},"required":["translations"],"additionalProperties":false}}}}}},"/api/v1/translate":{"post":{"operationId":"translate_text","tags":["configuration"],"summary":"Translate text","description":"Machine-translate up to 10 short strings to a target locale using AWS Translate. Use for translating button labels, short prompts, or widget messages. Per-item failures fall back to the original text instead of failing the whole batch.\n\n**Requires:** `clients` READ (any). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"translate_text","mcp":{"tool":"translate_text","endpoint":"/mcp"},"a2a":{"skill":"translate_text","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"any"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":1000,"description":"Text to translate"},"sourceLocale":{"description":"BCP-47 source locale; omit to let AWS auto-detect","type":"string","minLength":1,"maxLength":35}},"required":["text"]},"description":"Items to translate (max 10)"},"targetLocale":{"type":"string","minLength":1,"maxLength":35,"description":"BCP-47 target locale, e.g. fr or zh-TW"}},"required":["items","targetLocale"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/theme":{"get":{"operationId":"get_theme","tags":["configuration"],"summary":"Get theme","description":"Fetch the hotel's chat-widget theme: seed colour and visual asset URLs (icon, hero, herodark). Requires the branding entitlement.\n\n**Requires:** `branding` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `branding` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_theme","mcp":{"tool":"get_theme","endpoint":"/mcp"},"a2a":{"skill":"get_theme","endpoint":"/a2a"},"access":[{"feature":"branding","level":"READ","scope":"client"}],"entitlement":"branding","composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"set_theme_color","tags":["configuration"],"summary":"Set theme seed colour","description":"Update the chat-widget seed colour (CUI seed color string). This drives the brand colour of the embedded widget. Requires the branding entitlement.\n\n**Requires:** `branding` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `branding` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_theme_color","mcp":{"tool":"set_theme_color","endpoint":"/mcp"},"a2a":{"skill":"set_theme_color","endpoint":"/a2a"},"access":[{"feature":"branding","level":"WRITE","scope":"client"}],"entitlement":"branding","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cuiSeedColor":{"type":"string","minLength":1,"maxLength":200,"description":"CUI seed colour as a CSS colour value (hex or named)"}},"required":["cuiSeedColor"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/theme/visual/{kind}":{"get":{"operationId":"get_theme_visual","tags":["configuration"],"summary":"Get theme visual","description":"Read the raw SVG text for one of the hotel's chat-widget visual assets (icon, hero, or herodark). Returns 404 when no visual of that kind has been uploaded. Requires the branding entitlement.\n\n**Requires:** `branding` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `branding` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["icon","hero","herodark"],"description":"Visual asset kind"},"description":"Visual asset kind"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_theme_visual","mcp":{"tool":"get_theme_visual","endpoint":"/mcp"},"a2a":{"skill":"get_theme_visual","endpoint":"/a2a"},"access":[{"feature":"branding","level":"READ","scope":"client"}],"entitlement":"branding","composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"upload_theme_visual","tags":["configuration"],"summary":"Upload theme visual","description":"Upload or replace a chat-widget visual asset (icon, hero, or herodark): PNG, JPEG, GIF, WebP or SVG (SVG is sanitised). Send the file inline as `bytesBase64` (at most 64 KiB) or, for up to 5 MB, the `uploadId` from `create_theme_visual_upload` after PUTting the file. Returns the URL of the stored asset. Requires the branding entitlement.\n\n**Requires:** `branding` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `branding` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["icon","hero","herodark"],"description":"Visual asset kind"},"description":"Visual asset kind"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"upload_theme_visual","mcp":{"tool":"upload_theme_visual","endpoint":"/mcp"},"a2a":{"skill":"upload_theme_visual","endpoint":"/a2a"},"access":[{"feature":"branding","level":"WRITE","scope":"client"}],"entitlement":"branding","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Original filename"},"mimeType":{"type":"string","minLength":1,"maxLength":200,"description":"MIME type, e.g. image/svg+xml"},"bytesBase64":{"description":"File content, canonical base64-encoded; decoded size must not exceed 64 KiB. Send this or `uploadId`, not both","type":"string","minLength":4},"uploadId":{"description":"Id of a presigned upload already PUT to S3 (up to 5 MB). Send this or `bytesBase64`, not both","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["filename","mimeType"],"additionalProperties":false}}}}},"delete":{"operationId":"remove_theme_visual","tags":["configuration"],"summary":"Remove theme visual","description":"Delete a chat-widget visual asset (icon, hero, or herodark) from S3 and the client config. Requires the branding entitlement.\n\n**Requires:** `branding` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `branding` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["icon","hero","herodark"],"description":"Visual asset kind"},"description":"Visual asset kind"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_theme_visual","mcp":{"tool":"remove_theme_visual","endpoint":"/mcp"},"a2a":{"skill":"remove_theme_visual","endpoint":"/a2a"},"access":[{"feature":"branding","level":"WRITE","scope":"client"}],"entitlement":"branding","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/theme/visual/upload":{"post":{"operationId":"create_theme_visual_upload","tags":["configuration"],"summary":"Create a theme visual upload","description":"Start a theme visual upload larger than 64 KiB (up to 5 MB): returns `{ uploadId, uploadUrl, method, headers, expiresAt }`. PUT the raw file to `uploadUrl` with exactly `headers` within 15 minutes, then call `upload_theme_visual` with the `uploadId` (instead of `bytesBase64`). Requires the branding entitlement.\n\n**Requires:** `branding` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `branding` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_theme_visual_upload","mcp":{"tool":"create_theme_visual_upload","endpoint":"/mcp"},"a2a":{"skill":"create_theme_visual_upload","endpoint":"/a2a"},"access":[{"feature":"branding","level":"WRITE","scope":"client"}],"entitlement":"branding","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"],"description":"Content-Type of the file you will PUT; the URL is signed for it"},"sizeBytes":{"type":"integer","minimum":1,"maximum":5242880,"description":"Exact size of the file in bytes (at most 5 MB); the URL is signed for it"}},"required":["mimeType","sizeBytes"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/theme/icon":{"post":{"operationId":"generate_theme_icon","tags":["configuration"],"summary":"Generate the chat icon in the theme colour","description":"Generate the chat widget's launcher icon in the hotel's theme colour and store it as the `icon` visual: it replaces the current chat icon. The icon is a rounded square in `color` (default: the theme seed colour set with `set_theme_color`) with a speech-bubble glyph in near-white or near-black, whichever contrasts more. Returns `{ url, color }`; the operator can preview it on the Theme page. Running it again replaces the icon again. Requires the branding entitlement.\n\n**Requires:** `branding` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `branding` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"generate_theme_icon","mcp":{"tool":"generate_theme_icon","endpoint":"/mcp"},"a2a":{"skill":"generate_theme_icon","endpoint":"/a2a"},"access":[{"feature":"branding","level":"WRITE","scope":"client"}],"entitlement":"branding","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"color":{"description":"Icon colour as #rgb or #rrggbb; defaults to the theme seed colour","type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/theme/chatstyles":{"get":{"operationId":"get_chat_styles","tags":["configuration"],"summary":"Get chat styles","description":"Read the chat widget's full style map (`chatStyles`: the seed colour `cuiSeedColor` and every other widget style token the console's theme editor writes). For just the seed colour and visual URLs use `get_theme`. Requires the branding entitlement.\n\n**Requires:** `branding` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `branding` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_chat_styles","mcp":{"tool":"get_chat_styles","endpoint":"/mcp"},"a2a":{"skill":"get_chat_styles","endpoint":"/a2a"},"access":[{"feature":"branding","level":"READ","scope":"client"}],"entitlement":"branding","composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"set_chat_styles","tags":["configuration"],"summary":"Set chat styles","description":"Replace the chat widget's full style map (`chatStyles`) — send every token you want kept (read it first with `get_chat_styles`); the widget's cached styles are refreshed. To change only the seed colour use `set_theme_color`. Recorded in the activity feed. Requires the branding entitlement.\n\n**Requires:** `branding` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `branding` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_chat_styles","mcp":{"tool":"set_chat_styles","endpoint":"/mcp"},"a2a":{"skill":"set_chat_styles","endpoint":"/a2a"},"access":[{"feature":"branding","level":"WRITE","scope":"client"}],"entitlement":"branding","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatStyles":{"type":"object","propertyNames":{"type":"string","maxLength":100},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},"description":"Style token → value, e.g. { cuiSeedColor: \"<hex colour>\" }"}},"required":["chatStyles"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/mediaassets":{"get":{"operationId":"list_media_assets","tags":["configuration"],"summary":"List media assets","description":"List all media assets in the hotel's library (images used in knowledge articles, widget customisations, etc.). Requires the update-client entitlement.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_media_assets","mcp":{"tool":"list_media_assets","endpoint":"/mcp"},"a2a":{"skill":"list_media_assets","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/mediaasset/upload":{"post":{"operationId":"create_media_upload","tags":["configuration"],"summary":"Create a media upload","description":"Start a media-library upload larger than 64 KiB (up to 5 MB): returns `{ uploadId, uploadUrl, method, headers, expiresAt }`. PUT the raw file to `uploadUrl` with exactly `headers` within 15 minutes, then call `upload_media_asset` with the `uploadId` (instead of `bytesBase64`). Requires the update-client entitlement.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_media_upload","mcp":{"tool":"create_media_upload","endpoint":"/mcp"},"a2a":{"skill":"create_media_upload","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"],"description":"Content-Type of the file you will PUT; the URL is signed for it"},"sizeBytes":{"type":"integer","minimum":1,"maximum":5242880,"description":"Exact size of the file in bytes (at most 5 MB); the URL is signed for it"}},"required":["mimeType","sizeBytes"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/mediaasset":{"post":{"operationId":"upload_media_asset","tags":["configuration"],"summary":"Upload media asset","description":"Add an image (PNG, JPEG, GIF, WebP or SVG) to the hotel's media library. Send the file inline as `bytesBase64` (at most 64 KiB) or, for up to 5 MB, the `uploadId` from `create_media_upload` after PUTting the file. Returns the stored asset record. Requires the update-client entitlement.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"upload_media_asset","mcp":{"tool":"upload_media_asset","endpoint":"/mcp"},"a2a":{"skill":"upload_media_asset","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Original filename"},"mimeType":{"type":"string","minLength":1,"maxLength":200,"description":"MIME type, e.g. image/svg+xml"},"bytesBase64":{"description":"File content, canonical base64-encoded; decoded size must not exceed 64 KiB. Send this or `uploadId`, not both","type":"string","minLength":4},"uploadId":{"description":"Id of a presigned upload already PUT to S3 (up to 5 MB). Send this or `bytesBase64`, not both","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":{"description":"Optional caption or description","type":"string","maxLength":500},"published":{"default":false,"description":"Whether the asset is publicly visible immediately","type":"boolean"}},"required":["filename","mimeType"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/mediaasset/{assetId}":{"patch":{"operationId":"update_media_asset","tags":["configuration"],"summary":"Update media asset","description":"Update the description or published state of an existing media asset. At least one of `description` or `published` must be provided. Requires the update-client entitlement.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Media asset id"},"description":"Media asset id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_media_asset","mcp":{"tool":"update_media_asset","endpoint":"/mcp"},"a2a":{"skill":"update_media_asset","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"description":"New caption or description","type":"string","maxLength":500},"published":{"description":"Published state","type":"boolean"}},"additionalProperties":false}}}}},"delete":{"operationId":"remove_media_asset","tags":["configuration"],"summary":"Remove media asset","description":"Delete a media asset from S3 and the hotel's media library. Requires the update-client entitlement.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Media asset id"},"description":"Media asset id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_media_asset","mcp":{"tool":"remove_media_asset","endpoint":"/mcp"},"a2a":{"skill":"remove_media_asset","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/notes":{"get":{"operationId":"list_client_notes","tags":["configuration"],"summary":"List client notes","description":"Page through operator notes on a client, pinned notes first. Returns serialised note objects and an optional cursor for the next page. Requires the client-notes entitlement.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `client-notes` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"cursor","in":"query","required":false,"schema":{"description":"Pagination cursor (note id) from the previous page's `nextCursor`","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Pagination cursor (note id) from the previous page's `nextCursor`"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_notes","mcp":{"tool":"list_client_notes","endpoint":"/mcp"},"a2a":{"skill":"list_client_notes","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":"client-notes","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/note":{"post":{"operationId":"add_client_note","tags":["configuration"],"summary":"Add client note","description":"Create a new operator note on the client. Notes support Markdown. The new note is attributed to the calling user. Requires the client-notes entitlement.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `client-notes` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_client_note","mcp":{"tool":"add_client_note","endpoint":"/mcp"},"a2a":{"skill":"add_client_note","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"client-notes","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bodyMarkdown":{"type":"string","minLength":1,"maxLength":100000,"description":"Note body in Markdown; supports headings, lists, code blocks"},"pinned":{"default":false,"description":"Pin the note to the top of the list","type":"boolean"}},"required":["bodyMarkdown"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/note/{noteId}":{"patch":{"operationId":"update_client_note","tags":["configuration"],"summary":"Update client note","description":"Edit the body or pinned state of an existing note. Only the note's author or a Maison admin may update it. Pass `updatedDate` from the fetched note for optimistic concurrency — if the note was modified since, a 409 Conflict is returned. Requires the client-notes entitlement.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `client-notes` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"noteId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Note id"},"description":"Note id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_client_note","mcp":{"tool":"update_client_note","endpoint":"/mcp"},"a2a":{"skill":"update_client_note","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"client-notes","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"bodyMarkdown":{"description":"New note body; omit to leave unchanged","type":"string","minLength":1,"maxLength":100000},"pinned":{"description":"New pinned state; omit to leave unchanged","type":"boolean"},"updatedDate":{"description":"ISO timestamp from the fetched note for optimistic concurrency","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"additionalProperties":false}}}}},"delete":{"operationId":"delete_client_note","tags":["configuration"],"summary":"Delete client note","description":"Soft-delete a note from the client. Only the note's author or a Maison admin may delete it. Requires the client-notes entitlement.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `client-notes` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"noteId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Note id"},"description":"Note id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_client_note","mcp":{"tool":"delete_client_note","endpoint":"/mcp"},"a2a":{"skill":"delete_client_note","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"client-notes","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/note/{noteId}/versions":{"get":{"operationId":"list_note_versions","tags":["configuration"],"summary":"List note versions","description":"Page through the version history of a note, newest first. Returns serialised version objects and a numeric cursor for the next page. Requires the client-notes entitlement.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `client-notes` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"noteId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Note id"},"description":"Note id"},{"name":"cursor","in":"query","required":false,"schema":{"description":"Numeric cursor from the previous page's `nextCursor`","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"description":"Numeric cursor from the previous page's `nextCursor`"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_note_versions","mcp":{"tool":"list_note_versions","endpoint":"/mcp"},"a2a":{"skill":"list_note_versions","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":"client-notes","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/emails":{"get":{"operationId":"list_client_emails","tags":["configuration"],"summary":"List client emails","description":"Paginated list of email messages logged for the hotel. Supports filtering by status, source, date range and search. Returns summaries only; use `get_client_email` for the full body. Requires the client-emails entitlement.\n\n**Requires:** `client-emails` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `client-emails` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"page","in":"query","required":false,"schema":{"default":1,"description":"Page number (1-based)","type":"integer","minimum":1,"maximum":9007199254740991},"description":"Page number (1-based)"},{"name":"pageSize","in":"query","required":false,"schema":{"default":50,"description":"Results per page (max 100)","type":"integer","minimum":1,"maximum":100},"description":"Results per page (max 100)"},{"name":"sort","in":"query","required":false,"schema":{"default":"createdDate","description":"Sort column","type":"string","enum":["createdDate","sentDate","status","source"]},"description":"Sort column"},{"name":"order","in":"query","required":false,"schema":{"default":"desc","description":"Sort direction","type":"string","enum":["asc","desc"]},"description":"Sort direction"},{"name":"status","in":"query","required":false,"schema":{"description":"Filter by one or more statuses, e.g. [\"sent\", \"failed\"]","type":"array","items":{"type":"string"}},"description":"Filter by one or more statuses, e.g. [\"sent\", \"failed\"]"},{"name":"source","in":"query","required":false,"schema":{"description":"Filter by one or more source identifiers","type":"array","items":{"type":"string"}},"description":"Filter by one or more source identifiers"},{"name":"search","in":"query","required":false,"schema":{"description":"Case-insensitive search on subject or from","type":"string","maxLength":200},"description":"Case-insensitive search on subject or from"},{"name":"from","in":"query","required":false,"schema":{"description":"Inclusive lower bound on created date (ISO 8601)","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"Inclusive lower bound on created date (ISO 8601)"},{"name":"to","in":"query","required":false,"schema":{"description":"Exclusive upper bound on created date (ISO 8601)","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"Exclusive upper bound on created date (ISO 8601)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_emails","mcp":{"tool":"list_client_emails","endpoint":"/mcp"},"a2a":{"skill":"list_client_emails","endpoint":"/a2a"},"access":[{"feature":"client-emails","level":"READ","scope":"client"}],"entitlement":"client-emails","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/email/{emailId}":{"get":{"operationId":"get_client_email","tags":["configuration"],"summary":"Get client email","description":"Fetch the full detail of a single logged email, including the HTML/text body and event timeline. Requires the client-emails entitlement.\n\n**Requires:** `client-emails` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `client-emails` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"emailId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Email id"},"description":"Email id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_email","mcp":{"tool":"get_client_email","endpoint":"/mcp"},"a2a":{"skill":"get_client_email","endpoint":"/a2a"},"access":[{"feature":"client-emails","level":"READ","scope":"client"}],"entitlement":"client-emails","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/email/{emailId}/attachment/{index}":{"get":{"operationId":"get_client_email_attachment","tags":["configuration"],"summary":"Get email attachment URL","description":"Generate a pre-signed download URL for an attachment at the given zero-based index on a logged email. The URL is short-lived. Requires the client-emails entitlement.\n\n**Requires:** `client-emails` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `client-emails` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"emailId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Email id"},"description":"Email id"},{"name":"index","in":"path","required":true,"schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based attachment index"},"description":"Zero-based attachment index"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_email_attachment","mcp":{"tool":"get_client_email_attachment","endpoint":"/mcp"},"a2a":{"skill":"get_client_email_attachment","endpoint":"/a2a"},"access":[{"feature":"client-emails","level":"READ","scope":"client"}],"entitlement":"client-emails","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/settings":{"get":{"operationId":"list_client_settings","tags":["configuration"],"summary":"List client settings","description":"Page through the hotel's regions, departments and tags. Without `kind`, returns the first page (`limit`) of all three; with `kind`, returns that category only and accepts its `after` cursor (each page carries `items`, `total`, `nextCursor`, `hasMore`). `search` filters case-insensitively. Use `add_client_setting` to create entries.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"query","required":false,"schema":{"description":"One category; required to page with `after`","type":"string","enum":["region","department","tag"]},"description":"One category; required to page with `after`"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size per category","type":"integer","minimum":1,"maximum":100},"description":"Page size per category"},{"name":"after","in":"query","required":false,"schema":{"description":"Cursor from the category's `nextCursor`; needs `kind`","type":"string","minLength":1},"description":"Cursor from the category's `nextCursor`; needs `kind`"},{"name":"search","in":"query","required":false,"schema":{"description":"Case-insensitive filter applied to the categories returned","type":"string","maxLength":100},"description":"Case-insensitive filter applied to the categories returned"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_settings","mcp":{"tool":"list_client_settings","endpoint":"/mcp"},"a2a":{"skill":"list_client_settings","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/setting/{kind}":{"post":{"operationId":"add_client_setting","tags":["configuration"],"summary":"Add client setting","description":"Create a new region, department, or tag for the hotel. The `kind` field selects the category. Returns the created item.\n\n**Requires:** `clients` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["region","department","tag"],"description":"Setting type"},"description":"Setting type"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_client_setting","mcp":{"tool":"add_client_setting","endpoint":"/mcp"},"a2a":{"skill":"add_client_setting","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Display name"},"description":{"description":"Optional description","type":"string","maxLength":1000}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/setting/{kind}/{settingId}":{"put":{"operationId":"update_client_setting","tags":["configuration"],"summary":"Update client setting","description":"Update the name or description of an existing region, department, or tag. At least one field must be provided. Returns the updated item, or 404 if not found.\n\n**Requires:** `clients` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["region","department","tag"],"description":"Setting type"},"description":"Setting type"},{"name":"settingId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Setting id"},"description":"Setting id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_client_setting","mcp":{"tool":"update_client_setting","endpoint":"/mcp"},"a2a":{"skill":"update_client_setting","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New display name","type":"string","minLength":1,"maxLength":200},"description":{"description":"New description","type":"string","maxLength":1000}},"additionalProperties":false}}}}},"delete":{"operationId":"remove_client_setting","tags":["configuration"],"summary":"Remove client setting","description":"Disable (soft-delete) a region or department, or permanently delete a tag. The `kind` field selects the category.\n\n**Requires:** `clients` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["region","department","tag"],"description":"Setting type"},"description":"Setting type"},{"name":"settingId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Setting id"},"description":"Setting id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_client_setting","mcp":{"tool":"remove_client_setting","endpoint":"/mcp"},"a2a":{"skill":"remove_client_setting","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/subscribers":{"get":{"operationId":"list_report_subscribers","tags":["configuration"],"summary":"List report subscribers","description":"List all active report email subscribers for the hotel, including linked user details where available.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_report_subscribers","mcp":{"tool":"list_report_subscribers","endpoint":"/mcp"},"a2a":{"skill":"list_report_subscribers","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"post":{"operationId":"add_report_subscribers","tags":["configuration"],"summary":"Add report subscribers","description":"Add one or more email addresses as report subscribers for the hotel. Resolves known user accounts; unknown addresses are stored as raw emails. Returns the count of newly inserted rows. Recorded in the activity feed. Requires the update-client entitlement.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_report_subscribers","mcp":{"tool":"add_report_subscribers","endpoint":"/mcp"},"a2a":{"skill":"add_report_subscribers","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"minItems":1,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"description":"Email addresses to add as subscribers"},"emailType":{"type":"string","enum":["CHAT_LOG_ANALYTICS","AI_VISIBILITY_ANALYTICS","WEBSITE_SYNC_REPORT"],"description":"Report type to subscribe to"}},"required":["emails","emailType"],"additionalProperties":false}}}}},"delete":{"operationId":"remove_report_subscribers","tags":["configuration"],"summary":"Remove report subscribers","description":"Soft-delete report subscribers by their subscriber row ids. Only rows that belong to the specified client are removed; returns how many were. Recorded in the activity feed. Requires the update-client entitlement.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `update-client` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"ids","in":"query","required":true,"schema":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Subscriber row ids to remove (from `list_report_subscribers`)"},"description":"Subscriber row ids to remove (from `list_report_subscribers`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"remove_report_subscribers","mcp":{"tool":"remove_report_subscribers","endpoint":"/mcp"},"a2a":{"skill":"remove_report_subscribers","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":"update-client","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/notifications":{"get":{"operationId":"get_staff_notification_emails","tags":["configuration"],"summary":"Get staff notification emails","description":"Returns the list of staff email addresses that receive upsell and payment-notice notifications for a hotel. Requires the hotel-config entitlement.\n\n**Requires:** `hotel-config` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `hotel-config` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_staff_notification_emails","mcp":{"tool":"get_staff_notification_emails","endpoint":"/mcp"},"a2a":{"skill":"get_staff_notification_emails","endpoint":"/a2a"},"access":[{"feature":"hotel-config","level":"READ","scope":"client"}],"entitlement":"hotel-config","composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"set_staff_notification_emails","tags":["configuration"],"summary":"Set staff notification emails","description":"Replaces the list of staff email addresses that receive upsell and payment-notice notifications for a hotel (trimmed, lower-cased, de-duplicated). Send an empty array to clear all recipients. Recorded in the activity feed. Requires the hotel-config entitlement.\n\n**Requires:** `hotel-config` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `hotel-config` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_staff_notification_emails","mcp":{"tool":"set_staff_notification_emails","endpoint":"/mcp"},"a2a":{"skill":"set_staff_notification_emails","endpoint":"/a2a"},"access":[{"feature":"hotel-config","level":"WRITE","scope":"client"}],"entitlement":"hotel-config","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"staffNotificationEmails":{"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"description":"Email addresses to notify (replaces the current list)"}},"required":["staffNotificationEmails"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/access":{"get":{"operationId":"get_client_access","tags":["features"],"summary":"Get client access","description":"For every feature in the catalogue, returns whether the caller is entitled (plan), and whether they may read, write or execute it on this client; plus `lockedFeatures` (features the plan shows locked — offered as an upgrade, not hidden) and `lockedMessage` (the plan's locked copy, or the default). Shows which features are in the client's plan and what the caller may do with each.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_access","mcp":{"tool":"get_client_access","endpoint":"/mcp"},"a2a":{"skill":"get_client_access","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/features":{"get":{"operationId":"list_client_features","tags":["features"],"summary":"List client features","description":"Returns the feature strings currently in the client's plan (layer-1 entitlements). Maison-only. Use `get_client_access` to see what the caller can do with each feature.\n\n**Requires:** `client-feature-management` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_features","mcp":{"tool":"list_client_features","endpoint":"/mcp"},"a2a":{"skill":"list_client_features","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"set_client_features","tags":["features"],"summary":"Set client features","description":"Grant and/or revoke a set of features. Applies grants first, then revocations; on a client with a plan template each is kept as an override. Returns the resulting feature list. Maison-only.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).\n\n**Composite of:** `grant_client_feature`, `revoke_client_feature`.","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_client_features","mcp":{"tool":"set_client_features","endpoint":"/mcp"},"a2a":{"skill":"set_client_features","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":["grant_client_feature","revoke_client_feature"],"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"grant":{"description":"Feature names to add to the plan","type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"revoke":{"description":"Feature names to remove from the plan","type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/feature":{"post":{"operationId":"grant_client_feature","tags":["features"],"summary":"Grant client feature","description":"Add a single feature to the client's plan. Maison-only. On a client with a plan template the grant is kept as an \"on\" override, so a later reconcile does not undo it. Returns `{ feature }` on success. 404 when the feature name is not in the catalogue.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"grant_client_feature","mcp":{"tool":"grant_client_feature","endpoint":"/mcp"},"a2a":{"skill":"grant_client_feature","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"feature":{"type":"string","minLength":1,"maxLength":200,"description":"Feature name to grant"}},"required":["feature"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/feature/{feature}":{"delete":{"operationId":"revoke_client_feature","tags":["features"],"summary":"Revoke client feature","description":"Remove a single feature from the client's plan. Maison-only. Destructive — the client will immediately lose access to anything gated on this feature. On a client with a plan template the revoke is kept as an \"off\" override.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"feature","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Feature name to revoke"},"description":"Feature name to revoke"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"revoke_client_feature","mcp":{"tool":"revoke_client_feature","endpoint":"/mcp"},"a2a":{"skill":"revoke_client_feature","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/children/feature":{"post":{"operationId":"grant_feature_to_children","tags":["features"],"summary":"Grant feature to children","description":"Add a feature to every child property's plan. Returns a per-child result array. Maison-only. Use for bulk-entitling a feature across an entire portfolio hierarchy.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"grant_feature_to_children","mcp":{"tool":"grant_feature_to_children","endpoint":"/mcp"},"a2a":{"skill":"grant_feature_to_children","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"feature":{"type":"string","minLength":1,"maxLength":200,"description":"Feature name to grant to all children"}},"required":["feature"],"additionalProperties":false}}}}}},"/api/v1/featureplans":{"get":{"operationId":"list_plan_templates","tags":["features"],"summary":"List plan templates","description":"List all non-deleted plan templates with their features (`[{ feature, state }]`, state \"on\" or \"locked\"), locked message and counts (`client_count`, `on_count`, `locked_count`). Maison-only. Use `get_plan_template` for a single template's full detail.\n\n**Requires:** `client-feature-management` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:read"]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_plan_templates","mcp":{"tool":"list_plan_templates","endpoint":"/mcp"},"a2a":{"skill":"list_plan_templates","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/featureplan/{templateId}":{"get":{"operationId":"get_plan_template","tags":["features"],"summary":"Get plan template","description":"Return one plan template by id, including its features with their states, locked message and counts. Maison-only. 404 when the template has been deleted or the id is unknown.\n\n**Requires:** `client-feature-management` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:read"]}],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Plan template id"},"description":"Plan template id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_plan_template","mcp":{"tool":"get_plan_template","endpoint":"/mcp"},"a2a":{"skill":"get_plan_template","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_plan_template","tags":["features"],"summary":"Update plan template","description":"Update the name, description, locked message or features (with their states) of an existing plan template; changing the features reconciles every client on the plan. Maison-only. 404 when the template is unknown or deleted; 400 for a locked Maison-only feature.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Plan template id"},"description":"Plan template id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_plan_template","mcp":{"tool":"update_plan_template","endpoint":"/mcp"},"a2a":{"skill":"update_plan_template","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New template name","type":"string","minLength":1,"maxLength":200},"description":{"description":"New description","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"locked_message":{"description":"Copy a client sees on a locked feature; null or blank uses the default (\"This feature isn't part of your plan. Contact Maison support to enable it.\")","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"features":{"description":"Replacement features with their states (replaces the whole list)","maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"description":"Feature name (on)"},{"type":"object","properties":{"feature":{"type":"string","minLength":1,"maxLength":64,"description":"Feature name"},"state":{"type":"string","enum":["on","locked"],"description":"\"on\" entitles; \"locked\" shows the feature locked with the plan's message"}},"required":["feature","state"],"additionalProperties":false}]}}},"additionalProperties":false}}}}},"delete":{"operationId":"delete_plan_template","tags":["features"],"summary":"Delete plan template","description":"Soft-delete a plan template. Maison-only. Destructive. Refused (409) while any active client is on the template — move them to another plan first. 404 when already deleted or unknown.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Plan template id"},"description":"Plan template id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_plan_template","mcp":{"tool":"delete_plan_template","endpoint":"/mcp"},"a2a":{"skill":"delete_plan_template","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/featureplan":{"post":{"operationId":"create_plan_template","tags":["features"],"summary":"Create plan template","description":"Create a new plan template. Each feature is \"on\" or \"locked\" (a plain name means on); a feature left out is off. A Maison-only feature cannot be locked (400). Maison-only. 409 when a template with the same name already exists. Returns the created template.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_plan_template","mcp":{"tool":"create_plan_template","endpoint":"/mcp"},"a2a":{"skill":"create_plan_template","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Template name"},"description":{"description":"Optional description","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"locked_message":{"description":"Copy a client sees on a locked feature; null or blank uses the default (\"This feature isn't part of your plan. Contact Maison support to enable it.\")","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"features":{"default":[],"description":"Initial features with their states","maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"description":"Feature name (on)"},{"type":"object","properties":{"feature":{"type":"string","minLength":1,"maxLength":64,"description":"Feature name"},"state":{"type":"string","enum":["on","locked"],"description":"\"on\" entitles; \"locked\" shows the feature locked with the plan's message"}},"required":["feature","state"],"additionalProperties":false}]}}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/plan":{"get":{"operationId":"get_client_plan","tags":["features"],"summary":"Get client plan","description":"Return the client's assigned plan template, its overrides (`[{ feature, state }]`), the effective entitlement (`effective`), the features shown locked (`locked`) and the drift: features the client has that its plan and overrides don't call for (`extra`), and effective features it is missing (`missing`). Maison-only. 404 when no template is assigned.\n\n**Requires:** `client-feature-management` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_plan","mcp":{"tool":"get_client_plan","endpoint":"/mcp"},"a2a":{"skill":"get_client_plan","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"assign_plan_template","tags":["features"],"summary":"Assign plan template","description":"Assign or remove the client's plan template (pass null to unassign). Assigning reconciles the client's features to the template with its overrides kept; unassigning clears the overrides and keeps the current features as direct entitlements. Maison-only. 404 when the template id is unknown.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"assign_plan_template","mcp":{"tool":"assign_plan_template","endpoint":"/mcp"},"a2a":{"skill":"assign_plan_template","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Template id to assign, or null to unassign"}},"required":["templateId"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/plan/apply":{"post":{"operationId":"apply_plan_template","tags":["features"],"summary":"Apply plan template","description":"Sync the client's features to its assigned template: grant missing features, optionally revoke extras. Requires a template to be assigned — use `assign_plan_template` first. Maison-only.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"apply_plan_template","mcp":{"tool":"apply_plan_template","endpoint":"/mcp"},"a2a":{"skill":"apply_plan_template","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"prune":{"default":false,"description":"When true, also revoke features the template does not include","type":"boolean"}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/plan/set":{"put":{"operationId":"set_client_plan","tags":["features"],"summary":"Set client plan","description":"Assign a template, set the client's overrides (each `{ feature, state }` with state \"on\", \"off\" or \"locked\"; a plain name means on) and apply it. Returns the drift after applying (should be `inSync: true` when prune is true). A Maison-only feature cannot be locked (400). Maison-only.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).\n\n**Composite of:** `assign_plan_template`, `set_client_feature_override`, `apply_plan_template`.","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_client_plan","mcp":{"tool":"set_client_plan","endpoint":"/mcp"},"a2a":{"skill":"set_client_plan","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":["assign_plan_template","set_client_feature_override","apply_plan_template"],"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Template id to assign and apply"},"overrides":{"description":"Client overrides to set on top of the template (existing ones are kept)","maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"description":"Feature name (on)"},{"type":"object","properties":{"feature":{"type":"string","minLength":1,"maxLength":64,"description":"Feature name"},"state":{"type":"string","enum":["on","off","locked"],"description":"The client's own state for the feature, winning over its plan"}},"required":["feature","state"],"additionalProperties":false}]}},"prune":{"default":false,"description":"When true, also revoke features the template does not include","type":"boolean"}},"required":["templateId"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/plan/override/{feature}":{"put":{"operationId":"set_client_feature_override","tags":["features"],"summary":"Set client feature override","description":"Set the client's own state for one feature (\"on\", \"off\" or \"locked\"), winning over its plan template, and reconcile its features. An override stays even when it equals the plan; `clear_client_feature_override` returns the feature to the plan default. Maison-only. 404 when the client has no template or the feature is unknown; 400 when locking a Maison-only feature.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"feature","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Feature name"},"description":"Feature name"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_client_feature_override","mcp":{"tool":"set_client_feature_override","endpoint":"/mcp"},"a2a":{"skill":"set_client_feature_override","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["on","off","locked"],"description":"The client's own state for the feature, winning over its plan"}},"required":["state"],"additionalProperties":false}}}}},"delete":{"operationId":"clear_client_feature_override","tags":["features"],"summary":"Clear client feature override","description":"Remove the client's override for one feature so it follows the plan template again, and reconcile its features. Maison-only. 404 when the client has no template, the feature is unknown or there is no override to clear.\n\n**Requires:** `client-feature-management` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"feature","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Feature name"},"description":"Feature name"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"clear_client_feature_override","mcp":{"tool":"clear_client_feature_override","endpoint":"/mcp"},"a2a":{"skill":"clear_client_feature_override","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/featureplan/{templateId}/clients":{"get":{"operationId":"list_plan_template_clients","tags":["features"],"summary":"List a plan's clients","description":"The active clients on one plan template (id and name), as the plan page lists them. Maison-only. 404 when the template is unknown or deleted. Use before `delete_plan_template` to see who must move first.\n\n**Requires:** `client-feature-management` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:read"]}],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Plan template id"},"description":"Plan template id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_plan_template_clients","mcp":{"tool":"list_plan_template_clients","endpoint":"/mcp"},"a2a":{"skill":"list_plan_template_clients","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/featureplan/{templateId}/history":{"get":{"operationId":"list_plan_template_history","tags":["features"],"summary":"Plan template history","description":"A plan template's change history, newest first: its own field and feature-state changes, its creation and deletion, and clients assigned to it or moved off it. A deleted plan keeps its history. Offset paging (`limit`, `offset`; the page carries `total`). Maison-only. 404 for an unknown id.\n\n**Requires:** `client-feature-management` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:read"]}],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Plan template id"},"description":"Plan template id"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–200)","type":"integer","minimum":1,"maximum":200},"description":"Page size (1–200)"},{"name":"offset","in":"query","required":false,"schema":{"default":0,"description":"Rows to skip","type":"integer","minimum":0,"maximum":999999999},"description":"Rows to skip"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_plan_template_history","mcp":{"tool":"list_plan_template_history","endpoint":"/mcp"},"a2a":{"skill":"list_plan_template_history","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/plan/history":{"get":{"operationId":"list_client_plan_history","tags":["features"],"summary":"Client plan history","description":"A client's plan history, newest first: the plans it was assigned and its feature override changes. Offset paging (`limit`, `offset`; the page carries `total`). Maison-only. 404 for an unknown client.\n\n**Requires:** `client-feature-management` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–200)","type":"integer","minimum":1,"maximum":200},"description":"Page size (1–200)"},{"name":"offset","in":"query","required":false,"schema":{"default":0,"description":"Rows to skip","type":"integer","minimum":0,"maximum":999999999},"description":"Rows to skip"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_plan_history","mcp":{"tool":"list_client_plan_history","endpoint":"/mcp"},"a2a":{"skill":"list_client_plan_history","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/gatewayfees":{"get":{"operationId":"list_client_gateway_fees","tags":["features"],"summary":"List a client's gateway fees","description":"Maison's fee per payment gateway (stripe, elavon) for one hotel as it applies: the client's own fee, else its plan's, else none (`source`: client | template | null). Shown on the client's integrations page.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_gateway_fees","mcp":{"tool":"list_client_gateway_fees","endpoint":"/mcp"},"a2a":{"skill":"list_client_gateway_fees","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/gatewayfee/{gateway}":{"put":{"operationId":"set_client_gateway_fee","tags":["features"],"summary":"Set a client's gateway fee","description":"Set the hotel's own Maison fee for one gateway, overriding its plan's fee; recorded on each later payment for invoicing. Maison-only. Returns the fee stored.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"gateway","in":"path","required":true,"schema":{"type":"string","enum":["stripe","elavon"],"description":"Payment gateway"},"description":"Payment gateway"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_client_gateway_fee","mcp":{"tool":"set_client_gateway_fee","endpoint":"/mcp"},"a2a":{"skill":"set_client_gateway_fee","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"feeType":{"type":"string","enum":["percent","flat"],"description":"percent of the payment, or a flat amount"},"feeValue":{"type":"number","minimum":0,"description":"Percent (e.g. 1.5) or flat amount in the payment currency's major unit"}},"required":["feeType","feeValue"],"additionalProperties":false}}}}},"delete":{"operationId":"clear_client_gateway_fee","tags":["features"],"summary":"Clear a client's gateway fee","description":"Remove the hotel's own fee for one gateway so its plan's fee applies again. Maison-only. Returns whether a fee was removed (`removed: false` when there was none).\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"gateway","in":"path","required":true,"schema":{"type":"string","enum":["stripe","elavon"],"description":"Payment gateway"},"description":"Payment gateway"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"clear_client_gateway_fee","mcp":{"tool":"clear_client_gateway_fee","endpoint":"/mcp"},"a2a":{"skill":"clear_client_gateway_fee","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/featureplan/{templateId}/gatewayfees":{"get":{"operationId":"list_plan_gateway_fees","tags":["features"],"summary":"List a plan's gateway fees","description":"The Maison fees a plan template sets per gateway; every client on the plan without its own fee pays these. Maison-only.\n\n**Requires:** `clients` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Plan template id"},"description":"Plan template id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_plan_gateway_fees","mcp":{"tool":"list_plan_gateway_fees","endpoint":"/mcp"},"a2a":{"skill":"list_plan_gateway_fees","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/featureplan/{templateId}/gatewayfee/{gateway}":{"put":{"operationId":"set_plan_gateway_fee","tags":["features"],"summary":"Set a plan's gateway fee","description":"Set a plan template's Maison fee for one gateway; it applies to every client on the plan that has no fee of its own. Maison-only. Returns the fee stored.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Plan template id"},"description":"Plan template id"},{"name":"gateway","in":"path","required":true,"schema":{"type":"string","enum":["stripe","elavon"],"description":"Payment gateway"},"description":"Payment gateway"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"set_plan_gateway_fee","mcp":{"tool":"set_plan_gateway_fee","endpoint":"/mcp"},"a2a":{"skill":"set_plan_gateway_fee","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"feeType":{"type":"string","enum":["percent","flat"],"description":"percent of the payment, or a flat amount"},"feeValue":{"type":"number","minimum":0,"description":"Percent (e.g. 1.5) or flat amount in the payment currency's major unit"}},"required":["feeType","feeValue"],"additionalProperties":false}}}}},"delete":{"operationId":"clear_plan_gateway_fee","tags":["features"],"summary":"Clear a plan's gateway fee","description":"Remove a plan template's fee for one gateway; its clients without a fee of their own then pay none. Maison-only. Returns whether a fee was removed.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Plan template id"},"description":"Plan template id"},{"name":"gateway","in":"path","required":true,"schema":{"type":"string","enum":["stripe","elavon"],"description":"Payment gateway"},"description":"Payment gateway"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"clear_plan_gateway_fee","mcp":{"tool":"clear_plan_gateway_fee","endpoint":"/mcp"},"a2a":{"skill":"clear_plan_gateway_fee","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/gatewayfees/totals":{"get":{"operationId":"get_gateway_fee_totals","tags":["features"],"summary":"Gateway fee totals","description":"Paid payments and the Maison fees recorded on them for an inclusive date range, per client, gateway and currency (amounts in minor units), optionally for one client. Use for invoicing hotels. Maison-only.\n\n**Requires:** `clients` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"First day, YYYY-MM-DD"},"description":"First day, YYYY-MM-DD"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Last day (inclusive), YYYY-MM-DD"},"description":"Last day (inclusive), YYYY-MM-DD"},{"name":"clientId","in":"query","required":false,"schema":{"description":"Only this client","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Only this client"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_gateway_fee_totals","mcp":{"tool":"get_gateway_fee_totals","endpoint":"/mcp"},"a2a":{"skill":"get_gateway_fee_totals","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/feature":{"post":{"operationId":"create_feature","tags":["features"],"summary":"Create a feature","description":"Add a feature to the catalogue that grants (policy rules) and plans name. Maison-only (`maison-roles` WRITE). 409 when the name is taken. Returns the new feature's id. A feature does nothing until code checks it; prefer existing features (`list_features`).\n\n**Requires:** `maison-roles` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_feature","mcp":{"tool":"create_feature","endpoint":"/mcp"},"a2a":{"skill":"create_feature","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"Feature key, e.g. client-notes (what grants and plans name)"},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"What the feature gates"}},"required":["name","description"],"additionalProperties":false}}}}}},"/api/v1/feature/{featureId}":{"put":{"operationId":"update_feature","tags":["features"],"summary":"Update a feature","description":"Rename a catalogue feature or change its description; at least one field. Renaming changes the key every grant and plan uses, so only rename a feature nothing checks yet. Maison-only. 404 when unknown, 409 when the new name is taken. Returns the feature.\n\n**Requires:** `maison-roles` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"featureId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Feature id (from `list_features`)"},"description":"Feature id (from `list_features`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_feature","mcp":{"tool":"update_feature","endpoint":"/mcp"},"a2a":{"skill":"update_feature","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"Feature key, e.g. client-notes (what grants and plans name)"},"description":{"description":"New description","type":"string","maxLength":1000}},"additionalProperties":false}}}}},"delete":{"operationId":"deprecate_feature","tags":["features"],"summary":"Deprecate a feature","description":"Mark a catalogue feature deprecated: it leaves the catalogue offered to grants and plans and every client's eligibility. Nothing is deleted. Maison-only. 404 when unknown or already deprecated.\n\n**Requires:** `maison-roles` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","roles:write"]}],"parameters":[{"name":"featureId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Feature id (from `list_features`)"},"description":"Feature id (from `list_features`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"deprecate_feature","mcp":{"tool":"deprecate_feature","endpoint":"/mcp"},"a2a":{"skill":"deprecate_feature","endpoint":"/a2a"},"access":[{"feature":"maison-roles","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/hierarchy":{"get":{"operationId":"get_client_hierarchy","tags":["hierarchy"],"summary":"Get client hierarchy","description":"Return the client's parent group and its list of child properties. Maison-only. Use `attach_child_property` / `detach_child_property` to change the hierarchy.\n\n**Requires:** `clients` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_hierarchy","mcp":{"tool":"get_client_hierarchy","endpoint":"/mcp"},"a2a":{"skill":"get_client_hierarchy","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/children/candidates":{"get":{"operationId":"list_child_candidates","tags":["hierarchy"],"summary":"List child candidates","description":"Search active clients that could be attached as children of a parent group. Requires global clients WRITE (same as attach). Maison-only.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"search","in":"query","required":false,"schema":{"default":"","description":"Case-insensitive name search (empty returns top results)","type":"string","maxLength":100},"description":"Case-insensitive name search (empty returns top results)"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Maximum candidates to return","type":"integer","minimum":1,"maximum":20},"description":"Maximum candidates to return"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_child_candidates","mcp":{"tool":"list_child_candidates","endpoint":"/mcp"},"a2a":{"skill":"list_child_candidates","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/children/features":{"get":{"operationId":"list_children_feature_counts","tags":["hierarchy"],"summary":"List children feature counts","description":"For a group client: how many active child properties it has (`children`) and, per catalogue feature, how many of them are entitled to it (`items[].entitled`). Maison-only. Use to see which features are only partly rolled out before `grant_feature_to_children`.\n\n**Requires:** `client-feature-management` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","features:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_children_feature_counts","mcp":{"tool":"list_children_feature_counts","endpoint":"/mcp"},"a2a":{"skill":"list_children_feature_counts","endpoint":"/a2a"},"access":[{"feature":"client-feature-management","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/child":{"post":{"operationId":"attach_child_property","tags":["hierarchy"],"summary":"Attach child property","description":"Attach an existing client as a child property of a parent group. Maison-only. 409 when the relationship already exists or would create a cycle.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"attach_child_property","mcp":{"tool":"attach_child_property","endpoint":"/mcp"},"a2a":{"skill":"attach_child_property","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"childClientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of the client to attach as a child"}},"required":["childClientId"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/child/{childClientId}":{"delete":{"operationId":"detach_child_property","tags":["hierarchy"],"summary":"Detach child property","description":"Detach a child property from its parent group. Maison-only. Destructive. The child client is not deleted — only the relationship is removed.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"childClientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of the child client to detach"},"description":"Id of the child client to detach"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"detach_child_property","mcp":{"tool":"detach_child_property","endpoint":"/mcp"},"a2a":{"skill":"detach_child_property","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/propertydiscovery":{"post":{"operationId":"start_property_discovery","tags":["hierarchy"],"summary":"Start property discovery","description":"Kick off automated nearby-property discovery for a multi-property group client. Returns the new discovery session (status DISCOVERING). 409 when a run is already active. Maison-only or requires the `property-discovery` entitlement.\n\n**Requires:** `clients` EXECUTE (global). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `property-discovery` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"start_property_discovery","mcp":{"tool":"start_property_discovery","endpoint":"/mcp"},"a2a":{"skill":"start_property_discovery","endpoint":"/a2a"},"access":[{"feature":"clients","level":"EXECUTE","scope":"global"}],"entitlement":"property-discovery","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}},"get":{"operationId":"get_property_discovery","tags":["hierarchy"],"summary":"Get property discovery","description":"Return a discovery session. When `sessionId` is omitted returns the latest session; 404 when none. Provide `sessionId` to fetch a specific past run. Maison-only or requires the `property-discovery` entitlement.\n\n**Requires:** `clients` READ (global). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `property-discovery` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"query","required":false,"schema":{"description":"Specific session id; omit for the latest run","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Specific session id; omit for the latest run"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_property_discovery","mcp":{"tool":"get_property_discovery","endpoint":"/mcp"},"a2a":{"skill":"get_property_discovery","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"global"}],"entitlement":"property-discovery","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/propertydiscovery/{sessionId}/candidate/{candidateId}":{"patch":{"operationId":"update_property_candidate","tags":["hierarchy"],"summary":"Update property candidate","description":"Edit one proposed property candidate: correct its name, location, URL prefixes or decision. Only the fields sent are changed. Maison-only or requires the `property-discovery` entitlement.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `property-discovery` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Discovery session id"},"description":"Discovery session id"},{"name":"candidateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Candidate property id"},"description":"Candidate property id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_property_candidate","mcp":{"tool":"update_property_candidate","endpoint":"/mcp"},"a2a":{"skill":"update_property_candidate","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":"property-discovery","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Corrected property name","type":"string","minLength":1,"maxLength":200},"city":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"urlPrefixes":{"description":"URL prefixes that belong to this property","minItems":1,"type":"array","items":{"type":"string","format":"uri"}},"decision":{"description":"Review decision for this candidate","type":"string","enum":["PENDING","APPROVED","REJECTED"]}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/propertydiscovery/{sessionId}/decisions":{"post":{"operationId":"decide_property_candidates","tags":["hierarchy"],"summary":"Decide property candidates","description":"Apply a bulk decision (APPROVED or REJECTED) to candidates. When `candidateIds` is omitted, sets all candidates in the session to the decision; otherwise updates only the specified candidates. Maison-only or requires the `property-discovery` entitlement.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `property-discovery` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Discovery session id"},"description":"Discovery session id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"decide_property_candidates","mcp":{"tool":"decide_property_candidates","endpoint":"/mcp"},"a2a":{"skill":"decide_property_candidates","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":"property-discovery","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["APPROVED","REJECTED"],"description":"Decision to apply"},"candidateIds":{"description":"Specific candidates to update; omit to update all","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["decision"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/propertydiscovery/{sessionId}/approve":{"post":{"operationId":"approve_property_discovery","tags":["hierarchy"],"summary":"Approve property discovery","description":"Provision the APPROVED candidates of an AWAITING_REVIEW run as child clients. Returns 202 `{ status: \"PROVISIONING\", sessionId, approved }` at once; the run continues in the background — poll `get_property_discovery` (PROVISIONING → COMPLETED / FAILED). Optionally re-scrapes the parent after narrowing its knowledge-base scope. 409 when the run is not awaiting review or nothing is approved. Maison-only or requires the `property-discovery` entitlement.\n\n**Requires:** `clients` WRITE (global). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `property-discovery` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Discovery session id"},"description":"Discovery session id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"approve_property_discovery","mcp":{"tool":"approve_property_discovery","endpoint":"/mcp"},"a2a":{"skill":"approve_property_discovery","endpoint":"/a2a"},"access":[{"feature":"clients","level":"WRITE","scope":"global"}],"entitlement":"property-discovery","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"rescrapeParent":{"default":false,"description":"Re-scrape the parent client after narrowing its KB scope to group-level pages (default false)","type":"boolean"}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/testruns":{"get":{"operationId":"list_test_runs","tags":["quality"],"summary":"List test runs","description":"Page through test session runs for a hotel ordered newest first. Returns session ids, descriptions, created/completed dates and per-run success/fail/error counts. Use get_test_report to fetch the per-question results for a specific run.\n\n**Requires:** `test-session` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `test-session` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_test_runs","mcp":{"tool":"list_test_runs","endpoint":"/mcp"},"a2a":{"skill":"list_test_runs","endpoint":"/a2a"},"access":[{"feature":"test-session","level":"READ","scope":"client"}],"entitlement":"test-session","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/testrun/{sessionId}":{"get":{"operationId":"get_test_report","tags":["quality"],"summary":"Get a test run report","description":"Retrieve the full per-question results for a test session: test id, client id, status (SUCCESS / FAIL / ERROR / QUEUED / IN_PROGRESS) and the raw report data. 404 when the session does not exist or belongs to a different client. Use list_test_runs to find session ids.\n\n**Requires:** `test-session` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `test-session` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Test session id from list_test_runs"},"description":"Test session id from list_test_runs"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_test_report","mcp":{"tool":"get_test_report","endpoint":"/mcp"},"a2a":{"skill":"get_test_report","endpoint":"/a2a"},"access":[{"feature":"test-session","level":"READ","scope":"client"}],"entitlement":"test-session","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/goldenfaq":{"get":{"operationId":"list_golden_questions","tags":["quality"],"summary":"List golden FAQ questions","description":"Return all golden test questions for a hotel with their recent pass/fail history. Use run_golden_faq_test to run a subset or all of them; use list_chat_tests to see general chat tests.\n\n**Requires:** `test-session` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `test-session` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_golden_questions","mcp":{"tool":"list_golden_questions","endpoint":"/mcp"},"a2a":{"skill":"list_golden_questions","endpoint":"/a2a"},"access":[{"feature":"test-session","level":"READ","scope":"client"}],"entitlement":"test-session","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/chattests":{"get":{"operationId":"list_chat_tests","tags":["quality"],"summary":"List chat tests","description":"Return all authored chat-test cases for a hotel. Use run_chat_tests to run them; use list_golden_questions to see the golden FAQ set.\n\n**Requires:** `test-session` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `test-session` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_chat_tests","mcp":{"tool":"list_chat_tests","endpoint":"/mcp"},"a2a":{"skill":"list_chat_tests","endpoint":"/a2a"},"access":[{"feature":"test-session","level":"READ","scope":"client"}],"entitlement":"test-session","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/testrun/goldenfaq":{"post":{"operationId":"run_golden_faq_test","tags":["quality"],"summary":"Run golden FAQ test","description":"Enqueue a golden FAQ test run for a hotel. Pass an optional array of questionIds to run a specific subset; omit it to run all. Returns the new sessionId. 409 when a golden run is already in progress. Use run_chat_tests to run authored chat tests.\n\n**Requires:** `test-session` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `test-session` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"run_golden_faq_test","mcp":{"tool":"run_golden_faq_test","endpoint":"/mcp"},"a2a":{"skill":"run_golden_faq_test","endpoint":"/a2a"},"access":[{"feature":"test-session","level":"EXECUTE","scope":"client"}],"entitlement":"test-session","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"questionIds":{"description":"Specific golden question ids to run; omit to run all","minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/testrun":{"post":{"operationId":"run_chat_tests","tags":["quality"],"summary":"Run chat tests","description":"Enqueue an ad-hoc test session from a set of test cases and client ids. Requires test-session EXECUTE for every distinct client referenced in the tests array. Returns the new sessionId. Use run_golden_faq_test to run the hotel's pre-defined golden FAQ set.\n\n**Requires:** `test-session` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `test-session` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"run_chat_tests","mcp":{"tool":"run_chat_tests","endpoint":"/mcp"},"a2a":{"skill":"run_chat_tests","endpoint":"/a2a"},"access":[{"feature":"test-session","level":"EXECUTE","scope":"client"}],"entitlement":"test-session","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1,"description":"Label for this test run"},"tests":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Test id"},"clientIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Client ids to run this test against"}},"required":["id","clientIds"]},"description":"Test cases to include in this run"}},"required":["description","tests"],"additionalProperties":false}}}}}},"/api/v1/chatfeedback":{"get":{"operationId":"list_chat_feedback","tags":["quality"],"summary":"List Guest Agent quality review items","description":"Page through the Maison-global Guest Agent quality review queue (feature `chat-feedback`). Returns items, per-topic counts and the most recent run metadata. Filter by status, topic or a specific hotel. Use run_chat_feedback to trigger scoring; use resolve_chat_feedback / dismiss_chat_feedback to action items.\n\n**Requires:** `chat-feedback` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:read"]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"description":"Filter by item status; default OPEN","type":"string","enum":["OPEN","RESOLVED","DISMISSED"]},"description":"Filter by item status; default OPEN"},{"name":"topic","in":"query","required":false,"schema":{"description":"Filter by topic key","type":"string"},"description":"Filter by topic key"},{"name":"clientId","in":"query","required":false,"schema":{"description":"Limit to a specific hotel","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Limit to a specific hotel"},{"name":"limit","in":"query","required":false,"schema":{"description":"Page size (1–200)","type":"integer","minimum":1,"maximum":200},"description":"Page size (1–200)"},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page","type":"string"},"description":"Opaque cursor from the previous page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_chat_feedback","mcp":{"tool":"list_chat_feedback","endpoint":"/mcp"},"a2a":{"skill":"list_chat_feedback","endpoint":"/a2a"},"access":[{"feature":"chat-feedback","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/chatfeedback/run":{"post":{"operationId":"run_chat_feedback","tags":["quality"],"summary":"Run Guest Agent quality review scoring","description":"Trigger an asynchronous Guest Agent quality review scoring run. Pass a clientId to score one hotel; omit it to run all active hotels. The run is fire-and-forget — it returns immediately (202). Use list_chat_feedback to check results after the run completes.\n\n**Requires:** `chat-feedback` EXECUTE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:execute"]}],"parameters":[],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"run_chat_feedback","mcp":{"tool":"run_chat_feedback","endpoint":"/mcp"},"a2a":{"skill":"run_chat_feedback","endpoint":"/a2a"},"access":[{"feature":"chat-feedback","level":"EXECUTE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"description":"Limit scoring to this hotel; omit to score all active hotels","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}}}},"/api/v1/chatfeedback/{feedbackId}/resolve":{"post":{"operationId":"resolve_chat_feedback","tags":["quality"],"summary":"Resolve a Guest Agent quality review item","description":"Flip an OPEN Guest Agent quality review item to RESOLVED, recording an optional note. 404 when the item is not found. 409 when the item is already RESOLVED or DISMISSED. Use dismiss_chat_feedback to dismiss instead.\n\n**Requires:** `chat-feedback` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:execute"]}],"parameters":[{"name":"feedbackId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Guest Agent quality review item id"},"description":"Guest Agent quality review item id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"resolve_chat_feedback","mcp":{"tool":"resolve_chat_feedback","endpoint":"/mcp"},"a2a":{"skill":"resolve_chat_feedback","endpoint":"/a2a"},"access":[{"feature":"chat-feedback","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"description":"Optional resolution note","type":"string","maxLength":500}},"additionalProperties":false}}}}}},"/api/v1/chatfeedback/{feedbackId}/dismiss":{"post":{"operationId":"dismiss_chat_feedback","tags":["quality"],"summary":"Dismiss a Guest Agent quality review item","description":"Flip an OPEN Guest Agent quality review item to DISMISSED, recording an optional note. 404 when the item is not found. 409 when it is already DISMISSED or RESOLVED. Use resolve_chat_feedback to mark an item as resolved.\n\n**Requires:** `chat-feedback` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:execute"]}],"parameters":[{"name":"feedbackId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Guest Agent quality review item id"},"description":"Guest Agent quality review item id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"dismiss_chat_feedback","mcp":{"tool":"dismiss_chat_feedback","endpoint":"/mcp"},"a2a":{"skill":"dismiss_chat_feedback","endpoint":"/a2a"},"access":[{"feature":"chat-feedback","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"description":"Optional dismissal note","type":"string","maxLength":500}},"additionalProperties":false}}}}}},"/api/v1/chatfeedback/{feedbackId}/reopen":{"post":{"operationId":"reopen_chat_feedback","tags":["quality"],"summary":"Reopen a Guest Agent quality review item","description":"Flip a RESOLVED or DISMISSED Guest Agent quality review item back to OPEN. 404 when not found. 409 when already OPEN. Use resolve_chat_feedback or dismiss_chat_feedback to close an item.\n\n**Requires:** `chat-feedback` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["quality:execute"]}],"parameters":[{"name":"feedbackId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Guest Agent quality review item id"},"description":"Guest Agent quality review item id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"reopen_chat_feedback","mcp":{"tool":"reopen_chat_feedback","endpoint":"/mcp"},"a2a":{"skill":"reopen_chat_feedback","endpoint":"/a2a"},"access":[{"feature":"chat-feedback","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/hubspot/companies":{"get":{"operationId":"search_hubspot_companies","tags":["hubspot"],"summary":"Search HubSpot companies","description":"Search Maison's HubSpot portal for companies by name or domain. Returns up to 20 matches. Use the result's `items[].id` with `link_hubspot_company`. Requires global `hubspot` READ.\n\n**Requires:** `hubspot` READ (global). All are required (403 otherwise).\n\n**Availability:** switched on per environment; absent from listings and 404 when off.","security":[{"apiKey":[]},{"oauth2":["hubspot:read"]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":100,"description":"Search query (name or domain, ≥ 2 chars)"},"description":"Search query (name or domain, ≥ 2 chars)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"search_hubspot_companies","mcp":{"tool":"search_hubspot_companies","endpoint":"/mcp"},"a2a":{"skill":"search_hubspot_companies","endpoint":"/a2a"},"access":[{"feature":"hubspot","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/hubspot":{"get":{"operationId":"get_hubspot_link","tags":["hubspot"],"summary":"Get HubSpot link","description":"Return the client's HubSpot company mapping and the last push outcome. The `mapping` field is null when no company is linked — this is a normal state, not an error. 404 when the client itself is not found.\n\n**Requires:** `hubspot` READ (global). All are required (403 otherwise).\n\n**Availability:** switched on per environment; absent from listings and 404 when off.","security":[{"apiKey":[]},{"oauth2":["hubspot:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_hubspot_link","mcp":{"tool":"get_hubspot_link","endpoint":"/mcp"},"a2a":{"skill":"get_hubspot_link","endpoint":"/a2a"},"access":[{"feature":"hubspot","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"link_hubspot_company","tags":["hubspot"],"summary":"Link HubSpot company","description":"Link a client to a HubSpot company, or create a new one and link it. Provide exactly one of `hubspotCompanyId` (link existing) or `create` (create then link). Returns the updated mapping. 409 on mapping conflict or creation failure.\n\n**Requires:** `hubspot` WRITE (global). All are required (403 otherwise).\n\n**Availability:** switched on per environment; absent from listings and 404 when off.","security":[{"apiKey":[]},{"oauth2":["hubspot:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"link_hubspot_company","mcp":{"tool":"link_hubspot_company","endpoint":"/mcp"},"a2a":{"skill":"link_hubspot_company","endpoint":"/a2a"},"access":[{"feature":"hubspot","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"hubspotCompanyId":{"description":"Existing HubSpot company id to link (numeric string)","type":"string"},"hubspotCompanyName":{"description":"HubSpot company display name (for caching)","anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"hubspotCompanyDomain":{"description":"HubSpot company domain (for caching)","anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"create":{"description":"Create a new HubSpot company instead of linking an existing one","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"description":"New company name in HubSpot"},"domain":{"description":"Company domain","anyOf":[{"type":"string","maxLength":256},{"type":"null"}]}},"required":["name"]}},"additionalProperties":false}}}}},"delete":{"operationId":"unlink_hubspot_company","tags":["hubspot"],"summary":"Unlink HubSpot company","description":"Remove the client's HubSpot company mapping. Idempotent — returns `{ removed: false }` when no mapping exists. Destructive.\n\n**Requires:** `hubspot` WRITE (global). All are required (403 otherwise).\n\n**Availability:** switched on per environment; absent from listings and 404 when off.","security":[{"apiKey":[]},{"oauth2":["hubspot:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"unlink_hubspot_company","mcp":{"tool":"unlink_hubspot_company","endpoint":"/mcp"},"a2a":{"skill":"unlink_hubspot_company","endpoint":"/a2a"},"access":[{"feature":"hubspot","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/hubspot/push":{"post":{"operationId":"push_hubspot_chat_volume","tags":["hubspot"],"summary":"Push HubSpot chat volume","description":"Push this week's chat-volume metric to the client's linked HubSpot company. Use `dryRun: true` to preview the values without writing to HubSpot. 409 when the client is not mapped or a sync is already running.\n\n**Requires:** `hubspot` EXECUTE (global). All are required (403 otherwise).\n\n**Availability:** switched on per environment; absent from listings and 404 when off.","security":[{"apiKey":[]},{"oauth2":["hubspot:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"push_hubspot_chat_volume","mcp":{"tool":"push_hubspot_chat_volume","endpoint":"/mcp"},"a2a":{"skill":"push_hubspot_chat_volume","endpoint":"/a2a"},"access":[{"feature":"hubspot","level":"EXECUTE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"default":false,"description":"Preview only — do not write to HubSpot","type":"boolean"}},"additionalProperties":false}}}}}},"/api/v1/docs":{"get":{"operationId":"get_documentation","tags":["platform"],"summary":"Documentation index","description":"Where the public documentation lives: the docs site topics (quick start, authentication, API reference, MCP, A2A, widget SDK, installation guides, integrations, diagnostic), plus the machine-readable discovery URLs (OpenAPI document, agent card, filtered tool catalogue). Pass `topic` for a single entry.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[{"name":"topic","in":"query","required":false,"schema":{"description":"One topic id; omit for the whole index","type":"string","enum":["quickstart","auth","apireference","mcp","a2a","widget","installation","integrations","diagnostic"]},"description":"One topic id; omit for the whole index"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_documentation","mcp":{"tool":"get_documentation","endpoint":"/mcp"},"a2a":{"skill":"get_documentation","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/embed":{"get":{"operationId":"get_widget_embed_code","tags":["platform"],"summary":"Widget embed code","description":"The exact HTML a hotel pastes into its website to show the Maison chat widget: the hardened loader <script> tag for this environment's CDN and the `initMcbs` call with the hotel's client id. Use `check_website` afterwards to verify the embed went live.\n\n**Requires:** `clients` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_widget_embed_code","mcp":{"tool":"get_widget_embed_code","endpoint":"/mcp"},"a2a":{"skill":"get_widget_embed_code","endpoint":"/a2a"},"access":[{"feature":"clients","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/tools/sitecheck":{"post":{"operationId":"check_website","tags":["platform"],"summary":"Check a website","description":"Fetch a public website and report its framework, whether the Maison widget loader is embedded and which client id it carries. Use it to verify an embed or to size an onboarding before `create_client`.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"check_website","mcp":{"tool":"check_website","endpoint":"/mcp"},"a2a":{"skill":"check_website","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":true,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"Public http(s) URL"}},"required":["url"],"additionalProperties":false}}}}}},"/api/v1/diagnostic":{"post":{"operationId":"start_site_diagnostic","tags":["platform"],"summary":"Start a site diagnostic","description":"Start the AI website diagnostic for a URL: it crawls the site, checks the widget, content and structure, and streams findings. Returns a session id; poll `get_site_diagnostic` for progress and findings, then `chat_site_diagnostic` to ask about them.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"start_site_diagnostic","mcp":{"tool":"start_site_diagnostic","endpoint":"/mcp"},"a2a":{"skill":"start_site_diagnostic","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"Public http(s) URL"}},"required":["url"],"additionalProperties":false}}}}}},"/api/v1/diagnostic/{sessionId}":{"get":{"operationId":"get_site_diagnostic","tags":["platform"],"summary":"Diagnostic session","description":"The full history of a diagnostic session — run events, progress, findings and chat turns. An empty history is a valid, still-starting session.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Diagnostic session id (64 hex chars) from start_site_diagnostic"},"description":"Diagnostic session id (64 hex chars) from start_site_diagnostic"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_site_diagnostic","mcp":{"tool":"get_site_diagnostic","endpoint":"/mcp"},"a2a":{"skill":"get_site_diagnostic","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/diagnostic/{sessionId}/chat":{"post":{"operationId":"chat_site_diagnostic","tags":["platform"],"summary":"Ask the diagnostic agent","description":"Send a follow-up question about a finished or running diagnostic session and get the agent's answer.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Diagnostic session id (64 hex chars) from start_site_diagnostic"},"description":"Diagnostic session id (64 hex chars) from start_site_diagnostic"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"chat_site_diagnostic","mcp":{"tool":"chat_site_diagnostic","endpoint":"/mcp"},"a2a":{"skill":"chat_site_diagnostic","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000}},"required":["message"],"additionalProperties":false}}}}}},"/api/v1/status":{"get":{"operationId":"get_platform_status","tags":["platform"],"summary":"Platform status","description":"A live health summary from the API's point of view: environment, database reachability, LLM service reachability and the public status page URL. For incidents and maintenance read the status page.\n\n**Requires:** a valid API key.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_platform_status","mcp":{"tool":"get_platform_status","endpoint":"/mcp"},"a2a":{"skill":"get_platform_status","endpoint":"/a2a"},"access":[],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/agents":{"get":{"operationId":"list_agents","tags":["agents"],"summary":"List ledger agents","description":"List a hotel's configurable specialists, each with its live `counter` (matches and outcomes; null before its first run), plus `guest` — the built-in, always-on Guest agent's resources and settings version — and `templates`, the catalogue `create_agent` starts from. `builtInAgents` names the Guest agent's settings tool. 404 when the client does not exist.\n\n**Requires:** `agents` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_agents","mcp":{"tool":"list_agents","endpoint":"/mcp"},"a2a":{"skill":"list_agents","endpoint":"/a2a"},"access":[{"feature":"agents","level":"READ","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/agent":{"post":{"operationId":"create_agent","tags":["agents"],"summary":"Create ledger agent","description":"Create a ledger agent for a hotel. It is saved disabled unless `enabled: true` (dry-run it with `test_agent`, then `enable_agent`); the runtime sees it as soon as it is enabled. Webhook outputs must be https. Returns the stored agent with its `version`; the change is recorded in the client activity feed.\n\n**Requires:** `agents` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_agent","mcp":{"tool":"create_agent","endpoint":"/mcp"},"a2a":{"skill":"create_agent","endpoint":"/a2a"},"access":[{"feature":"agents","level":"WRITE","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"type":"string","minLength":1,"maxLength":40,"description":"Template id, e.g. 'sales_lead' or 'custom'"},"name":{"type":"string","minLength":1,"maxLength":120,"description":"Display name"},"enabled":{"default":false,"description":"Whether the agent evaluates live turns (default false: test it, then enable_agent)","type":"boolean"},"channels":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"},"description":"Channels the agent listens on: lowercase channel ids ('*', 'web', 'gmail', 'outlook', 'instagram', 'messenger', 'whatsapp', 'chatgpt', 'webhook'); ['*'] alone means every channel"},"criteria":{"type":"string","minLength":1,"maxLength":4000,"description":"What to look for in the conversation"},"action":{"type":"string","minLength":1,"maxLength":4000,"description":"What to do when criteria are met"},"outputs":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"webhook_response"}},"required":["kind"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"reply_same_chat"}},"required":["kind"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"channel_message"},"channel":{"type":"string","minLength":1}},"required":["kind","channel"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"email"},"recipients":{"minItems":1,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"subjectPrefix":{"type":"string","maxLength":200}},"required":["kind","recipients"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"whatsapp"},"to":{"type":"string","minLength":1}},"required":["kind","to"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"sms"},"to":{"type":"string","minLength":1}},"required":["kind","to"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"connector"},"provider":{"type":"string","minLength":1},"toolId":{"type":"string","minLength":1},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","provider"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"webhook"},"url":{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*","description":"https URL the output POSTs to"},"secret":{"type":"string","minLength":1}},"required":["kind","url","secret"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120,"description":"Shown to operators as the notice; written by you, never by the guest or the model. Also the destination name (unique within the agent)"},"kind":{"type":"string","const":"notify_operator"},"targets":{"type":"object","properties":{"allOperators":{"description":"Alert every user who can read this client's conversations","type":"boolean"},"userIds":{"description":"Users to alert","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"groupIds":{"description":"User groups whose members are alerted","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"roleIds":{"description":"Roles whose holders at this client are alerted","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}},"description":"Who is alerted; only users who can read this client's conversations receive the notice"},"policy":{"type":"string","enum":["personal","shared","hybrid"],"description":"personal: every recipient must read it; shared: the first read clears it for everyone; hybrid: namedUserIds must read it themselves, the first read clears it for the rest"},"namedUserIds":{"description":"Hybrid only: recipients whose notice stays until they read it","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"flagConversation":{"description":"Also mark the conversation as needing an operator","type":"boolean"},"draft":{"description":"Default true: write a short staff note for the run's evidence; false skips the model call","type":"boolean"}},"required":["label","kind","targets","policy"]}]},"description":"Output actions to execute on match"},"threshold":{"default":0.7,"description":"Minimum confidence (0–1)","type":"number","minimum":0,"maximum":1},"repeat":{"default":{"mode":"once_per_session"},"description":"Repeat policy","anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"once_per_session"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","const":"every_match"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","const":"cooldown"},"cooldownMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["mode","cooldownMinutes"]}]},"scope":{"description":"Guest identity and hotel-local schedule criteria","type":"object","properties":{"guest":{"type":"string","enum":["all","identified","anonymous"]},"webhookIds":{"description":"Webhooks (ids from `list_webhooks`) whose inbound requests start this agent","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"schedule":{"type":"object","properties":{"timezone":{"type":"string","minLength":1},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["timezone","days","start","end"]}},"required":["guest"]},"resources":{"description":"Allowed knowledge, translations, configuration and integration tools","type":"object","properties":{"knowledge":{"type":"boolean"},"translations":{"type":"boolean"},"configuration":{"type":"boolean"},"integrations":{"type":"boolean"},"tools":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"required":["knowledge","translations","configuration","integrations"]}},"required":["templateId","name","channels","criteria","action","outputs"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/agent/{agentId}":{"get":{"operationId":"get_agent","tags":["agents"],"summary":"Get ledger agent","description":"Fetch one ledger agent by id, with `attention` — true when it had a failed or errored run in the last 24 hours (the console rail's flag) — and the attention details. 404 when the agent does not exist.\n\n**Requires:** `agents` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Ledger agent id"},"description":"Ledger agent id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_agent","mcp":{"tool":"get_agent","endpoint":"/mcp"},"a2a":{"skill":"get_agent","endpoint":"/a2a"},"access":[{"feature":"agents","level":"READ","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_agent","tags":["agents"],"summary":"Update ledger agent","description":"Partially update a ledger agent; the live runtime picks it up at once and the change is recorded in the client activity feed. Requires the current `version` for optimistic concurrency (409 when it moved). Webhook outputs must be https.\n\n**Requires:** `agents` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Ledger agent id"},"description":"Ledger agent id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_agent","mcp":{"tool":"update_agent","endpoint":"/mcp"},"a2a":{"skill":"update_agent","endpoint":"/a2a"},"access":[{"feature":"agents","level":"WRITE","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Current version from a prior read"},"name":{"type":"string","minLength":1,"maxLength":120},"enabled":{"type":"boolean"},"channels":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"},"description":"Channels the agent listens on: lowercase channel ids ('*', 'web', 'gmail', 'outlook', 'instagram', 'messenger', 'whatsapp', 'chatgpt', 'webhook'); ['*'] alone means every channel"},"criteria":{"type":"string","minLength":1,"maxLength":4000},"action":{"type":"string","minLength":1,"maxLength":4000},"outputs":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"webhook_response"}},"required":["kind"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"reply_same_chat"}},"required":["kind"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"channel_message"},"channel":{"type":"string","minLength":1}},"required":["kind","channel"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"email"},"recipients":{"minItems":1,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"subjectPrefix":{"type":"string","maxLength":200}},"required":["kind","recipients"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"whatsapp"},"to":{"type":"string","minLength":1}},"required":["kind","to"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"sms"},"to":{"type":"string","minLength":1}},"required":["kind","to"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"connector"},"provider":{"type":"string","minLength":1},"toolId":{"type":"string","minLength":1},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","provider"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"Destination name the action instruction can refer to; unique within the agent (case-insensitive)"},"kind":{"type":"string","const":"webhook"},"url":{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*","description":"https URL the output POSTs to"},"secret":{"type":"string","minLength":1}},"required":["kind","url","secret"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120,"description":"Shown to operators as the notice; written by you, never by the guest or the model. Also the destination name (unique within the agent)"},"kind":{"type":"string","const":"notify_operator"},"targets":{"type":"object","properties":{"allOperators":{"description":"Alert every user who can read this client's conversations","type":"boolean"},"userIds":{"description":"Users to alert","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"groupIds":{"description":"User groups whose members are alerted","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"roleIds":{"description":"Roles whose holders at this client are alerted","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}},"description":"Who is alerted; only users who can read this client's conversations receive the notice"},"policy":{"type":"string","enum":["personal","shared","hybrid"],"description":"personal: every recipient must read it; shared: the first read clears it for everyone; hybrid: namedUserIds must read it themselves, the first read clears it for the rest"},"namedUserIds":{"description":"Hybrid only: recipients whose notice stays until they read it","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"flagConversation":{"description":"Also mark the conversation as needing an operator","type":"boolean"},"draft":{"description":"Default true: write a short staff note for the run's evidence; false skips the model call","type":"boolean"}},"required":["label","kind","targets","policy"]}]}},"threshold":{"type":"number","minimum":0,"maximum":1},"repeat":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"once_per_session"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","const":"every_match"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","const":"cooldown"},"cooldownMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["mode","cooldownMinutes"]}]},"scope":{"type":"object","properties":{"guest":{"type":"string","enum":["all","identified","anonymous"]},"webhookIds":{"description":"Webhooks (ids from `list_webhooks`) whose inbound requests start this agent","maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"schedule":{"type":"object","properties":{"timezone":{"type":"string","minLength":1},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["timezone","days","start","end"]}},"required":["guest"]},"resources":{"type":"object","properties":{"knowledge":{"type":"boolean"},"translations":{"type":"boolean"},"configuration":{"type":"boolean"},"integrations":{"type":"boolean"},"tools":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"required":["knowledge","translations","configuration","integrations"]}},"required":["version"],"additionalProperties":false}}}}},"delete":{"operationId":"delete_agent","tags":["agents"],"summary":"Delete ledger agent","description":"Soft-delete a ledger agent.\n\n**Requires:** `agents` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Ledger agent id"},"description":"Ledger agent id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_agent","mcp":{"tool":"delete_agent","endpoint":"/mcp"},"a2a":{"skill":"delete_agent","endpoint":"/a2a"},"access":[{"feature":"agents","level":"WRITE","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":false,"destructive":false}}},"/api/v1/client/{clientId}/agent/{agentId}/enable":{"post":{"operationId":"enable_agent","tags":["agents"],"summary":"Enable ledger agent","description":"Enable a ledger agent so it evaluates live turns.\n\n**Requires:** `agents` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Ledger agent id"},"description":"Ledger agent id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"enable_agent","mcp":{"tool":"enable_agent","endpoint":"/mcp"},"a2a":{"skill":"enable_agent","endpoint":"/a2a"},"access":[{"feature":"agents","level":"WRITE","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/agent/{agentId}/disable":{"post":{"operationId":"disable_agent","tags":["agents"],"summary":"Disable ledger agent","description":"Disable a ledger agent so it no longer evaluates live turns.\n\n**Requires:** `agents` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Ledger agent id"},"description":"Ledger agent id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"disable_agent","mcp":{"tool":"disable_agent","endpoint":"/mcp"},"a2a":{"skill":"disable_agent","endpoint":"/a2a"},"access":[{"feature":"agents","level":"WRITE","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/agent/{agentId}/test":{"post":{"operationId":"test_agent","tags":["agents"],"summary":"Test ledger agent","description":"Dry-run a ledger agent against a transcript. Returns verdicts without executing outputs or writing an execution record.\n\n**Requires:** `agents` EXECUTE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:execute"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Ledger agent id"},"description":"Ledger agent id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"test_agent","mcp":{"tool":"test_agent","endpoint":"/mcp"},"a2a":{"skill":"test_agent","endpoint":"/a2a"},"access":[{"feature":"agents","level":"EXECUTE","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"default":"web","description":"Channel the transcript came from","type":"string","minLength":1},"guestIdentified":{"default":false,"description":"Whether the guest is identified (for identity-scoped agents)","type":"boolean"},"transcript":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"message":{"type":"string","maxLength":4000},"datetime":{"type":"string"}},"required":["role","message"]},"description":"Representative conversation transcript (1–100 turns)"}},"required":["transcript"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/agents/tools":{"get":{"operationId":"list_agent_tools","tags":["agents"],"summary":"List tools an agent may use","description":"List the hotel's integration tools an agent may be allowed to call — the ids `create_agent` / `update_agent` accept in `resources.tools` — with each tool's provider, description and whether it only reads. Only tools delivered to the guest audience are listed. 404 when the client does not exist.\n\n**Requires:** `agents` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_agent_tools","mcp":{"tool":"list_agent_tools","endpoint":"/mcp"},"a2a":{"skill":"list_agent_tools","endpoint":"/a2a"},"access":[{"feature":"agents","level":"READ","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/agenttemplates":{"get":{"operationId":"list_agent_templates","tags":["agents"],"summary":"List ledger templates","description":"List predefined agent templates with suggested criteria, actions, and outputs.\n\n**Requires:** `agents` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:read"]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_agent_templates","mcp":{"tool":"list_agent_templates","endpoint":"/mcp"},"a2a":{"skill":"list_agent_templates","endpoint":"/a2a"},"access":[{"feature":"agents","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/agents/sessions":{"get":{"operationId":"list_agent_sessions","tags":["agents"],"summary":"Find agent sessions and analytics","description":"Find the sessions where an agent was triggered in a date range, with exact matched, delivered, failed and pending counts across the full result set, not just this page. Sessions where no agent matched are listed only with executionsOnly=false.\n\n**Requires:** `agents` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"agentId","in":"query","required":false,"schema":{"description":"Configured agent id","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Configured agent id"},{"name":"sessionId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":40}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Inclusive ISO start; range cannot exceed 366 days"},"description":"Inclusive ISO start; range cannot exceed 366 days"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exclusive ISO end"},"description":"Exclusive ISO end"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"executionsOnly","in":"query","required":false,"schema":{"description":"Triggered runs only (default true for sessions and executions): runs whose criteria matched (acted, partial, failed, pending, waiting for details, skipped by instruction) plus runs whose evaluation failed. Set false for the diagnostic view of every decision, including no_match, below_threshold and skipped_dedupe.","type":"boolean"},"description":"Triggered runs only (default true for sessions and executions): runs whose criteria matched (acted, partial, failed, pending, waiting for details, skipped by instruction) plus runs whose evaluation failed. Set false for the diagnostic view of every decision, including no_match, below_threshold and skipped_dedupe."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_agent_sessions","mcp":{"tool":"list_agent_sessions","endpoint":"/mcp"},"a2a":{"skill":"list_agent_sessions","endpoint":"/a2a"},"access":[{"feature":"agents","level":"READ","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/agents/history":{"get":{"operationId":"list_agent_execution_history","tags":["agents"],"summary":"Explain agent activity","description":"List indexed action-history metadata: source-message identity, agent configuration version, status, confidence, threshold and timing. Use get_agent_execution_history to load one execution's immutable decision and output evidence. Lists triggered runs by default; set executionsOnly=false to investigate nonmatches, below-threshold and dedupe decisions as well.\n\n**Requires:** `agents` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"agentId","in":"query","required":false,"schema":{"description":"Configured agent id","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Configured agent id"},{"name":"sessionId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":40}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Inclusive ISO start; range cannot exceed 366 days"},"description":"Inclusive ISO start; range cannot exceed 366 days"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exclusive ISO end"},"description":"Exclusive ISO end"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"executionsOnly","in":"query","required":false,"schema":{"description":"Triggered runs only (default true for sessions and executions): runs whose criteria matched (acted, partial, failed, pending, waiting for details, skipped by instruction) plus runs whose evaluation failed. Set false for the diagnostic view of every decision, including no_match, below_threshold and skipped_dedupe.","type":"boolean"},"description":"Triggered runs only (default true for sessions and executions): runs whose criteria matched (acted, partial, failed, pending, waiting for details, skipped by instruction) plus runs whose evaluation failed. Set false for the diagnostic view of every decision, including no_match, below_threshold and skipped_dedupe."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_agent_execution_history","mcp":{"tool":"list_agent_execution_history","endpoint":"/mcp"},"a2a":{"skill":"list_agent_execution_history","endpoint":"/a2a"},"access":[{"feature":"agents","level":"READ","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/agents/history/{executionId}":{"get":{"operationId":"get_agent_execution_history","tags":["agents"],"summary":"Explain one agent execution","description":"Fetch the durable source-message, trigger and action evidence for one execution, including output message references. Preserves the configuration used at execution time even if the agent was renamed or deleted.\n\n**Requires:** `agents` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"executionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_agent_execution_history","mcp":{"tool":"get_agent_execution_history","endpoint":"/mcp"},"a2a":{"skill":"get_agent_execution_history","endpoint":"/a2a"},"access":[{"feature":"agents","level":"READ","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/agent/guest/settings":{"get":{"operationId":"get_guest_agent_settings","tags":["agents"],"summary":"Get Guest agent resources","description":"Read resource permissions and current settings version for the built-in, always-on Guest agent.\n\n**Requires:** `agents` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_guest_agent_settings","mcp":{"tool":"get_guest_agent_settings","endpoint":"/mcp"},"a2a":{"skill":"get_guest_agent_settings","endpoint":"/a2a"},"access":[{"feature":"agents","level":"READ","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_guest_agent_settings","tags":["agents"],"summary":"Set Guest agent resources","description":"Update resource permissions for the built-in Guest agent using its current settings version (0 for untouched defaults). The Guest agent cannot be disabled.\n\n**Requires:** `agents` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `agents` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["agents:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_guest_agent_settings","mcp":{"tool":"update_guest_agent_settings","endpoint":"/mcp"},"a2a":{"skill":"update_guest_agent_settings","endpoint":"/a2a"},"access":[{"feature":"agents","level":"WRITE","scope":"client"}],"entitlement":"agents","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"type":"object","properties":{"knowledge":{"type":"boolean"},"translations":{"type":"boolean"},"configuration":{"type":"boolean"},"integrations":{"type":"boolean"},"tools":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"required":["knowledge","translations","configuration","integrations"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["resources","version"],"additionalProperties":false}}}}}},"/api/v1/llmusage/summary":{"get":{"operationId":"get_llm_usage_summary","tags":["usage"],"summary":"LLM usage summary","description":"Aggregated LLM token and cost totals for a date window, grouped by day, model, purpose or client. Window must not exceed 31 days. Costs are list-price estimates.\n\n**Requires:** `llm-usage` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["usage:read"]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD (inclusive)"},"description":"Start date YYYY-MM-DD (inclusive)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD (inclusive)"},"description":"End date YYYY-MM-DD (inclusive)"},{"name":"groupBy","in":"query","required":false,"schema":{"default":"day","description":"Dimension to group results by","type":"string","enum":["day","model","purpose","client"]},"description":"Dimension to group results by"},{"name":"clientId","in":"query","required":false,"schema":{"description":"Limit to a specific client","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Limit to a specific client"},{"name":"purpose","in":"query","required":false,"schema":{"description":"Limit to a specific purpose","type":"string","enum":["guest_chat","admin_agent","agent_evaluate","agent_route","agent_draft","agent_split","chat_feedback","conversation_topic","knowledge_gap","analytics_report","diagnostic","translate","follow_ups","email_judge","classify","addon_intent","embedding","other"]},"description":"Limit to a specific purpose"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_llm_usage_summary","mcp":{"tool":"get_llm_usage_summary","endpoint":"/mcp"},"a2a":{"skill":"get_llm_usage_summary","endpoint":"/a2a"},"access":[{"feature":"llm-usage","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/llmusage":{"get":{"operationId":"list_llm_usage","tags":["usage"],"summary":"List LLM usage records","description":"Individual LLM call records for a date window (newest first, up to 100 per page). Window must not exceed 31 days. Filter by clientId or purpose.\n\n**Requires:** `llm-usage` READ (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["usage:read"]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD (inclusive)"},"description":"Start date YYYY-MM-DD (inclusive)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD (inclusive)"},"description":"End date YYYY-MM-DD (inclusive)"},{"name":"clientId","in":"query","required":false,"schema":{"description":"Limit to a specific client","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Limit to a specific client"},{"name":"purpose","in":"query","required":false,"schema":{"description":"Limit to a specific purpose","type":"string","enum":["guest_chat","admin_agent","agent_evaluate","agent_route","agent_draft","agent_split","chat_feedback","conversation_topic","knowledge_gap","analytics_report","diagnostic","translate","follow_ups","email_judge","classify","addon_intent","embedding","other"]},"description":"Limit to a specific purpose"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"},{"name":"after","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page","type":"string"},"description":"Opaque cursor from the previous page's `nextCursor`; omit for the first page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_llm_usage","mcp":{"tool":"list_llm_usage","endpoint":"/mcp"},"a2a":{"skill":"list_llm_usage","endpoint":"/a2a"},"access":[{"feature":"llm-usage","level":"READ","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/webhooks":{"get":{"operationId":"list_webhooks","tags":["webhooks"],"summary":"List webhooks","description":"List a hotel's incoming webhooks with their addresses, live keys (prefixes only, never secrets) and 24-hour request counts, plus how many are deleted (`deletedCount`). Set `deleted` to include soft-deleted webhooks. Use to find the id to put in an agent's `scope.webhookIds`; use `get_webhook` for one.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"deleted","in":"query","required":false,"schema":{"default":false,"description":"Include soft-deleted webhooks","type":"boolean"},"description":"Include soft-deleted webhooks"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_webhooks","mcp":{"tool":"list_webhooks","endpoint":"/mcp"},"a2a":{"skill":"list_webhooks","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/webhook":{"post":{"operationId":"create_webhook","tags":["webhooks"],"summary":"Create webhook","description":"Create an incoming webhook: a permanent address (`/webhooks/{clientId}/{slug}`) other systems POST to. With `api_key` access (the default) the response carries `apiKey`, the secret of its first key `Default` — returned only here, never again by a read; hand it to the sender at once (`reveal_webhook_key` recovers it later). 409 `slug_taken` when the slug is in use. Then list the webhook in an agent's `scope.webhookIds`.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_webhook","mcp":{"tool":"create_webhook","endpoint":"/mcp"},"a2a":{"skill":"create_webhook","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Display name"},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","description":"Address segment: lowercase letters, digits and hyphens; never changes"},"description":{"type":"string","maxLength":500},"enabled":{"description":"Accept requests (default true)","type":"boolean"},"authMode":{"default":"api_key","type":"string","enum":["open","api_key"],"description":"`api_key`: senders must present a key; `open`: anyone with the address may post"},"keyRotation":{"type":"string","enum":["manual","auto"],"description":"`auto` rotates each key lazily once `keyRotationDays` have passed"},"keyRotationDays":{"type":"integer","minimum":1,"maximum":365,"description":"Days between automatic rotations; required when `keyRotation` is `auto`"}},"required":["name","slug"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/webhook/{webhookId}":{"get":{"operationId":"get_webhook","tags":["webhooks"],"summary":"Get webhook","description":"Fetch one webhook (deleted ones included) with its address, settings, live keys (prefixes only — never a secret) and 24-hour request count. Use `reveal_webhook_key` for a key's secret, `list_webhook_requests` for its traffic.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_webhook","mcp":{"tool":"get_webhook","endpoint":"/mcp"},"a2a":{"skill":"get_webhook","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_webhook","tags":["webhooks"],"summary":"Update webhook","description":"Edit a webhook's name, description, enabled state, access mode or key rotation, with its current `version`. The slug (address) never changes — sending `slug` is refused; create a new webhook for a new address. Switching to `open` revokes every live key; switching to `api_key` with no live key creates a `Default` key whose secret is returned once as `apiKey`. 409 `version_conflict` when stale, `webhook_deleted` for a deleted webhook.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_webhook","mcp":{"tool":"update_webhook","endpoint":"/mcp"},"a2a":{"skill":"update_webhook","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"description":"null clears it","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"enabled":{"type":"boolean"},"authMode":{"type":"string","enum":["open","api_key"],"description":"`api_key`: senders must present a key; `open`: anyone with the address may post"},"keyRotation":{"type":"string","enum":["manual","auto"],"description":"`auto` rotates each key lazily once `keyRotationDays` have passed"},"keyRotationDays":{"type":"integer","minimum":1,"maximum":365,"description":"Days between automatic rotations; required when `keyRotation` is `auto`"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Current `version` from a prior read (optimistic concurrency; 409 when stale)"}},"required":["version"],"additionalProperties":false}}}}},"delete":{"operationId":"delete_webhook","tags":["webhooks"],"summary":"Delete webhook","description":"Soft-delete a webhook: it stops accepting requests at once, its request log stays readable and its address stays reserved (it cannot be reused). Returns the deleted webhook. 409 `already_deleted`. To pause instead, `update_webhook` with `enabled: false`.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"delete_webhook","mcp":{"tool":"delete_webhook","endpoint":"/mcp"},"a2a":{"skill":"delete_webhook","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/webhook/{webhookId}/key":{"post":{"operationId":"add_webhook_key","tags":["webhooks"],"summary":"Add webhook key","description":"Add a named key to an `api_key` webhook — one per sending app, so the request log shows which app called (at most 20 live). Returns the webhook, the key and its secret `apiKey`, returned once. 409 `webhook_has_no_key` for an `open` webhook, `key_name_taken`, `too_many_keys`, `webhook_deleted`.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"add_webhook_key","mcp":{"tool":"add_webhook_key","endpoint":"/mcp"},"a2a":{"skill":"add_webhook_key","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"description":"Key name, e.g. the sender"}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/webhook/{webhookId}/key/{keyId}":{"put":{"operationId":"rename_webhook_key","tags":["webhooks"],"summary":"Rename webhook key","description":"Rename a live key with its current `version`; the secret does not change. 409 `version_conflict`, `key_name_taken`, `key_revoked`.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Key id (a webhook's `keys[].id`)"},"description":"Key id (a webhook's `keys[].id`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"rename_webhook_key","mcp":{"tool":"rename_webhook_key","endpoint":"/mcp"},"a2a":{"skill":"rename_webhook_key","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"description":"New key name"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Current `version` from a prior read (optimistic concurrency; 409 when stale)"}},"required":["name","version"],"additionalProperties":false}}}}},"delete":{"operationId":"revoke_webhook_key","tags":["webhooks"],"summary":"Revoke webhook key","description":"Revoke a key at once (soft: the request log keeps its name). Returns the revoked key and the webhook's remaining live keys. The last live key of an `api_key` webhook cannot be revoked (409 `last_key`) — switch the webhook to `open` with `update_webhook` instead. To replace a leaked key without downtime use `rotate_webhook_key`.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Key id (a webhook's `keys[].id`)"},"description":"Key id (a webhook's `keys[].id`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"revoke_webhook_key","mcp":{"tool":"revoke_webhook_key","endpoint":"/mcp"},"a2a":{"skill":"revoke_webhook_key","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/webhook/{webhookId}/key/{keyId}/secret":{"get":{"operationId":"reveal_webhook_key","tags":["webhooks"],"summary":"Reveal webhook key","description":"Return a live key's secret (`apiKey`) again. Needs WRITE: the reveal is recorded in the hotel's activity log, and when the key's automatic rotation is due it is rotated first, so the secret returned is the new one (the old one keeps working for 24 hours). 409 `key_revoked`, `webhook_deleted`.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Key id (a webhook's `keys[].id`)"},"description":"Key id (a webhook's `keys[].id`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"reveal_webhook_key","mcp":{"tool":"reveal_webhook_key","endpoint":"/mcp"},"a2a":{"skill":"reveal_webhook_key","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false}}},"/api/v1/client/{clientId}/webhook/{webhookId}/key/{keyId}/rotate":{"post":{"operationId":"rotate_webhook_key","tags":["webhooks"],"summary":"Rotate webhook key","description":"Issue a new secret for a key, with the key's current `version`. Returns the webhook, the key and the new `apiKey` (returned once); the previous secret keeps working for 24 hours so the sender can switch. 409 `version_conflict`, `key_revoked`, `webhook_deleted`.\n\n**Requires:** `update-client` WRITE (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Key id (a webhook's `keys[].id`)"},"description":"Key id (a webhook's `keys[].id`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"rotate_webhook_key","mcp":{"tool":"rotate_webhook_key","endpoint":"/mcp"},"a2a":{"skill":"rotate_webhook_key","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"WRITE","scope":"client"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Current `version` from a prior read (optimistic concurrency; 409 when stale)"}},"required":["version"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/webhooks/analytics":{"get":{"operationId":"get_webhook_analytics","tags":["webhooks"],"summary":"Get webhook analytics","description":"Request counts for a hotel's webhooks over `from`–`to` (inclusive UTC days, at most 92): per day (total, accepted, rejected), per webhook (with the last request time) and per outcome. Optionally one webhook. Use `list_webhook_requests` for the individual requests.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day, YYYY-MM-DD (UTC)"},"description":"First day, YYYY-MM-DD (UTC)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day, YYYY-MM-DD (UTC, inclusive)"},"description":"Last day, YYYY-MM-DD (UTC, inclusive)"},{"name":"webhookId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_webhook_analytics","mcp":{"tool":"get_webhook_analytics","endpoint":"/mcp"},"a2a":{"skill":"get_webhook_analytics","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/webhook/{webhookId}/requests":{"get":{"operationId":"list_webhook_requests","tags":["webhooks"],"summary":"List webhook requests","description":"A webhook's request log, newest first: when, status, outcome (`accepted` or why it was refused), size, the key that authenticated it and how many agent runs it started. Filter by time, outcome or key; page with `cursor` from `nextCursor`. Bodies are not included — `get_webhook_request` returns one request's headers and body.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"},{"name":"from","in":"query","required":false,"schema":{"description":"Start: a UTC day (YYYY-MM-DD) or an ISO datetime","anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"description":"Start: a UTC day (YYYY-MM-DD) or an ISO datetime"},{"name":"to","in":"query","required":false,"schema":{"description":"End: a UTC day (inclusive) or an ISO datetime (exclusive)","anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"description":"End: a UTC day (inclusive) or an ISO datetime (exclusive)"},{"name":"outcome","in":"query","required":false,"schema":{"type":"string","enum":["accepted","rejected_auth","rejected_disabled","rejected_payload","store_failed"]}},{"name":"keyId","in":"query","required":false,"schema":{"description":"Only requests authenticated by this key","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Only requests authenticated by this key"},{"name":"cursor","in":"query","required":false,"schema":{"description":"nextCursor from the previous page","type":"string","minLength":1,"maxLength":512},"description":"nextCursor from the previous page"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_webhook_requests","mcp":{"tool":"list_webhook_requests","endpoint":"/mcp"},"a2a":{"skill":"list_webhook_requests","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/webhook/{webhookId}/request/{requestId}":{"get":{"operationId":"get_webhook_request","tags":["webhooks"],"summary":"Get webhook request","description":"One logged request with the caller's IP, its stored headers and body (bodies are kept 90 days; after that `body` is null). `truncated` is true when the body exceeded the stored limit. Use to see exactly what a sender posted.\n\n**Requires:** `update-client` READ (client). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["clients:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id (from `list_webhooks` or `create_webhook`)"},"description":"Webhook id (from `list_webhooks` or `create_webhook`)"},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Request id from `list_webhook_requests`"},"description":"Request id from `list_webhook_requests`"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_webhook_request","mcp":{"tool":"get_webhook_request","endpoint":"/mcp"},"a2a":{"skill":"get_webhook_request","endpoint":"/a2a"},"access":[{"feature":"update-client","level":"READ","scope":"client"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/apps":{"get":{"operationId":"list_client_apps","tags":["apps"],"summary":"List a hotel's developer apps","description":"The OAuth apps a hotel registered to call the Maison API on its behalf, newest first: registration fields, verified / suspended state, who created, changed or revoked each, `last_used_at` and `requests_30d`. Revoked apps only with `includeRevoked`. Returns `{ apps, nextCursor, canWrite }`. Never returns a client secret. Use `get_client_app` for one app.\n\n**Requires:** `oauth-apps` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `oauth-apps` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"includeRevoked","in":"query","required":false,"schema":{"default":false,"description":"Also list revoked apps","type":"boolean"},"description":"Also list revoked apps"},{"name":"limit","in":"query","required":false,"schema":{"default":100,"description":"Page size (1–200)","type":"integer","minimum":1,"maximum":200},"description":"Page size (1–200)"},{"name":"cursor","in":"query","required":false,"schema":{"description":"`nextCursor` of the previous page","type":"string","minLength":1,"maxLength":512},"description":"`nextCursor` of the previous page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_apps","mcp":{"tool":"list_client_apps","endpoint":"/mcp"},"a2a":{"skill":"list_client_apps","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"READ","scope":"client"}],"entitlement":"oauth-apps","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/app/{appId}":{"get":{"operationId":"get_client_app","tags":["apps"],"summary":"Get a developer app","description":"One of a hotel's developer apps, revoked or not, with its registration, state, actors and usage. Never returns the client secret (it was shown once, by `create_client_app`). 404 when the app is not this hotel's.\n\n**Requires:** `oauth-apps` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `oauth-apps` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_app","mcp":{"tool":"get_client_app","endpoint":"/mcp"},"a2a":{"skill":"get_client_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"READ","scope":"client"}],"entitlement":"oauth-apps","composite":null,"readOnly":true,"destructive":false}},"put":{"operationId":"update_client_app","tags":["apps"],"summary":"Update a developer app","description":"Change a live app's name, logo, home page, redirect URIs or scopes (send only what changes). The audit log keeps the before and after, and separate events when the scopes or redirect URIs change. People already connected keep the scopes they consented to. 404 when the app is not this hotel's or is revoked (reinstate it first).\n\n**Requires:** `oauth-apps` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `oauth-apps` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"update_client_app","mcp":{"tool":"update_client_app","endpoint":"/mcp"},"a2a":{"skill":"update_client_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"client"}],"entitlement":"oauth-apps","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"logoUri":{"anyOf":[{"type":"string","pattern":"^https:\\/\\/"},{"type":"null"}]},"clientUri":{"anyOf":[{"type":"string","pattern":"^https:\\/\\/"},{"type":"null"}]},"redirectUris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uri"}},"requestedScopes":{"minItems":1,"type":"array","items":{"type":"string"},"description":"The scopes the app may ask people for (e.g. `clients:read`); never `admin`"}},"additionalProperties":false}}}}},"delete":{"operationId":"revoke_client_app","tags":["apps"],"summary":"Revoke a developer app","description":"Stop a hotel's app and everyone connected through it: the app is revoked (never deleted) and every person's consent to it is revoked too (access tokens are refused within 30 seconds). Returns `{ revoked, revokedGrants }`. `reinstate_client_app` brings the app back, but consents stay revoked. 404 when there is no live app.\n\n**Requires:** `oauth-apps` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `oauth-apps` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"revoke_client_app","mcp":{"tool":"revoke_client_app","endpoint":"/mcp"},"a2a":{"skill":"revoke_client_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"client"}],"entitlement":"oauth-apps","composite":null,"readOnly":false,"destructive":true}}},"/api/v1/client/{clientId}/app":{"post":{"operationId":"create_client_app","tags":["apps"],"summary":"Register a developer app","description":"Register an OAuth app for a hotel: name, redirect URIs (https, or http on localhost), the scopes it may ask for, and its type — `public` (PKCE, no secret) or `confidential` (a client secret). Returns the app with its OAuth `clientId`; a confidential app's `clientSecret` is in THIS response only and can never be read again — hand it over at once. The app starts unverified. Recorded in the hotel's audit log. Call it with a user's own API key: an OAuth access token is refused (403 `credential_not_allowed`), so an app can never register further apps.\n\n**Requires:** `oauth-apps` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `oauth-apps` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"create_client_app","mcp":{"tool":"create_client_app","endpoint":"/mcp"},"a2a":{"skill":"create_client_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"client"}],"entitlement":"oauth-apps","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"Shown on the consent screen"},"logoUri":{"anyOf":[{"type":"string","pattern":"^https:\\/\\/"},{"type":"null"}]},"clientUri":{"description":"The app's home page","anyOf":[{"type":"string","pattern":"^https:\\/\\/"},{"type":"null"}]},"redirectUris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uri"}},"requestedScopes":{"minItems":1,"type":"array","items":{"type":"string"},"description":"The scopes the app may ask people for (e.g. `clients:read`); never `admin`"},"clientType":{"type":"string","enum":["public","confidential"]}},"required":["name","redirectUris","requestedScopes","clientType"],"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/app/{appId}/reinstate":{"post":{"operationId":"reinstate_client_app","tags":["apps"],"summary":"Reinstate a developer app","description":"Bring a revoked app back. Consents stay revoked: people connect again. 404 when the app is not revoked (or not this hotel's); 409 `client_id_in_use` when another live app now holds its OAuth client id.\n\n**Requires:** `oauth-apps` WRITE (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `oauth-apps` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"reinstate_client_app","mcp":{"tool":"reinstate_client_app","endpoint":"/mcp"},"a2a":{"skill":"reinstate_client_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"client"}],"entitlement":"oauth-apps","composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/client/{clientId}/app/{appId}/analytics":{"get":{"operationId":"get_client_app_analytics","tags":["apps"],"summary":"Developer app analytics","description":"How an app is used over a window of UTC days (`from`/`to` inclusive, at most 92 days; default the last 30 days): requests per day split ok / error (error = status 400 and above), totals (requests, errors, median duration, active users, last use), the top tools, transports, people and sources, and consents (active now, granted / revoked per day). 404 when the app is not this hotel's. Use `list_client_app_requests` for the calls themselves.\n\n**Requires:** `oauth-apps` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `oauth-apps` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"},{"name":"from","in":"query","required":false,"schema":{"description":"First day (YYYY-MM-DD, UTC)","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"First day (YYYY-MM-DD, UTC)"},{"name":"to","in":"query","required":false,"schema":{"description":"Last day, inclusive (YYYY-MM-DD, UTC); default today","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"Last day, inclusive (YYYY-MM-DD, UTC); default today"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"get_client_app_analytics","mcp":{"tool":"get_client_app_analytics","endpoint":"/mcp"},"a2a":{"skill":"get_client_app_analytics","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"READ","scope":"client"}],"entitlement":"oauth-apps","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/app/{appId}/requests":{"get":{"operationId":"list_client_app_requests","tags":["apps"],"summary":"Developer app request log","description":"The app's access log, newest first: every tool call and token exchange with its tool, transport, status, error code, duration, the person it ran as, the hotel it named and where it came from. Filter by `from` / `to` (a day — `to` inclusive — or an ISO datetime — `to` exclusive) and `outcome` (`ok` | `error`). Returns `{ requests, nextCursor }`. 404 when the app is not this hotel's.\n\n**Requires:** `oauth-apps` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `oauth-apps` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"A day (YYYY-MM-DD, UTC) or an ISO datetime"},"description":"A day (YYYY-MM-DD, UTC) or an ISO datetime"},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"A day (YYYY-MM-DD, UTC) or an ISO datetime"},"description":"A day (YYYY-MM-DD, UTC) or an ISO datetime"},{"name":"outcome","in":"query","required":false,"schema":{"type":"string","enum":["ok","error"]}},{"name":"cursor","in":"query","required":false,"schema":{"description":"`nextCursor` of the previous page","type":"string","minLength":1,"maxLength":512},"description":"`nextCursor` of the previous page"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_app_requests","mcp":{"tool":"list_client_app_requests","endpoint":"/mcp"},"a2a":{"skill":"list_client_app_requests","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"READ","scope":"client"}],"entitlement":"oauth-apps","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/client/{clientId}/app/{appId}/audit":{"get":{"operationId":"list_client_app_audit","tags":["apps"],"summary":"Developer app audit log","description":"Every change to the app and every consent to it, newest first (`oauth_app_*` events: created, updated, scopes / redirects changed, revoked, grants revoked, reinstated, suspended, verified, consent granted / revoked), each with the actor's name and the detail. Returns `{ events, nextCursor }`. 404 when the app is not this hotel's.\n\n**Requires:** `oauth-apps` READ (client). All are required (403 otherwise).\n\n**Client plan:** the client must be entitled to `oauth-apps` (403 `not_entitled` otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:read"]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Client (hotel) id"},"description":"Client (hotel) id"},{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"},{"name":"cursor","in":"query","required":false,"schema":{"description":"`nextCursor` of the previous page","type":"string","minLength":1,"maxLength":512},"description":"`nextCursor` of the previous page"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_client_app_audit","mcp":{"tool":"list_client_app_audit","endpoint":"/mcp"},"a2a":{"skill":"list_client_app_audit","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"READ","scope":"client"}],"entitlement":"oauth-apps","composite":null,"readOnly":true,"destructive":false}}},"/api/v1/oauthapps":{"get":{"operationId":"list_oauth_apps","tags":["apps"],"summary":"List every developer app","description":"Maison staff: every OAuth app on the platform, oldest first — hotel portal apps, Claude / ChatGPT style CIMD and DCR registrations, and first-party apps — with the portal fields, `is_first_party` and the redirect URI count. Filter by `search` (name), `type` and `status` (`active`, `suspended`, `revoked`); revoked apps join the list only with `includeRevoked` or `status: revoked`. Returns `{ apps, cursor, hasMore }`.\n\n**Requires:** `oauth-apps` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["portal","cimd","dcr","first_party"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","suspended","revoked"]}},{"name":"includeRevoked","in":"query","required":false,"schema":{"default":false,"description":"Revoked apps alongside the live ones","type":"boolean"},"description":"Revoked apps alongside the live ones"},{"name":"cursor","in":"query","required":false,"schema":{"description":"`cursor` of the previous page","type":"string","minLength":1,"maxLength":512},"description":"`cursor` of the previous page"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size (1–100)","type":"integer","minimum":1,"maximum":100},"description":"Page size (1–100)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"list_oauth_apps","mcp":{"tool":"list_oauth_apps","endpoint":"/mcp"},"a2a":{"skill":"list_oauth_apps","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":true,"destructive":false}}},"/api/v1/oauthapp/{appId}/verify":{"post":{"operationId":"verify_oauth_app","tags":["apps"],"summary":"Verify a developer app","description":"Maison staff: mark a live app verified — the consent screen drops its \"Unverified app\" warning. A badge only; it never gates the flow. 404 when there is no live app. Recorded in the owning hotel's audit log.\n\n**Requires:** `oauth-apps` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"verify_oauth_app","mcp":{"tool":"verify_oauth_app","endpoint":"/mcp"},"a2a":{"skill":"verify_oauth_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/oauthapp/{appId}/unverify":{"post":{"operationId":"unverify_oauth_app","tags":["apps"],"summary":"Remove an app's verified mark","description":"Maison staff: remove a live app's verified mark; the consent screen warns again. 404 when there is no live app.\n\n**Requires:** `oauth-apps` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"unverify_oauth_app","mcp":{"tool":"unverify_oauth_app","endpoint":"/mcp"},"a2a":{"skill":"unverify_oauth_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/oauthapp/{appId}/suspend":{"post":{"operationId":"suspend_oauth_app","tags":["apps"],"summary":"Suspend a developer app","description":"Maison staff: a temporary stop that keeps consents — authorize and token requests are refused, and access tokens already issued run out within 15 minutes. `unsuspend_oauth_app` lifts it; use `revoke_oauth_app` to stop the app for good. 404 when there is no live app.\n\n**Requires:** `oauth-apps` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"suspend_oauth_app","mcp":{"tool":"suspend_oauth_app","endpoint":"/mcp"},"a2a":{"skill":"suspend_oauth_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/oauthapp/{appId}/unsuspend":{"post":{"operationId":"unsuspend_oauth_app","tags":["apps"],"summary":"Lift an app's suspension","description":"Maison staff: lift a suspension; the app works again with the consents it had. 404 when there is no live app.\n\n**Requires:** `oauth-apps` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"unsuspend_oauth_app","mcp":{"tool":"unsuspend_oauth_app","endpoint":"/mcp"},"a2a":{"skill":"unsuspend_oauth_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/oauthapp/{appId}":{"delete":{"operationId":"revoke_oauth_app","tags":["apps"],"summary":"Revoke any developer app","description":"Maison staff: revoke any app on the platform (any registration type) and every person's consent to it; access tokens are refused within 30 seconds. Returns `{ revoked, revokedGrants }`. `reinstate_oauth_app` brings the app back without its consents. 404 when there is no live app.\n\n**Requires:** `oauth-apps` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"revoke_oauth_app","mcp":{"tool":"revoke_oauth_app","endpoint":"/mcp"},"a2a":{"skill":"revoke_oauth_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":true}}},"/api/v1/oauthapp/{appId}/reinstate":{"post":{"operationId":"reinstate_oauth_app","tags":["apps"],"summary":"Reinstate any developer app","description":"Maison staff: bring a revoked app back; consents stay revoked. 404 when the app is not revoked; 409 `client_id_in_use` when another live app now holds its OAuth client id.\n\n**Requires:** `oauth-apps` WRITE (global). All are required (403 otherwise).","security":[{"apiKey":[]},{"oauth2":["admin","apps:write"]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Developer app id (`id` from list_client_apps)"},"description":"Developer app id (`id` from list_client_apps)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input — `details` lists the Zod issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's user lacks one or more required grants — `details.missing` lists them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-maison-tool":{"name":"reinstate_oauth_app","mcp":{"tool":"reinstate_oauth_app","endpoint":"/mcp"},"a2a":{"skill":"reinstate_oauth_app","endpoint":"/a2a"},"access":[{"feature":"oauth-apps","level":"WRITE","scope":"global"}],"entitlement":null,"composite":null,"readOnly":false,"destructive":false},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/v1/tools":{"get":{"operationId":"list_tools","tags":["account"],"summary":"List the tools this credential may call","description":"The catalogue filtered to the tools the caller holds every required grant for (globally or on at least one client). For OAuth tokens, additionally filtered by the token's scope set. Each entry carries the REST binding, the MCP tool name, the A2A skill id and the JSON Schema of the input.","security":[{"apiKey":[]},{"oauth2":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolDescriptor"}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/{name}":{"post":{"operationId":"call_tool","tags":["account"],"summary":"Call any tool by name","description":"Transport-neutral invocation: the body is the tool's input object. Identical to calling the tool's own REST binding.","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Tool output","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing grants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/openapi.json":{"get":{"operationId":"get_openapi","tags":["platform"],"summary":"This document","security":[],"responses":{"200":{"description":"OpenAPI 3.1 document","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/mcp":{"post":{"operationId":"mcp_request","tags":["platform"],"summary":"MCP Streamable HTTP endpoint","description":"Model Context Protocol (Streamable HTTP). `initialize` without `mcp-session-id`; every later request carries the header. The tool list is the same catalogue as `GET /api/v1/tools`, filtered to the caller's grants and token scopes.","security":[{"apiKey":[]},{"oauth2":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"number"}]},"method":{"type":"string"},"params":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"JSON-RPC response (JSON or SSE)"},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown MCP session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"mcp_stream","tags":["platform"],"summary":"MCP server-to-client SSE stream","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[{"name":"mcp-session-id","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"text/event-stream"},"404":{"description":"Unknown MCP session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"mcp_close","tags":["platform"],"summary":"Close an MCP session","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[{"name":"mcp-session-id","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Closed"},"404":{"description":"Unknown MCP session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/a2a":{"post":{"operationId":"a2a_rpc","tags":["platform"],"summary":"A2A JSON-RPC 2.0 endpoint","description":"Methods: `tasks/send` (run a skill: a `data` part `{ tool, input }` or a text part answered by `send_message`), `tasks/get`, `tasks/cancel`. Skills are the tool catalogue; see the agent card.","security":[{"apiKey":[]},{"oauth2":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"number"}]},"method":{"type":"string"},"params":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"JSON-RPC result or error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/A2AResponse"}}}}}}},"/.well-known/agent.json":{"get":{"operationId":"get_agent_card","tags":["platform"],"summary":"A2A agent card","description":"Discovery document: skills (= the tool catalogue), endpoint and security scheme.","security":[],"responses":{"200":{"description":"Agent card","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/guest/mcp":{"post":{"operationId":"guest_mcp","tags":["platform"],"summary":"Guest MCP (unauthenticated)","description":"Separate, guest-scoped MCP server for public AI assistants (`search_hotels`, `get_hotel_info`, `ask_hotel`). No credential; published in test and stg only. Not part of the operator tool catalogue — see docs/guest-mcp.md.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"number"}]},"method":{"type":"string"},"params":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"JSON-RPC response"},"404":{"description":"Not published in this environment"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"A Maison API key (`mx_<env>_…`), created from the admin console profile page. Keys are accepted on `/api/v1`, `/mcp` and `/a2a`."},"oauth2":{"type":"oauth2","description":"OAuth 2.1 access token (RFC 8707 Resource Indicators). Obtain via the authorization code flow at `/as/authorize`. Access tokens are RS256 JWTs; resource = `https://{host}/api/v1`, `/mcp` or `/a2a` (must match `aud`). Token TTL: 15 min.","flows":{"authorizationCode":{"authorizationUrl":"https://maison-labs.com/as/authorize","tokenUrl":"https://maison-labs.com/as/token","scopes":{"clients:read":"See the hotel's configuration, channels, integrations, branding, activity and emails.","clients:write":"Change the hotel's configuration, channels, integrations, branding and policies.","clients:execute":"Deploy the hotel's demo site, start property discovery, look for knowledge gaps and send integration connect links.","knowledge:read":"See the hotel's document sources, questions and answers, tone and translations.","knowledge:write":"Add and change the hotel's document sources, questions and answers, tone and translations.","knowledge:execute":"Sync and scrape the hotel's sources and rediscover its booking links.","conversations:read":"Read the hotel's guest conversations.","conversations:write":"Take over and hand back the hotel's guest conversations, stop a reply and mark them read.","conversations:execute":"Send replies to the hotel's guests and whisper to the agent.","guest-identity:read":"See who a guest is: their verified identity and contact details, their name on conversation lists, and their other conversations.","analytics:read":"See conversation analytics and AI visibility analytics.","analytics:write":"Change the settings behind conversation and AI visibility analytics.","analytics:execute":"Run analytics reports.","agents:read":"See the hotel's agents and their ledger.","agents:write":"Create and change the hotel's agents.","agents:execute":"Test the hotel's agents against a conversation.","quality:read":"See conversation feedback scores and test session results.","quality:execute":"Run feedback scoring, consistency checks, duplicate clean-up and test sessions.","users:read":"See people's accounts, the roles they hold and their access.","users:write":"Invite people, change their access and remove them.","users:execute":"Resend invitations.","groups:read":"See groups and who belongs to them.","groups:write":"Create, change and delete groups, and add or remove their members and roles.","roles:read":"See roles and what each one allows.","roles:write":"Create, change and delete roles, and give them to people and groups.","policies:read":"See policies and the rules in them.","policies:write":"Create, change and delete policies and their rules.","apps:read":"See the hotel's developer apps, their usage, request log and audit trail.","apps:write":"Register, change, revoke and reinstate the hotel's developer apps.","usage:read":"See AI usage and cost summaries.","hubspot:read":"See HubSpot company and deal data.","hubspot:write":"Change HubSpot company and deal data.","hubspot:execute":"Push conversation volume to HubSpot.","features:read":"See which features each hotel has, and the plan templates.","features:write":"Turn features on and off for hotels, and create and change plan templates.","jobs:execute":"See and stop a hotel's running background jobs, such as a website scrape.","schedules:write":"Change how often a hotel's website sources sync on their own."}}}}},"schemas":{"Error":{"type":"object","required":["error","code"],"properties":{"error":{"type":"string"},"code":{"type":"string","enum":["invalid_input","unauthorized","forbidden","not_found","conflict","too_large","unavailable","internal"]},"details":{}}},"AccessRequirement":{"type":"object","required":["feature","level","scope"],"properties":{"feature":{"type":"string"},"level":{"type":"string","enum":["READ","WRITE","EXECUTE"]},"scope":{"type":"string","enum":["global","client","any"]}}},"ToolDescriptor":{"type":"object","required":["name","title","description","category","rest","access","inputSchema"],"properties":{"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"rest":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"}}},"access":{"type":"array","items":{"$ref":"#/components/schemas/AccessRequirement"}},"composite":{"type":"array","items":{"type":"string"},"nullable":true},"readOnly":{"type":"boolean"},"destructive":{"type":"boolean"},"inputSchema":{"type":"object","additionalProperties":true}}},"A2AResponse":{"type":"object","required":["jsonrpc","id"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"null"}]},"result":{"type":"object","additionalProperties":true},"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{}}}}}}}}