{"openapi":"3.1.0","info":{"title":"Perbene AI API","description":"REST API for the Perbene AI voice-assistant platform. Authenticate with `X-API-Key: pbn_live_…` issued from your dashboard at https://app.perbene.ai/settings?tab=profile. All endpoints are scoped to the organization that issued the key.","version":"1.0.0"},"servers":[{"url":"https://api.perbene.ai","description":"Production"}],"paths":{"/api/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Check the health of the API and its dependencies.","operationId":"health_check_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheck"}}}}}}},"/api/health/live":{"get":{"tags":["Health"],"summary":"Liveness","description":"Simple liveness check that always returns 200 - for container healthchecks.","operationId":"liveness_api_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Check the health of the API and its dependencies.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheck"}}}}}}},"/health/live":{"get":{"tags":["Health"],"summary":"Liveness","description":"Simple liveness check that always returns 200 - for container healthchecks.","operationId":"liveness_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/service-requests":{"get":{"tags":["Service Requests"],"summary":"List Service Requests","description":"List service requests with filtering and pagination.\n\ndue_days: only jobs still open due by the end of that many days from today in the\nbusiness's own timezone (0 = today and everything already late), soonest first. It\nanswers \"what has to be finished today\", which status and priority can only\napproximate.","operationId":"list_service_requests_api_service_requests_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceRequestPriority"},{"type":"null"}],"title":"Priority"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"due_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":0},{"type":"null"}],"title":"Due Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Service Requests"],"summary":"Create Service Request","description":"Create a new service request.","operationId":"create_service_request_api_service_requests_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceRequest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/service-requests/{service_request_id}":{"put":{"tags":["Service Requests"],"summary":"Update Service Request","description":"Update a service request.","operationId":"update_service_request_api_service_requests__service_request_id__put","parameters":[{"name":"service_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceRequestUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceRequest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Service Requests"],"summary":"Delete Service Request","description":"Delete a service request.","operationId":"delete_service_request_api_service_requests__service_request_id__delete","parameters":[{"name":"service_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Request Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/service-requests/{service_request_id}/quote":{"post":{"tags":["Service Requests"],"summary":"Create Quote","description":"Create or update a quote for a service request.","operationId":"create_quote_api_service_requests__service_request_id__quote_post","parameters":[{"name":"service_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Request Id"}},{"name":"quote_amount_cents","in":"query","required":true,"schema":{"type":"integer","minimum":0,"description":"Quote amount in cents","title":"Quote Amount Cents"},"description":"Quote amount in cents"},{"name":"diagnostic_fee_cents","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Diagnostic fee in cents","title":"Diagnostic Fee Cents"},"description":"Diagnostic fee in cents"},{"name":"notes","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Service Requests"],"summary":"Update Quote Status","description":"Update quote status (approve, reject, or mark as billed).","operationId":"update_quote_status_api_service_requests__service_request_id__quote_put","parameters":[{"name":"service_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Request Id"}},{"name":"status","in":"query","required":true,"schema":{"type":"string","pattern":"^(approved|rejected|billed)$","description":"New quote status","title":"Status"},"description":"New quote status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/service-requests/stats":{"get":{"tags":["Service Requests"],"summary":"Service Request Stats","description":"The Jobs page cards: open jobs (not completed or cancelled) that are emergencies, have\na quote waiting for approval, or have a provider assigned. Counted across every page.","operationId":"service_request_stats_api_service_requests_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/quotes/pending":{"get":{"tags":["Service Requests"],"summary":"List Pending Quotes","description":"List all pending quotes awaiting approval.","operationId":"list_pending_quotes_api_quotes_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/service-requests/{service_request_id}/emergency":{"post":{"tags":["Service Requests"],"summary":"Mark As Emergency","description":"Mark a service request as an emergency for immediate dispatch.","operationId":"mark_as_emergency_api_service_requests__service_request_id__emergency_post","parameters":[{"name":"service_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Request Id"}},{"name":"emergency_type","in":"query","required":true,"schema":{"type":"string","pattern":"^(gas|water|electrical|hvac|structural|other)$","description":"Type of emergency","title":"Emergency Type"},"description":"Type of emergency"},{"name":"emergency_priority","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Priority (1=highest, 10=lowest)","default":1,"title":"Emergency Priority"},"description":"Priority (1=highest, 10=lowest)"},{"name":"notes","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Notes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/emergencies/active":{"get":{"tags":["Service Requests"],"summary":"List Active Emergencies","description":"List all active emergency requests.","operationId":"list_active_emergencies_api_emergencies_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/service-providers":{"get":{"tags":["Service Providers"],"summary":"List Service Providers","description":"List service providers with filtering and pagination.","operationId":"list_service_providers_api_service_providers_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceProviderStatus"},{"type":"null"}],"title":"Status"}},{"name":"specialty","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceProviderList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Service Providers"],"summary":"Create Service Provider","description":"Create a new service provider.","operationId":"create_service_provider_api_service_providers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceProviderCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceProvider"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/service-providers/{provider_id}":{"get":{"tags":["Service Providers"],"summary":"Get Service Provider","description":"Get a specific service provider by ID.","operationId":"get_service_provider_api_service_providers__provider_id__get","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceProvider"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Service Providers"],"summary":"Update Service Provider","description":"Update a service provider.","operationId":"update_service_provider_api_service_providers__provider_id__put","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceProviderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceProvider"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Service Providers"],"summary":"Delete Service Provider","description":"Delete a service provider.","operationId":"delete_service_provider_api_service_providers__provider_id__delete","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Provider Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts":{"get":{"tags":["Contacts"],"summary":"List Contacts","description":"List contacts with filtering and pagination.\n\nprospects: scraped businesses nobody has spoken to yet, instead of the people the\nbusiness actually deals with. They are two different lists — mixing them buried\n80 customers under 262 cold rows — so one or the other, never both. An explicit\n`status` overrides the split.","operationId":"list_contacts_api_contacts_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ContactStatus"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"prospects","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Prospects"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(name|name_desc|newest)$","default":"name","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Contacts"],"summary":"Create Contact","description":"Create a new contact.","operationId":"create_contact_api_contacts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/search":{"get":{"tags":["Contacts"],"summary":"Search Contacts","description":"Search contacts by phone number or name.","operationId":"search_contacts_api_contacts_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contact"},"title":"Response Search Contacts Api Contacts Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/search-by-email":{"get":{"tags":["Contacts"],"summary":"Search Contacts By Email","description":"Search contacts by email address.","operationId":"search_contacts_by_email_api_contacts_search_by_email_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"Email"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contact"},"title":"Response Search Contacts By Email Api Contacts Search By Email Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/{contact_id}":{"get":{"tags":["Contacts"],"summary":"Get Contact","description":"Get a specific contact by ID.","operationId":"get_contact_api_contacts__contact_id__get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Contacts"],"summary":"Update Contact","description":"Update a contact.","operationId":"update_contact_api_contacts__contact_id__put","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Contacts"],"summary":"Delete Contact","description":"Delete a contact. Requires owner or admin role.","operationId":"delete_contact_api_contacts__contact_id__delete","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/bulk-delete":{"post":{"tags":["Contacts"],"summary":"Bulk Delete Contacts","description":"Delete multiple contacts. Requires owner or admin role.","operationId":"bulk_delete_contacts_api_contacts_bulk_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/technicians":{"get":{"tags":["Technicians","Technicians"],"summary":"List Technicians","description":"List technicians/service providers with filtering.","operationId":"list_technicians_api_technicians_get","parameters":[{"name":"is_on_call","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by on-call status","title":"Is On Call"},"description":"Filter by on-call status"},{"name":"skill","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by skill","title":"Skill"},"description":"Filter by skill"},{"name":"available_now","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only show technicians available right now","title":"Available Now"},"description":"Only show technicians available right now"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Technicians","Technicians"],"summary":"Create Technician","description":"Create a new technician/service provider.","operationId":"create_technician_api_technicians_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicianCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/technicians/on-call/schedule":{"get":{"tags":["Technicians","Technicians"],"summary":"List On Call Schedule","description":"List on-call schedules.","operationId":"list_on_call_schedule_api_technicians_on_call_schedule_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter by start date","title":"Start Date"},"description":"Filter by start date"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter by end date","title":"End Date"},"description":"Filter by end date"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Technicians","Technicians"],"summary":"Create On Call Schedule","description":"Create an on-call schedule.","operationId":"create_on_call_schedule_api_technicians_on_call_schedule_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnCallScheduleCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/technicians/on-call/schedule/{schedule_id}":{"put":{"tags":["Technicians","Technicians"],"summary":"Update On Call Schedule","description":"Update an on-call schedule.","operationId":"update_on_call_schedule_api_technicians_on_call_schedule__schedule_id__put","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnCallScheduleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Technicians","Technicians"],"summary":"Cancel On Call Schedule","description":"Cancel an on-call schedule.","operationId":"cancel_on_call_schedule_api_technicians_on_call_schedule__schedule_id__delete","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/technicians/on-call/current":{"get":{"tags":["Technicians","Technicians"],"summary":"Get Current On Call","description":"Get currently on-call technicians.","operationId":"get_current_on_call_api_technicians_on_call_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/technicians/dispatch":{"post":{"tags":["Technicians","Technicians"],"summary":"Create Dispatch","description":"Create an emergency dispatch.","operationId":"create_dispatch_api_technicians_dispatch_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Technicians","Technicians"],"summary":"List All Dispatches","description":"List all emergency dispatches with optional status filter.","operationId":"list_all_dispatches_api_technicians_dispatch_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/technicians/dispatch/active":{"get":{"tags":["Technicians","Technicians"],"summary":"List Active Dispatches","description":"List active emergency dispatches.","operationId":"list_active_dispatches_api_technicians_dispatch_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/technicians/dispatch/{dispatch_id}":{"get":{"tags":["Technicians","Technicians"],"summary":"Get Dispatch Details","description":"Get details of a single dispatch.","operationId":"get_dispatch_details_api_technicians_dispatch__dispatch_id__get","parameters":[{"name":"dispatch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dispatch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Technicians","Technicians"],"summary":"Update Dispatch","description":"Update dispatch status.","operationId":"update_dispatch_api_technicians_dispatch__dispatch_id__put","parameters":[{"name":"dispatch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dispatch Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Technicians","Technicians"],"summary":"Cancel Dispatch","description":"Cancel an emergency dispatch.","operationId":"cancel_dispatch_api_technicians_dispatch__dispatch_id__delete","parameters":[{"name":"dispatch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dispatch Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/technicians/{technician_id}":{"get":{"tags":["Technicians","Technicians"],"summary":"Get Technician","description":"Get technician details.","operationId":"get_technician_api_technicians__technician_id__get","parameters":[{"name":"technician_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Technician Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Technicians","Technicians"],"summary":"Update Technician","description":"Update technician information.","operationId":"update_technician_api_technicians__technician_id__put","parameters":[{"name":"technician_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Technician Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicianUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Technicians","Technicians"],"summary":"Delete Technician","description":"Delete a technician.","operationId":"delete_technician_api_technicians__technician_id__delete","parameters":[{"name":"technician_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Technician Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/service-listings":{"get":{"tags":["Service Listings"],"summary":"List Service Listings","description":"List service listings with filtering and pagination.","operationId":"list_service_listings_api_service_listings_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"is_available","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Available"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListingList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Service Listings"],"summary":"Create Service Listing","description":"Create a new service listing.","operationId":"create_service_listing_api_service_listings_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListing"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/service-listings/{listing_id}":{"get":{"tags":["Service Listings"],"summary":"Get Service Listing","description":"Get a specific service listing by ID.","operationId":"get_service_listing_api_service_listings__listing_id__get","parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Listing Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListing"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Service Listings"],"summary":"Update Service Listing","description":"Update a service listing.","operationId":"update_service_listing_api_service_listings__listing_id__put","parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Listing Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListing"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Service Listings"],"summary":"Delete Service Listing","description":"Delete a service listing.","operationId":"delete_service_listing_api_service_listings__listing_id__delete","parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Listing Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/leads":{"get":{"tags":["Leads"],"summary":"List Leads","description":"List leads with filtering and pagination.\n\nstale_days: only open leads not updated in that many days, least recently touched first.\ndue_days: only open leads whose next step falls due by the end of that many days from\ntoday in the business's own timezone (0 = today and everything late), soonest first. It answers \"what do I owe today\", which stale_days can only guess at.","operationId":"list_leads_api_leads_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"stale_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"title":"Stale Days"}},{"name":"due_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":0},{"type":"null"}],"title":"Due Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Leads"],"summary":"Create Lead","description":"Create a new lead, linked to an upserted Contact.","operationId":"create_lead_api_leads_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/leads/pipeline":{"get":{"tags":["Leads"],"summary":"Lead Pipeline","description":"Leads per status, how many were won and lost in the last PIPELINE_DAYS days, the\nlatest reasons given for a loss, and the customers won in that window.","operationId":"lead_pipeline_api_leads_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPipeline"}}}}}}},"/api/leads/{lead_id}":{"get":{"tags":["Leads"],"summary":"Get Lead","description":"Get a specific lead by ID.","operationId":"get_lead_api_leads__lead_id__get","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Leads"],"summary":"Update Lead","description":"Update a lead.","operationId":"update_lead_api_leads__lead_id__put","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Leads"],"summary":"Delete Lead","description":"Delete a lead.","operationId":"delete_lead_api_leads__lead_id__delete","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/urgent-alerts":{"get":{"tags":["Urgent Alerts"],"summary":"List Urgent Alerts","description":"List urgent alerts with filtering and pagination.","operationId":"list_urgent_alerts_api_urgent_alerts_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"}},{"name":"alert_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alert Type"}},{"name":"resolution_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrgentAlertList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Urgent Alerts"],"summary":"Create Urgent Alert","description":"Create a new urgent alert.","operationId":"create_urgent_alert_api_urgent_alerts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrgentAlertCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrgentAlertSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/urgent-alerts/{alert_id}":{"get":{"tags":["Urgent Alerts"],"summary":"Get Urgent Alert","description":"Get a specific urgent alert by ID.","operationId":"get_urgent_alert_api_urgent_alerts__alert_id__get","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrgentAlertSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Urgent Alerts"],"summary":"Update Urgent Alert","description":"Update an urgent alert.","operationId":"update_urgent_alert_api_urgent_alerts__alert_id__put","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrgentAlertCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrgentAlertSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Urgent Alerts"],"summary":"Delete Urgent Alert","description":"Delete an urgent alert.","operationId":"delete_urgent_alert_api_urgent_alerts__alert_id__delete","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/caller-memory":{"get":{"tags":["Conversations"],"summary":"Get Caller Memory","description":"Return the rolling recall summary the voice agent has for this caller.\n\nThe summary lives in the caller's ``phone`` Conversation\n(``conversation_state[\"summary\"]``). Returns nulls when none exists yet.","operationId":"get_caller_memory_api_caller_memory_get","parameters":[{"name":"phone_number","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Phone Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallerMemorySchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Conversations"],"summary":"Clear Caller Memory","description":"Clear the rolling recall summary for this caller's ``phone`` conversation.\n\nRemoves only ``summary`` / ``summary_updated_at`` from ``conversation_state``;\nthe conversation row and its message history are left intact. Idempotent — a\ncaller with no stored memory still returns ``cleared: False`` successfully.","operationId":"clear_caller_memory_api_caller_memory_delete","parameters":[{"name":"phone_number","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Phone Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations":{"get":{"tags":["Conversations"],"summary":"Get Conversations","description":"Get conversations, optionally filtered by phone number and/or channel.","operationId":"get_conversations_api_conversations_get","parameters":[{"name":"phone_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationSchema"},"title":"Response Get Conversations Api Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Conversations"],"summary":"Create Or Update Conversation","description":"Create a new conversation or update existing one.","operationId":"create_or_update_conversation_api_conversations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}":{"get":{"tags":["Conversations"],"summary":"Get Conversation","description":"Get a specific conversation by ID.","operationId":"get_conversation_api_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Conversations"],"summary":"Delete Conversation","description":"Delete a conversation.","operationId":"delete_conversation_api_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/messages":{"get":{"tags":["Conversations"],"summary":"Get Conversation Messages","description":"Get stored messages for a conversation.","operationId":"get_conversation_messages_api_conversations__conversation_id__messages_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Conversations"],"summary":"Log Conversation Message","description":"Log a message in the conversation, store content, and update totals.","operationId":"log_conversation_message_api_conversations__conversation_id__messages_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessage"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/end":{"put":{"tags":["Conversations"],"summary":"End Conversation","description":"Mark a conversation as inactive.","operationId":"end_conversation_api_conversations__conversation_id__end_put","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activities":{"get":{"tags":["Activities"],"summary":"List Activities","description":"List activities with filtering and pagination. The team's plain lookups (a READ\ntool it was allowed to use: about four in five team actions) are left out unless\n`lookups` is set: they are an audit trail, and they buried what really happened.","operationId":"list_activities_api_activities_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"activity_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ActivityType"},{"type":"null"}],"title":"Activity Type"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"}},{"name":"service_request_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Request Id"}},{"name":"hours_back","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":8760,"minimum":1},{"type":"null"}],"title":"Hours Back"}},{"name":"lookups","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Lookups"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Activities"],"summary":"Create Activity","description":"Create a new activity log.","operationId":"create_activity_api_activities_post","parameters":[{"name":"x-internal-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activities/{activity_id}":{"get":{"tags":["Activities"],"summary":"Get Activity","description":"Get a specific activity by ID.","operationId":"get_activity_api_activities__activity_id__get","parameters":[{"name":"activity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Activity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/calls":{"get":{"tags":["Calls"],"summary":"List Calls","description":"List calls with enhanced analytics.\n\nEach call is represented by a single CALL_ENDED activity that contains\nall call data (duration, transcription, recording, outcome, start_time).\nchannel=web lists the calls taken through the website widget; channel=phone\nthe calls on a phone line (rows written before website calls existed have no\nchannel, and are phone calls).","operationId":"list_calls_api_calls_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Page Size"}},{"name":"hours_back","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":8760,"minimum":1},{"type":"null"}],"title":"Hours Back"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(phone|web)$"},{"type":"null"}],"title":"Channel"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Calls"],"summary":"Bulk Delete Calls","description":"Bulk delete spam/empty calls. At least one filter must be provided.","operationId":"bulk_delete_calls_api_calls_delete","parameters":[{"name":"no_transcription","in":"query","required":false,"schema":{"type":"boolean","description":"Delete calls with no transcription","default":false,"title":"No Transcription"},"description":"Delete calls with no transcription"},{"name":"max_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Delete calls shorter than N seconds","title":"Max Duration"},"description":"Delete calls shorter than N seconds"},{"name":"hours_back","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":8760,"minimum":1},{"type":"null"}],"title":"Hours Back"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/calls/{session_id}":{"delete":{"tags":["Calls"],"summary":"Delete Call","description":"Delete all activities for a call session.","operationId":"delete_call_api_calls__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Calls"],"summary":"Get Call","description":"Get detailed information for a specific call.","operationId":"get_call_api_calls__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/calls/{session_id}/recording":{"get":{"tags":["Calls"],"summary":"Get Call Recording","description":"Get a presigned URL for a call recording.","operationId":"get_call_recording_api_calls__session_id__recording_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/messages":{"get":{"tags":["Messages"],"summary":"List Messages","description":"List messages with filtering and analytics. channel=sms (default) or whatsapp\nlists that channel's messages; channel=web lists website-chat exchanges, each expanded into a visitor\nmessage + a reply item.","operationId":"list_messages_api_messages_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"hours_back","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":8760,"minimum":1},{"type":"null"}],"title":"Hours Back"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(inbound|outbound)$"},{"type":"null"}],"title":"Direction"}},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},{"name":"channel","in":"query","required":false,"schema":{"type":"string","pattern":"^(sms|web|whatsapp)$","default":"sms","title":"Channel"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/statistics/dashboard":{"get":{"tags":["Statistics"],"summary":"Get Dashboard Stats","description":"Get dashboard statistics.","operationId":"get_dashboard_stats_api_statistics_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStats"}}}}}}},"/api/statistics/roi":{"get":{"tags":["Statistics"],"summary":"Get Roi","description":"ROI rollup: after-hours calls answered, leads, appointments, est. value.","operationId":"get_roi_api_statistics_roi_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/statistics/service-requests/by-status":{"get":{"tags":["Statistics"],"summary":"Get Service Requests By Status","description":"Get service requests grouped by status.","operationId":"get_service_requests_by_status_api_statistics_service_requests_by_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/statistics/service-requests/by-priority":{"get":{"tags":["Statistics"],"summary":"Get Service Requests By Priority","description":"Get service requests grouped by priority.","operationId":"get_service_requests_by_priority_api_statistics_service_requests_by_priority_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/statistics/activities/by-type":{"get":{"tags":["Statistics"],"summary":"Get Activities By Type","description":"Get activities grouped by type in the last N hours.","operationId":"get_activities_by_type_api_statistics_activities_by_type_get","parameters":[{"name":"hours_back","in":"query","required":false,"schema":{"type":"integer","maximum":8760,"minimum":1,"default":24,"title":"Hours Back"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/statistics/metrics/time-series":{"get":{"tags":["Statistics"],"summary":"Get Metrics Time Series","description":"Get time series data for a specific metric.","operationId":"get_metrics_time_series_api_statistics_metrics_time_series_get","parameters":[{"name":"metric","in":"query","required":true,"schema":{"type":"string","pattern":"^(service_requests|activities|calls|sms_messages)$","title":"Metric"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/statistics/portal-sessions":{"get":{"tags":["Statistics"],"summary":"Get Portal Sessions","description":"Count contacts with active portal tokens (portal-enabled customers).","operationId":"get_portal_sessions_api_statistics_portal_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/statistics/appointment-stats":{"get":{"tags":["Statistics"],"summary":"Get Appointment Stats","description":"Per-status appointment counts for the appointment-status donut.","operationId":"get_appointment_stats_api_statistics_appointment_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/statistics/upcoming":{"get":{"tags":["Statistics"],"summary":"Get Upcoming","description":"Everything coming up, soonest first: appointments, calls, follow-ups, campaign emails,\nscheduled posts (app/services/upcoming.py).","operationId":"get_upcoming_api_statistics_upcoming_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":31,"minimum":1,"default":7,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":12,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/statistics/upcoming-appointments":{"get":{"tags":["Statistics"],"summary":"Get Upcoming Appointments","description":"Next confirmed or rescheduled appointments for the org + a total count for KPI.\n\n``total`` is the number of future confirmed or rescheduled appointments; ``items`` is the\nchronologically-first ``limit`` of those.","operationId":"get_upcoming_appointments_api_statistics_upcoming_appointments_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns":{"get":{"tags":["Campaigns","Campaigns"],"summary":"List Campaigns","description":"List outbound campaigns (paginated, filterable by status).","operationId":"list_campaigns_api_campaigns_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Campaigns","Campaigns"],"summary":"Create Campaign","description":"Create a new outbound campaign (status=DRAFT).","operationId":"create_campaign_api_campaigns_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/limits":{"get":{"tags":["Campaigns","Campaigns"],"summary":"Campaign Limits","description":"What the law allows for this org, so the form can say so while the owner\nchooses instead of the dial path refusing silently later. Served from the\nsame table the dial path reads, so the two cannot drift.","operationId":"campaign_limits_api_campaigns_limits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/campaigns/{campaign_id}":{"get":{"tags":["Campaigns","Campaigns"],"summary":"Get Campaign","operationId":"get_campaign_api_campaigns__campaign_id__get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Campaigns","Campaigns"],"summary":"Update Campaign","operationId":"update_campaign_api_campaigns__campaign_id__put","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Campaigns","Campaigns"],"summary":"Delete Campaign","operationId":"delete_campaign_api_campaigns__campaign_id__delete","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/duplicate":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Duplicate Campaign","description":"Clone a campaign's configuration into a new DRAFT.\n\nOnly the config is copied (name, instructions, retry policy, calling hours,\netc.). Contacts are NOT copied — the user starts fresh by uploading or\nimporting new contacts. This matches the common CRM \"re-run with new\naudience\" workflow.","operationId":"duplicate_campaign_api_campaigns__campaign_id__duplicate_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/steps":{"get":{"tags":["Campaigns","Campaigns"],"summary":"List Steps","operationId":"list_steps_api_campaigns__campaign_id__steps_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignStep"},"title":"Response List Steps Api Campaigns  Campaign Id  Steps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Campaigns","Campaigns"],"summary":"Replace Steps","operationId":"replace_steps_api_campaigns__campaign_id__steps_put","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignStepCreate"},"title":"Steps"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignStep"},"title":"Response Replace Steps Api Campaigns  Campaign Id  Steps Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/start":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Start Campaign","operationId":"start_campaign_api_campaigns__campaign_id__start_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/pause":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Pause Campaign","operationId":"pause_campaign_api_campaigns__campaign_id__pause_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/cancel":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Cancel Campaign","operationId":"cancel_campaign_api_campaigns__campaign_id__cancel_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/retry":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Retry Campaign","description":"Re-queue failed/unanswered contacts and reactivate the campaign.\n\nResets each retryable contact to PENDING with a cleared attempt counter so\nthe orchestrator picks it up again, resuming at the step it failed on\n(current_step is left intact). COMPLETED contacts are not touched.","operationId":"retry_campaign_api_campaigns__campaign_id__retry_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/contacts/{contact_id}/stop":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Stop Contact","operationId":"stop_contact_api_campaigns__campaign_id__contacts__contact_id__stop_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignContact"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/stop":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Stop Campaign","operationId":"stop_campaign_api_campaigns__campaign_id__stop_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stop Campaign Api Campaigns  Campaign Id  Stop Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/contacts":{"get":{"tags":["Campaigns","Campaigns"],"summary":"List Contacts","operationId":"list_contacts_api_campaigns__campaign_id__contacts_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"call_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignContactList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Campaigns","Campaigns"],"summary":"Add Contacts","operationId":"add_contacts_api_campaigns__campaign_id__contacts_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactCreate"},"title":"Contacts"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Contacts Api Campaigns  Campaign Id  Contacts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/contacts/upload":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Upload Contacts","description":"Upload CSV or TXT file of contacts.","operationId":"upload_contacts_api_campaigns__campaign_id__contacts_upload_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_contacts_api_campaigns__campaign_id__contacts_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Contacts Api Campaigns  Campaign Id  Contacts Upload Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/contacts/{contact_id}":{"delete":{"tags":["Campaigns","Campaigns"],"summary":"Delete Contact","operationId":"delete_contact_api_campaigns__campaign_id__contacts__contact_id__delete","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/quick-call":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Quick Call","description":"Create a 1-contact campaign and start it immediately.","operationId":"quick_call_api_campaigns_quick_call_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickCallRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/entity-call":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Entity Call","description":"Call an existing entity (contact, provider, or lead) with full CRM context.","operationId":"entity_call_api_campaigns_entity_call_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityCallRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/quick-send":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Quick Send","description":"Create a 1-contact campaign on any channel and start it immediately.","operationId":"quick_send_api_campaigns_quick_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickSendRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/entity-send":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Entity Send","description":"Send to an existing CRM entity (contact, service_provider, or lead) on any channel.","operationId":"entity_send_api_campaigns_entity_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySendRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/draft-email":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Draft Email","description":"One-shot AI draft for fixed-content campaigns. Returns {subject, body}.\n\nThe dashboard drops the result into the editable fixed-content fields.","operationId":"draft_email_api_campaigns_draft_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Draft Email Api Campaigns Draft Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/contacts/{contact_id}/disposition":{"post":{"tags":["Campaigns","Campaigns"],"summary":"Set Contact Disposition","description":"Assign a disposition to a campaign contact.\n\nIf disposition.ends_sequence is True: cancel any scheduled retry;\nPENDING contacts become SKIPPED. If disposition.triggers_dnc is True:\nadd the phone to the org's DNC list.","operationId":"set_contact_disposition_api_campaigns__campaign_id__contacts__contact_id__disposition_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_DispositionAssign"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dispositions":{"get":{"tags":["Dispositions","Dispositions"],"summary":"List Dispositions","operationId":"list_dispositions_api_dispositions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Dispositions","Dispositions"],"summary":"Create Disposition","operationId":"create_disposition_api_dispositions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispositionCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dispositions/{disposition_id}":{"put":{"tags":["Dispositions","Dispositions"],"summary":"Update Disposition","operationId":"update_disposition_api_dispositions__disposition_id__put","parameters":[{"name":"disposition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Disposition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispositionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Dispositions","Dispositions"],"summary":"Delete Disposition","operationId":"delete_disposition_api_dispositions__disposition_id__delete","parameters":[{"name":"disposition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Disposition Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dnc":{"get":{"tags":["DNC","DNC"],"summary":"List Dnc","operationId":"list_dnc_api_dnc_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["DNC","DNC"],"summary":"Add Dnc","operationId":"add_dnc_api_dnc_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DNCCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dnc/bulk":{"post":{"tags":["DNC","DNC"],"summary":"Bulk Upload Dnc","operationId":"bulk_upload_dnc_api_dnc_bulk_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_bulk_upload_dnc_api_dnc_bulk_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dnc/{dnc_id}":{"delete":{"tags":["DNC","DNC"],"summary":"Remove Dnc","operationId":"remove_dnc_api_dnc__dnc_id__delete","parameters":[{"name":"dnc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dnc Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dnc/check/{phone}":{"get":{"tags":["DNC","DNC"],"summary":"Check Dnc","operationId":"check_dnc_api_dnc_check__phone__get","parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string","title":"Phone"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge-base/sources/upload":{"post":{"tags":["Knowledge Base","Knowledge Base"],"summary":"Upload Document","description":"Upload a document (PDF, DOCX, TXT, CSV, image) to the knowledge base.","operationId":"upload_document_api_knowledge_base_sources_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_api_knowledge_base_sources_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge-base/sources":{"post":{"tags":["Knowledge Base","Knowledge Base"],"summary":"Create Source","description":"Create a Q&A pair or website knowledge source.","operationId":"create_source_api_knowledge_base_sources_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QAPairRequest"},{"$ref":"#/components/schemas/WebsiteRequest"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Base","Knowledge Base"],"summary":"List Sources","description":"List all knowledge sources for the organization.","operationId":"list_sources_api_knowledge_base_sources_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge-base/sources/{source_id}":{"get":{"tags":["Knowledge Base","Knowledge Base"],"summary":"Get Source","description":"Get a single knowledge source.","operationId":"get_source_api_knowledge_base_sources__source_id__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Knowledge Base","Knowledge Base"],"summary":"Update Source","description":"Update a Q&A pair, website, or document source, then recompile it into Memory.","operationId":"update_source_api_knowledge_base_sources__source_id__put","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQARequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Knowledge Base","Knowledge Base"],"summary":"Delete Source","description":"Delete a source and forget what only it taught Memory.","operationId":"delete_source_api_knowledge_base_sources__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge-base/sources/{source_id}/recrawl":{"post":{"tags":["Knowledge Base","Knowledge Base"],"summary":"Recrawl Source","description":"Re-process an existing source (re-crawl website, re-extract document).","operationId":"recrawl_source_api_knowledge_base_sources__source_id__recrawl_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge-base/search":{"post":{"tags":["Knowledge Base","Knowledge Base"],"summary":"Search","description":"Search Memory — the one knowledge store every agent reads.","operationId":"search_api_knowledge_base_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/connection":{"get":{"tags":["Scheduling","Scheduling"],"summary":"Get Connection","description":"Get current calendar connection status.","operationId":"get_connection_api_scheduling_connection_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"tags":["Scheduling","Scheduling"],"summary":"Disconnect Calendar","description":"Disconnect the active calendar connection.","operationId":"disconnect_calendar_api_scheduling_connection_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/scheduling/connection/google/session":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Start Google Calendar Session","description":"An Anaella connect link for Google Calendar. When the active Google connection lost\nits grant, the link re-authorises that same channel instead of adding another.","operationId":"start_google_calendar_session_api_scheduling_connection_google_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/scheduling/connection/google/sync":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Sync Google Calendar Connection","description":"After the connect link: keep the first returned channel that is this business's (the\nchannel's name is the Google account), make it the org's one active calendar connection\n(re-activating its row on a reconnect) and retire any other.","operationId":"sync_google_calendar_connection_api_scheduling_connection_google_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCalendarSyncRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/connection/calendly":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Start Calendly Oauth","description":"Start Calendly OAuth flow.","operationId":"start_calendly_oauth_api_scheduling_connection_calendly_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/scheduling/connection/calendly/callback":{"get":{"tags":["Scheduling","Scheduling"],"summary":"Calendly Oauth Callback","description":"Calendly OAuth callback.","operationId":"calendly_oauth_callback_api_scheduling_connection_calendly_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/connection/calcom/event-types":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Calcom Event Types","description":"List the Cal.com account's event types so the connect UI can offer a\npicker (a free-text event-type id is easy to leave blank → bookings no-op).","operationId":"calcom_event_types_api_scheduling_connection_calcom_event_types_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalComEventTypesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/connection/calcom":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Connect Calcom","description":"Connect Cal.com using API key (no OAuth). Requires an event type id; the\naccount label is fetched for display.","operationId":"connect_calcom_api_scheduling_connection_calcom_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalComConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/types/sync":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Sync Types","description":"Refresh the appointment types from Cal.com: throttled when the owner opens\nScheduling, immediate for \"Refresh from Cal.com\" (force=true).","operationId":"sync_types_api_scheduling_types_sync_post","parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/types":{"get":{"tags":["Scheduling","Scheduling"],"summary":"List Types","description":"List appointment types for the organization.","operationId":"list_types_api_scheduling_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Scheduling","Scheduling"],"summary":"Create Type","description":"Create a new appointment type. Not while Cal.com is connected: Cal.com can only\nbook its own event types, so new types are made there and synced in.","operationId":"create_type_api_scheduling_types_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentTypeCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/types/suggestions":{"get":{"tags":["Scheduling","Scheduling"],"summary":"List Type Suggestions","description":"The appointment types proposed from the website (or the defaults for the business\ntype), until the owner confirms or dismisses them. Empty with types or Cal.com.","operationId":"list_type_suggestions_api_scheduling_types_suggestions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/scheduling/types/suggestions/confirm":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Confirm Type Suggestions","description":"Create the types the owner kept and close the card. The only path from a\nproposal to a live type.","operationId":"confirm_type_suggestions_api_scheduling_types_suggestions_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionsConfirm"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/types/suggestions/dismiss":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Dismiss Type Suggestions","description":"Close the card without creating anything.","operationId":"dismiss_type_suggestions_api_scheduling_types_suggestions_dismiss_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/scheduling/types/{type_id}":{"put":{"tags":["Scheduling","Scheduling"],"summary":"Update Type","description":"Update an appointment type.","operationId":"update_type_api_scheduling_types__type_id__put","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Scheduling","Scheduling"],"summary":"Delete Type","description":"Soft-delete an appointment type.","operationId":"delete_type_api_scheduling_types__type_id__delete","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/appointments":{"get":{"tags":["Scheduling","Scheduling"],"summary":"List Appointments","description":"List appointments for the organization: a page of the list (newest first), or,\nwith `span`, every appointment overlapping a week or a day of the calendar, laid\nout in the business's time zone (the one its texts and calls use).","operationId":"list_appointments_api_scheduling_appointments_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},{"name":"span","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span"}},{"name":"week_start","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Week Start"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/appointments/{appointment_id}":{"get":{"tags":["Scheduling","Scheduling"],"summary":"Get Appointment","description":"Get a single appointment.","operationId":"get_appointment_api_scheduling_appointments__appointment_id__get","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/check-availability":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Check Availability Endpoint","description":"Check calendar availability (used by worker during calls).","operationId":"check_availability_endpoint_api_scheduling_check_availability_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAvailabilityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/book":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Book Endpoint","description":"Book an appointment (used by worker during calls).\n\nAlso public: an owner's API key or dashboard session books here too. Only the\nserver's own pipeline (X-Internal-Key) speaks for a customer channel; anything else\nis the owner's own booking, recorded as channel \"api\" and never billed.","operationId":"book_endpoint_api_scheduling_book_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduling/manage":{"post":{"tags":["Scheduling","Scheduling"],"summary":"Manage Endpoint","description":"Reschedule, cancel, or update an appointment (used by worker during calls).","operationId":"manage_endpoint_api_scheduling_manage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/meetings":{"get":{"tags":["Meetings","Meetings"],"summary":"List Meetings","description":"List meetings with filtering and pagination.","operationId":"list_meetings_api_meetings_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/meetings/bots":{"post":{"tags":["Meetings","Meetings"],"summary":"Dispatch Bot","description":"Send a live transcription bot into a meeting link (Google Meet / Zoom).\n\nCreates a PENDING meeting; the poller retrieves the transcript once the bot\nleaves. Idempotent per link — re-dispatch only after a FAILED attempt.","operationId":"dispatch_bot_api_meetings_bots_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotDispatch"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/meetings/{meeting_id}":{"get":{"tags":["Meetings","Meetings"],"summary":"Get Meeting","operationId":"get_meeting_api_meetings__meeting_id__get","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Meeting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/meetings/{meeting_id}/reprocess":{"post":{"tags":["Meetings","Meetings"],"summary":"Reprocess Meeting","operationId":"reprocess_meeting_api_meetings__meeting_id__reprocess_post","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Meeting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Activity":{"properties":{"activity_type":{"$ref":"#/components/schemas/ActivityType"},"description":{"type":"string","title":"Description","default":""},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"participant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Participant Id"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"transcription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription"},"language_detected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language Detected"},"id":{"type":"string","format":"uuid","title":"Id"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"service_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Request Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["activity_type","id","created_at"],"title":"Activity","description":"Schema for activity response — lenient overrides for dirty DB data."},"ActivityCreate":{"properties":{"activity_type":{"$ref":"#/components/schemas/ActivityType"},"description":{"type":"string","minLength":1,"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"participant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Participant Id"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"transcription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription"},"language_detected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language Detected"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"service_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Request Id"}},"type":"object","required":["activity_type","description"],"title":"ActivityCreate","description":"Schema for creating an activity."},"ActivityList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Activity"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"ActivityList","description":"Activity list response schema."},"ActivityType":{"type":"string","enum":["call_started","call_ended","service_request_created","sms_sent","sms_send_failed","web_chat","whatsapp_received","whatsapp_sent","whatsapp_send_failed","sms_received","email_sent","email_received","inquiry","lead_qualified","urgent_alert","contact_recognized","provider_notified","troubleshooting_completed","notification_sent","meeting_processed","team_action"],"title":"ActivityType"},"AppointmentTypeCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"duration_minutes":{"type":"integer","maximum":480.0,"minimum":5.0,"title":"Duration Minutes"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"recall_weeks":{"anyOf":[{"type":"integer","maximum":260.0,"minimum":1.0},{"type":"null"}],"title":"Recall Weeks"}},"type":"object","required":["name","duration_minutes"],"title":"AppointmentTypeCreate"},"AppointmentTypeUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"duration_minutes":{"anyOf":[{"type":"integer","maximum":480.0,"minimum":5.0},{"type":"null"}],"title":"Duration Minutes"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"recall_weeks":{"anyOf":[{"type":"integer","maximum":260.0,"minimum":1.0},{"type":"null"}],"title":"Recall Weeks"}},"type":"object","title":"AppointmentTypeUpdate"},"Body_bulk_upload_dnc_api_dnc_bulk_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV with phone_number,reason columns"}},"type":"object","required":["file"],"title":"Body_bulk_upload_dnc_api_dnc_bulk_post"},"Body_upload_contacts_api_campaigns__campaign_id__contacts_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_contacts_api_campaigns__campaign_id__contacts_upload_post"},"Body_upload_document_api_knowledge_base_sources_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"name":{"type":"string","title":"Name"}},"type":"object","required":["file","name"],"title":"Body_upload_document_api_knowledge_base_sources_upload_post"},"BookRequest":{"properties":{"slot":{"type":"string","minLength":1,"title":"Slot"},"appointment_type_id":{"type":"string","title":"Appointment Type Id"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"caller_name":{"type":"string","minLength":1,"title":"Caller Name"},"caller_phone":{"type":"string","minLength":1,"title":"Caller Phone"},"caller_email":{"type":"string","maxLength":255,"title":"Caller Email","default":""},"reason":{"type":"string","title":"Reason","default":""},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["slot","appointment_type_id","duration_minutes","caller_name","caller_phone"],"title":"BookRequest"},"BulkDeleteRequest":{"properties":{"ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Ids"}},"type":"object","required":["ids"],"title":"BulkDeleteRequest","description":"Request to delete multiple items by ID."},"CalComConnectRequest":{"properties":{"api_key":{"type":"string","minLength":1,"title":"Api Key"},"event_type_id":{"type":"string","minLength":1,"title":"Event Type Id"}},"type":"object","required":["api_key","event_type_id"],"title":"CalComConnectRequest"},"CalComEventTypesRequest":{"properties":{"api_key":{"type":"string","minLength":1,"title":"Api Key"}},"type":"object","required":["api_key"],"title":"CalComEventTypesRequest"},"CallInfo":{"properties":{"session_id":{"type":"string","title":"Session Id"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"caller_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Phone"},"caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Name"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"language_detected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language Detected"},"transcription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription"},"sentiment_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sentiment Score"},"sentiment_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentiment Label"},"call_purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Purpose"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"work_order_created":{"type":"boolean","title":"Work Order Created"},"lead_qualified":{"type":"boolean","title":"Lead Qualified"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},"type":"object","required":["session_id","start_time","end_time","duration_seconds","caller_phone","caller_name","contact_id","language_detected","transcription","sentiment_score","sentiment_label","call_purpose","outcome","recording_url","work_order_created","lead_qualified"],"title":"CallInfo","description":"Enhanced call information."},"CallerMemorySchema":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"summary_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Updated At"}},"type":"object","required":["phone_number"],"title":"CallerMemorySchema","description":"Rolling recall memory the voice agent keeps for a caller's phone."},"CallsList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallInfo"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"CallsList","description":"Calls list response."},"Campaign":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"instructions":{"type":"string","title":"Instructions"},"channel":{"type":"string","title":"Channel","default":"CALL"},"purpose":{"type":"string","title":"Purpose"},"status":{"type":"string","title":"Status"},"max_concurrent_calls":{"type":"integer","title":"Max Concurrent Calls"},"total_contacts":{"type":"integer","title":"Total Contacts"},"completed_contacts":{"type":"integer","title":"Completed Contacts"},"answered_contacts":{"type":"integer","title":"Answered Contacts"},"failed_contacts":{"type":"integer","title":"Failed Contacts"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"content_mode":{"type":"string","title":"Content Mode","default":"ai"},"dialed_by":{"type":"string","title":"Dialed By","default":"agent"},"email_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Subject"},"email_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Body"},"email_content_type":{"type":"string","title":"Email Content Type","default":"text"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"sent_count":{"type":"integer","title":"Sent Count","default":0},"delivered_count":{"type":"integer","title":"Delivered Count","default":0},"opened_count":{"type":"integer","title":"Opened Count","default":0},"clicked_count":{"type":"integer","title":"Clicked Count","default":0},"bounced_count":{"type":"integer","title":"Bounced Count","default":0},"unsubscribed_count":{"type":"integer","title":"Unsubscribed Count","default":0}},"type":"object","required":["id","name","instructions","purpose","status","max_concurrent_calls","total_contacts","completed_contacts","answered_contacts","failed_contacts","created_at","updated_at"],"title":"Campaign","description":"Outbound campaign response."},"CampaignContact":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"campaign_id":{"type":"string","format":"uuid","title":"Campaign Id"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"call_status":{"type":"string","title":"Call Status"},"call_attempts":{"type":"integer","title":"Call Attempts"},"contact_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Contact Metadata"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"call_duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Call Duration"},"call_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Outcome"},"call_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Summary"},"called_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Called At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"disposition_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Disposition Id"},"next_retry_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Retry At"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"current_step":{"type":"integer","title":"Current Step","default":1},"next_step_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Step At"},"stopped_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stopped Reason"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"last_opened_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Opened At"},"last_clicked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Clicked At"},"bounced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bounced At"}},"type":"object","required":["id","campaign_id","call_status","call_attempts","created_at","updated_at"],"title":"CampaignContact","description":"Campaign contact response."},"CampaignContactList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CampaignContact"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"CampaignContactList","description":"Paginated list of campaign contacts."},"CampaignCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"instructions":{"type":"string","minLength":1,"title":"Instructions"},"channel":{"type":"string","pattern":"^(CALL|SMS|EMAIL)$","title":"Channel","default":"CALL"},"purpose":{"type":"string","maxLength":100,"title":"Purpose","default":"general"},"max_concurrent_calls":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Max Concurrent Calls","default":2},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"contacts":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Contacts"},"max_attempts":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Attempts","default":1},"retry_policy":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Retry Policy"},"calling_hours":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Calling Hours"},"dnc_enabled":{"type":"boolean","title":"Dnc Enabled","default":true},"audience":{"type":"string","title":"Audience","default":"warm"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"default_timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Default Timezone"},"content_mode":{"type":"string","pattern":"^(ai|fixed)$","title":"Content Mode","default":"ai"},"email_subject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Email Subject"},"email_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Body"},"email_content_type":{"type":"string","pattern":"^(text|html)$","title":"Email Content Type","default":"text"},"language":{"anyOf":[{"type":"string","pattern":"^(en|fr|es)$"},{"type":"null"}],"title":"Language"},"dialed_by":{"type":"string","pattern":"^(agent|owner)$","title":"Dialed By","default":"agent"},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/CampaignStepCreate"},"type":"array"},{"type":"null"}],"title":"Steps"}},"type":"object","required":["name","instructions"],"title":"CampaignCreate","description":"Create an outbound campaign."},"CampaignList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Campaign"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"CampaignList","description":"Paginated list of campaigns."},"CampaignStep":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"campaign_id":{"type":"string","format":"uuid","title":"Campaign Id"},"step_order":{"type":"integer","title":"Step Order"},"content_mode":{"type":"string","title":"Content Mode"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"email_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Subject"},"email_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Body"},"email_content_type":{"type":"string","title":"Email Content Type","default":"text"},"delay_value":{"type":"integer","title":"Delay Value","default":0},"delay_unit":{"type":"string","title":"Delay Unit","default":"days"}},"type":"object","required":["id","campaign_id","step_order","content_mode"],"title":"CampaignStep","description":"Email sequence step (response)."},"CampaignStepCreate":{"properties":{"step_order":{"type":"integer","minimum":1.0,"title":"Step Order"},"content_mode":{"type":"string","pattern":"^(ai|fixed)$","title":"Content Mode","default":"ai"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"email_subject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Email Subject"},"email_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Body"},"email_content_type":{"type":"string","pattern":"^(text|html)$","title":"Email Content Type","default":"text"},"delay_value":{"type":"integer","minimum":0.0,"title":"Delay Value","default":0},"delay_unit":{"type":"string","pattern":"^(minutes|hours|days)$","title":"Delay Unit","default":"days"}},"type":"object","required":["step_order"],"title":"CampaignStepCreate","description":"One step in an email sequence (create/replace payload)."},"CampaignUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"purpose":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Purpose"},"max_concurrent_calls":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Max Concurrent Calls"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"max_attempts":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Max Attempts"},"retry_policy":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Retry Policy"},"calling_hours":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Calling Hours"},"dnc_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dnc Enabled"},"audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"default_timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Default Timezone"},"content_mode":{"anyOf":[{"type":"string","pattern":"^(ai|fixed)$"},{"type":"null"}],"title":"Content Mode"},"email_subject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Email Subject"},"email_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Body"},"email_content_type":{"anyOf":[{"type":"string","pattern":"^(text|html)$"},{"type":"null"}],"title":"Email Content Type"},"language":{"anyOf":[{"type":"string","pattern":"^(en|fr|es)$"},{"type":"null"}],"title":"Language"}},"type":"object","title":"CampaignUpdate","description":"Update an outbound campaign."},"CheckAvailabilityRequest":{"properties":{"date":{"type":"string","minLength":1,"title":"Date"},"appointment_type":{"type":"string","minLength":1,"title":"Appointment Type"}},"type":"object","required":["date","appointment_type"],"title":"CheckAvailabilityRequest"},"Contact":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name","default":""},"phone_number":{"type":"string","maxLength":32,"title":"Phone Number","default":""},"address":{"type":"string","maxLength":255,"title":"Address","default":""},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"emergency_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact"},"emergency_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Phone"},"preferred_language":{"type":"string","maxLength":10,"title":"Preferred Language","default":"en"},"status":{"$ref":"#/components/schemas/ContactStatus","default":"ACTIVE"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"monthly_charge_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Charge Cents"},"payment_due_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Due Day"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","created_at","updated_at"],"title":"Contact","description":"Schema for contact response — lenient overrides for dirty DB data.\n\nphone_number has NO regex pattern — we read whatever the DB has so\nsync/import workflows (HubSpot etc.) can surface contacts with\nshort international numbers instead of 500-ing the whole list."},"ContactCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"phone_number":{"type":"string","maxLength":32,"title":"Phone Number"},"address":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Contact Email"},"emergency_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact"},"emergency_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Phone"},"preferred_language":{"type":"string","maxLength":10,"title":"Preferred Language","default":"en"},"status":{"$ref":"#/components/schemas/ContactStatus","default":"ACTIVE"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"monthly_charge_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Charge Cents"},"payment_due_day":{"anyOf":[{"type":"integer","maximum":28.0,"minimum":1.0},{"type":"null"}],"title":"Payment Due Day"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","required":["name","phone_number"],"title":"ContactCreate","description":"Schema for creating a contact."},"ContactList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ContactRow"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"active_count":{"type":"integer","title":"Active Count"},"prospect_count":{"type":"integer","title":"Prospect Count","default":0},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","active_count","page","page_size","total_pages"],"title":"ContactList","description":"Contact list response schema."},"ContactRow":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name","default":""},"phone_number":{"type":"string","maxLength":32,"title":"Phone Number","default":""},"address":{"type":"string","maxLength":255,"title":"Address","default":""},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"emergency_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact"},"emergency_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Phone"},"preferred_language":{"type":"string","maxLength":10,"title":"Preferred Language","default":"en"},"status":{"$ref":"#/components/schemas/ContactStatus","default":"ACTIVE"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"monthly_charge_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Charge Cents"},"payment_due_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Due Day"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_contact_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Contact At"},"last_contact_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Contact Channel"},"billed_cents":{"type":"integer","title":"Billed Cents","default":0}},"type":"object","required":["id","created_at","updated_at"],"title":"ContactRow","description":"A contact as the Clients table shows it: the record plus when and how it was last in touch,\nand what has been charged to it."},"ContactStatus":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","PROSPECT"],"title":"ContactStatus"},"ContactUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"phone_number":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone Number"},"address":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Contact Email"},"emergency_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact"},"emergency_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Phone"},"preferred_language":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Preferred Language"},"status":{"anyOf":[{"$ref":"#/components/schemas/ContactStatus"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"monthly_charge_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Charge Cents"},"payment_due_day":{"anyOf":[{"type":"integer","maximum":28.0,"minimum":1.0},{"type":"null"}],"title":"Payment Due Day"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","title":"ContactUpdate","description":"Schema for updating a contact."},"ConversationCreate":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"channel":{"type":"string","title":"Channel","default":"sms"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"language":{"type":"string","title":"Language","default":"en"}},"type":"object","required":["phone_number"],"title":"ConversationCreate","description":"Schema for creating/updating conversations."},"ConversationMessage":{"properties":{"direction":{"type":"string","enum":["inbound","outbound"],"title":"Direction"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Preview"},"duration_seconds":{"type":"integer","title":"Duration Seconds","default":0}},"type":"object","required":["direction"],"title":"ConversationMessage","description":"Schema for logging conversation messages."},"ConversationSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"phone_number":{"type":"string","title":"Phone Number"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"channel":{"type":"string","title":"Channel"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"language":{"type":"string","title":"Language"},"total_messages":{"type":"integer","title":"Total Messages"},"last_interaction":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Interaction"},"conversation_state":{"additionalProperties":true,"type":"object","title":"Conversation State","default":{}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","phone_number","session_id","channel","contact_name","contact_id","language","total_messages","last_interaction","created_at","updated_at"],"title":"ConversationSchema","description":"Schema for conversation data."},"DNCCreate":{"properties":{"phone_number":{"type":"string","maxLength":20,"minLength":1,"title":"Phone Number"},"reason":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Reason"}},"type":"object","required":["phone_number"],"title":"DNCCreate"},"DashboardStats":{"properties":{"total_service_requests":{"type":"integer","title":"Total Service Requests","default":0},"pending_service_requests":{"type":"integer","title":"Pending Service Requests","default":0},"completed_service_requests":{"type":"integer","title":"Completed Service Requests","default":0},"total_contacts":{"type":"integer","title":"Total Contacts","default":0},"active_contacts":{"type":"integer","title":"Active Contacts","default":0},"total_calls_today":{"type":"integer","title":"Total Calls Today","default":0},"average_response_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Response Time"},"urgent_issues":{"type":"integer","title":"Urgent Issues","default":0},"active_listings":{"type":"integer","title":"Active Listings","default":0},"total_leads":{"type":"integer","title":"Total Leads","default":0},"total_emergencies":{"type":"integer","title":"Total Emergencies","default":0},"pending_emergencies":{"type":"integer","title":"Pending Emergencies","default":0}},"type":"object","title":"DashboardStats","description":"Dashboard statistics schema."},"DispatchCreate":{"properties":{"service_request_id":{"type":"string","format":"uuid","title":"Service Request Id"},"service_provider_id":{"type":"string","format":"uuid","title":"Service Provider Id"},"dispatch_location":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dispatch Location","description":"GPS coordinates and address"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["service_request_id","service_provider_id"],"title":"DispatchCreate","description":"Create an emergency dispatch."},"DispatchUpdate":{"properties":{"status":{"type":"string","pattern":"^(dispatched|en_route|arrived|in_progress|completed|cancelled)","title":"Status"},"arrived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Arrived At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["status"],"title":"DispatchUpdate","description":"Update dispatch status."},"DispositionCreate":{"properties":{"code":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Z0-9_]+$","title":"Code"},"label":{"type":"string","maxLength":128,"minLength":1,"title":"Label"},"is_positive":{"type":"boolean","title":"Is Positive","default":false},"ends_sequence":{"type":"boolean","title":"Ends Sequence","default":false},"triggers_dnc":{"type":"boolean","title":"Triggers Dnc","default":false},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["code","label"],"title":"DispositionCreate"},"DispositionUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Label"},"is_positive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Positive"},"ends_sequence":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ends Sequence"},"triggers_dnc":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Triggers Dnc"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"DispositionUpdate"},"DraftEmailRequest":{"properties":{"instructions":{"type":"string","title":"Instructions"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","required":["instructions"],"title":"DraftEmailRequest"},"EntityCallRequest":{"properties":{"entity_type":{"type":"string","title":"Entity Type","description":"Type: contact, service_provider, or lead"},"entity_id":{"type":"string","title":"Entity Id","description":"UUID of the entity to call"},"instructions":{"type":"string","minLength":1,"title":"Instructions"},"purpose":{"type":"string","maxLength":100,"title":"Purpose","default":"callback"}},"type":"object","required":["entity_type","entity_id","instructions"],"title":"EntityCallRequest","description":"Call an existing entity (contact, service provider, lead) from the CRM."},"EntitySendRequest":{"properties":{"channel":{"type":"string","pattern":"^(CALL|SMS|EMAIL)$","title":"Channel","default":"CALL"},"entity_type":{"type":"string","title":"Entity Type","description":"contact, service_provider, or lead"},"entity_id":{"type":"string","title":"Entity Id"},"instructions":{"type":"string","minLength":1,"title":"Instructions"},"purpose":{"type":"string","maxLength":100,"title":"Purpose","default":"callback"}},"type":"object","required":["entity_type","entity_id","instructions"],"title":"EntitySendRequest","description":"Send to an existing CRM entity on any channel."},"GoogleCalendarSyncRequest":{"properties":{"channel_ids":{"items":{"type":"string"},"type":"array","title":"Channel Ids"}},"type":"object","required":["channel_ids"],"title":"GoogleCalendarSyncRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthCheck":{"properties":{"status":{"type":"string","title":"Status"},"timestamp":{"type":"string","title":"Timestamp"},"version":{"type":"string","title":"Version"},"database":{"type":"string","title":"Database"},"services":{"additionalProperties":true,"type":"object","title":"Services"}},"type":"object","required":["status","timestamp","version","database","services"],"title":"HealthCheck","description":"Health check response schema."},"Lead":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name","default":""},"contact_info":{"type":"string","maxLength":255,"title":"Contact Info","default":""},"interest":{"type":"string","maxLength":255,"title":"Interest","default":""},"qualification_answers":{"additionalProperties":true,"type":"object","title":"Qualification Answers"},"email_sent":{"type":"boolean","title":"Email Sent","default":false},"email_recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Recipient"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"type":"string","maxLength":50,"title":"Status","default":"new"},"next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Step"},"next_step_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Step At"},"close_reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Close Reason"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["qualification_answers","id","created_at","updated_at"],"title":"Lead","description":"Schema for lead response — lenient overrides for dirty DB data."},"LeadCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"contact_info":{"type":"string","maxLength":255,"minLength":1,"title":"Contact Info"},"interest":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Interest"},"qualification_answers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qualification Answers"},"email_sent":{"type":"boolean","title":"Email Sent","default":false},"email_recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Recipient"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"type":"string","maxLength":50,"title":"Status","default":"new"},"next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Step"},"next_step_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Step At"},"close_reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Close Reason"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"source":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Source"},"trigger":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Trigger"}},"type":"object","required":["name","contact_info"],"title":"LeadCreate","description":"Schema for creating a lead."},"LeadList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Lead"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"},"status_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Status Counts","default":{}}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"LeadList","description":"Lead list response schema."},"LeadPipeline":{"properties":{"status_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Status Counts"},"days":{"type":"integer","title":"Days"},"won":{"type":"integer","title":"Won"},"lost":{"type":"integer","title":"Lost"},"lost_reasons":{"items":{"type":"string"},"type":"array","title":"Lost Reasons"},"recent_won":{"items":{"$ref":"#/components/schemas/Lead"},"type":"array","title":"Recent Won"}},"type":"object","required":["status_counts","days","won","lost","lost_reasons","recent_won"],"title":"LeadPipeline","description":"The Sales page's pipeline card and its list of customers to ask for a review."},"LeadUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"contact_info":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Contact Info"},"interest":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Interest"},"qualification_answers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qualification Answers"},"email_sent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Sent"},"email_recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Recipient"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Status"},"next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Step"},"next_step_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Step At"},"close_reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Close Reason"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","title":"LeadUpdate","description":"Schema for updating a lead."},"ManageRequest":{"properties":{"action":{"type":"string","pattern":"^(reschedule|cancel|update)$","title":"Action"},"caller_phone":{"type":"string","title":"Caller Phone","default":""},"caller_name":{"type":"string","title":"Caller Name","default":""},"new_slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Slot"},"new_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Phone"},"new_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Name"},"new_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Reason"}},"type":"object","required":["action"],"title":"ManageRequest"},"MeetingBotDispatch":{"properties":{"meeting_url":{"type":"string","title":"Meeting Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["meeting_url"],"title":"MeetingBotDispatch","description":"Send a live transcription bot into a meeting by its join link."},"MeetingDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"provider":{"type":"string","title":"Provider"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"transcript_status":{"type":"string","title":"Transcript Status"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"external_meeting_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Meeting Id"},"participants":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Participants"},"transcript_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Text"},"transcript_segments":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Transcript Segments"},"action_items":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Action Items"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","provider","transcript_status"],"title":"MeetingDetail"},"MeetingList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MeetingSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"MeetingList"},"MeetingSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"provider":{"type":"string","title":"Provider"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"transcript_status":{"type":"string","title":"Transcript Status"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["id","provider","transcript_status"],"title":"MeetingSummary"},"OnCallScheduleCreate":{"properties":{"service_provider_id":{"type":"string","format":"uuid","title":"Service Provider Id"},"start_time":{"type":"string","format":"date-time","title":"Start Time","description":"Start of on-call shift"},"end_time":{"type":"string","format":"date-time","title":"End Time","description":"End of on-call shift"},"is_emergency_only":{"type":"boolean","title":"Is Emergency Only","description":"True = only emergencies, False = all requests","default":true},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["service_provider_id","start_time","end_time"],"title":"OnCallScheduleCreate","description":"Create an on-call schedule."},"OnCallScheduleUpdate":{"properties":{"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"is_emergency_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Emergency Only"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"OnCallScheduleUpdate","description":"Update on-call schedule."},"QAPairRequest":{"properties":{"type":{"type":"string","title":"Type","default":"qa_pair"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"question":{"type":"string","minLength":1,"title":"Question"},"answer":{"type":"string","minLength":1,"title":"Answer"}},"type":"object","required":["name","question","answer"],"title":"QAPairRequest"},"QuickCallRequest":{"properties":{"phone_number":{"type":"string","maxLength":20,"minLength":5,"title":"Phone Number"},"contact_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Name"},"instructions":{"type":"string","minLength":1,"title":"Instructions"}},"type":"object","required":["phone_number","instructions"],"title":"QuickCallRequest","description":"Single outbound call request."},"QuickSendRequest":{"properties":{"channel":{"type":"string","pattern":"^(CALL|SMS|EMAIL)$","title":"Channel","default":"CALL"},"phone_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Phone Number"},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"contact_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Name"},"instructions":{"type":"string","minLength":1,"title":"Instructions"},"purpose":{"type":"string","maxLength":100,"title":"Purpose","default":"quick_send"}},"type":"object","required":["instructions"],"title":"QuickSendRequest","description":"Single outbound send on any channel."},"SMSList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SMSMessage"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"},"summary":{"additionalProperties":true,"type":"object","title":"Summary"}},"type":"object","required":["items","total","page","page_size","total_pages","summary"],"title":"SMSList","description":"SMS messages list response."},"SMSMessage":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"direction":{"type":"string","title":"Direction"},"from_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Phone"},"to_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Phone"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"language_detected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language Detected"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sent_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent By"},"voice":{"type":"boolean","title":"Voice","default":false},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Via"}},"type":"object","required":["id","direction","from_phone","to_phone","content","contact_name","contact_id","language_detected","created_at"],"title":"SMSMessage","description":"Individual SMS message info."},"SearchRequest":{"properties":{"query":{"type":"string","maxLength":1000,"minLength":1,"title":"Query"},"limit":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Limit","default":5}},"type":"object","required":["query"],"title":"SearchRequest"},"ServiceListing":{"properties":{"title":{"type":"string","maxLength":255,"title":"Title","default":""},"category":{"type":"string","maxLength":100,"title":"Category","default":""},"description":{"type":"string","title":"Description","default":""},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price"},"price_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Unit"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"features":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Features"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"},"photos":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Photos"},"is_available":{"type":"boolean","title":"Is Available","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","created_at","updated_at"],"title":"ServiceListing","description":"Schema for service listing response — lenient overrides for dirty DB data."},"ServiceListingCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"category":{"type":"string","maxLength":100,"minLength":1,"title":"Category"},"description":{"type":"string","minLength":1,"title":"Description"},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price"},"price_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Unit"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"features":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Features"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"},"photos":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Photos"},"is_available":{"type":"boolean","title":"Is Available","default":true}},"type":"object","required":["title","category","description"],"title":"ServiceListingCreate","description":"Schema for creating a service listing."},"ServiceListingList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ServiceListing"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"ServiceListingList","description":"Service listing list response schema."},"ServiceListingUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"category":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Category"},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Description"},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price"},"price_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Unit"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"features":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Features"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"},"photos":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Photos"},"is_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Available"}},"type":"object","title":"ServiceListingUpdate","description":"Schema for updating a service listing."},"ServiceProvider":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name","default":""},"phone_number":{"type":"string","pattern":"^(\\+?1?\\d{9,15})?$","title":"Phone Number","default":""},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"company_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Name"},"specialty":{"type":"string","maxLength":100,"title":"Specialty","default":""},"hourly_rate":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Hourly Rate"},"status":{"$ref":"#/components/schemas/ServiceProviderStatus","default":"ACTIVE"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","created_at","updated_at"],"title":"ServiceProvider","description":"Schema for service provider response — lenient overrides for dirty DB data."},"ServiceProviderCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"phone_number":{"type":"string","maxLength":32,"title":"Phone Number"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"company_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Name"},"specialty":{"type":"string","maxLength":100,"minLength":1,"title":"Specialty"},"hourly_rate":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Hourly Rate"},"status":{"$ref":"#/components/schemas/ServiceProviderStatus","default":"ACTIVE"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","phone_number","specialty"],"title":"ServiceProviderCreate","description":"Schema for creating a service provider."},"ServiceProviderList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ServiceProvider"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"ServiceProviderList","description":"Schema for service provider list response."},"ServiceProviderStatus":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING"],"title":"ServiceProviderStatus"},"ServiceProviderUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"phone_number":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone Number"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"company_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Name"},"specialty":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Specialty"},"hourly_rate":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Hourly Rate"},"status":{"anyOf":[{"$ref":"#/components/schemas/ServiceProviderStatus"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ServiceProviderUpdate","description":"Schema for updating a service provider."},"ServiceRequest":{"properties":{"address":{"type":"string","maxLength":255,"title":"Address","default":""},"contact_name":{"type":"string","maxLength":255,"title":"Contact Name","default":""},"category":{"type":"string","maxLength":100,"title":"Category","default":""},"priority":{"$ref":"#/components/schemas/ServiceRequestPriority","default":"MEDIUM"},"description":{"type":"string","title":"Description","default":""},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"media_attachments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Media Attachments"},"troubleshooting_steps":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Troubleshooting Steps"},"estimated_completion":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Estimated Completion"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"},"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/ServiceRequestStatus"},"cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost"},"resolution_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Summary"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Provider Id"},"provider":{"anyOf":[{"$ref":"#/components/schemas/ServiceProvider"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"is_emergency":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Emergency","default":false},"emergency_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Type"},"emergency_priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Emergency Priority"},"quote_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quote Amount Cents"},"quote_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote Status"},"diagnostic_fee_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Diagnostic Fee Cents"},"quote_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Quote Created At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","created_at","updated_at"],"title":"ServiceRequest","description":"Schema for service request response — lenient overrides for dirty DB data."},"ServiceRequestCreate":{"properties":{"address":{"type":"string","maxLength":255,"title":"Address","default":""},"contact_name":{"type":"string","maxLength":255,"minLength":1,"title":"Contact Name"},"category":{"type":"string","maxLength":100,"minLength":1,"title":"Category"},"priority":{"$ref":"#/components/schemas/ServiceRequestPriority","default":"MEDIUM"},"description":{"type":"string","minLength":1,"title":"Description"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"media_attachments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Media Attachments"},"troubleshooting_steps":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Troubleshooting Steps"},"estimated_completion":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Estimated Completion"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Provider Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"caller_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Phone"},"caller_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Email"}},"type":"object","required":["contact_name","category","description"],"title":"ServiceRequestCreate","description":"Schema for creating a service request."},"ServiceRequestPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"],"title":"ServiceRequestPriority"},"ServiceRequestStatus":{"type":"string","enum":["PENDING","IN_PROGRESS","COMPLETED","CANCELLED","ON_HOLD"],"title":"ServiceRequestStatus"},"ServiceRequestUpdate":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/ServiceRequestStatus"},{"type":"null"}]},"priority":{"anyOf":[{"$ref":"#/components/schemas/ServiceRequestPriority"},{"type":"null"}]},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Provider Id"},"cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"resolution_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Summary"},"estimated_completion":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Estimated Completion"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","title":"ServiceRequestUpdate","description":"Schema for updating a service request."},"SuggestionsConfirm":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AppointmentTypeCreate"},"type":"array","maxItems":20,"minItems":1,"title":"Items"}},"type":"object","required":["items"],"title":"SuggestionsConfirm","description":"The proposals the owner kept, as edited on the card."},"TechnicianAvailability":{"properties":{"start":{"type":"string","title":"Start","description":"Start time in HH:MM format"},"end":{"type":"string","title":"End","description":"End time in HH:MM format"},"available":{"type":"boolean","title":"Available","default":true}},"type":"object","required":["start","end"],"title":"TechnicianAvailability","description":"Weekly availability schedule."},"TechnicianCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"phone_number":{"type":"string","maxLength":50,"minLength":10,"title":"Phone Number"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"company_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Name"},"specialty":{"type":"string","maxLength":100,"minLength":1,"title":"Specialty"},"hourly_rate_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Hourly Rate Cents","description":"Hourly rate in cents"},"skills":{"items":{"$ref":"#/components/schemas/TechnicianSkill"},"type":"array","title":"Skills","description":"List of skills"},"availability":{"additionalProperties":{"$ref":"#/components/schemas/TechnicianAvailability"},"type":"object","title":"Availability","description":"Weekly availability: {monday: {start, end}, ...}"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","phone_number","specialty"],"title":"TechnicianCreate","description":"Create a new technician/service provider."},"TechnicianLocation":{"properties":{"lat":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat","description":"Latitude"},"lng":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lng","description":"Longitude"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["lat","lng"],"title":"TechnicianLocation","description":"Current GPS location for dispatch."},"TechnicianSkill":{"properties":{"skill":{"type":"string","title":"Skill","description":"Skill name (e.g., plumbing, hvac, electrical)"},"level":{"type":"string","title":"Level","description":"Skill level: beginner, intermediate, expert, master","default":"intermediate"},"certifications":{"items":{"type":"string"},"type":"array","title":"Certifications","description":"List of certifications"}},"type":"object","required":["skill"],"title":"TechnicianSkill","description":"Individual skill with certification level."},"TechnicianUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"phone_number":{"anyOf":[{"type":"string","maxLength":50,"minLength":10},{"type":"null"}],"title":"Phone Number"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"company_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Name"},"specialty":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Specialty"},"hourly_rate_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Hourly Rate Cents"},"skills":{"anyOf":[{"items":{"$ref":"#/components/schemas/TechnicianSkill"},"type":"array"},{"type":"null"}],"title":"Skills"},"availability":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/TechnicianAvailability"},"type":"object"},{"type":"null"}],"title":"Availability"},"current_location":{"anyOf":[{"$ref":"#/components/schemas/TechnicianLocation"},{"type":"null"}]},"is_on_call":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is On Call"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"anyOf":[{"type":"string","pattern":"^(ACTIVE|INACTIVE|PENDING)$"},{"type":"null"}],"title":"Status"}},"type":"object","title":"TechnicianUpdate","description":"Update technician information."},"UpdateQARequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"raw_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Text"}},"type":"object","title":"UpdateQARequest"},"UrgentAlertCreate":{"properties":{"location":{"type":"string","title":"Location"},"alert_type":{"type":"string","enum":["fire","gas_leak","burst_pipe","flooding","no_heat","electrical_hazard","medical_emergency","security_issue","other"],"title":"Alert Type"},"response_actions":{"additionalProperties":true,"type":"object","title":"Response Actions","default":{}},"contact_notified":{"type":"boolean","title":"Contact Notified","default":true},"emergency_services_called":{"type":"boolean","title":"Emergency Services Called","default":false},"call_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Call Timestamp"},"resolution_status":{"type":"string","title":"Resolution Status","default":"pending"},"follow_up_required":{"type":"boolean","title":"Follow Up Required","default":true},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"}},"type":"object","required":["location","alert_type"],"title":"UrgentAlertCreate","description":"Schema for creating urgent alerts."},"UrgentAlertList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UrgentAlertSchema"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"UrgentAlertList","description":"Urgent alert list response schema."},"UrgentAlertSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"location":{"type":"string","title":"Location"},"alert_type":{"type":"string","title":"Alert Type"},"response_actions":{"additionalProperties":true,"type":"object","title":"Response Actions"},"contact_notified":{"type":"boolean","title":"Contact Notified"},"emergency_services_called":{"type":"boolean","title":"Emergency Services Called"},"call_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Call Timestamp"},"resolution_status":{"type":"string","title":"Resolution Status"},"follow_up_required":{"type":"boolean","title":"Follow Up Required"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","location","alert_type","response_actions","contact_notified","emergency_services_called","call_timestamp","resolution_status","follow_up_required","notes","contact_id","created_at","updated_at"],"title":"UrgentAlertSchema","description":"Schema for urgent alerts."},"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"},"WebsiteRequest":{"properties":{"type":{"type":"string","title":"Type","default":"website"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"source_url":{"type":"string","minLength":1,"title":"Source Url"}},"type":"object","required":["name","source_url"],"title":"WebsiteRequest"},"_DispositionAssign":{"properties":{"disposition_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Disposition Id"},"disposition_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disposition Code"}},"type":"object","title":"_DispositionAssign","description":"Either disposition_id (UUID) or disposition_code (string) is required."}}}}