{"openapi":"3.1.0","info":{"title":"PaxPilot","description":"PaxPilot API","version":"1.0.0"},"paths":{"/onboarding/info":{"get":{"tags":["onboarding"],"summary":"Get Onboarding Info","operationId":"get_onboarding_info_onboarding_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingInfoResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/onboarding/business-profile":{"patch":{"tags":["onboarding"],"summary":"Update Business Profile","operationId":"update_business_profile_onboarding_business_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/onboarding/message-tone":{"patch":{"tags":["onboarding"],"summary":"Update Message Tone","operationId":"update_message_tone_onboarding_message_tone_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageToneRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageToneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/onboarding/compliance":{"patch":{"tags":["onboarding"],"summary":"Submit Compliance","operationId":"submit_compliance_onboarding_compliance_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSignoffRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSignoffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/add-document":{"post":{"tags":["tenant"],"summary":"Add Document","operationId":"add_document_tenant_add_document_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_document_tenant_add_document_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/documents":{"get":{"tags":["tenant"],"summary":"List Documents","operationId":"list_documents_tenant_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDocumentsResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/escalations":{"get":{"tags":["tenant"],"summary":"List Escalations","operationId":"list_escalations_tenant_escalations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEscalationsResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/leads":{"get":{"tags":["tenant"],"summary":"List Leads","operationId":"list_leads_tenant_leads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLeadsResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/document-status":{"patch":{"tags":["tenant"],"summary":"Update Document Status","operationId":"update_document_status_tenant_document_status_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/document":{"delete":{"tags":["tenant"],"summary":"Delete Document","operationId":"delete_document_tenant_document_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDocumentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/onboarding-call":{"get":{"tags":["tenant"],"summary":"Get Onboarding Call","description":"When the setup call is.\n\n404 if the tenant has no call row. One is created at signup, so that means the signup\ndid not complete — it is not a state a healthy tenant reaches.","operationId":"get_onboarding_call_tenant_onboarding_call_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCallOut"}}}}},"security":[{"BearerAuth":[]}]},"patch":{"tags":["tenant"],"summary":"Reschedule Onboarding Call","description":"Pick a different time.\n\nSend the offset (`2026-09-10T14:00:00-05:00`). A time with no timezone is rejected\nrather than guessed at — it would put the lead on the phone at the wrong hour.\n\n400 if the time is in the past; 409 if the call already happened.","operationId":"reschedule_onboarding_call_tenant_onboarding_call_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCallReschedule"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/respond":{"post":{"tags":["tenant"],"summary":"Respond","description":"Record that someone on the team followed up on an escalation or a lead.\n\nONE endpoint for all three, because the dashboard has one button. `entity` says which\ntable: \"escalation\", \"booking\" (a submitted booking request) or \"voice\" (a call that\ncame out as a lead). For a leads row, LeadOut.kind maps straight onto the last two.\n\nAn optional `note` records what was done. Responding again overwrites — a colleague\nadding a better note is a correction, not an error — and `undo: true` clears it.\n\nThis does NOT resolve an escalation. Responding is \"someone has got back to the guest\";\nresolving is \"the matter is closed\", and the Overview's open-escalations card counts the\nsecond one. A refund can be answered in minutes and stay open for a week.","operationId":"respond_tenant_respond_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/escalations/{escalation_id}":{"patch":{"tags":["tenant"],"summary":"Resolve Escalation","description":"Close an escalation, or reopen it with `resolved: false`.\n\nThis is the ONLY thing that writes `resolved` — until now nothing did, so the Overview's\nopen-escalations card counted every escalation a tenant had ever had and could only grow.\n\nDistinct from POST /tenant/respond: responding records that someone got back to the\nguest, resolving records that the matter is closed. Both can be true, in either order,\nand the card counts only the second.\n\nAn optional `note` says what was done. It is stored separately from the escalation's own\nnote, which describes what the guest raised and is left untouched.","operationId":"resolve_escalation_tenant_escalations__escalation_id__patch","parameters":[{"name":"escalation_id","in":"path","required":true,"schema":{"type":"string","title":"Escalation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/escalation-contacts":{"put":{"tags":["escalation-contacts"],"summary":"Replace Escalation Contacts","operationId":"replace_escalation_contacts_tenant_escalation_contacts_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationContactsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationContactsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"post":{"tags":["escalation-contacts"],"summary":"Add Escalation Contact","operationId":"add_escalation_contact_tenant_escalation_contacts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationContactCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/escalation-contacts/{contact_id}":{"patch":{"tags":["escalation-contacts"],"summary":"Update Escalation Contact","operationId":"update_escalation_contact_tenant_escalation_contacts__contact_id__patch","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationContactUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["escalation-contacts"],"summary":"Delete Escalation Contact","operationId":"delete_escalation_contact_tenant_escalation_contacts__contact_id__delete","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEscalationContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/rooms":{"put":{"tags":["rooms"],"summary":"Replace Rooms","operationId":"replace_rooms_tenant_rooms_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomsBookingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomsBookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"post":{"tags":["rooms"],"summary":"Add Room","operationId":"add_room_tenant_rooms_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/rooms/{room_id}":{"patch":{"tags":["rooms"],"summary":"Update Room","operationId":"update_room_tenant_rooms__room_id__patch","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["rooms"],"summary":"Delete Room","operationId":"delete_room_tenant_rooms__room_id__delete","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRoomResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/overview/stats":{"get":{"tags":["overview"],"summary":"Overview Stats","operationId":"overview_stats_tenant_overview_stats_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"window length in days","default":30,"title":"Days"},"description":"window length in days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverviewStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/overview/chat-stats":{"get":{"tags":["overview"],"summary":"Overview Chat Stats","operationId":"overview_chat_stats_tenant_overview_chat_stats_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"window length in days","default":30,"title":"Days"},"description":"window length in days"},{"name":"volume_days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"days on the volume chart","default":14,"title":"Volume Days"},"description":"days on the volume chart"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverviewChatStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/vehicle":{"put":{"tags":["vehicles"],"summary":"Replace Fleet","operationId":"replace_fleet_tenant_vehicle_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetBookingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetBookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"post":{"tags":["vehicles"],"summary":"Add Vehicle","operationId":"add_vehicle_tenant_vehicle_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/vehicle/{vehicle_id}":{"patch":{"tags":["vehicles"],"summary":"Update Vehicle","operationId":"update_vehicle_tenant_vehicle__vehicle_id__patch","parameters":[{"name":"vehicle_id","in":"path","required":true,"schema":{"type":"string","title":"Vehicle Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["vehicles"],"summary":"Delete Vehicle","operationId":"delete_vehicle_tenant_vehicle__vehicle_id__delete","parameters":[{"name":"vehicle_id","in":"path","required":true,"schema":{"type":"string","title":"Vehicle Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVehicleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/booking/lookup":{"get":{"tags":["booking"],"summary":"Booking Lookup","operationId":"booking_lookup_tenant_booking_lookup_get","parameters":[{"name":"widget_key","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Widget Key"}},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenant/booking":{"post":{"tags":["booking"],"summary":"Submit Booking","operationId":"submit_booking_tenant_booking_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenant/user":{"get":{"tags":["tenant"],"summary":"Get My User","operationId":"get_my_user_tenant_user_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}},"security":[{"BearerAuth":[]}]},"patch":{"tags":["tenant"],"summary":"Update My User","operationId":"update_my_user_tenant_user_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/instagram-enabled":{"patch":{"tags":["tenant"],"summary":"Set Instagram Enabled","operationId":"set_instagram_enabled_tenant_instagram_enabled_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramEnabledUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramEnabledResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/whatsapp-hours":{"get":{"tags":["tenant"],"summary":"Get Whatsapp Hours","description":"The hours the tenant's team answers WhatsApp, and who is on right now.\n\nThe window is when the TEAM answers; inside it a message is stored, shown in the inbox\nand left for a person, and the AI covers every other hour, every day left out of the\nrota, and every closed date. Same direction as the voice office-hours window.","operationId":"get_whatsapp_hours_tenant_whatsapp_hours_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppHoursOut"}}}}},"security":[{"BearerAuth":[]}]},"put":{"tags":["tenant"],"summary":"Set Whatsapp Hours","description":"Choose when the assistant answers WhatsApp, relative to the business's opening hours.\n\n    always          it answers every message, around the clock\n    during_hours    only while the business is OPEN\n    outside_hours   only while it is CLOSED - the team takes the messages that arrive\n                    during opening hours, and they wait in the inbox\n\nNO WINDOW IS SENT HERE. Both timed modes read the opening hours set by\nPUT /tenant/opening-hours, so the week is described once. start/end/days are still\naccepted and ignored so an older frontend keeps working; \"custom\" is the old name for\noutside_hours and still maps to it.\n\ncover_off_days and cover_holidays decide whole days the business is shut - a weekly\nclosure and a closed DATE respectively. Both default to true; set either false and\nnobody replies that day, though the message is still stored and shown in the inbox. The\nholiday dates are shared with voice (PUT /tenant/holidays), while cover_holidays is\nWhatsApp's own - voice always covers a closed date, because an unstaffed reception just\nrings out.\n\nIf opening hours are not set at all, both timed modes fall back to answering everything\nrather than going silent. 400 if the business timezone is not set.","operationId":"set_whatsapp_hours_tenant_whatsapp_hours_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppHoursUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppHoursOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/holidays":{"get":{"tags":["tenant"],"summary":"Get Holidays","description":"The business's closed dates. Shared by every channel: on one of these dates nobody is\nin, so the AI answers all day on both voice and WhatsApp.","operationId":"get_holidays_tenant_holidays_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidaysOut"}}}}},"security":[{"BearerAuth":[]}]},"put":{"tags":["tenant"],"summary":"Set Holidays","description":"Replace the closed-date list. Send the dates you want, not a delta.\n\nUnlike PATCH /tenant/voice/office-hours, this does not need a provisioned voice agent,\nso holidays can be set during setup before any channel is connected.","operationId":"set_holidays_tenant_holidays_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidaysUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidaysOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/{tenant_id}":{"patch":{"tags":["tenant"],"summary":"Update Tenant","operationId":"update_tenant_tenant__tenant_id__patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/opening-hours":{"get":{"tags":["tenant"],"summary":"Get Opening Hours","description":"When the business is open to GUESTS, and whether it is open right now.\n\nSeparate from /whatsapp-hours, which is when a human answers messages. A park can be\nopen to visitors at 08:00 while nobody watches WhatsApp until 09:00.","operationId":"get_opening_hours_tenant_opening_hours_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningHoursOut"}}}}},"security":[{"BearerAuth":[]}]},"put":{"tags":["tenant"],"summary":"Set Opening Hours","description":"Set when guests may visit. The agent is handed the open/closed verdict as a fact.\n\ndays is isoweekday (Monday=1), so a business closed on Mondays omits 1. start and end\nare \"HH:MM\" in the business's local time. All three move together; send all three empty\nto clear them and let the documents answer again.\n\nThese OUTRANK whatever the uploaded documents say about opening times, because they are\nwhat the client set here and the documents may be out of date.\n\ntimezone is the IANA name for the whole business (\"America/Jamaica\"). It is shared with\nvoice, the WhatsApp gate and the closed-date list, so setting it here sets it\neverywhere; omit it to leave it unchanged. A body carrying ONLY a timezone updates just\nthat and leaves the hours alone.\n\n400 for an unknown timezone, for hours saved before any timezone is set, or if only\nsome of days/start/end are given.","operationId":"set_opening_hours_tenant_opening_hours_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningHoursUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningHoursOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/agent-turns":{"get":{"tags":["tenant"],"summary":"List Agent Turns","description":"What the assistant was actually sent, most recent first.\n\nOne row per MODEL CALL, not per guest message: a turn that uses tools makes several,\nand `step` says which. Pass `conversation_id` to pull a single thread.\n\nThis exists because a transcript that reads wrong could not previously be explained -\nthe prompt was rebuilt and discarded every turn, and retrieval returned text with no\nrecord of which document it came from. `retrieved` answers the question that kept\ncoming back: was the right entry retrieved and ignored, or never retrieved?","operationId":"list_agent_turns_tenant_agent_turns_get","parameters":[{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentTurnsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/agent-turns/{turn_id}":{"get":{"tags":["tenant"],"summary":"Get Agent Turn","description":"One call with the FULL text of both system messages, in the order they were sent.\n\n`system_prompt` is the stable block and `brief` the per-turn facts; the model received\nthem as two system messages in that order, then the message history. Scoped to the\ncaller's own tenant.","operationId":"get_agent_turn_tenant_agent_turns__turn_id__get","parameters":[{"name":"turn_id","in":"path","required":true,"schema":{"type":"string","title":"Turn Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTurnDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/chat/query":{"post":{"tags":["chat"],"summary":"Chat Query","operationId":"chat_query_chat_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenant/conversations":{"get":{"tags":["chat"],"summary":"List Conversations","description":"This tenant's conversations across every channel, newest activity first.\n\nBoth filters are applied in SQL rather than after paging, so a WhatsApp-only inbox\nreturns 50 WhatsApp threads — not whatever WhatsApp happens to be in the first 50\nmixed rows.","operationId":"list_conversations_tenant_conversations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Channel"},{"type":"null"}],"description":"Only this channel: web_chat | whatsapp | instagram | voice","title":"Channel"},"description":"Only this channel: web_chat | whatsapp | instagram | voice"},{"name":"wa_business_phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"WhatsApp only: one inbox per connected number. Any format — '+92 300 111 1111', '923001111111' and a raw jid all match.","title":"Wa Business Phone"},"description":"WhatsApp only: one inbox per connected number. Any format — '+92 300 111 1111', '923001111111' and a raw jid all match."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConversationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/conversations/{conversation_id}":{"get":{"tags":["chat"],"summary":"Get Conversation","operationId":"get_conversation_tenant_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationWithMessagesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["chat"],"summary":"Delete Conversation","operationId":"delete_conversation_tenant_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/whatsapp/numbers":{"get":{"tags":["whatsapp"],"summary":"List Numbers","description":"Every WhatsApp number this tenant has connected.","operationId":"list_numbers_tenant_whatsapp_numbers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWaNumbersResponse"}}}}},"security":[{"BearerAuth":[]}]},"post":{"tags":["whatsapp"],"summary":"Register Number","description":"Record a number this tenant just connected by scanning a QR.\n\nRe-scanning an existing number is normal - same phone, new session id - and updates\nthe row in place so the conversation history keyed on that number stays attached.","operationId":"register_number_tenant_whatsapp_numbers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaNumberRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/whatsapp/numbers/{business_phone}":{"patch":{"tags":["whatsapp"],"summary":"Update Number Status","description":"Push a status change from the gateway (DISCONNECTED / LOGGED_OUT / BANNED / ...).\n\nBANNED is not the same as LOGGED_OUT: a permanent ban kills that number across every\nWhatsApp surface, so the dashboard must render it differently and must not encourage\nburning a replacement number into the same pattern.","operationId":"update_number_status_tenant_whatsapp_numbers__business_phone__patch","parameters":[{"name":"business_phone","in":"path","required":true,"schema":{"type":"string","title":"Business Phone"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaNumberStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["whatsapp"],"summary":"Delete Number","description":"Forget a number. Conversations are kept - they key on the phone string, so the\nhistory re-attaches if the same number is connected again.","operationId":"delete_number_tenant_whatsapp_numbers__business_phone__delete","parameters":[{"name":"business_phone","in":"path","required":true,"schema":{"type":"string","title":"Business Phone"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/whatsapp/query":{"post":{"tags":["whatsapp"],"summary":"Whatsapp Query","description":"Ask the agent on behalf of a WhatsApp chat - the WhatsApp twin of POST /chat/query.\n\nSame pipeline (RAG, escalation, booking, message log); only the identifiers differ.\n`/chat/query` keys on widget_key + chat_id; this keys on `business_phone` (which of\nthe tenant's numbers received it) + `from_lid` (who sent it).\n\nReturns the reply text. Delivery is the caller's job - this never touches WhatsApp.\n\n`deduped: true` means this wa_message_id was already answered (WhatsApp redelivers\non reconnect) and `reply` is empty - do not send anything.","operationId":"whatsapp_query_tenant_whatsapp_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/whatsapp/agent-message":{"post":{"tags":["whatsapp"],"summary":"Whatsapp Agent Message","description":"Record a reply a HUMAN sent from the tenant's WhatsApp.\n\nThe gateway reports these so a thread answered by a person is not one-sided in the\ndashboard - which matters most inside the tenant's WhatsApp team hours, when answering\nby hand is the whole arrangement. The agent's own replies are logged as it sends them\nand are skipped here by wa_message_id.\n\nNever creates a conversation: a business number is also somebody's phone, and messages\nto people who are not guests do not belong in the inbox. `recorded: false` with a\n`reason` is a normal outcome, not an error - log it, do not retry.","operationId":"whatsapp_agent_message_tenant_whatsapp_agent_message_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaAgentMessageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaAgentMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/whatsapp/numbers/{business_phone}/chats":{"get":{"tags":["whatsapp"],"summary":"List Chats","description":"Inbox for ONE connected number: every customer who has messaged it.\n\nTen customers messaging the same tenant number produce ten rows here, each its own\nconversation. Most recent activity first, with a last-message preview.\n\nIdentify a row by `wa_lid` - QR-linked WhatsApp never exposes the sender's number, so\n`name` and `phone` stay null until the customer volunteers them in the chat.","operationId":"list_chats_tenant_whatsapp_numbers__business_phone__chats_get","parameters":[{"name":"business_phone","in":"path","required":true,"schema":{"type":"string","title":"Business Phone"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWaChatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/whatsapp/numbers/{business_phone}/chats/{sender_lid}":{"get":{"tags":["whatsapp"],"summary":"Get Chat","description":"One chat with its full thread, oldest message first.\n\n`sender_lid` is the `wa_lid` from the inbox list - the only sender identity WhatsApp\nreliably provides, so it is what every chat is addressed by here.\n\nScoped to the number because the same person messaging two of the tenant's numbers is\ntwo separate chats.","operationId":"get_chat_tenant_whatsapp_numbers__business_phone__chats__sender_lid__get","parameters":[{"name":"business_phone","in":"path","required":true,"schema":{"type":"string","title":"Business Phone"}},{"name":"sender_lid","in":"path","required":true,"schema":{"type":"string","title":"Sender Lid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaChatDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["whatsapp"],"summary":"Delete Chat","description":"Delete one WhatsApp chat and its messages. Irreversible.\n\nThe lead is kept: the Contact survives, and escalations, bookings and call logs only\nlose their link (ON DELETE SET NULL). If the same sender messages again a fresh\nconversation starts on the same Contact.","operationId":"delete_chat_tenant_whatsapp_numbers__business_phone__chats__sender_lid__delete","parameters":[{"name":"business_phone","in":"path","required":true,"schema":{"type":"string","title":"Business Phone"}},{"name":"sender_lid","in":"path","required":true,"schema":{"type":"string","title":"Sender Lid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWaChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/voice/elevenlab-voices":{"get":{"tags":["voice-calls-v3"],"summary":"List Voices","description":"The voices this tenant can choose from — the picker behind the `voice` field.\n\nEvery tenant sees the same list: it is the master account's catalogue, not something\nper-tenant. Each entry carries a `preview_url` the browser can play, so the tenant can\nhear a voice before saving it.\n\nPass the chosen `voice_id` as `voice` to POST /tenant/voice/agent or\nPATCH /tenant/voice/settings.","operationId":"list_voices_tenant_voice_elevenlab_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceListResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/voice/get-agent":{"get":{"tags":["voice-calls-v3"],"summary":"Get Voice Agent","description":"This tenant's current voice agent — what the dashboard loads before editing.\n\nReturns `configured: false` with everything else null when they have not saved a\nprompt yet, so the UI can show an empty editor instead of guessing.","operationId":"get_voice_agent_tenant_voice_get_agent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceAgentOutV3"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/voice/create-agent":{"post":{"tags":["voice-calls-v3"],"summary":"Save Voice Agent","description":"Create this tenant's voice agent, or update it if they already have one.\n\nNo phone line involved. The agent lives in PaxPilot's ElevenLabs account and can be\nspoken to straight away via POST /tenant/voice/test-session. Attaching a number later\nuses this SAME agent, so what is tested is what answers.\n\nSending this again edits the existing agent; it never creates a second one.","operationId":"save_voice_agent_tenant_voice_create_agent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceAgentSaveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceAgentSaveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/voice/test-session":{"post":{"tags":["voice-calls-v3"],"summary":"Voice Test Session","description":"A signed URL so the dashboard can speak to this tenant's agent in the browser.\n\nSame agent the phone line will use — the browser session simply has no Telnyx leg.\nShort-lived: request a new one per session rather than caching it.","operationId":"voice_test_session_tenant_voice_test_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTestSessionResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/voice/number":{"post":{"tags":["voice-calls-v3"],"summary":"Request Number","description":"Assign this tenant a phone number and put their agent behind it.\n\nONE number per tenant: if they already have one this 409s rather than quietly buying a\nsecond they would be billed for. Release the current one first.\n\nRequires an agent to exist already (POST /tenant/voice/agent) — the number is attached\nto the agent they tested in the browser, so what they heard is what answers.\n\nNothing about human handoff happens here. Office hours are off by default, so the\nagent answers 24/7 and no call is ever transferred to a person. A handoff number is\nonly needed to turn office hours ON — set it then, with\nPUT /tenant/voice/handoff-number.","operationId":"request_number_tenant_voice_number_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceNumberRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/voice/webhook":{"post":{"tags":["voice-calls-v3"],"summary":"Post Call Webhook","description":"ElevenLabs post-call delivery for EVERY tenant.\n\nOne workspace webhook covers every agent in the account, so this URL is registered once\nand the tenant is identified from the payload's `agent_id`.","operationId":"post_call_webhook_voice_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/voice/incoming":{"post":{"tags":["voice-calls-v3"],"summary":"Incoming Call","description":"Telnyx Call Control front door for EVERY tenant.\n\nOne Call Control App serves the whole master account, so this URL is registered once and\nthe tenant is identified from the number that was DIALLED.","operationId":"incoming_call_voice_incoming_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/voice/{tenant_id}/catalog":{"get":{"tags":["voice-calls-v3"],"summary":"Catalog Tool","description":"Live rooms/vehicles for one tenant — called BY ElevenLabs during a call.\n\nPublic + secret-verified. The tenant comes from the URL (fixed by us when we created the\ntool), never from the caller, so one hotel's agent can't read another's catalog. Fast and\nminimal — the caller is on the line waiting.","operationId":"catalog_tool_voice__tenant_id__catalog_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenant/voice/settings":{"get":{"tags":["voice-calls-v3"],"summary":"Get Voice Settings","description":"The current voice settings — load this before showing the settings form.\n\n`approved_languages` is a whole-list REPLACEMENT on the PATCH, so the form has to be\npopulated from here first; saving a blank form would send an empty list and clear it.\n\nReturns defaults (English, the account's default voice, multilingual off) when the\ntenant has no voice row yet, so the form works during onboarding too.","operationId":"get_voice_settings_tenant_voice_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettingsOut"}}}}},"security":[{"BearerAuth":[]}]},"patch":{"tags":["voice-calls-v3"],"summary":"Update Voice Settings","description":"Voice configuration — presentation plus language controls.\n\nOnly the fields you send change. Works BEFORE voice is connected (usable during\nonboarding); if an agent is live the change is pushed immediately (`pushed_to_agent`).\n\nLanguage detection is OPT-IN via `multi_language_enabled`, and the agent may then switch\nonly to a language in `approved_languages` — sending that list replaces it, `[]` clears it.\n\n⚠️ The multilingual flags are stored but NOT yet sent to ElevenLabs; voice, default\nlanguage and greeting do push.","operationId":"update_voice_settings_tenant_voice_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/voice/office-hours":{"get":{"tags":["voice-calls-v3"],"summary":"Get Office Hours","description":"The current schedule — load this before showing the office-hours form.\n\n`working_days` and `holidays` are whole-list REPLACEMENTS on the PATCH, so the form has\nto be populated from here first. Opening it blank and saving would send empty lists and\nwipe a real schedule.\n\nReturns the defaults (disabled, no days, no holidays) when nothing has been set yet, so\nthe UI never has to special-case a missing row.","operationId":"get_office_hours_tenant_voice_office_hours_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeHoursResponse"}}}}},"security":[{"BearerAuth":[]}]},"patch":{"tags":["voice-calls-v3"],"summary":"Update Office Hours","description":"Set the office-hours schedule — the single entry point for all of it.\n\nSend any subset; omitted fields are left alone. `working_days` and `holidays` are\nwhole-list replacements, so there is no separate add/remove call: send the list you\nwant. Holidays already in the past are dropped rather than stored.\n\n`handoff_number` is accepted here too, and is applied BEFORE the enable check — so\nsending it together with `office_hours_enabled: true` works in one request, which is\nthe point. It is the same number, validated the same way, as POST\n/tenant/voice/handoff-number; that endpoint still works for callers already using it.\n\n409s if voice is not connected; 400s if enabling without a valid E.164 handoff\nnumber, since there would be nowhere to send the human calls.","operationId":"update_office_hours_tenant_voice_office_hours_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeHoursUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeHoursResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/calls":{"get":{"tags":["voice-calls-v3"],"summary":"List Calls","description":"This tenant's voice calls, newest first. Transcripts are omitted from the list —\nfetch a single call to read one.","operationId":"list_calls_tenant_calls_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCallsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/tenant/calls/{call_id}":{"get":{"tags":["voice-calls-v3"],"summary":"Get Call","description":"One call in full, including its transcript and recording.","operationId":"get_call_tenant_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/landing/audit":{"post":{"tags":["landing"],"summary":"Submit Audit","description":"Store the audit lead and email them their result.\n\nAlways 200 once the lead is stored. `email_sent` reports whether the result email\nactually went out — a mail failure never loses the lead.","operationId":"submit_audit_landing_audit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landing/demo":{"post":{"tags":["landing"],"summary":"Submit Demo","description":"Store the demo request, email the lead a confirmation, and notify admin.\n\nAlways 200 once the lead is stored. `email_sent` reports whether the confirmation\nactually went out — a mail failure never loses the lead.","operationId":"submit_demo_landing_demo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landing/waitlist":{"post":{"tags":["landing"],"summary":"Submit Waitlist","description":"Store the waitlist signup, email the lead a confirmation, and notify admin.\n\nAlways 200 once the lead is stored. `email_sent` reports whether the confirmation\nactually went out — a mail failure never loses the lead.","operationId":"submit_waitlist_landing_waitlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants":{"get":{"tags":["admin"],"summary":"List Tenants","operationId":"list_tenants_admin_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTenantsResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/tenant-status":{"patch":{"tags":["admin"],"summary":"Update Tenant Status","operationId":"update_tenant_status_admin_tenant_status_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/tenants/{tenant_id}/voice":{"get":{"tags":["admin"],"summary":"Get Voice Holdings","description":"What this tenant holds at the providers, and what it costs us each month.\n\nCheck this before suspending or cancelling — it is the only view of what PaxPilot is\nactually paying for on a given tenant.","operationId":"get_voice_holdings_admin_tenants__tenant_id__voice_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceHoldingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["admin"],"summary":"Release Voice","description":"Cancel: release every PAID resource, keep everything free.\n\nGone: the Telnyx number, its ElevenLabs SIP import, the agent, the catalog tool.\nKept: prompt, greeting, voice, language, office hours, handoff number — so\nre-subscribing is create-agent + number from stored config, with nothing retyped.\n\nIRREVERSIBLE for the number: a released number is gone, and the tenant's forwarding\nbreaks with it. Suspend instead if they may come back soon.\n\nCheck `warnings`. A non-empty list means something could NOT be released and is STILL\nBILLING; its provider id is kept so the call can simply be retried.","operationId":"release_voice_admin_tenants__tenant_id__voice_delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceReleaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/tenants/{tenant_id}/voice/suspend":{"post":{"tags":["admin"],"summary":"Suspend Voice","description":"Stop the AI answering, but give NOTHING back.\n\nThe number, the agent and the SIP import all stay, so the tenant's own call forwarding\nkeeps pointing somewhere valid and resuming is a single call. Callers reach the handoff\nnumber if one is set; otherwise the call is not answered.\n\nThis does NOT stop the monthly number rental — we are still holding the line. Use\nDELETE to stop the money.","operationId":"suspend_voice_admin_tenants__tenant_id__voice_suspend_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSuspendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/tenants/{tenant_id}/voice/resume":{"post":{"tags":["admin"],"summary":"Resume Voice","description":"Put the AI back on the line. Nothing is re-provisioned — it was never given up.","operationId":"resume_voice_admin_tenants__tenant_id__voice_resume_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSuspendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/onboarding-calls":{"get":{"tags":["admin"],"summary":"List Onboarding Calls","description":"The lead's worklist — setup calls, soonest first.\n\nOnly tenants with a stored call appear. Every tenant has a derived default time\n(signup + 24 hours), but listing all of them would bury the ones actually booked.","operationId":"list_onboarding_calls_admin_onboarding_calls_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"include_done","in":"query","required":false,"schema":{"type":"boolean","description":"also show completed/no-show/cancelled","default":false,"title":"Include Done"},"description":"also show completed/no-show/cancelled"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCallListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/tenants/{tenant_id}/onboarding-call":{"get":{"tags":["admin"],"summary":"Get Tenant Onboarding Call","operationId":"get_tenant_onboarding_call_admin_tenants__tenant_id__onboarding_call_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"patch":{"tags":["admin"],"summary":"Reschedule Tenant Onboarding Call","description":"Move a tenant's call on their behalf — the usual case is the lead agreeing a new\ntime on the phone. Same rules as the tenant's own reschedule: future only, and not\nonce the call is done.","operationId":"reschedule_tenant_onboarding_call_admin_tenants__tenant_id__onboarding_call_patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCallReschedule"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/tenants/{tenant_id}/onboarding-call/outcome":{"patch":{"tags":["admin"],"summary":"Set Onboarding Call Outcome","description":"Record how the call went: completed, no-show, cancelled, plus the lead's notes.\n\nSeparate from rescheduling because marking a call done is what STOPS it being\nreschedulable — folding both into one endpoint would let a single request close a call\nand move it at the same time.","operationId":"set_onboarding_call_outcome_admin_tenants__tenant_id__onboarding_call_outcome_patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCallOutcome"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/tenants/{tenant_id}/intake":{"get":{"tags":["admin"],"summary":"Get Tenant Intake","description":"How this tenant's calls reach us. The first thing to check when they report that\ncalls are not arriving — the investigation is different for each path.","operationId":"get_tenant_intake_admin_tenants__tenant_id__intake_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"patch":{"tags":["admin"],"summary":"Set Tenant Intake","description":"Set the intake path, and for forwarding the carrier, plan and quoted rate.\n\nAdmin-only because the lead decides this on the setup call, after asking what phone\nsystem the property actually has. It is a note about a customer, not a setting the\ncustomer changes.\n\nThe forwarding fields are refused on the other two paths — see IntakeUpdate.","operationId":"set_tenant_intake_admin_tenants__tenant_id__intake_patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/tenants/{tenant_id}/timezone":{"patch":{"tags":["admin"],"summary":"Set Tenant Timezone","description":"Correct where a tenant actually is.\n\nThe lead learns this on the setup call and needs to fix it there: a wrong timezone\nbooks the next call at the wrong hour AND shifts the hotel's staffed window once voice\nis live, since office-hours routing reads the same column.\n\nAn unknown zone is refused rather than stored — it would silently fall back to UTC.","operationId":"set_tenant_timezone_admin_tenants__tenant_id__timezone_patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantTimezoneUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantTimezoneOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/usage/voice":{"get":{"tags":["admin"],"summary":"Voice Usage","description":"Voice minutes per tenant for a calendar month, against their plan allowance.\n\n`month` is YYYY-MM and defaults to the current one. Heaviest users first.\n\nDemo calls are excluded from the minutes and reported separately — they are the tenant\ntesting their own agent from the dashboard, and nobody should be billed for that.\n\nTwo minute figures are returned: `minutes` (seconds/60) and `billed_minutes` (each call\nrounded up, as the carrier bills us). They differ most on short calls, and which one an\ninvoice should use is a commercial decision rather than a technical one.","operationId":"voice_usage_admin_usage_voice_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/admin/providers/balance":{"get":{"tags":["admin"],"summary":"Provider Balance","description":"Remaining balance at each provider PaxPilot pays.\n\nThis is OUR money, not a tenant's: one pool serves every tenant, so an empty account\nstops every line at once. Nothing else in the platform reads it, which is why it was\nlast discovered at $1.71 by a number purchase failing mid-onboarding.\n\nOnly Telnyx reports a balance today. ElevenLabs needs the `user_read` permission added\nto the API key; OpenAI publishes no balance to API clients at all, only spend, and that\nneeds a separate admin key. Each provider reports its own availability so a missing key\ngreys out one row instead of emptying the page.","operationId":"provider_balance_admin_providers_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderBalanceResponse"}}}}},"security":[{"BearerAuth":[]}]}}},"components":{"schemas":{"AddDocumentResponse":{"properties":{"message":{"type":"string","title":"Message"},"document":{"$ref":"#/components/schemas/KnowledgeDocOut"}},"type":"object","required":["message","document"],"title":"AddDocumentResponse"},"AgentTurnDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"step":{"type":"integer","title":"Step"},"question":{"type":"string","title":"Question"},"model":{"type":"string","title":"Model"},"temperature":{"type":"number","title":"Temperature"},"history_count":{"type":"integer","title":"History Count"},"retrieved":{"items":{"$ref":"#/components/schemas/RetrievedChunkOut"},"type":"array","title":"Retrieved"},"system_prompt":{"type":"string","title":"System Prompt"},"brief":{"type":"string","title":"Brief"},"system_prompt_chars":{"type":"integer","title":"System Prompt Chars"},"brief_chars":{"type":"integer","title":"Brief Chars"}},"type":"object","required":["id","conversation_id","created_at","step","question","model","temperature","history_count","retrieved","system_prompt","brief","system_prompt_chars","brief_chars"],"title":"AgentTurnDetailOut","description":"The same, plus the full text of both system messages, in the order sent."},"AgentTurnOut":{"properties":{"id":{"type":"string","title":"Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"step":{"type":"integer","title":"Step"},"question":{"type":"string","title":"Question"},"model":{"type":"string","title":"Model"},"temperature":{"type":"number","title":"Temperature"},"history_count":{"type":"integer","title":"History Count"},"retrieved":{"items":{"$ref":"#/components/schemas/RetrievedChunkOut"},"type":"array","title":"Retrieved"}},"type":"object","required":["id","conversation_id","created_at","step","question","model","temperature","history_count","retrieved"],"title":"AgentTurnOut","description":"One model call, exactly as it was made."},"AuditSubmitRequest":{"properties":{"name":{"type":"string","maxLength":160,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"business":{"type":"string","maxLength":200,"minLength":1,"title":"Business"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"bizType":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Biztype"},"score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Score"},"q1":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Q1","default":0},"q2":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Q2","default":0},"q3":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Q3","default":0},"q4":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Q4","default":0},"q5":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Q5","default":0}},"type":"object","required":["name","email","business"],"title":"AuditSubmitRequest","description":"The \"Free AI Readiness Audit\" lead-capture form (spec: AI_READINESS_AUDIT_LOGIC.md §7).\n\nThe site sends the LEAD plus the RAW answers q1..q5 (points). It may also send its own\n`score`, but the backend IGNORES it and recomputes — a client-side score is trivially\nforged. A skipped question is simply absent (or 0); that is never an error."},"AuditSubmitResponse":{"properties":{"message":{"type":"string","title":"Message"},"lead_id":{"type":"string","title":"Lead Id"},"score":{"type":"integer","title":"Score"},"tier":{"type":"string","title":"Tier"},"tier_blurb":{"type":"string","title":"Tier Blurb"},"report_items":{"items":{"type":"string"},"type":"array","title":"Report Items"},"email_sent":{"type":"boolean","title":"Email Sent"}},"type":"object","required":["message","lead_id","score","tier","tier_blurb","report_items","email_sent"],"title":"AuditSubmitResponse","description":"The authoritative, server-computed result — the site renders its report from this."},"Body_add_document_tenant_add_document_post":{"properties":{"file":{"type":"string","title":"File","format":"binary"}},"type":"object","required":["file"],"title":"Body_add_document_tenant_add_document_post"},"BookingLookupResponse":{"properties":{"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"},"vertical":{"anyOf":[{"$ref":"#/components/schemas/Vertical"},{"type":"null"}]},"contact":{"anyOf":[{"$ref":"#/components/schemas/ContactOut"},{"type":"null"}]},"ig_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ig Id"},"rooms":{"items":{"$ref":"#/components/schemas/RoomOut"},"type":"array","title":"Rooms"},"vehicles":{"items":{"$ref":"#/components/schemas/VehicleOut"},"type":"array","title":"Vehicles"}},"type":"object","required":["tenant_name","vertical","ig_id","rooms","vehicles"],"title":"BookingLookupResponse","description":"Data to prefill the booking form opened from the WhatsApp/Instagram link."},"BookingRequestOut":{"properties":{"id":{"type":"string","title":"Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"room_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Room Id"},"vehicle_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vehicle Id"},"item_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Name"},"preferred_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Preferred Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","conversation_id","room_id","vehicle_id","item_name","preferred_date","notes","status","created_at"],"title":"BookingRequestOut"},"BookingSubmitRequest":{"properties":{"widget_key":{"type":"string","minLength":1,"title":"Widget Key"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"ig_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Ig Id"},"country":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Country"},"room_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Room Id"},"vehicle_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vehicle Id"},"item_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Item Name"},"preferred_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Preferred Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"chat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Id"}},"type":"object","required":["widget_key"],"title":"BookingSubmitRequest"},"BookingSubmitResponse":{"properties":{"message":{"type":"string","title":"Message"},"contact_created":{"type":"boolean","title":"Contact Created"},"contact":{"$ref":"#/components/schemas/ContactOut"},"booking_request":{"$ref":"#/components/schemas/BookingRequestOut"}},"type":"object","required":["message","contact_created","contact","booking_request"],"title":"BookingSubmitResponse"},"BusinessProfileOut":{"properties":{"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/TenantStatus"},"vertical":{"anyOf":[{"$ref":"#/components/schemas/Vertical"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Capacity"},"primary_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Name"},"primary_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Email"},"public_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Phone"}},"type":"object","required":["id","status","vertical"],"title":"BusinessProfileOut"},"BusinessProfileRequest":{"properties":{"address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Address"},"website_url":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Website Url"},"capacity":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Capacity"}},"type":"object","title":"BusinessProfileRequest","description":"Complete the property profile — the three things signup could not ask for.\n\nName, contact, phone, country and business type were all captured at signup and are\nnot repeated here. Every field is optional: sending one changes it, omitting it leaves\nit alone."},"BusinessProfileResponse":{"properties":{"message":{"type":"string","title":"Message"},"tenant":{"$ref":"#/components/schemas/BusinessProfileOut"}},"type":"object","required":["message","tenant"],"title":"BusinessProfileResponse"},"CallDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"caller_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Phone"},"caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Name"},"whatsapp_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Number"},"duration_seconds":{"type":"integer","title":"Duration Seconds"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"intent":{"anyOf":[{"$ref":"#/components/schemas/Intent"},{"type":"null"}]},"is_demo":{"type":"boolean","title":"Is Demo","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Name if we have one, else the number. Same rule as the inbox — see\ntenant_service.display_identity.","readOnly":true}},"type":"object","required":["id","caller_phone","duration_seconds","summary","intent","created_at","transcript","recording_url","display_name"],"title":"CallDetailOut","description":"One call in full: adds the transcript and the recording.\n\nNOTE: provider_cost is deliberately NOT exposed — it is OUR provider cost, not the\ntenant's price. Showing a customer what a call cost us is an internal-margin leak."},"CallOut":{"properties":{"id":{"type":"string","title":"Id"},"caller_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Phone"},"caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Name"},"whatsapp_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Number"},"duration_seconds":{"type":"integer","title":"Duration Seconds"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"intent":{"anyOf":[{"$ref":"#/components/schemas/Intent"},{"type":"null"}]},"is_demo":{"type":"boolean","title":"Is Demo","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Name if we have one, else the number. Same rule as the inbox — see\ntenant_service.display_identity.","readOnly":true}},"type":"object","required":["id","caller_phone","duration_seconds","summary","intent","created_at","display_name"],"title":"CallOut","description":"One voice call, as shown in the calls list.\n\nThe transcript and recording_url are omitted here on purpose — transcripts are large,\nso 50 of them would make the list slow. GET /tenant/calls/{id} returns them."},"CatalogOption":{"properties":{"name":{"type":"string","title":"Name"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"type":"string","title":"Currency"},"per":{"type":"string","title":"Per"},"type":{"type":"string","title":"Type"}},"type":"object","required":["name","price","currency","per","type"],"title":"CatalogOption","description":"One room or vehicle, in the shape the voice agent speaks from."},"CatalogResponse":{"properties":{"options":{"items":{"$ref":"#/components/schemas/CatalogOption"},"type":"array","title":"Options"}},"type":"object","required":["options"],"title":"CatalogResponse"},"Channel":{"type":"string","enum":["web_chat","whatsapp","instagram","voice"],"title":"Channel"},"ChatRequest":{"properties":{"widget_key":{"type":"string","minLength":1,"title":"Widget Key"},"query":{"type":"string","minLength":1,"title":"Query"},"chat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Id"}},"type":"object","required":["widget_key","query"],"title":"ChatRequest"},"ChatResponse":{"properties":{"chat_id":{"type":"string","title":"Chat Id"},"answer":{"type":"string","title":"Answer"},"escalated":{"type":"boolean","title":"Escalated","default":false},"booking":{"type":"boolean","title":"Booking","default":false}},"type":"object","required":["chat_id","answer"],"title":"ChatResponse","description":"THERE IS NO BOOKING FORM. `booking_options` and `booking_link` were removed with it:\nthe agent collects the guest's details in the conversation and records them itself.\n\nDropping them does not break the live widget. It renders its booking button only when\n`booking && (options?.length ?? 0) > 0`, so a response with no options field renders\nnothing extra — which is what we now want on every turn."},"ComplianceSignoffRequest":{"properties":{"authorised_by":{"type":"string","maxLength":160,"minLength":1,"title":"Authorised By"},"role":{"type":"string","maxLength":120,"minLength":1,"title":"Role"}},"type":"object","required":["authorised_by","role"],"title":"ComplianceSignoffRequest"},"ComplianceSignoffResponse":{"properties":{"message":{"type":"string","title":"Message"},"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/TenantStatus"},"onboarded_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarded By Name"},"onboarded_by_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarded By Role"},"onboarding_submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarding Submitted At"}},"type":"object","required":["message","id","status","onboarded_by_name","onboarded_by_role","onboarding_submitted_at"],"title":"ComplianceSignoffResponse"},"ContactOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","required":["id","name","email","phone","country"],"title":"ContactOut"},"ContactTime":{"type":"string","enum":["Anytime","Morning","Afternoon","Evening"],"title":"ContactTime","description":"\"Preferred contact time\" on the demo form. Optional — the site may omit it."},"ConversationOut":{"properties":{"id":{"type":"string","title":"Id"},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"contact_wa_lid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Wa Lid"},"wa_business_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wa Business Phone"},"channel":{"$ref":"#/components/schemas/Channel"},"last_intent":{"anyOf":[{"$ref":"#/components/schemas/Intent"},{"type":"null"}]},"escalated":{"type":"boolean","title":"Escalated"},"is_demo":{"type":"boolean","title":"Is Demo","default":false},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"caller_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Phone"},"caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Name"},"last_message_at":{"type":"string","format":"date-time","title":"Last Message At"},"message_count":{"type":"integer","title":"Message Count"}},"type":"object","required":["id","contact_id","contact_name","contact_email","contact_phone","channel","last_intent","escalated","last_message_at","message_count"],"title":"ConversationOut"},"ConversationVolume":{"properties":{"days":{"type":"integer","title":"Days"},"timezone":{"type":"string","title":"Timezone"},"series":{"items":{"$ref":"#/components/schemas/VolumePoint"},"type":"array","title":"Series"}},"type":"object","required":["days","timezone"],"title":"ConversationVolume"},"ConversationWithMessagesOut":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"channel":{"anyOf":[{"$ref":"#/components/schemas/Channel"},{"type":"null"}]},"last_intent":{"anyOf":[{"$ref":"#/components/schemas/Intent"},{"type":"null"}]},"escalated":{"type":"boolean","title":"Escalated"},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"contact_wa_lid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Wa Lid"},"wa_business_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wa Business Phone"},"messages":{"items":{"$ref":"#/components/schemas/MessageOut"},"type":"array","title":"Messages"}},"type":"object","required":["id","created_at","channel","last_intent","escalated","contact_id","messages"],"title":"ConversationWithMessagesOut"},"DeleteConversationResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"messages_deleted":{"type":"integer","title":"Messages Deleted"},"detail":{"type":"string","title":"Detail","default":"Conversation and its messages deleted."}},"type":"object","required":["conversation_id","messages_deleted"],"title":"DeleteConversationResponse"},"DeleteDocumentRequest":{"properties":{"document_id":{"type":"string","minLength":1,"title":"Document Id"},"status":{"$ref":"#/components/schemas/DocStatus"}},"type":"object","required":["document_id","status"],"title":"DeleteDocumentRequest"},"DeleteDocumentResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"DeleteDocumentResponse"},"DeleteEscalationContactResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"DeleteEscalationContactResponse"},"DeleteRoomResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"DeleteRoomResponse"},"DeleteVehicleResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"DeleteVehicleResponse"},"DeleteWaChatResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"messages_deleted":{"type":"integer","title":"Messages Deleted"},"detail":{"type":"string","title":"Detail","default":"Chat and its messages deleted."}},"type":"object","required":["conversation_id","messages_deleted"],"title":"DeleteWaChatResponse"},"DemoBusinessType":{"type":"string","enum":["Hotel or Resort","Car Rental or Mobility","Tours or Attractions","Other"],"title":"DemoBusinessType","description":"\"Business type\" on the demo form. Marketing-facing wording, not the Vertical pack."},"DemoSubmitRequest":{"properties":{"name":{"type":"string","maxLength":160,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","maxLength":40,"minLength":1,"title":"Phone"},"organization":{"type":"string","maxLength":200,"minLength":1,"title":"Organization"},"business_type":{"$ref":"#/components/schemas/DemoBusinessType"},"preferred_time":{"anyOf":[{"$ref":"#/components/schemas/ContactTime"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"source":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Source"}},"type":"object","required":["name","email","phone","organization","business_type"],"title":"DemoSubmitRequest","description":"The \"Book a PaxPilot Demo\" form on the landing page.\n\nbusiness_type / preferred_time are validated against the enums, whose values are the\nsite's exact <option> text (\"Car Rental or Mobility\", \"Anytime\") — those <option> tags\ncarry no value attribute, so the browser submits the label verbatim. The placeholder\noption (\"Select one\") is not a member, so an unchosen dropdown is rejected with a 422."},"DemoSubmitResponse":{"properties":{"message":{"type":"string","title":"Message"},"lead_id":{"type":"string","title":"Lead Id"},"email_sent":{"type":"boolean","title":"Email Sent"}},"type":"object","required":["message","lead_id","email_sent"],"title":"DemoSubmitResponse"},"DocStatus":{"type":"string","enum":["pending","processing","active","archived"],"title":"DocStatus"},"DocumentOut":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"doc_type":{"type":"string","title":"Doc Type"},"status":{"$ref":"#/components/schemas/DocStatus"},"chunk_count":{"type":"integer","title":"Chunk Count"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","title","doc_type","status","chunk_count","created_at"],"title":"DocumentOut"},"EscalationContactCreate":{"properties":{"name":{"type":"string","maxLength":160,"minLength":1,"title":"Name"},"channel":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Channel"},"role":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Role"},"triggers":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggers"},"contact":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact"}},"type":"object","required":["name"],"title":"EscalationContactCreate"},"EscalationContactOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"triggers":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggers"},"contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact"}},"type":"object","required":["id","name","channel","role","triggers","contact"],"title":"EscalationContactOut"},"EscalationContactResponse":{"properties":{"message":{"type":"string","title":"Message"},"escalation_contact":{"$ref":"#/components/schemas/EscalationContactOut"}},"type":"object","required":["message","escalation_contact"],"title":"EscalationContactResponse"},"EscalationContactUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Name"},"channel":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Channel"},"role":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Role"},"triggers":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggers"},"contact":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact"}},"type":"object","title":"EscalationContactUpdate"},"EscalationContactsRequest":{"properties":{"escalation_contacts":{"items":{"$ref":"#/components/schemas/EscalationContactCreate"},"type":"array","title":"Escalation Contacts"}},"type":"object","title":"EscalationContactsRequest"},"EscalationContactsResponse":{"properties":{"message":{"type":"string","title":"Message"},"escalation_contacts":{"items":{"$ref":"#/components/schemas/EscalationContactOut"},"type":"array","title":"Escalation Contacts"}},"type":"object","required":["message","escalation_contacts"],"title":"EscalationContactsResponse"},"EscalationOut":{"properties":{"id":{"type":"string","title":"Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"},"channel":{"anyOf":[{"$ref":"#/components/schemas/Channel"},{"type":"null"}]},"reason":{"$ref":"#/components/schemas/EscalationReason"},"severity":{"$ref":"#/components/schemas/Severity"},"resolved":{"type":"boolean","title":"Resolved"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"resolved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By"},"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note"},"ghl_notified":{"type":"boolean","title":"Ghl Notified"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Responded At"},"responded_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Responded By"},"response_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"responded":{"type":"boolean","title":"Responded","readOnly":true}},"type":"object","required":["id","conversation_id","contact_id","channel","reason","severity","resolved","ghl_notified","note","name","email","phone","created_at","responded"],"title":"EscalationOut"},"EscalationReason":{"type":"string","enum":["refund","complaint","legal","safety","vip","unknown_repeated","accident_damage","insurance_dispute","deposit_dispute"],"title":"EscalationReason","description":"Why a conversation was handed to a human."},"EscalationResolveRequest":{"properties":{"resolved":{"type":"boolean","title":"Resolved","default":true},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"}},"type":"object","title":"EscalationResolveRequest","description":"Close an escalation, or reopen one closed too early.\n\nSEPARATE FROM /tenant/respond on purpose. Responding is \"someone got back to the guest\";\nresolving is \"the matter is closed\". A refund can be answered in minutes and stay open\nfor a week, and the Overview's open-escalations card counts the second one."},"EscalationResolveResponse":{"properties":{"id":{"type":"string","title":"Id"},"resolved":{"type":"boolean","title":"Resolved"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"resolved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By"},"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","resolved","resolved_at","resolved_by","resolution_note","message"],"title":"EscalationResolveResponse"},"FleetBookingRequest":{"properties":{"vehicles":{"items":{"$ref":"#/components/schemas/VehicleCreate"},"type":"array","title":"Vehicles"},"default_booking_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Default Booking Url"}},"type":"object","title":"FleetBookingRequest"},"FleetBookingResponse":{"properties":{"message":{"type":"string","title":"Message"},"vehicles":{"items":{"$ref":"#/components/schemas/VehicleOut"},"type":"array","title":"Vehicles"},"default_booking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Booking Url"}},"type":"object","required":["message","vehicles","default_booking_url"],"title":"FleetBookingResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HolidaysOut":{"properties":{"holidays":{"items":{"type":"string","format":"date"},"type":"array","title":"Holidays"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["holidays","timezone"],"title":"HolidaysOut"},"HolidaysUpdate":{"properties":{"holidays":{"items":{"type":"string","format":"date"},"type":"array","maxItems":366,"title":"Holidays"}},"type":"object","title":"HolidaysUpdate","description":"Whole-list replace of the business's closed dates, matching the voice endpoint so a\nform submits what it shows rather than a delta. Dates already past are dropped.\n\nONE-OFF DATES ONLY - a public holiday, a one-day closure. A business that shuts every\nMonday says so in its weekly days, not with fifty-two holiday rows a year."},"InstagramEnabledResponse":{"properties":{"message":{"type":"string","title":"Message"},"instagram_enabled":{"type":"boolean","title":"Instagram Enabled"}},"type":"object","required":["message","instagram_enabled"],"title":"InstagramEnabledResponse"},"InstagramEnabledUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"InstagramEnabledUpdate"},"IntakeOut":{"properties":{"intake":{"anyOf":[{"$ref":"#/components/schemas/IntakePath"},{"type":"null"}]},"forwarding_carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarding Carrier"},"forwarding_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarding Plan"},"forwarding_cost_estimate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Forwarding Cost Estimate"}},"type":"object","required":["intake","forwarding_carrier","forwarding_plan","forwarding_cost_estimate"],"title":"IntakeOut","description":"How this tenant's calls physically reach us."},"IntakePath":{"type":"string","enum":["did","forwarding","pbx"],"title":"IntakePath","description":"How a guest's call physically reaches us. Chosen by the onboarding lead on the setup\ncall, not by the tenant.\n\nEverything downstream is identical for all three — same agent, same escalation, same\ntranscript — so this changes no routing. It is recorded because when a tenant reports\n\"calls are not reaching the AI\", the investigation is completely different per path, and\nbecause only FORWARDING costs the tenant money at their own carrier."},"IntakeUpdate":{"properties":{"intake":{"anyOf":[{"$ref":"#/components/schemas/IntakePath"},{"type":"null"}]},"forwarding_carrier":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Forwarding Carrier"},"forwarding_plan":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Forwarding Plan"},"forwarding_cost_estimate":{"anyOf":[{"type":"number","maximum":99.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Forwarding Cost Estimate"}},"type":"object","title":"IntakeUpdate","description":"Admin only. Only the fields sent are changed.\n\nThe three forwarding fields are the record that the cost conversation happened: that\npath bills the TENANT, per minute, at their own carrier's rate, and the lead has to\ndisclose and estimate it before switching it on. They are rejected on the other two\npaths rather than stored and ignored — a per-minute estimate sitting against a DID\ntenant would read, months later, as a cost they are paying and are not."},"Intent":{"type":"string","enum":["booking_inquiry","faq","complaint","cancellation","upsell","unknown","group_inquiry","ticketing_inquiry","transfer_coordination","vehicle_availability","insurance_question","licence_eligibility","extension_request","damage_report"],"title":"Intent","description":"Intent taxonomy. Base intents apply to every vertical; vertical-specific\nintents are added by the vertical pack."},"IntentSlice":{"properties":{"intent":{"$ref":"#/components/schemas/Intent"},"conversations":{"type":"integer","title":"Conversations"},"pct":{"type":"number","title":"Pct"}},"type":"object","required":["intent","conversations","pct"],"title":"IntentSlice"},"KnowledgeDocOut":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"doc_type":{"type":"string","title":"Doc Type"},"status":{"$ref":"#/components/schemas/DocStatus"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"}},"type":"object","required":["id","title","doc_type","status"],"title":"KnowledgeDocOut"},"LeadKind":{"type":"string","enum":["booking","voice"],"title":"LeadKind","description":"What produced a row in the leads list.\n\nThe list is of REQUESTS, not of people: one guest who books twice is two rows, because\ntwo bookings are two things for the hotel to act on."},"LeadOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"$ref":"#/components/schemas/LeadKind"},"contact_id":{"type":"string","title":"Contact Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"ghl_contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Contact Id"},"channel":{"anyOf":[{"$ref":"#/components/schemas/Channel"},{"type":"null"}]},"intent":{"anyOf":[{"$ref":"#/components/schemas/Intent"},{"type":"null"}]},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"first_seen_at":{"type":"string","format":"date-time","title":"First Seen At"},"booking_request":{"anyOf":[{"$ref":"#/components/schemas/BookingRequestOut"},{"type":"null"}]},"voice":{"anyOf":[{"$ref":"#/components/schemas/VoiceLeadInfo"},{"type":"null"}]},"responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Responded At"},"responded_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Responded By"},"response_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Note"},"responded":{"type":"boolean","title":"Responded","readOnly":true}},"type":"object","required":["id","kind","contact_id","name","email","phone","country","ghl_contact_id","channel","intent","requested_at","first_seen_at","responded"],"title":"LeadOut","description":"ONE lead request — a single booking, or a single call that turned into a lead.\n\nA guest who asks to book twice produces TWO of these, not one row with a count. Two\nrequests are two things for the hotel to act on, and collapsing them hid the second\nbehind a number nobody could click."},"ListAgentTurnsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"turns":{"items":{"$ref":"#/components/schemas/AgentTurnOut"},"type":"array","title":"Turns"}},"type":"object","required":["count","turns"],"title":"ListAgentTurnsResponse"},"ListCallsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"calls":{"items":{"$ref":"#/components/schemas/CallOut"},"type":"array","title":"Calls"}},"type":"object","required":["count","calls"],"title":"ListCallsResponse"},"ListConversationsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"conversations":{"items":{"$ref":"#/components/schemas/ConversationOut"},"type":"array","title":"Conversations"}},"type":"object","required":["count","conversations"],"title":"ListConversationsResponse"},"ListDocumentsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"documents":{"items":{"$ref":"#/components/schemas/DocumentOut"},"type":"array","title":"Documents"}},"type":"object","required":["count","documents"],"title":"ListDocumentsResponse"},"ListEscalationsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"escalations":{"items":{"$ref":"#/components/schemas/EscalationOut"},"type":"array","title":"Escalations"}},"type":"object","required":["count","escalations"],"title":"ListEscalationsResponse"},"ListLeadsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"leads":{"items":{"$ref":"#/components/schemas/LeadOut"},"type":"array","title":"Leads"}},"type":"object","required":["count","leads"],"title":"ListLeadsResponse"},"ListTenantsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"tenants":{"items":{"$ref":"#/components/schemas/app__schemas__admin__TenantOut"},"type":"array","title":"Tenants"}},"type":"object","required":["count","tenants"],"title":"ListTenantsResponse"},"ListWaChatsResponse":{"properties":{"business_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Phone"},"count":{"type":"integer","title":"Count"},"chats":{"items":{"$ref":"#/components/schemas/WaChatOut"},"type":"array","title":"Chats"}},"type":"object","required":["business_phone","count","chats"],"title":"ListWaChatsResponse"},"ListWaNumbersResponse":{"properties":{"numbers":{"items":{"$ref":"#/components/schemas/WaNumberOut"},"type":"array","title":"Numbers"}},"type":"object","required":["numbers"],"title":"ListWaNumbersResponse"},"MessageOut":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","title":"Role"},"sender":{"type":"string","title":"Sender"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","role","sender","body","created_at"],"title":"MessageOut"},"MessageTone":{"type":"string","enum":["warm_relaxed","polished_formal","bright_upbeat"],"title":"MessageTone","description":"How the agent speaks to a guest. Set on the onboarding message-tone step and\nrendered into both the chat and voice prompts."},"MessageToneRequest":{"properties":{"tone":{"anyOf":[{"$ref":"#/components/schemas/MessageTone"},{"type":"null"}]},"greeting_style":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Greeting Style"},"tone_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone Instructions"}},"type":"object","title":"MessageToneRequest"},"MessageToneResponse":{"properties":{"message":{"type":"string","title":"Message"},"tone":{"anyOf":[{"$ref":"#/components/schemas/MessageTone"},{"type":"null"}]},"greeting_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Greeting Style"},"tone_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone Instructions"}},"type":"object","required":["message","tone","greeting_style","tone_instructions"],"title":"MessageToneResponse"},"OfficeHoursResponse":{"properties":{"office_hours_enabled":{"type":"boolean","title":"Office Hours Enabled"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"office_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Start"},"office_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office End"},"working_days":{"items":{"type":"integer"},"type":"array","title":"Working Days"},"holidays":{"items":{"type":"string","format":"date"},"type":"array","title":"Holidays"},"handoff_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handoff Number"},"handoff_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handoff Country"},"handoff_warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handoff Warning"}},"type":"object","required":["office_hours_enabled","timezone","office_start","office_end","working_days","holidays"],"title":"OfficeHoursResponse"},"OfficeHoursUpdate":{"properties":{"office_hours_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Office Hours Enabled"},"handoff_number":{"anyOf":[{"type":"string","maxLength":40,"minLength":5},{"type":"null"}],"title":"Handoff Number","examples":["+18761234567"]},"office_start":{"anyOf":[{"type":"string","maxLength":5,"minLength":3},{"type":"null"}],"title":"Office Start"},"office_end":{"anyOf":[{"type":"string","maxLength":5,"minLength":3},{"type":"null"}],"title":"Office End"},"working_days":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Working Days"},"holidays":{"anyOf":[{"items":{"type":"string","format":"date"},"type":"array"},{"type":"null"}],"title":"Holidays"}},"type":"object","title":"OfficeHoursUpdate","description":"The office-hours schedule. ONE schema for every change to it.\n\nOnly the fields you send are changed. `working_days` and `holidays` are whole-list\nREPLACEMENTS, not deltas — send the list you want and it becomes the list. That is\nwhat makes the old per-item add/remove endpoints unnecessary.\n\nReception (the human) answers inside `office_start`-`office_end` on working days that\nare not holidays; the AI answers otherwise.\n\n`timezone` is not here either. One business is in one place, so it lives on the tenant\nand is set through PATCH /tenant/{tenant_id} — the onboarding-call scheduler needs the\nsame value, and two copies would drift. It is still returned below.\n\n`handoff_number` IS here. It had its own pair of endpoints, which read as an unrelated\nsetting while being the one thing office hours cannot be enabled without — so switching\nthe schedule on for the first time meant two requests in the right order, and a 400 if\nyou got it wrong. Sent here it is applied before the enable check, in the same\ntransaction. The standalone endpoints still work for callers that use them."},"OnboardingCallListItem":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"},"scheduled_at":{"type":"string","format":"date-time","title":"Scheduled At"},"status":{"$ref":"#/components/schemas/OnboardingCallStatus"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"attempts":{"type":"integer","title":"Attempts"},"last_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Failed At"},"tenant_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Timezone"},"intake":{"anyOf":[{"$ref":"#/components/schemas/IntakePath"},{"type":"null"}]}},"type":"object","required":["tenant_id","tenant_name","scheduled_at","status","notes","attempts","last_failed_at","tenant_timezone","intake"],"title":"OnboardingCallListItem"},"OnboardingCallListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"calls":{"items":{"$ref":"#/components/schemas/OnboardingCallListItem"},"type":"array","title":"Calls"}},"type":"object","required":["count","calls"],"title":"OnboardingCallListResponse"},"OnboardingCallOut":{"properties":{"scheduled_at":{"type":"string","format":"date-time","title":"Scheduled At"},"status":{"$ref":"#/components/schemas/OnboardingCallStatus"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"attempts":{"type":"integer","title":"Attempts"},"last_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Failed At"},"tenant_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Timezone"}},"type":"object","required":["scheduled_at","status","notes","attempts","last_failed_at","tenant_timezone"],"title":"OnboardingCallOut","description":"When the setup call is, and how it went."},"OnboardingCallOutcome":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/OnboardingCallStatus"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"OnboardingCallOutcome","description":"Admin only — what the lead records after the call. Both fields optional; only what\nis sent is changed."},"OnboardingCallReschedule":{"properties":{"scheduled_at":{"type":"string","format":"date-time","title":"Scheduled At"}},"type":"object","required":["scheduled_at"],"title":"OnboardingCallReschedule","description":"Move the call.\n\nSend the offset — `2026-09-10T14:00:00-05:00`, not `2026-09-10T14:00:00`. A naive time\nis ambiguous and would put the lead on the phone at the wrong hour; it is rejected\nrather than guessed at."},"OnboardingCallStatus":{"type":"string","enum":["scheduled","completed","no_show","cancelled"],"title":"OnboardingCallStatus"},"OnboardingInfoResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"slug":{"type":"string","title":"Slug"},"vertical":{"anyOf":[{"$ref":"#/components/schemas/Vertical"},{"type":"null"}]},"package":{"type":"string","title":"Package"},"status":{"$ref":"#/components/schemas/TenantStatus"},"widget_key":{"type":"string","title":"Widget Key"},"primary_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Name"},"primary_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Email"},"public_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Capacity"},"message_tone":{"anyOf":[{"$ref":"#/components/schemas/MessageTone"},{"type":"null"}]},"greeting_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Greeting Style"},"tone_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone Instructions"},"booking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Url"},"mini_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mini Prompt"},"house_rules":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"House Rules"},"whatsapp_connected":{"type":"boolean","title":"Whatsapp Connected"},"wa_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wa Number"},"ig_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ig Account Id"},"ig_access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ig Access Token"},"ghl_subaccount_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Subaccount Id"},"widget_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Widget Origin"},"phone_line_active":{"type":"boolean","title":"Phone Line Active"},"onboarding_submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarding Submitted At"},"onboarded_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarded By Name"},"onboarded_by_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarded By Role"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"rooms":{"items":{"$ref":"#/components/schemas/RoomOut"},"type":"array","title":"Rooms"},"vehicles":{"items":{"$ref":"#/components/schemas/VehicleOut"},"type":"array","title":"Vehicles"},"escalation_contacts":{"items":{"$ref":"#/components/schemas/EscalationContactOut"},"type":"array","title":"Escalation Contacts"},"documents":{"items":{"$ref":"#/components/schemas/KnowledgeDocOut"},"type":"array","title":"Documents"}},"type":"object","required":["id","name","slug","vertical","package","status","widget_key","primary_contact_name","primary_contact_email","public_phone","message_tone","greeting_style","tone_instructions","booking_url","mini_prompt","house_rules","whatsapp_connected","wa_number","ig_account_id","ig_access_token","ghl_subaccount_id","widget_origin","phone_line_active","onboarding_submitted_at","onboarded_by_name","onboarded_by_role","created_at","updated_at","rooms","vehicles","escalation_contacts","documents"],"title":"OnboardingInfoResponse"},"OpenEscalations":{"properties":{"value":{"type":"integer","title":"Value"},"awaiting_over_1h":{"type":"integer","title":"Awaiting Over 1H"}},"type":"object","required":["value","awaiting_over_1h"],"title":"OpenEscalations","description":"Unresolved right now. A stock, not a flow: no window and no comparison, because the\nquestion is what is waiting, not how many opened this month."},"OpeningHoursOut":{"properties":{"days":{"items":{"type":"integer"},"type":"array","title":"Days"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"configured":{"type":"boolean","title":"Configured"},"open_now":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Open Now"},"today":{"type":"string","title":"Today"},"next_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Open"}},"type":"object","required":["days","start","end","timezone","configured","open_now","today","next_open"],"title":"OpeningHoursOut"},"OpeningHoursUpdate":{"properties":{"days":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Days","examples":[[2,3,4,5,6,7]]},"start":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},{"type":"null"}],"title":"Start","examples":["08:00"]},"end":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},{"type":"null"}],"title":"End","examples":["17:00"]},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone","examples":["America/Jamaica"]}},"type":"object","title":"OpeningHoursUpdate","description":"When the business is OPEN TO GUESTS. NOT staffing - WhatsAppHoursUpdate is that.\n\ndays, start and end move together: send all three to set the hours, or all three\nexplicitly null to clear them and let the documents answer again. A partial update is\nrejected, because days without times is not a rule anything can be computed from.\n\nOMITTING them entirely is different from nulling them. A body carrying only a timezone\nchanges only the timezone and leaves the hours alone - otherwise saving a timezone\nwould silently wipe the opening hours the same form had just shown."},"OverviewChatStats":{"properties":{"days":{"type":"integer","title":"Days"},"volume":{"$ref":"#/components/schemas/ConversationVolume"},"intent_mix":{"items":{"$ref":"#/components/schemas/IntentSlice"},"type":"array","title":"Intent Mix"},"avg_first_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg First Response Ms"},"voice_calls":{"type":"integer","title":"Voice Calls"}},"type":"object","required":["days","volume","avg_first_response_ms","voice_calls"],"title":"OverviewChatStats"},"OverviewStats":{"properties":{"days":{"type":"integer","title":"Days"},"inquiries":{"$ref":"#/components/schemas/StatCard"},"guests_captured":{"$ref":"#/components/schemas/StatCard"},"booking_links_sent":{"$ref":"#/components/schemas/StatCard"},"open_escalations":{"$ref":"#/components/schemas/OpenEscalations"}},"type":"object","required":["days","inquiries","guests_captured","booking_links_sent","open_escalations"],"title":"OverviewStats"},"ProviderBalanceOut":{"properties":{"provider":{"type":"string","title":"Provider"},"available":{"type":"boolean","title":"Available"},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance"},"available_credit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Available Credit"},"credit_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Limit"},"currency":{"type":"string","title":"Currency","default":"USD"},"status":{"type":"string","title":"Status","default":"unknown"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"as_of":{"type":"string","format":"date-time","title":"As Of"}},"type":"object","required":["provider","available","as_of"],"title":"ProviderBalanceOut","description":"One provider's remaining balance, as the admin panel shows it.\n\nA LIST OF THESE, even while only Telnyx is wired up, so adding ElevenLabs and OpenAI\nlater does not change the response shape the frontend already renders. Each row carries\nits own `available`: ElevenLabs needs a key permission we do not yet have, and OpenAI\nexposes spend but no balance at all, so one provider being unreadable must not blank the\nothers."},"ProviderBalanceResponse":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/ProviderBalanceOut"},"type":"array","title":"Providers"},"warn_below":{"type":"number","title":"Warn Below"},"critical_below":{"type":"number","title":"Critical Below"}},"type":"object","required":["providers","warn_below","critical_below"],"title":"ProviderBalanceResponse"},"RespondRequest":{"properties":{"entity":{"type":"string","title":"Entity","examples":["escalation","booking","voice"]},"id":{"type":"string","title":"Id"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"},"undo":{"type":"boolean","title":"Undo","default":false}},"type":"object","required":["entity","id"],"title":"RespondRequest","description":"Mark one escalation or lead as followed up.\n\n`entity` is the concrete thing being stamped, not \"lead\": the leads list is built from\ntwo different tables, and LeadOut.kind already tells the caller which one a row came\nfrom. Map kind=booking -> \"booking\", kind=voice -> \"voice\", and an escalation row ->\n\"escalation\"."},"RespondResponse":{"properties":{"entity":{"type":"string","title":"Entity"},"id":{"type":"string","title":"Id"},"responded":{"type":"boolean","title":"Responded"},"responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Responded At"},"responded_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Responded By"},"response_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Note"},"message":{"type":"string","title":"Message"}},"type":"object","required":["entity","id","responded","responded_at","responded_by","response_note","message"],"title":"RespondResponse"},"RetrievedChunkOut":{"properties":{"doc_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"chunk_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Index"},"distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance"},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"}},"type":"object","required":["doc_id","title","chunk_index","distance","preview"],"title":"RetrievedChunkOut","description":"One knowledge-base hit, with what decided it was a hit."},"RoomCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"rate_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate Amount"},"rate_period":{"type":"string","maxLength":20,"title":"Rate Period","default":"night"},"currency":{"type":"string","maxLength":3,"title":"Currency","default":"USD"}},"type":"object","required":["name"],"title":"RoomCreate"},"RoomOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate Amount"},"rate_period":{"type":"string","title":"Rate Period"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["id","name","rate_amount","rate_period","currency"],"title":"RoomOut"},"RoomResponse":{"properties":{"message":{"type":"string","title":"Message"},"room":{"$ref":"#/components/schemas/RoomOut"}},"type":"object","required":["message","room"],"title":"RoomResponse"},"RoomUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"rate_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate Amount"},"rate_period":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Rate Period"},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Currency"}},"type":"object","title":"RoomUpdate"},"RoomsBookingRequest":{"properties":{"rooms":{"items":{"$ref":"#/components/schemas/RoomCreate"},"type":"array","title":"Rooms"},"default_booking_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Default Booking Url"}},"type":"object","title":"RoomsBookingRequest"},"RoomsBookingResponse":{"properties":{"message":{"type":"string","title":"Message"},"rooms":{"items":{"$ref":"#/components/schemas/RoomOut"},"type":"array","title":"Rooms"},"default_booking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Booking Url"}},"type":"object","required":["message","rooms","default_booking_url"],"title":"RoomsBookingResponse"},"Severity":{"type":"string","enum":["low","medium","high"],"title":"Severity"},"StatCard":{"properties":{"value":{"type":"integer","title":"Value"},"previous":{"type":"integer","title":"Previous"},"delta_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Delta Pct"}},"type":"object","required":["value","previous","delta_pct"],"title":"StatCard","description":"One top-row number, against the window before it."},"TenantStatus":{"type":"string","enum":["onboarding","pending_review","active","suspended"],"title":"TenantStatus"},"TenantTimezoneOut":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["tenant_id","tenant_name","timezone"],"title":"TenantTimezoneOut"},"TenantTimezoneUpdate":{"properties":{"timezone":{"type":"string","maxLength":64,"minLength":1,"title":"Timezone","examples":["America/Jamaica"]}},"type":"object","required":["timezone"],"title":"TenantTimezoneUpdate","description":"Correct a tenant's timezone. Admin only.\n\nThe tenant can set their own through PATCH /tenant/{tenant_id}; this exists because\nthe lead learns the real answer on the setup call (\"we're in Kingston\") and had no way\nto fix a wrong one — they could see it on the worklist but not change it."},"TenantUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Slug"},"vertical":{"anyOf":[{"$ref":"#/components/schemas/Vertical"},{"type":"null"}]},"package":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Package"},"ig_account_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Ig Account Id"},"ig_access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ig Access Token"},"instagram_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Instagram Enabled"},"ghl_subaccount_id":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Ghl Subaccount Id"},"ghl_api_key_enc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Api Key Enc"},"booking_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Booking Url"},"primary_contact_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Primary Contact Name"},"primary_contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Primary Contact Email"},"public_phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Public Phone"},"message_tone":{"anyOf":[{"$ref":"#/components/schemas/MessageTone"},{"type":"null"}]},"greeting_style":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Greeting Style"},"tone_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone Instructions"},"mini_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mini Prompt"},"house_rules":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"House Rules"},"widget_origin":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Widget Origin"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"}},"type":"object","title":"TenantUpdate","description":"Any tenant column may be patched. All fields are optional - only the ones\nprovided are changed. Excluded by design: id, created_at, updated_at,\nonboarded_by_name, onboarded_by_role, and the relationship collections\n(rooms / vehicles / escalation_contacts / documents have their own routes).\n\nwidget_key is NOT here on purpose. It is issued once at signup and is the only\nthing identifying a tenant on the public widget paths (POST /chat/query, the\n/tenant/booking pair), so it behaves like a credential: changing it would break\nevery embedded widget and every booking link already handed to a guest, and\nletting a tenant choose it would let them pick a guessable one. The route drops\nunknown fields, so a client that still sends it is simply ignored. It is\nreadable in TenantOut."},"TenantUpdateResponse":{"properties":{"message":{"type":"string","title":"Message"},"tenant":{"$ref":"#/components/schemas/app__schemas__tenant_settings__TenantOut"}},"type":"object","required":["message","tenant"],"title":"TenantUpdateResponse"},"UpdateDocumentStatusRequest":{"properties":{"document_id":{"type":"string","minLength":1,"title":"Document Id"},"status":{"$ref":"#/components/schemas/DocStatus"}},"type":"object","required":["document_id","status"],"title":"UpdateDocumentStatusRequest"},"UpdateDocumentStatusResponse":{"properties":{"message":{"type":"string","title":"Message"},"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/DocStatus"}},"type":"object","required":["message","id","status"],"title":"UpdateDocumentStatusResponse"},"UpdateTenantStatusRequest":{"properties":{"tenant_id":{"type":"string","minLength":1,"title":"Tenant Id"},"status":{"$ref":"#/components/schemas/TenantStatus"}},"type":"object","required":["tenant_id","status"],"title":"UpdateTenantStatusRequest"},"UpdateTenantStatusResponse":{"properties":{"message":{"type":"string","title":"Message"},"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/TenantStatus"}},"type":"object","required":["message","id","status"],"title":"UpdateTenantStatusResponse"},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email","full_name"],"title":"UserOut","description":"The authenticated user's record (from the users table)."},"UserUpdate":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"full_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Full Name"}},"type":"object","title":"UserUpdate","description":"Update the authenticated user's own email and/or name (partial)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VehicleCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"rate_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate Amount"},"rate_period":{"type":"string","maxLength":20,"title":"Rate Period","default":"day"},"currency":{"type":"string","maxLength":3,"title":"Currency","default":"USD"}},"type":"object","required":["name"],"title":"VehicleCreate"},"VehicleOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate Amount"},"rate_period":{"type":"string","title":"Rate Period"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["id","name","rate_amount","rate_period","currency"],"title":"VehicleOut"},"VehicleResponse":{"properties":{"message":{"type":"string","title":"Message"},"vehicle":{"$ref":"#/components/schemas/VehicleOut"}},"type":"object","required":["message","vehicle"],"title":"VehicleResponse"},"VehicleUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"rate_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate Amount"},"rate_period":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Rate Period"},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Currency"}},"type":"object","title":"VehicleUpdate"},"Vertical":{"type":"string","enum":["hotel","car_rental","attraction","tour_operator","transfer"],"title":"Vertical","description":"Business type of a tenant. Drives vocabulary, intent pack, escalation\ndefaults, and onboarding/KB templates via the vertical pack."},"VoiceAgentOutV3":{"properties":{"configured":{"type":"boolean","title":"Configured"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"first_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message"},"voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"approval_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approval Date"},"phone_line_active":{"type":"boolean","title":"Phone Line Active","default":false},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"}},"type":"object","required":["configured"],"title":"VoiceAgentOutV3","description":"The tenant's current voice agent, for the dashboard to load and edit.\n\n`configured` is False before they have saved anything — the UI shows an empty prompt\nbox rather than a spinner. `phone_line_active` says whether a phone number is attached;\nan agent can exist and be testable in the browser without one."},"VoiceAgentSaveRequest":{"properties":{"prompt":{"type":"string","maxLength":20000,"minLength":1,"title":"Prompt"},"first_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"First Message"},"voice":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Voice"},"language":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Language"}},"type":"object","required":["prompt"],"title":"VoiceAgentSaveRequest","description":"Create or update this tenant's voice agent.\n\nThe SAME agent is later attached to a phone number — what is tested in the browser is\nwhat answers the call. Sending this repeatedly updates one agent; it never creates a\nsecond.\n\nIn v3 the prompt is the agent's ENTIRE knowledge: there is no website scan. Live data\n(rooms, vehicles, prices) is fetched mid-call from the catalog tool instead."},"VoiceAgentSaveResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"created":{"type":"boolean","title":"Created"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"first_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message"},"voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"phone_line_active":{"type":"boolean","title":"Phone Line Active"}},"type":"object","required":["success","created","agent_id","prompt","first_message","voice","language","phone_line_active"],"title":"VoiceAgentSaveResponse"},"VoiceHoldingsOut":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"},"suspended":{"type":"boolean","title":"Suspended"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"number_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number Country"},"number_purchased_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Number Purchased At"},"monthly_cost":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Monthly Cost"},"phone_line_active":{"type":"boolean","title":"Phone Line Active"}},"type":"object","required":["tenant_id","tenant_name","suspended","agent_id","phone_number","number_country","number_purchased_at","monthly_cost","phone_line_active"],"title":"VoiceHoldingsOut","description":"What one tenant currently holds at the providers, and what it costs."},"VoiceLeadInfo":{"properties":{"call_id":{"type":"string","title":"Call Id"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"duration_seconds":{"type":"integer","title":"Duration Seconds"},"caller_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Phone"}},"type":"object","required":["call_id","summary","duration_seconds","caller_phone"],"title":"VoiceLeadInfo","description":"Voice-lead detail, present only when the lead came from a phone call. The CallLog IS\nthe lead record for voice (no BookingRequest), so its data is surfaced here."},"VoiceListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"voices":{"items":{"$ref":"#/components/schemas/VoiceOption"},"type":"array","title":"Voices"}},"type":"object","required":["count","voices"],"title":"VoiceListResponse"},"VoiceNumberRequest":{"properties":{"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country","default":"US","examples":["US"]},"area_code":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Area Code","examples":["415"]}},"type":"object","title":"VoiceNumberRequest","description":"Ask for a phone number for this tenant. One number per tenant.\n\nBuying the line is all this does. Nothing about human handoff belongs here: office\nhours are off by default, so the agent answers 24/7 and no call is ever transferred to\na person. A handoff number is only needed to turn office hours ON, and it is set through\nPUT /tenant/voice/handoff-number at that point.","example":{"area_code":"415","country":"US"}},"VoiceNumberResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"phone_number":{"type":"string","title":"Phone Number"},"phone_line_active":{"type":"boolean","title":"Phone Line Active"},"instruction":{"type":"string","title":"Instruction"}},"type":"object","required":["success","phone_number","phone_line_active","instruction"],"title":"VoiceNumberResponse"},"VoiceOption":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"accent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"}},"type":"object","required":["voice_id"],"title":"VoiceOption","description":"One selectable voice from the master ElevenLabs account.\n\n`voice_id` is what POST /tenant/voice/agent and PATCH /tenant/voice/settings expect in\ntheir `voice` field. The rest is for the picker: `preview_url` is a plain audio file the\nbrowser can play, and the label fields are what the list should be filtered on."},"VoiceReleaseResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"released_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Released Number"},"released_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Released Agent"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["success","released_number","released_agent","warnings","detail"],"title":"VoiceReleaseResponse"},"VoiceSettingsOut":{"properties":{"default_language":{"type":"string","title":"Default Language"},"multi_language_enabled":{"type":"boolean","title":"Multi Language Enabled"},"approved_languages":{"items":{"type":"string"},"type":"array","title":"Approved Languages"},"voice":{"type":"string","title":"Voice"},"first_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message"},"pushed_to_agent":{"type":"boolean","title":"Pushed To Agent"}},"type":"object","required":["default_language","multi_language_enabled","approved_languages","voice","first_message","pushed_to_agent"],"title":"VoiceSettingsOut","description":"The current voice settings — what GET /tenant/voice/settings returns.\n\nState only. The PATCH response adds `success`/`message`/`pushed_to_agent`/`warnings`,\nwhich describe what that write did and mean nothing on a read.\n\nReturns the model defaults when the tenant has no voice row yet, so the form can be\npopulated during onboarding, before an agent exists."},"VoiceSettingsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"default_language":{"type":"string","title":"Default Language"},"multi_language_enabled":{"type":"boolean","title":"Multi Language Enabled"},"approved_languages":{"items":{"type":"string"},"type":"array","title":"Approved Languages"},"voice":{"type":"string","title":"Voice"},"first_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message"},"pushed_to_agent":{"type":"boolean","title":"Pushed To Agent"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["success","message","default_language","multi_language_enabled","approved_languages","voice","first_message","pushed_to_agent"],"title":"VoiceSettingsResponse"},"VoiceSettingsUpdate":{"properties":{"default_language":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Default Language"},"multi_language_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Multi Language Enabled"},"approved_languages":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Approved Languages"},"voice":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Voice"},"first_message":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"First Message"}},"type":"object","title":"VoiceSettingsUpdate","description":"How the agent PRESENTS itself — voice, language, greeting.\n\nEvery field is optional; only the ones actually sent are changed. If an agent is\nalready live the change is pushed to it immediately.\n\nThe PROMPT is deliberately not here. It is set and edited through\nPOST /tenant/voice/agent, which is also what creates the agent — so the wording the\ntenant tests in the browser is the wording that answers the phone, with one endpoint\nowning it rather than two writing the same column."},"VoiceSuspendResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"suspended":{"type":"boolean","title":"Suspended"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["success","suspended","phone_number","detail"],"title":"VoiceSuspendResponse"},"VoiceTestSessionResponse":{"properties":{"signed_url":{"type":"string","title":"Signed Url"},"agent_id":{"type":"string","title":"Agent Id"},"max_seconds":{"type":"integer","title":"Max Seconds"}},"type":"object","required":["signed_url","agent_id","max_seconds"],"title":"VoiceTestSessionResponse","description":"A browser session against the tenant's real agent — no phone line involved."},"VoiceUsageResponse":{"properties":{"month":{"type":"string","title":"Month"},"window_start":{"type":"string","format":"date-time","title":"Window Start"},"window_end":{"type":"string","format":"date-time","title":"Window End"},"tenants":{"items":{"$ref":"#/components/schemas/VoiceUsageRow"},"type":"array","title":"Tenants"}},"type":"object","required":["month","window_start","window_end","tenants"],"title":"VoiceUsageResponse"},"VoiceUsageRow":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"},"package":{"type":"string","title":"Package"},"includes_voice":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Includes Voice"},"calls":{"type":"integer","title":"Calls"},"demo_calls":{"type":"integer","title":"Demo Calls"},"seconds":{"type":"integer","title":"Seconds"},"minutes":{"type":"number","title":"Minutes"},"billed_minutes":{"type":"integer","title":"Billed Minutes"},"allowance_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Allowance Minutes"},"overage_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overage Minutes"},"overage_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overage Cents"},"overage_rate_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overage Rate Cents"}},"type":"object","required":["tenant_id","tenant_name","package","calls","demo_calls","seconds","minutes","billed_minutes"],"title":"VoiceUsageRow","description":"One tenant's voice consumption for a month, against what their plan includes."},"VolumePoint":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"total":{"type":"integer","title":"Total"},"web_chat":{"type":"integer","title":"Web Chat"},"whatsapp":{"type":"integer","title":"Whatsapp"},"voice":{"type":"integer","title":"Voice"}},"type":"object","required":["date","total","web_chat","whatsapp","voice"],"title":"VolumePoint","description":"One local day on the volume chart.\n\nAll three channels are present on every point, zeros included, so the page's Chat /\nWhatsApp / Voice buttons toggle without refetching. Instagram is not reported: the\nplatform does not serve it (its router is disabled), so the bar would be flat zero."},"WaAgentMessageRequest":{"properties":{"business_phone":{"type":"string","minLength":5,"title":"Business Phone"},"body":{"type":"string","minLength":1,"title":"Body"},"to_lid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Lid"},"to_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Phone"},"wa_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wa Message Id"}},"type":"object","required":["business_phone","body"],"title":"WaAgentMessageRequest","description":"A message a HUMAN sent from the tenant's WhatsApp, reported by the gateway.\n\nNot the agent's own replies — the gateway already logs those as it sends them, and\nskips them here by their wa_message_id."},"WaAgentMessageResponse":{"properties":{"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"recorded":{"type":"boolean","title":"Recorded"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["conversation_id","recorded","reason"],"title":"WaAgentMessageResponse"},"WaChatDetailOut":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"business_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Phone"},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"},"wa_lid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wa Lid"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"escalated":{"type":"boolean","title":"Escalated"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"messages":{"items":{"$ref":"#/components/schemas/WaChatMessageOut"},"type":"array","title":"Messages"}},"type":"object","required":["conversation_id","business_phone","contact_id","wa_lid","phone","name","escalated","created_at","messages"],"title":"WaChatDetailOut","description":"One chat, full thread, oldest message first."},"WaChatMessageOut":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","title":"Role"},"sender":{"type":"string","title":"Sender"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","role","sender","body","created_at"],"title":"WaChatMessageOut"},"WaChatOut":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"},"wa_lid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wa Lid"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"last_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message"},"last_message_at":{"type":"string","format":"date-time","title":"Last Message At"},"message_count":{"type":"integer","title":"Message Count"},"escalated":{"type":"boolean","title":"Escalated"}},"type":"object","required":["conversation_id","contact_id","wa_lid","phone","name","last_message","last_message_at","message_count","escalated"],"title":"WaChatOut","description":"One customer's chat on a connected number — a row in the number's inbox.\n\n`wa_lid` is the identity for QR-linked WhatsApp; name/phone are only present once the\ncustomer volunteers them in conversation, so the UI should fall back to the lid."},"WaNumberOut":{"properties":{"id":{"type":"string","title":"Id"},"session_id":{"type":"string","title":"Session Id"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"lid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lid"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"status":{"type":"string","title":"Status"},"provider":{"type":"string","title":"Provider"},"last_connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Connected At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","session_id","phone","lid","label","status","provider","last_connected_at","last_error","created_at"],"title":"WaNumberOut"},"WaNumberRegisterRequest":{"properties":{"session_id":{"type":"string","maxLength":64,"minLength":1,"title":"Session Id"},"phone":{"type":"string","maxLength":40,"minLength":5,"title":"Phone"},"lid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Lid"},"label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label"},"status":{"type":"string","maxLength":32,"title":"Status","default":"CONNECTED"}},"type":"object","required":["session_id","phone"],"title":"WaNumberRegisterRequest","description":"Posted once a QR scan completes, to record which number this tenant connected.\n\n`phone` is the identity everything else keys on, so it is required here — the\nsession id is only a handle and changes on every re-scan."},"WaNumberStatusRequest":{"properties":{"status":{"type":"string","maxLength":32,"minLength":1,"title":"Status"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"}},"type":"object","required":["status"],"title":"WaNumberStatusRequest","description":"Status-only update for a number already registered (disconnect, ban, re-connect)."},"WaQueryRequest":{"properties":{"business_phone":{"type":"string","maxLength":40,"minLength":5,"title":"Business Phone"},"message":{"type":"string","minLength":1,"title":"Message"},"from_lid":{"type":"string","maxLength":64,"minLength":1,"title":"From Lid"},"from_phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"From Phone"},"from_jid":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"From Jid"},"wa_message_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Wa Message Id"}},"type":"object","required":["business_phone","message","from_lid"],"title":"WaQueryRequest","description":"One customer message from a WhatsApp chat — the /chat/query equivalent.\n\nIdentity is the LID: Baileys does not expose the sender's msisdn, and the LID is the\none field always present. `from_phone` is stored when supplied but never used to\nfind the chat. `from_jid` is echoed back as the reply address."},"WaQueryResponse":{"properties":{"chat_id":{"type":"string","title":"Chat Id"},"reply":{"type":"string","title":"Reply"},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To"},"escalated":{"type":"boolean","title":"Escalated","default":false},"booking":{"type":"boolean","title":"Booking","default":false},"booking_options":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Booking Options"},"deduped":{"type":"boolean","title":"Deduped","default":false}},"type":"object","required":["chat_id","reply"],"title":"WaQueryResponse","description":"The reply for the caller to deliver. `deduped` means this message was already\nhandled (WhatsApp redelivers on reconnect) — do NOT send `reply` again."},"WaitlistSubmitRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"business":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Business"},"source":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Source"}},"type":"object","required":["email"],"title":"WaitlistSubmitRequest","description":"The \"Join the waitlist\" form on the landing page.\n\nOnly `email` is required — the form marks NAME and BUSINESS / PROPERTY NAME optional.\nThe confirmation email falls back to friendly wording when they are omitted."},"WaitlistSubmitResponse":{"properties":{"message":{"type":"string","title":"Message"},"lead_id":{"type":"string","title":"Lead Id"},"email_sent":{"type":"boolean","title":"Email Sent"}},"type":"object","required":["message","lead_id","email_sent"],"title":"WaitlistSubmitResponse"},"WhatsAppHoursOut":{"properties":{"mode":{"type":"string","title":"Mode"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"},"days":{"items":{"type":"integer"},"type":"array","title":"Days"},"cover_off_days":{"type":"boolean","title":"Cover Off Days"},"cover_holidays":{"type":"boolean","title":"Cover Holidays"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"hours_configured":{"type":"boolean","title":"Hours Configured"},"ai_answering_now":{"type":"boolean","title":"Ai Answering Now"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["mode","start","end","days","cover_off_days","cover_holidays","timezone","hours_configured","ai_answering_now","reason"],"title":"WhatsAppHoursOut"},"WhatsAppHoursUpdate":{"properties":{"mode":{"type":"string","enum":["always","during_hours","outside_hours","custom"],"title":"Mode"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start","deprecated":true},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End","deprecated":true},"days":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Days","deprecated":true},"cover_off_days":{"type":"boolean","title":"Cover Off Days","default":true},"cover_holidays":{"type":"boolean","title":"Cover Holidays","default":true}},"type":"object","required":["mode"],"title":"WhatsAppHoursUpdate","description":"When the assistant answers on WhatsApp, relative to the BUSINESS's opening hours.\n\n    always          answers every message, around the clock\n    during_hours    answers only while the business is open\n    outside_hours   answers only while it is closed; the team takes the rest\n\nTHE WINDOW IS NOT SET HERE ANY MORE. It is the opening hours (PUT /tenant/opening-hours),\nso a client describes their week once instead of keeping a WhatsApp rota in step with it\nby hand. `start`, `end` and `days` are accepted and IGNORED so an older frontend does not\nstart failing validation mid-deploy; they will be removed once it has caught up."},"app__schemas__admin__TenantOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"slug":{"type":"string","title":"Slug"},"vertical":{"anyOf":[{"$ref":"#/components/schemas/Vertical"},{"type":"null"}]},"package":{"type":"string","title":"Package"},"status":{"$ref":"#/components/schemas/TenantStatus"},"widget_key":{"type":"string","title":"Widget Key"},"wa_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wa Number"},"ghl_subaccount_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Subaccount Id"},"booking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Url"},"phone_line_active":{"type":"boolean","title":"Phone Line Active"},"primary_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Name"},"primary_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Email"},"public_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Phone"},"message_tone":{"anyOf":[{"$ref":"#/components/schemas/MessageTone"},{"type":"null"}]},"greeting_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Greeting Style"},"tone_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone Instructions"},"mini_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mini Prompt"},"house_rules":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"House Rules"},"widget_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Widget Origin"},"onboarding_submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarding Submitted At"},"onboarded_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarded By Name"},"onboarded_by_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarded By Role"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","slug","vertical","package","status","widget_key","wa_number","ghl_subaccount_id","booking_url","phone_line_active","primary_contact_name","primary_contact_email","public_phone","message_tone","greeting_style","tone_instructions","mini_prompt","house_rules","widget_origin","onboarding_submitted_at","onboarded_by_name","onboarded_by_role","created_at","updated_at"],"title":"TenantOut","description":"All tenant-table fields except the encrypted integration secrets\n(wa_api_key_enc / ghl_api_key_enc), which are never returned."},"app__schemas__tenant_settings__TenantOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"slug":{"type":"string","title":"Slug"},"vertical":{"anyOf":[{"$ref":"#/components/schemas/Vertical"},{"type":"null"}]},"package":{"type":"string","title":"Package"},"status":{"$ref":"#/components/schemas/TenantStatus"},"widget_key":{"type":"string","title":"Widget Key"},"ig_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ig Account Id"},"instagram_enabled":{"type":"boolean","title":"Instagram Enabled"},"ghl_subaccount_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Subaccount Id"},"booking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Url"},"phone_line_active":{"type":"boolean","title":"Phone Line Active"},"primary_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Name"},"primary_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Email"},"public_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Phone"},"message_tone":{"anyOf":[{"$ref":"#/components/schemas/MessageTone"},{"type":"null"}]},"greeting_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Greeting Style"},"tone_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone Instructions"},"mini_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mini Prompt"},"house_rules":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"House Rules"},"widget_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Widget Origin"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"onboarding_submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarding Submitted At"},"onboarded_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarded By Name"},"onboarded_by_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarded By Role"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","slug","vertical","package","status","widget_key","ig_account_id","instagram_enabled","ghl_subaccount_id","booking_url","phone_line_active","primary_contact_name","primary_contact_email","public_phone","message_tone","greeting_style","tone_instructions","mini_prompt","house_rules","widget_origin","timezone","onboarding_submitted_at","onboarded_by_name","onboarded_by_role","created_at","updated_at"],"title":"TenantOut","description":"Tenant read-back. Secrets (wa_api_key_enc / ghl_api_key_enc) are never echoed;\nbooleans report whether they're set.\n\nThe WhatsApp columns (wa_number / wa_phone_number_id / wa_waba_id / wa_api_key_enc)\nare not returned either: they are written only by Meta Embedded Signup\n(POST /whatsapp/get-access-token) and are not the tenant's to read back."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}