{"openapi":"3.1.0","info":{"title":"SkyConnect","description":"CRM and connection system for SkySuite","version":"0.1.0"},"paths":{"/connect/":{"get":{"tags":["Pages"],"summary":"Dashboard Page","operationId":"dashboard_page_connect__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/contacts":{"get":{"tags":["Pages"],"summary":"Contacts Page","operationId":"contacts_page_connect_contacts_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/prospects":{"get":{"tags":["Pages"],"summary":"Prospects Page","description":"Prospects = the contacts table filtered to lifecycle_stage='prospect'.\nThe contacts table IS the prospects list — no separate prospects table.","operationId":"prospects_page_connect_prospects_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/outreach":{"get":{"tags":["Pages"],"summary":"Outreach Page","description":"Outreach: Lead-Gen search + the working list of prospects (one page).\n\nRenders discovery.html with outreach_view=True; the template adds a\nsecond pane below the search results for the user's working list of\npending prospects (Contacts where lifecycle_stage='prospect' OR has\nopen lead-stage Deal). Per the restructure synthesis, this is where\nthe user lives between lead-gen searches and getting to a real Deal.","operationId":"outreach_page_connect_outreach_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/clients":{"get":{"tags":["Pages"],"summary":"Clients Page","description":"Clients = Contacts whose computed lifecycle_stage='customer' (has won deal).\n\nRenders contacts.html with client_view=True; the template applies a\n'won-deal' filter and relabels the page as Clients. Repeat-pitch /\nupsell flows live here.","operationId":"clients_page_connect_clients_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/contractors":{"get":{"tags":["Pages"],"summary":"Contractors Page","description":"Contractors = Contacts whose contact_type is contractor (people you PAY).\n\nSame contacts table as Clients, filtered by type. The detail page breaks\nout to the contractor profile (W-9 / 1099 / pay / crew). See\nfeedback_crm_contact_noun_model.","operationId":"contractors_page_connect_contractors_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/contacts/new":{"get":{"tags":["Pages"],"summary":"Contact New Page","operationId":"contact_new_page_connect_contacts_new_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/contacts/{contact_id}":{"get":{"tags":["Pages"],"summary":"Contact Detail Page","operationId":"contact_detail_page_connect_contacts__contact_id__get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/duplicates":{"get":{"tags":["Pages"],"summary":"Duplicates Page","operationId":"duplicates_page_connect_duplicates_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/companies":{"get":{"tags":["Pages"],"summary":"Companies Page","operationId":"companies_page_connect_companies_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/companies/{company_id}":{"get":{"tags":["Pages"],"summary":"Company Detail Page","operationId":"company_detail_page_connect_companies__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/pipeline":{"get":{"tags":["Pages"],"summary":"Pipeline Redirect","operationId":"pipeline_redirect_connect_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/deals":{"get":{"tags":["Pages"],"summary":"Deals Page","operationId":"deals_page_connect_deals_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/deals/{deal_id}":{"get":{"tags":["Pages"],"summary":"Deal Detail Page","operationId":"deal_detail_page_connect_deals__deal_id__get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/tasks":{"get":{"tags":["Pages"],"summary":"Tasks Page","operationId":"tasks_page_connect_tasks_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/meetings":{"get":{"tags":["Pages"],"summary":"Meetings Page","operationId":"meetings_page_connect_meetings_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/documents":{"get":{"tags":["Pages"],"summary":"Documents Page","operationId":"documents_page_connect_documents_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/automations":{"get":{"tags":["Pages"],"summary":"Automations Page","operationId":"automations_page_connect_automations_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/reports":{"get":{"tags":["Pages"],"summary":"Reports Page","operationId":"reports_page_connect_reports_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/reports/pipeline":{"get":{"tags":["Pages"],"summary":"Pipeline Report Page","operationId":"pipeline_report_page_connect_reports_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/reports/activities":{"get":{"tags":["Pages"],"summary":"Activity Report Page","operationId":"activity_report_page_connect_reports_activities_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/reports/forecast":{"get":{"tags":["Pages"],"summary":"Forecast Report Page","operationId":"forecast_report_page_connect_reports_forecast_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/reports/analytics":{"get":{"tags":["Pages"],"summary":"Analytics Page","operationId":"analytics_page_connect_reports_analytics_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/reports/email-analytics":{"get":{"tags":["Pages"],"summary":"Email Analytics Page","operationId":"email_analytics_page_connect_reports_email_analytics_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/directory":{"get":{"tags":["Pages"],"summary":"Directory Page","operationId":"directory_page_connect_directory_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/connections":{"get":{"tags":["Pages"],"summary":"Connections Page","operationId":"connections_page_connect_connections_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/connections/{connection_id}":{"get":{"tags":["Pages"],"summary":"Connection Detail Page","operationId":"connection_detail_page_connect_connections__connection_id__get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/requests":{"get":{"tags":["Pages"],"summary":"Requests Page","operationId":"requests_page_connect_requests_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/request/new":{"get":{"tags":["Pages"],"summary":"Request New Page","operationId":"request_new_page_connect_request_new_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/tags":{"get":{"tags":["Pages"],"summary":"Tags Page","operationId":"tags_page_connect_tags_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/web-forms":{"get":{"tags":["Pages"],"summary":"Web Forms Page","operationId":"web_forms_page_connect_web_forms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings":{"get":{"tags":["Pages"],"summary":"Settings Index Page","description":"Settings landing page — categorised tiles linking to every\n/connect/settings/* sub-page plus the admin-y pages that don't\nsit under /settings/* but logically belong here (api-keys,\nintegrations, audit trail, etc.).\n\nServer-rendered so the page is indexable and works without JS;\na small inline filter narrows the tile grid as the user types.","operationId":"settings_index_page_connect_settings_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/custom-fields":{"get":{"tags":["Pages"],"summary":"Custom Fields Admin Page","operationId":"custom_fields_admin_page_connect_settings_custom_fields_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/sequences":{"get":{"tags":["Pages"],"summary":"Sequences Page","operationId":"sequences_page_connect_sequences_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/reports/builder":{"get":{"tags":["Pages"],"summary":"Report Builder Page","operationId":"report_builder_page_connect_reports_builder_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/webhooks":{"get":{"tags":["Pages"],"summary":"Webhooks Settings Page","operationId":"webhooks_settings_page_connect_settings_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/activity-feed":{"get":{"tags":["Pages"],"summary":"Activity Feed Page","operationId":"activity_feed_page_connect_activity_feed_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/audit-trail":{"get":{"tags":["Pages"],"summary":"Audit Trail Page","operationId":"audit_trail_page_connect_audit_trail_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/assignment-rules":{"get":{"tags":["Pages"],"summary":"Assignment Rules Page","operationId":"assignment_rules_page_connect_settings_assignment_rules_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/roles":{"get":{"tags":["Pages"],"summary":"Roles Settings Page","operationId":"roles_settings_page_connect_settings_roles_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/validation":{"get":{"tags":["Pages"],"summary":"Validation Settings Page","operationId":"validation_settings_page_connect_settings_validation_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/trash":{"get":{"tags":["Pages"],"summary":"Trash Page","operationId":"trash_page_connect_trash_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/import":{"get":{"tags":["Pages"],"summary":"Import Data Page","operationId":"import_data_page_connect_import_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/api-docs":{"get":{"tags":["Pages"],"summary":"Api Docs Page","operationId":"api_docs_page_connect_api_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/api-keys":{"get":{"tags":["Pages"],"summary":"Api Keys Page","operationId":"api_keys_page_connect_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/quote-templates":{"get":{"tags":["Pages"],"summary":"Quote Templates Page","operationId":"quote_templates_page_connect_settings_quote_templates_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/exchange-rates":{"get":{"tags":["Pages"],"summary":"Exchange Rates Page","operationId":"exchange_rates_page_connect_settings_exchange_rates_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/notification-channels":{"get":{"tags":["Pages"],"summary":"Notification Channels Page","operationId":"notification_channels_page_connect_settings_notification_channels_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/visibility":{"get":{"tags":["Pages"],"summary":"Visibility Settings Page","operationId":"visibility_settings_page_connect_settings_visibility_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/integrations":{"get":{"tags":["Pages"],"summary":"Integrations Page","operationId":"integrations_page_connect_integrations_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/settings/email-domains":{"get":{"tags":["Pages"],"summary":"Email Domain Settings Page","operationId":"email_domain_settings_page_connect_settings_email_domains_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/admin/email-providers":{"get":{"tags":["Pages"],"summary":"Email Providers Admin Page","operationId":"email_providers_admin_page_connect_admin_email_providers_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/auto-responders":{"get":{"tags":["Pages"],"summary":"Auto Responders Page","operationId":"auto_responders_page_connect_auto_responders_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/sms-templates":{"get":{"tags":["Pages"],"summary":"Sms Templates Page","operationId":"sms_templates_page_connect_sms_templates_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/booking-links":{"get":{"tags":["Pages"],"summary":"Booking Links Page","operationId":"booking_links_page_connect_booking_links_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/quotas":{"get":{"tags":["Pages"],"summary":"Quotas Page","operationId":"quotas_page_connect_quotas_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/products":{"get":{"tags":["Pages"],"summary":"Products Page","operationId":"products_page_connect_products_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/territories":{"get":{"tags":["Pages"],"summary":"Territories Page","operationId":"territories_page_connect_territories_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/contracts":{"get":{"tags":["Pages"],"summary":"Contracts Page","description":"Contracts list — shows both native and line-migrated contracts.","operationId":"contracts_page_connect_contracts_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/contracts/{contract_id}":{"get":{"tags":["Pages"],"summary":"Contract Detail Page","description":"Contract detail — view + edit + lifecycle actions (send / sign /\nvoid / record-payment). The page is a thin JS client for\n/connect/api/contracts/{id}; all business logic lives in the API.","operationId":"contract_detail_page_connect_contracts__contract_id__get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/quotes":{"get":{"tags":["Pages"],"summary":"Quotes Page","description":"Quotes list page — sales proposals with line items, lifecycle,\nand the accept-→-spawn-contract flow. Server-rendered shell;\n/connect/api/quotes powers the data.","operationId":"quotes_page_connect_quotes_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/quotes/new":{"get":{"tags":["Pages"],"summary":"Quote New Page","description":"Editor for a brand-new quote — empty draft, line item builder.","operationId":"quote_new_page_connect_quotes_new_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/quotes/how-pricing-works":{"get":{"tags":["Pages"],"summary":"Quote Pricing Help Page","description":"Plain-English reference for every industry, formula, hazard, addon.","operationId":"quote_pricing_help_page_connect_quotes_how_pricing_works_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/quotes/{quote_id}":{"get":{"tags":["Pages"],"summary":"Quote Detail Page","operationId":"quote_detail_page_connect_quotes__quote_id__get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/quotes/{quote_id}/edit":{"get":{"tags":["Pages"],"summary":"Quote Edit Page","operationId":"quote_edit_page_connect_quotes__quote_id__edit_get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/quotes/{quote_id}/accept":{"get":{"tags":["Pages"],"summary":"Quote Accept Page","description":"Public hosted accept page — no JWT required (token is the\ncredential). Mirrors contract_sign.html. Renders a friendly\n\"no longer valid\" view if the token is missing or wrong.","operationId":"quote_accept_page_connect_quotes__quote_id__accept_get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}},{"name":"accept_token","in":"query","required":false,"schema":{"type":"string","default":"","title":"Accept Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/contracts/{contract_id}/sign":{"get":{"tags":["Pages"],"summary":"Contract Sign Page","description":"Public hosted signing page (QA finding #4).\n\nNo JWT required — the access grant is the ``sign_token`` query\nparam, validated against the contract row in the public API\nendpoint ``GET /connect/api/contracts/{id}/public``. The page is\na thin JS client; the user fetches the contract by token,\nreviews the body, types their name, and POSTs to\n``/connect/api/contracts/{id}/sign?sign_token=...``.\n\nIf the token is missing or invalid the page renders a friendly\n\"this signing link is no longer valid\" state — we never echo the\nraw 404 to the signer.","operationId":"contract_sign_page_connect_contracts__contract_id__sign_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}},{"name":"sign_token","in":"query","required":false,"schema":{"type":"string","default":"","title":"Sign Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/contract-templates":{"get":{"tags":["Pages"],"summary":"Contract Templates Page","description":"Contract templates list — used to spawn new contracts with\npre-filled body + deliverables.","operationId":"contract_templates_page_connect_contract_templates_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/admin/permission-config":{"get":{"tags":["Pages"],"summary":"Permission Config Page","operationId":"permission_config_page_connect_admin_permission_config_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/ai-receptionist":{"get":{"tags":["Pages"],"summary":"Ai Receptionist Page","operationId":"ai_receptionist_page_connect_ai_receptionist_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/book/{slug}":{"get":{"tags":["Pages"],"summary":"Public Booking Page","description":"Public-facing booking page — no authentication required.","operationId":"public_booking_page_connect_book__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/discovery":{"get":{"tags":["Pages"],"summary":"Discovery Page","operationId":"discovery_page_connect_discovery_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/equipment":{"get":{"tags":["Pages"],"summary":"Equipment Page","operationId":"equipment_page_connect_equipment_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/api/scopes":{"get":{"tags":["Connections"],"summary":"List Available Scopes","description":"List all available data scopes that can be requested.","operationId":"list_available_scopes_connect_api_scopes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/request":{"post":{"tags":["Connections"],"summary":"Create Connection Request","description":"Send a connection request to another org.","operationId":"create_connection_request_connect_api_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/requests/incoming":{"get":{"tags":["Connections"],"summary":"List Incoming Requests","description":"List pending connection requests TO current org.","operationId":"list_incoming_requests_connect_api_requests_incoming_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/requests/outgoing":{"get":{"tags":["Connections"],"summary":"List Outgoing Requests","description":"List pending requests FROM current org.","operationId":"list_outgoing_requests_connect_api_requests_outgoing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/requests/{connection_id}/respond":{"post":{"tags":["Connections"],"summary":"Respond To Request","description":"Approve or decline a connection request per scope.","operationId":"respond_to_request_connect_api_requests__connection_id__respond_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionRespond"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/{connection_id}/revoke":{"post":{"tags":["Connections"],"summary":"Revoke Connection","description":"Revoke an active connection (either side can do this).","operationId":"revoke_connection_connect_api__connection_id__revoke_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/{connection_id}/scopes/update":{"post":{"tags":["Connections"],"summary":"Update Scopes","description":"Update individual scope statuses after initial approval. Only the target org can do this.","operationId":"update_scopes_connect_api__connection_id__scopes_update_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/connections":{"get":{"tags":["Connections"],"summary":"List Connections","description":"List all connections for current org (both as requester and target).","operationId":"list_connections_connect_api_connections_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"active","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/connections/{connection_id}":{"get":{"tags":["Connections"],"summary":"Get Connection","description":"Get connection detail with approved scopes.","operationId":"get_connection_connect_api_connections__connection_id__get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/connections/{connection_id}/shared-data":{"get":{"tags":["Connections"],"summary":"Get Shared Data","description":"Get the actual shared profile data based on approved scopes.\nCalls sky-accounts to get fresh profile data for the connected org's owner,\nthen filters to only approved fields.","operationId":"get_shared_data_connect_api_connections__connection_id__shared_data_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/{connection_id}/notes":{"get":{"tags":["CRM"],"summary":"List Notes","description":"List notes for this connection (own org's notes only).","operationId":"list_notes_connect_api__connection_id__notes_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["CRM"],"summary":"Create Note","description":"Create a CRM note on a connection.","operationId":"create_note_connect_api__connection_id__notes_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notes/{note_id}":{"put":{"tags":["CRM"],"summary":"Update Note","description":"Update a CRM note.","operationId":"update_note_connect_api_notes__note_id__put","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["CRM"],"summary":"Delete Note","description":"Delete a CRM note.","operationId":"delete_note_connect_api_notes__note_id__delete","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/tags":{"get":{"tags":["CRM"],"summary":"List Tags","description":"List org's CRM tags.","operationId":"list_tags_connect_api_tags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["CRM"],"summary":"Create Tag","description":"Create a CRM tag.","operationId":"create_tag_connect_api_tags_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/tags/{tag_id}":{"put":{"tags":["CRM"],"summary":"Update Tag","description":"Update a CRM tag.","operationId":"update_tag_connect_api_tags__tag_id__put","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","title":"Tag Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["CRM"],"summary":"Delete Tag","description":"Delete a CRM tag (also removes all assignments).","operationId":"delete_tag_connect_api_tags__tag_id__delete","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","title":"Tag Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/{connection_id}/tags/{tag_id}":{"post":{"tags":["CRM"],"summary":"Assign Tag","description":"Assign a tag to a connection.","operationId":"assign_tag_connect_api__connection_id__tags__tag_id__post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","title":"Tag Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["CRM"],"summary":"Remove Tag","description":"Remove a tag from a connection.","operationId":"remove_tag_connect_api__connection_id__tags__tag_id__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","title":"Tag Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/{connection_id}/custom-fields":{"get":{"tags":["CRM"],"summary":"List Custom Fields","description":"List custom fields for a connection (own org's fields only).","operationId":"list_custom_fields_connect_api__connection_id__custom_fields_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["CRM"],"summary":"Create Or Update Custom Field","description":"Create or update a custom field on a connection.","operationId":"create_or_update_custom_field_connect_api__connection_id__custom_fields_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__connect__CustomFieldCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/custom-fields/{field_id}":{"delete":{"tags":["CRM"],"summary":"Delete Custom Field","description":"Delete a custom field.","operationId":"delete_custom_field_connect_api_custom_fields__field_id__delete","parameters":[{"name":"field_id","in":"path","required":true,"schema":{"type":"integer","title":"Field Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/directory":{"get":{"tags":["Directory"],"summary":"List Directory","description":"Unified view of all connections for current org with tags,\nlatest notes, and approved scopes. Supports search and tag filter.","operationId":"list_directory_connect_api_directory_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or email in shared data","title":"Search"},"description":"Search by name or email in shared data"},{"name":"tag_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by tag ID","title":"Tag Id"},"description":"Filter by tag ID"},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/directory/{connection_id}":{"get":{"tags":["Directory"],"summary":"Get Directory Entry","description":"Full contact card: shared data + CRM overlay (notes, tags, custom fields).","operationId":"get_directory_entry_connect_api_directory__connection_id__get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/connection-exists":{"get":{"summary":"Connection Exists","description":"Check if two orgs have an active connection. Used by sky-jobs to verify parties.","operationId":"connection_exists_api_internal_connection_exists_get","parameters":[{"name":"org_a","in":"query","required":true,"schema":{"type":"integer","title":"Org A"}},{"name":"org_b","in":"query","required":true,"schema":{"type":"integer","title":"Org B"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/org-connections/{org_id}":{"get":{"summary":"Get Org Connections","description":"List all active connection IDs for an org. Used by other services.","operationId":"get_org_connections_api_internal_org_connections__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/internal/seed-org":{"post":{"summary":"Seed Org","description":"Seed default CRM data (deal stages + roles) for a new org.\nCalled by sky-orgs after org creation. Idempotent.\nIf owner_user_id is provided, assigns them to the Admin role.","operationId":"seed_org_connect_api_internal_seed_org_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedOrgRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/internal/contacts/search":{"get":{"summary":"Internal Search Contacts","description":"Search contacts for typeahead/dropdown in ledger UI.\nUsed by sky-ledger for vendor/client dropdowns.","operationId":"internal_search_contacts_connect_api_internal_contacts_search_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"integer","title":"Org Id"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"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"}}}}}}},"/connect/api/internal/contacts/find-or-create":{"post":{"summary":"Internal Find Or Create Contact","description":"Find a contact by email within an org, or create one. Lets any module\n(Survey portal, Deliver, etc.) keep ONE canonical Connect contact instead of\nforking clients into its own silo. Localhost-only.","operationId":"internal_find_or_create_contact_connect_api_internal_contacts_find_or_create_post","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"integer","title":"Org Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Name"}},{"name":"company","in":"query","required":false,"schema":{"type":"string","default":"","title":"Company"}},{"name":"phone","in":"query","required":false,"schema":{"type":"string","default":"","title":"Phone"}},{"name":"lead_source","in":"query","required":false,"schema":{"type":"string","default":"portal","title":"Lead Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/internal/contacts/{contact_id}":{"get":{"summary":"Internal Get Contact","description":"Fetch a single contact with billing fields, addresses, emails, phones.\nUsed by sky-ledger for contact lookups.","operationId":"internal_get_contact_connect_api_internal_contacts__contact_id__get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/internal/contacts/batch":{"post":{"summary":"Internal Batch Contacts","description":"Batch-resolve contact IDs to names/billing info.\nUsed by sky-ledger list views.","operationId":"internal_batch_contacts_connect_api_internal_contacts_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/internal/equipment":{"get":{"summary":"Internal Equipment","description":"Canonical equipment + capability profile for a user (localhost-only).\n\nTHE equipment read for other modules (pilot cockpit, federal, survey,\njobs). sky_connect.equipment is the canonical store; this seam keeps every\nconsumer reading the same inventory the web Equipment page writes to.","operationId":"internal_equipment_connect_api_internal_equipment_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/_internal/events/job.status_changed":{"post":{"tags":["internal-events"],"summary":"On Job Status Changed","description":"Dispatch SMS/email notifications when a job status changes.","operationId":"on_job_status_changed__internal_events_job_status_changed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/calendar.weather_advisory":{"post":{"tags":["internal-events"],"summary":"On Weather Advisory","description":"Send weather advisory SMS to client when bad conditions detected.","operationId":"on_weather_advisory__internal_events_calendar_weather_advisory_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/calendar.booking_confirmed_sms":{"post":{"tags":["internal-events"],"summary":"On Booking Confirmed Sms","description":"Send SMS confirmation when a booking is confirmed.","operationId":"on_booking_confirmed_sms__internal_events_calendar_booking_confirmed_sms_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/calendar.reminder":{"post":{"tags":["internal-events"],"summary":"On Calendar Reminder","description":"Send 24-hour reminder SMS before a booking.","operationId":"on_calendar_reminder__internal_events_calendar_reminder_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/job.rebooking_nudge":{"post":{"tags":["internal-events"],"summary":"On Rebooking Nudge","description":"Send re-engagement SMS nudge for past clients.","operationId":"on_rebooking_nudge__internal_events_job_rebooking_nudge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/job.weather_advisory":{"post":{"tags":["internal-events"],"summary":"On Job Weather Advisory","description":"Send weather advisory SMS from jobs service.","operationId":"on_job_weather_advisory__internal_events_job_weather_advisory_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/booking.created":{"post":{"tags":["internal-events"],"summary":"Handle Booking Created","description":"Upsert a Contact and log a ``booking`` activity on its timeline.","operationId":"handle_booking_created__internal_events_booking_created_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/booking.cancelled":{"post":{"tags":["internal-events"],"summary":"Handle Booking Cancelled","description":"Mark the booking's activity row as cancelled.","operationId":"handle_booking_cancelled__internal_events_booking_cancelled_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/flight_plan.approved":{"post":{"tags":["internal-events"],"summary":"Handle Flight Plan Approved","description":"Caster's LAANC said yes — record an org-level activity.\n\nConnect doesn't have a hard link from a CasterFlightPlan to a\nContact/Deal (we'd need a per-org rule for \"match LAANC to job\"\nthat we don't have today). So we write an org-level activity\nthat surfaces in the activity feed and is searchable by FAA\nreference number — operators can manually link it to a deal\nlater if needed.","operationId":"handle_flight_plan_approved__internal_events_flight_plan_approved_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/survey.project_completed":{"post":{"tags":["internal-events"],"summary":"Handle Survey Project Completed","description":"A photogrammetry project finished processing — log activity.\n\nTries to attach the activity to a contact by matching the survey\nproject's owning user_id to a Connect contact via email (looked\nup in the user cache). If no match, creates an org-level activity.","operationId":"handle_survey_project_completed__internal_events_survey_project_completed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/blog.post_published":{"post":{"tags":["internal-events"],"summary":"Handle Blog Post Published","description":"A blog article was published — log an org-level activity.\n\nBlog posts aren't tied to a specific contact (it's a marketing\npublish event), so the activity is created at org level. The\ndescription includes the platform URL so operators can click\nthrough.","operationId":"handle_blog_post_published__internal_events_blog_post_published_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/plan.file_downloaded":{"post":{"tags":["internal-events"],"summary":"Handle Plan File Downloaded","description":"A flight plan was downloaded — log a prep activity at org level.\n\nThe plan service is stateless; downloads are the strongest signal\nwe have that \"the pilot is about to take this in the field\".","operationId":"handle_plan_file_downloaded__internal_events_plan_file_downloaded_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/skyscout.job_found":{"post":{"tags":["internal-events"],"summary":"Handle Skyscout Job Found","description":"A new job appeared (via SkyScout scraper) — record as a Lead activity.\n\nFor this iteration we don't auto-create Contacts/Deals (the\nskyscout side has no operator info to populate them with). We\ncreate a stand-alone Activity in the org-level feed so the team\ncan decide whether to convert it into a Deal manually.","operationId":"handle_skyscout_job_found__internal_events_skyscout_job_found_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.pin_updated":{"post":{"tags":["internal-events"],"summary":"Handle Track Pin Updated","description":"A pin in a track project was created/updated — log org activity.","operationId":"handle_track_pin_updated__internal_events_track_pin_updated_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.qc_failed":{"post":{"tags":["internal-events"],"summary":"Handle Track Qc Failed","description":"A pin was flagged red (QC issue) — log an alert activity.","operationId":"handle_track_qc_failed__internal_events_track_qc_failed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.photo_uploaded":{"post":{"tags":["internal-events"],"summary":"Handle Track Photo Uploaded","description":"First photo on a pin — strongest \"pole completed\" signal we\nhave short of the pilot flipping the pin to green.","operationId":"handle_track_photo_uploaded__internal_events_track_photo_uploaded_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.project_completed":{"post":{"tags":["internal-events"],"summary":"Handle Track Project Completed","description":"All pins on a track project are green — log completion activity.","operationId":"handle_track_project_completed__internal_events_track_project_completed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.qc_recorded":{"post":{"tags":["internal-events"],"summary":"Handle Track Qc Recorded","description":"A QC result was recorded for a project — log activity.","operationId":"handle_track_qc_recorded__internal_events_track_qc_recorded_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.project_assigned":{"post":{"tags":["internal-events"],"summary":"Handle Track Project Assigned","operationId":"handle_track_project_assigned__internal_events_track_project_assigned_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.project_transferred":{"post":{"tags":["internal-events"],"summary":"Handle Track Project Transferred","operationId":"handle_track_project_transferred__internal_events_track_project_transferred_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.project_renamed":{"post":{"tags":["internal-events"],"summary":"Handle Track Project Renamed","operationId":"handle_track_project_renamed__internal_events_track_project_renamed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.project_deleted":{"post":{"tags":["internal-events"],"summary":"Handle Track Project Deleted","operationId":"handle_track_project_deleted__internal_events_track_project_deleted_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/track.pilot_location":{"post":{"tags":["internal-events"],"summary":"Handle Track Pilot Location","description":"Receive a pilot position heartbeat from track-v2.\n\nThis is a high-volume topic (emitted every minute bucket per\npilot). We deliberately do NOT create an Activity row for each\none — the activity feed would drown in location chatter. Instead\nwe just ack the event via the idempotency shim so the outbox\nmarks it sent and the sender moves on.\n\nWhen a real pilot push channel exists it can subscribe too.","operationId":"handle_track_pilot_location__internal_events_track_pilot_location_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/gov.opportunity.matched":{"post":{"tags":["internal-events"],"summary":"Handle Gov Opportunity Matched","description":"A new government opportunity was matched to a saved search.","operationId":"handle_gov_opportunity_matched__internal_events_gov_opportunity_matched_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/gov.proposal.submitted":{"post":{"tags":["internal-events"],"summary":"Handle Gov Proposal Submitted","description":"A government contract proposal was submitted.","operationId":"handle_gov_proposal_submitted__internal_events_gov_proposal_submitted_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/gov.deadline.approaching":{"post":{"tags":["internal-events"],"summary":"Handle Gov Deadline Approaching","description":"A government contract deadline is approaching.","operationId":"handle_gov_deadline_approaching__internal_events_gov_deadline_approaching_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/ledger.dunning_activity":{"post":{"tags":["internal-events"],"summary":"Handle Dunning Activity","description":"A dunning action was taken on an overdue invoice — log CRM activity.\n\nCreates a timeline activity so the sales/support team can see that\na client has been contacted about an overdue invoice, and at what\nescalation level.","operationId":"handle_dunning_activity__internal_events_ledger_dunning_activity_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/ledger.escrow_held":{"post":{"tags":["internal-events"],"summary":"Handle Escrow Held","description":"Funds were placed in escrow for an invoice — log CRM activity.","operationId":"handle_escrow_held__internal_events_ledger_escrow_held_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/ledger.escrow_released":{"post":{"tags":["internal-events"],"summary":"Handle Escrow Released","description":"Escrowed funds were released to the payee — log CRM activity.","operationId":"handle_escrow_released__internal_events_ledger_escrow_released_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/_internal/events/ledger.escrow_refunded":{"post":{"tags":["internal-events"],"summary":"Handle Escrow Refunded","description":"Escrowed funds were refunded to the payer — log CRM activity.","operationId":"handle_escrow_refunded__internal_events_ledger_escrow_refunded_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/contract-templates":{"get":{"tags":["Contracts"],"summary":"List Contract Templates","description":"List contract templates for the current org. Filter by\n``?category=NDA`` if set.","operationId":"list_contract_templates_connect_api_contract_templates_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTemplateListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Contracts"],"summary":"Create Contract Template","operationId":"create_contract_template_connect_api_contract_templates_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTemplateCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contract-templates/{template_id}":{"get":{"tags":["Contracts"],"summary":"Get Contract Template","operationId":"get_contract_template_connect_api_contract_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Contracts"],"summary":"Update Contract Template","operationId":"update_contract_template_connect_api_contract_templates__template_id__put","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Contracts"],"summary":"Delete Contract Template","description":"Soft-delete — sets deleted_at. Existing contracts that reference\nthe template are unaffected because they store a snapshot of the\nbody, not a live join.","operationId":"delete_contract_template_connect_api_contract_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contracts":{"get":{"tags":["Contracts"],"summary":"List Contracts","operationId":"list_contracts_connect_api_contracts_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},{"name":"deal_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"title / contract_number search","title":"Q"},"description":"title / contract_number search"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Contracts"],"summary":"Create Contract","description":"Create a new contract in ``draft`` status.\n\nBody resolution precedence:\n  1. If ``template_id`` is set, render that template's body with\n     ``template_variables``\n  2. Else if ``body`` is set, use it verbatim\n  3. Else leave ``body`` null — the user fills it in later","operationId":"create_contract_connect_api_contracts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contracts/{contract_id}":{"get":{"tags":["Contracts"],"summary":"Get Contract","operationId":"get_contract_connect_api_contracts__contract_id__get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Contracts"],"summary":"Update Contract","description":"Partial update of editable fields.\n\nRejected states: cannot edit a ``signed`` or ``executed`` contract\n(those are legally bound and must use amendment chains instead).\nCannot edit a ``voided`` contract.","operationId":"update_contract_connect_api_contracts__contract_id__put","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Contracts"],"summary":"Delete Contract","description":"Soft-delete. Signed contracts CAN be soft-deleted (they remain\nin audit log / reports) but a user-facing UI should probably use\nvoid instead.","operationId":"delete_contract_connect_api_contracts__contract_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contracts/{contract_id}/send":{"post":{"tags":["Contracts"],"summary":"Send Contract","description":"Transition draft → sent.\n\nStamps ``sent_at``, regenerates ``sign_token`` so the signing URL\nis fresh each send (resend invalidates any old link), and emits\nan audit entry. Actual email delivery is left to connect's\nexisting email pipeline (``send_contract_email`` in the services\nlayer) — for this commit we just do the state transition +\naudit so the wiring is complete and the email piece can slot in\nlater without a schema change.","operationId":"send_contract_connect_api_contracts__contract_id__send_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contracts/{contract_id}/public":{"get":{"tags":["Contracts"],"summary":"Get Contract Public","description":"Public read of a contract via its signing token.\n\nUsed by the hosted signing page (``GET /connect/contracts/{id}/sign``)\nso the signer can review the body before clicking \"Sign\". No JWT\nrequired — the access grant is the token itself, which is a\nsingle-use 43-char URL-safe slug bound to this contract.\n\nReturns the same shape as the authenticated GET endpoint, minus\nthe ``sign_token`` field (which we strip out so a download of the\nJSON doesn't echo the credential the signer typed in their URL).","operationId":"get_contract_public_connect_api_contracts__contract_id__public_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}},{"name":"sign_token","in":"query","required":true,"schema":{"type":"string","description":"Signing token from the email link","title":"Sign Token"},"description":"Signing token from the email link"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contracts/{contract_id}/sign":{"post":{"tags":["Contracts"],"summary":"Sign Contract","description":"Sign a contract via its hosted signing page.\n\n**Not JWT-protected** — the access grant is the ``sign_token``\nitself, which was emailed to the signer. The token is a 43-char\nURL-safe random string, single-use (regenerated on send), and\nonly works for the exact contract it was issued for.\n\nUses the path param for the contract_id + the token query param\nso a leak of the contract_id alone is useless without the token.","operationId":"sign_contract_connect_api_contracts__contract_id__sign_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}},{"name":"sign_token","in":"query","required":true,"schema":{"type":"string","description":"Signing token from the email link","title":"Sign Token"},"description":"Signing token from the email link"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractSignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contracts/{contract_id}/void":{"post":{"tags":["Contracts"],"summary":"Void Contract","operationId":"void_contract_connect_api_contracts__contract_id__void_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractVoidRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contracts/{contract_id}/record-payment":{"post":{"tags":["Contracts"],"summary":"Record Contract Payment","description":"Record a manual payment against a contract.\n\nUpdates ``amount_paid`` and re-derives ``payment_status`` from\nthe total. Guards against over-payment (≤ total_amount). For\ncontracts linked to a ledger Invoice via the P4 loop, the\ncanonical payment state lives in ledger — this endpoint is for\nstandalone contracts where manual tracking is the source of truth.","operationId":"record_contract_payment_connect_api_contracts__contract_id__record_payment_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordPaymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contracts/{contract_id}/milestones":{"get":{"tags":["Contracts"],"summary":"List Milestones","operationId":"list_milestones_connect_api_contracts__contract_id__milestones_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneResponse"},"title":"Response List Milestones Connect Api Contracts  Contract Id  Milestones Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Contracts"],"summary":"Create Milestone","operationId":"create_milestone_connect_api_contracts__contract_id__milestones_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contracts/{contract_id}/milestones/{milestone_id}":{"put":{"tags":["Contracts"],"summary":"Update Milestone","operationId":"update_milestone_connect_api_contracts__contract_id__milestones__milestone_id__put","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}},{"name":"milestone_id","in":"path","required":true,"schema":{"type":"integer","title":"Milestone Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Contracts"],"summary":"Delete Milestone","operationId":"delete_milestone_connect_api_contracts__contract_id__milestones__milestone_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}},{"name":"milestone_id","in":"path","required":true,"schema":{"type":"integer","title":"Milestone Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts":{"get":{"tags":["Contacts"],"summary":"List Contacts","description":"List contacts with pagination and filters.","operationId":"list_contacts_connect_api_contacts_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"lifecycle_stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage"}},{"name":"funnel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Funnel group: prospect|lead|client (maps the 6 lifecycle stages)","title":"Funnel"},"description":"Funnel group: prospect|lead|client (maps the 6 lifecycle stages)"},{"name":"lead_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Alias for lead_source — convenience for ?source=discovery URLs","title":"Source"},"description":"Alias for lead_source — convenience for ?source=discovery URLs"},{"name":"owner_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"}},{"name":"contact_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"tag_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tag Id"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListResponse"}}}},"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_connect_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/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/search":{"get":{"tags":["Contacts"],"summary":"Search Contacts","description":"Full text search across contacts. Returns top 20 results.","operationId":"search_contacts_connect_api_contacts_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/import":{"post":{"tags":["Contacts"],"summary":"Import Contacts","description":"Import contacts from a CSV file. Expects headers: first_name, last_name, email, phone, job_title, department, company_name, lifecycle_stage, lead_source, lead_status, notes.","operationId":"import_contacts_connect_api_contacts_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_contacts_connect_api_contacts_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/export":{"get":{"tags":["Contacts"],"summary":"Export Contacts","description":"Export contacts for the current org as a CSV download, with optional filters.","operationId":"export_contacts_connect_api_contacts_export_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"lifecycle_stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage"}},{"name":"lead_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"}},{"name":"owner_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/trash":{"get":{"tags":["Contacts"],"summary":"List Trash Contacts","description":"List soft-deleted contacts for the current org.","operationId":"list_trash_contacts_connect_api_contacts_trash_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TrashContactResponse"},"type":"array","title":"Response List Trash Contacts Connect Api Contacts Trash Get"}}}}}}},"/connect/api/contacts/duplicates":{"get":{"tags":["Contacts"],"summary":"Find Duplicate Contacts","description":"Find potential duplicate contacts within the org.\nChecks for matching email addresses or identical first+last name pairs.\nExcludes dismissed pairs.","operationId":"find_duplicate_contacts_connect_api_contacts_duplicates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DuplicatePair"},"type":"array","title":"Response Find Duplicate Contacts Connect Api Contacts Duplicates Get"}}}}}}},"/connect/api/contacts/duplicates/count":{"get":{"tags":["Contacts"],"summary":"Count Duplicate Contacts","description":"Return count of duplicate pairs (for nav badge).","operationId":"count_duplicate_contacts_connect_api_contacts_duplicates_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/contacts/usage":{"get":{"tags":["Contacts"],"summary":"Get Contacts Usage","description":"Return current contact count, the user's plan, and the cap.\n\nUsed by the contacts list page to surface \"X of N contacts\" for\nplan-capped users and to disable the Add Contact button when at\nthe cap. ``limit`` is ``None`` for unlimited plans.","operationId":"get_contacts_usage_connect_api_contacts_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/contacts/duplicates/dismiss":{"post":{"tags":["Contacts"],"summary":"Dismiss Duplicate Pair","description":"Dismiss a duplicate pair so it no longer shows up.","operationId":"dismiss_duplicate_pair_connect_api_contacts_duplicates_dismiss_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/recalculate-scores":{"post":{"tags":["Contacts"],"summary":"Batch Recalculate Contact Scores","description":"Batch recalculate scores for all contacts in the org.","operationId":"batch_recalculate_contact_scores_connect_api_contacts_recalculate_scores_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/contacts/{contact_id}":{"get":{"tags":["Contacts"],"summary":"Get Contact","description":"Get contact detail including activity, deal, and task counts.","operationId":"get_contact_connect_api_contacts__contact_id__get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Contacts"],"summary":"Update Contact","description":"Update a contact. Only provided fields are updated.","operationId":"update_contact_connect_api_contacts__contact_id__put","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","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/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Contacts"],"summary":"Delete Contact","description":"Soft-delete a contact (set deleted_at).","operationId":"delete_contact_connect_api_contacts__contact_id__delete","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/restore":{"post":{"tags":["Contacts"],"summary":"Restore Contact","description":"Restore a soft-deleted contact.","operationId":"restore_contact_connect_api_contacts__contact_id__restore_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/tags":{"post":{"tags":["Contacts"],"summary":"Add Contact Tag","description":"Add a tag to a contact.","operationId":"add_contact_tag_connect_api_contacts__contact_id__tags_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTagBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/tags/{tag_id}":{"delete":{"tags":["Contacts"],"summary":"Remove Contact Tag","description":"Remove a tag from a contact.","operationId":"remove_contact_tag_connect_api_contacts__contact_id__tags__tag_id__delete","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","title":"Tag Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/merge":{"post":{"tags":["Contacts"],"summary":"Merge Contacts","description":"Merge another contact into this one. Moves all activities, deals, tasks,\nand tags from merge_from to the target contact, then soft-deletes merge_from.","operationId":"merge_contacts_connect_api_contacts__contact_id__merge_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMergeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/bulk-update":{"post":{"tags":["Contacts"],"summary":"Bulk Update Contacts","description":"Bulk update fields on multiple contacts.","operationId":"bulk_update_contacts_connect_api_contacts_bulk_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkContactUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/bulk-delete":{"post":{"tags":["Contacts"],"summary":"Bulk Delete Contacts","description":"Bulk soft-delete multiple contacts.","operationId":"bulk_delete_contacts_connect_api_contacts_bulk_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkContactDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/bulk-tag":{"post":{"tags":["Contacts"],"summary":"Bulk Tag Contacts","description":"Add a tag to multiple contacts at once.","operationId":"bulk_tag_contacts_connect_api_contacts_bulk_tag_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkContactTagRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/custom-fields":{"get":{"tags":["Contacts"],"summary":"List Contact Custom Fields","description":"List custom fields for a contact.","operationId":"list_contact_custom_fields_connect_api_contacts__contact_id__custom_fields_get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldResponse"},"title":"Response List Contact Custom Fields Connect Api Contacts  Contact Id  Custom Fields Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Contacts"],"summary":"Create Contact Custom Field","description":"Create or update a custom field for a contact.","operationId":"create_contact_custom_field_connect_api_contacts__contact_id__custom_fields_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__crm__CustomFieldCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/score":{"post":{"tags":["Contacts"],"summary":"Recalculate Contact Score","description":"Recalculate lead score for a single contact, returning score and factors.","operationId":"recalculate_contact_score_connect_api_contacts__contact_id__score_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/research":{"post":{"tags":["Contacts"],"summary":"Research Contact Company","description":"Run deep AI research (Claude + web search) on the contact's company.\n\nCaches the result on contact.ai_research for 7 days; pass ``force=true``\nto re-run sooner. Read-only with respect to the contact's other fields —\nthe user can copy verified phone/email/website from the returned panel\nrather than us silently overwriting their data.","operationId":"research_contact_company_connect_api_contacts__contact_id__research_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"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"}}}}}}},"/connect/api/twilio/click-to-call":{"post":{"tags":["twilio"],"summary":"Click To Call","description":"Initiate an outbound bridge: Twilio rings the pilot's phone, then\nwhen they answer, dials the contact and connects them.","operationId":"click_to_call_connect_api_twilio_click_to_call_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickToCallRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickToCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/twilio/twiml/dial":{"get":{"tags":["twilio"],"summary":"Twiml Dial","description":"TwiML callback — Twilio fetches this when the pilot answers. We return\nXML telling Twilio to dial the contact and bridge the two calls.","operationId":"twiml_dial_connect_api_twilio_twiml_dial_get","parameters":[{"name":"to","in":"query","required":true,"schema":{"type":"string","title":"To"}},{"name":"contact_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/twilio/status":{"get":{"tags":["twilio"],"summary":"Twilio Status","description":"Capability check used by the call modal to show/hide the click-to-call\nbutton. Reports the active provider (signalwire or twilio) and whether\nit has all the credentials needed for outbound dialing.","operationId":"twilio_status_connect_api_twilio_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/contacts/{contact_id}/onepager.pdf":{"get":{"tags":["onepager"],"summary":"Contact Onepager","operationId":"contact_onepager_connect_api_contacts__contact_id__onepager_pdf_get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/onepager/draft":{"get":{"tags":["onepager"],"summary":"Contact Onepager Draft","description":"Return the AI-generated proposal content for the edit modal.","operationId":"contact_onepager_draft_connect_api_contacts__contact_id__onepager_draft_get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/onepager/render":{"post":{"tags":["onepager"],"summary":"Contact Onepager Render","description":"Render a PDF from a (possibly user-edited) content dict.","operationId":"contact_onepager_render_connect_api_contacts__contact_id__onepager_render_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Content"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/companies":{"get":{"tags":["Companies"],"summary":"List Companies","description":"List companies with search, industry filter, and pagination.","operationId":"list_companies_connect_api_companies_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Companies"],"summary":"Create Company","description":"Create a new company.","operationId":"create_company_connect_api_companies_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/companies/trash":{"get":{"tags":["Companies"],"summary":"List Trash Companies","description":"List soft-deleted companies for the current org.","operationId":"list_trash_companies_connect_api_companies_trash_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TrashCompanyResponse"},"type":"array","title":"Response List Trash Companies Connect Api Companies Trash Get"}}}}}}},"/connect/api/companies/bulk-delete":{"post":{"tags":["Companies"],"summary":"Bulk Delete Companies","description":"Bulk soft-delete companies by IDs.","operationId":"bulk_delete_companies_connect_api_companies_bulk_delete_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/companies/export":{"get":{"tags":["Companies"],"summary":"Export Companies","description":"Export companies as CSV.","operationId":"export_companies_connect_api_companies_export_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/companies/{company_id}":{"get":{"tags":["Companies"],"summary":"Get Company","description":"Get company detail with contact count.","operationId":"get_company_connect_api_companies__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Companies"],"summary":"Update Company","description":"Update a company. Only provided fields are updated.","operationId":"update_company_connect_api_companies__company_id__put","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Companies"],"summary":"Delete Company","description":"Soft-delete a company.","operationId":"delete_company_connect_api_companies__company_id__delete","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/companies":{"get":{"tags":["Companies"],"summary":"List Contact Companies","description":"List the companies a contact is linked to (the contact_companies graph),\nprimary first. Powers the Contact -> Company back-link in the UI.","operationId":"list_contact_companies_connect_api_contacts__contact_id__companies_get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/companies/{company_id}":{"post":{"tags":["Companies"],"summary":"Link Contact Company","description":"Link a contact to a company.","operationId":"link_contact_company_connect_api_contacts__contact_id__companies__company_id__post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Companies"],"summary":"Unlink Contact Company","description":"Unlink a contact from a company.","operationId":"unlink_contact_company_connect_api_contacts__contact_id__companies__company_id__delete","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/companies/{company_id}/restore":{"post":{"tags":["Companies"],"summary":"Restore Company","description":"Restore a soft-deleted company.","operationId":"restore_company_connect_api_companies__company_id__restore_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/activity-feed":{"get":{"tags":["Activities"],"summary":"Activity Feed","description":"Org-wide activity stream showing all CRM activity.","operationId":"activity_feed_connect_api_activity_feed_get","parameters":[{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Per Page"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/activities":{"get":{"tags":["Activities"],"summary":"List Activities","description":"List activities with filters and pagination.","operationId":"list_activities_connect_api_activities_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},{"name":"deal_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"}},{"name":"activity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity Type"}},{"name":"created_by","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Activities"],"summary":"Create Activity","description":"Log an activity. If contact_id provided and type is call/email/meeting, update contact.last_contacted_at.","operationId":"create_activity_connect_api_activities_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/activities/{activity_id}":{"get":{"tags":["Activities"],"summary":"Get Activity","description":"Get activity detail.","operationId":"get_activity_connect_api_activities__activity_id__get","parameters":[{"name":"activity_id","in":"path","required":true,"schema":{"type":"integer","title":"Activity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Activities"],"summary":"Update Activity","description":"Update an activity. Only provided fields are updated.","operationId":"update_activity_connect_api_activities__activity_id__put","parameters":[{"name":"activity_id","in":"path","required":true,"schema":{"type":"integer","title":"Activity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Activities"],"summary":"Delete Activity","description":"Delete an activity (hard delete).","operationId":"delete_activity_connect_api_activities__activity_id__delete","parameters":[{"name":"activity_id","in":"path","required":true,"schema":{"type":"integer","title":"Activity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/activities/{activity_id}/pin":{"post":{"tags":["Activities"],"summary":"Toggle Pin","description":"Toggle the is_pinned flag on an activity.","operationId":"toggle_pin_connect_api_activities__activity_id__pin_post","parameters":[{"name":"activity_id","in":"path","required":true,"schema":{"type":"integer","title":"Activity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/timeline":{"get":{"tags":["Activities"],"summary":"Contact Timeline","description":"All activities for a contact, ordered by created_at DESC, paginated.","operationId":"contact_timeline_connect_api_contacts__contact_id__timeline_get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/timeline":{"get":{"tags":["Activities"],"summary":"Deal Timeline","description":"All activities for a deal, ordered by created_at DESC, paginated.","operationId":"deal_timeline_connect_api_deals__deal_id__timeline_get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/stages":{"get":{"tags":["Deals"],"summary":"List Deal Stages","description":"List all deal stages for the current org, optionally filtered by pipeline_id.","operationId":"list_deal_stages_connect_api_deals_stages_get","parameters":[{"name":"pipeline_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DealStageResponse"},"title":"Response List Deal Stages Connect Api Deals Stages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Deals"],"summary":"Create Deal Stage","description":"Create a custom deal stage.","operationId":"create_deal_stage_connect_api_deals_stages_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealStageCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealStageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/trash":{"get":{"tags":["Deals"],"summary":"List Trash Deals Early","description":"List soft-deleted deals for the current org.","operationId":"list_trash_deals_early_connect_api_deals_trash_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TrashDealResponse"},"type":"array","title":"Response List Trash Deals Early Connect Api Deals Trash Get"}}}}}}},"/connect/api/deals/recurring":{"get":{"tags":["Deals"],"summary":"List Recurring Deals","description":"List recurring deals with renewal info.","operationId":"list_recurring_deals_connect_api_deals_recurring_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/deals/mrr":{"get":{"tags":["Deals"],"summary":"Get Mrr Stats","description":"Return MRR/ARR stats and churn metrics for the org.","operationId":"get_mrr_stats_connect_api_deals_mrr_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/deals":{"get":{"tags":["Deals"],"summary":"List Deals","description":"List deals with filters and pagination.","operationId":"list_deals_connect_api_deals_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"stage_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stage Id"}},{"name":"owner_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"}},{"name":"amount_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Min"}},{"name":"amount_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Max"}},{"name":"close_date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Close Date From"}},{"name":"close_date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Close Date To"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Deals"],"summary":"Create Deal","description":"Create a new deal. Auto-records initial DealStageHistory entry.","operationId":"create_deal_connect_api_deals_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}":{"get":{"tags":["Deals"],"summary":"Get Deal","description":"Get deal detail with stage info and stage change history.","operationId":"get_deal_connect_api_deals__deal_id__get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Deals"],"summary":"Update Deal","description":"Update a deal. If stage_id changes, auto-record DealStageHistory with time_in_previous_stage_days.","operationId":"update_deal_connect_api_deals__deal_id__patch","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Deals"],"summary":"Update Deal","description":"Update a deal. If stage_id changes, auto-record DealStageHistory with time_in_previous_stage_days.","operationId":"update_deal_connect_api_deals__deal_id__put","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Deals"],"summary":"Delete Deal","description":"Soft-delete a deal.","operationId":"delete_deal_connect_api_deals__deal_id__delete","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/clone":{"post":{"tags":["Deals"],"summary":"Clone Deal","description":"Clone a deal: copies title, amount, line items, contacts, tags, custom fields.\nDoes NOT copy activities, stage history, or close dates.\nSets stage to pipeline's first stage.","operationId":"clone_deal_connect_api_deals__deal_id__clone_post","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/convert":{"post":{"tags":["Deals"],"summary":"Convert Deal To Job","description":"Convert a deal to a sky-jobs job. Idempotent: if job_id already set, return existing.\nCalls the sky-jobs internal API to create the job.","operationId":"convert_deal_to_job_connect_api_deals__deal_id__convert_post","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DealConvertRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/close":{"post":{"tags":["Deals"],"summary":"Close Deal","description":"Close a deal as Won or Lost. For Won, optionally creates a Customer Success deal.","operationId":"close_deal_connect_api_deals__deal_id__close_post","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealCloseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealCloseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/pipeline":{"get":{"tags":["Deals"],"summary":"Get Pipeline","description":"Get deals grouped by stage for a Kanban board view.\nIf pipeline_id is provided, only return stages/deals for that pipeline.\nOtherwise, return the default pipeline.","operationId":"get_pipeline_connect_api_pipeline_get","parameters":[{"name":"pipeline_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/stages/{stage_id}":{"put":{"tags":["Deals"],"summary":"Update Deal Stage","description":"Update a deal stage.","operationId":"update_deal_stage_connect_api_deals_stages__stage_id__put","parameters":[{"name":"stage_id","in":"path","required":true,"schema":{"type":"integer","title":"Stage Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealStageUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealStageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Deals"],"summary":"Delete Deal Stage","description":"Delete a deal stage. Fails if any deals are currently in this stage.","operationId":"delete_deal_stage_connect_api_deals_stages__stage_id__delete","parameters":[{"name":"stage_id","in":"path","required":true,"schema":{"type":"integer","title":"Stage Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/history":{"get":{"tags":["Deals"],"summary":"Get Deal History","description":"Get the stage change history for a deal.","operationId":"get_deal_history_connect_api_deals__deal_id__history_get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DealStageHistoryResponse"},"title":"Response Get Deal History Connect Api Deals  Deal Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/restore":{"post":{"tags":["Deals"],"summary":"Restore Deal","description":"Restore a soft-deleted deal.","operationId":"restore_deal_connect_api_deals__deal_id__restore_post","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/bulk-stage":{"post":{"tags":["Deals"],"summary":"Bulk Change Deal Stage","description":"Move multiple deals to a new stage at once.","operationId":"bulk_change_deal_stage_connect_api_deals_bulk_stage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDealStageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/tasks":{"get":{"tags":["Tasks"],"summary":"List Tasks","description":"List tasks with filters and pagination.\nstatus: 'open' (completed_at IS NULL), 'completed' (completed_at IS NOT NULL),\n'overdue' (completed_at IS NULL AND due_date < today).\nassigned_to: 'me' for current user, or an integer user ID.","operationId":"list_tasks_connect_api_tasks_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},{"name":"deal_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"}},{"name":"due_date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date From"}},{"name":"due_date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Tasks"],"summary":"Create Task","description":"Create a new task.","operationId":"create_task_connect_api_tasks_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/tasks/today":{"get":{"tags":["Tasks"],"summary":"Tasks Today","description":"Tasks due today assigned to the current user that are not completed.","operationId":"tasks_today_connect_api_tasks_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TaskResponse"},"type":"array","title":"Response Tasks Today Connect Api Tasks Today Get"}}}}}}},"/connect/api/tasks/overdue":{"get":{"tags":["Tasks"],"summary":"Overdue Tasks","description":"Overdue tasks (due_date < today, not completed) for the current org.","operationId":"overdue_tasks_connect_api_tasks_overdue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TaskResponse"},"type":"array","title":"Response Overdue Tasks Connect Api Tasks Overdue Get"}}}}}}},"/connect/api/tasks/{task_id}":{"get":{"tags":["Tasks"],"summary":"Get Task","description":"Get task detail.","operationId":"get_task_connect_api_tasks__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Tasks"],"summary":"Update Task","description":"Update a task. Only provided fields are updated.","operationId":"update_task_connect_api_tasks__task_id__put","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tasks"],"summary":"Delete Task","description":"Delete a task (hard delete).","operationId":"delete_task_connect_api_tasks__task_id__delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/tasks/{task_id}/complete":{"post":{"tags":["Tasks"],"summary":"Complete Task","description":"Mark a task as completed. Sets completed_at and completed_by_user_id.\nAlso creates an Activity record (type=task_completed) on the linked contact if any.","operationId":"complete_task_connect_api_tasks__task_id__complete_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/reports/pipeline":{"get":{"tags":["Reports"],"summary":"Pipeline Report","description":"Pipeline value by stage: stage name, deal count, total value, avg value.\nPlus win rate (won / (won + lost)) and avg days to close.","operationId":"pipeline_report_connect_api_reports_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineReport"}}}}}}},"/connect/api/reports/activities":{"get":{"tags":["Reports"],"summary":"Activity Report","description":"Activity counts by type and by user for a date range.","operationId":"activity_report_connect_api_reports_activities_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/reports/contacts":{"get":{"tags":["Reports"],"summary":"Contacts Report","description":"Total contacts, new this month, contacts by lifecycle stage, contacts by lead source.","operationId":"contacts_report_connect_api_reports_contacts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsReport"}}}}}}},"/connect/api/reports/forecast":{"get":{"tags":["Reports"],"summary":"Forecast Report","description":"Returns monthly forecast data.\nFor each month (current month + next N months):\n- Total pipeline value (all open deals expected to close that month)\n- Weighted forecast (amount * probability for each deal)\n- By forecast_category breakdown","operationId":"forecast_report_connect_api_reports_forecast_get","parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":6,"title":"Months"}},{"name":"pipeline_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/reports/analytics":{"get":{"tags":["Reports"],"summary":"Sales Analytics","description":"Sales activity analytics for the given time period.\nReturns activities by user, activities by day, avg response time,\ndeal velocity, and conversion rates.","operationId":"sales_analytics_connect_api_reports_analytics_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"}}}}}}},"/connect/api/reports/pipeline/export":{"get":{"tags":["Reports"],"summary":"Export Pipeline Csv","description":"Export the pipeline report as CSV.","operationId":"export_pipeline_csv_connect_api_reports_pipeline_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/reports/activities/export":{"get":{"tags":["Reports"],"summary":"Export Activities Csv","description":"Export the activity report as CSV.","operationId":"export_activities_csv_connect_api_reports_activities_export_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/reports/pipeline/flow":{"get":{"tags":["Reports"],"summary":"Pipeline Flow","description":"Build Sankey diagram data: nodes (stages + Won/Lost) and links (transitions).\nReturns avg days in each stage, drop-off percentage, conversion rates.","operationId":"pipeline_flow_connect_api_reports_pipeline_flow_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/reports/email-analytics":{"get":{"tags":["Reports"],"summary":"Email Analytics","description":"Aggregate email analytics from Activity records.","operationId":"email_analytics_connect_api_reports_email_analytics_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"}}}}}}},"/connect/api/search":{"get":{"tags":["Search"],"summary":"Global Search","description":"Search across contacts (name, email, company), companies (name, domain),\ndeals (title), and tasks (title). Returns max 5 of each type, or 10 if\nfiltered to a single type.","operationId":"global_search_connect_api_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(contact|company|deal|task)$"},{"type":"null"}],"title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-templates":{"get":{"tags":["Email Templates"],"summary":"List Email Templates","description":"List email templates for the current org.","operationId":"list_email_templates_connect_api_email_templates_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateResponse"},"title":"Response List Email Templates Connect Api Email Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Email Templates"],"summary":"Create Email Template","description":"Create a new email template.","operationId":"create_email_template_connect_api_email_templates_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-templates/{template_id}":{"get":{"tags":["Email Templates"],"summary":"Get Email Template","description":"Get email template detail with variable preview.","operationId":"get_email_template_connect_api_email_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Email Templates"],"summary":"Update Email Template","description":"Update an email template.","operationId":"update_email_template_connect_api_email_templates__template_id__put","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Email Templates"],"summary":"Delete Email Template","description":"Delete an email template.","operationId":"delete_email_template_connect_api_email_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-templates/{template_id}/render":{"post":{"tags":["Email Templates"],"summary":"Render Email Template","description":"Render an email template by substituting contact data for variables.","operationId":"render_email_template_connect_api_email_templates__template_id__render_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateRenderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateRenderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/audit-logs":{"get":{"tags":["Audit Logs"],"summary":"List Audit Logs","description":"List audit logs with optional filters.","operationId":"list_audit_logs_connect_api_audit_logs_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Per Page"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entity Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/saved-filters":{"get":{"tags":["Saved Filters"],"summary":"List Saved Filters","description":"List saved filters for current user + shared ones for the given entity type.","operationId":"list_saved_filters_connect_api_saved_filters_get","parameters":[{"name":"entity_type","in":"query","required":true,"schema":{"type":"string","description":"Entity type: contacts, companies, deals, tasks","title":"Entity Type"},"description":"Entity type: contacts, companies, deals, tasks"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SavedFilterResponse"},"title":"Response List Saved Filters Connect Api Saved Filters Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Saved Filters"],"summary":"Create Saved Filter","description":"Create a new saved filter / view.","operationId":"create_saved_filter_connect_api_saved_filters_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/saved-filters/{filter_id}":{"put":{"tags":["Saved Filters"],"summary":"Update Saved Filter","description":"Update a saved filter. Only the owner can update.","operationId":"update_saved_filter_connect_api_saved_filters__filter_id__put","parameters":[{"name":"filter_id","in":"path","required":true,"schema":{"type":"integer","title":"Filter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Saved Filters"],"summary":"Delete Saved Filter","description":"Delete a saved filter. Only the owner can delete.","operationId":"delete_saved_filter_connect_api_saved_filters__filter_id__delete","parameters":[{"name":"filter_id","in":"path","required":true,"schema":{"type":"integer","title":"Filter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/saved-filters/{filter_id}/results":{"get":{"tags":["Saved Filters"],"summary":"Apply Saved Filter","description":"Apply a saved filter and return filtered results.","operationId":"apply_saved_filter_connect_api_saved_filters__filter_id__results_get","parameters":[{"name":"filter_id","in":"path","required":true,"schema":{"type":"integer","title":"Filter Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/meetings":{"get":{"tags":["Meetings"],"summary":"List Meetings","description":"List meetings with filters and pagination. Default: upcoming meetings ordered by start_at ASC.","operationId":"list_meetings_connect_api_meetings_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},{"name":"deal_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"meeting_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Meetings"],"summary":"Create Meeting","description":"Schedule a new meeting.","operationId":"create_meeting_connect_api_meetings_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/meetings/upcoming":{"get":{"tags":["Meetings"],"summary":"Upcoming Meetings","description":"Next 10 meetings for current user.","operationId":"upcoming_meetings_connect_api_meetings_upcoming_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MeetingResponse"},"type":"array","title":"Response Upcoming Meetings Connect Api Meetings Upcoming Get"}}}}}}},"/connect/api/meetings/{meeting_id}/ics":{"get":{"tags":["Meetings"],"summary":"Download Meeting Ics","description":"Download a .ics calendar invite for a meeting.","operationId":"download_meeting_ics_connect_api_meetings__meeting_id__ics_get","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"integer","title":"Meeting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/meetings/feed.ics":{"get":{"tags":["Meetings"],"summary":"Meetings Ics Feed","description":"Subscribable ICS calendar feed of all upcoming meetings.","operationId":"meetings_ics_feed_connect_api_meetings_feed_ics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/meetings/{meeting_id}/send-invite":{"post":{"tags":["Meetings"],"summary":"Send Meeting Invite","description":"Send a calendar invite email to the meeting's contact.","operationId":"send_meeting_invite_connect_api_meetings__meeting_id__send_invite_post","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"integer","title":"Meeting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/meetings/{meeting_id}":{"get":{"tags":["Meetings"],"summary":"Get Meeting","description":"Get meeting detail.","operationId":"get_meeting_connect_api_meetings__meeting_id__get","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"integer","title":"Meeting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Meetings"],"summary":"Update Meeting","description":"Update a meeting. Only provided fields are updated.","operationId":"update_meeting_connect_api_meetings__meeting_id__put","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"integer","title":"Meeting Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Meetings"],"summary":"Delete Meeting","description":"Cancel a meeting (set status=cancelled).","operationId":"delete_meeting_connect_api_meetings__meeting_id__delete","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"integer","title":"Meeting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/meetings/{meeting_id}/complete":{"post":{"tags":["Meetings"],"summary":"Complete Meeting","description":"Mark a meeting as completed. Auto-creates an Activity record.","operationId":"complete_meeting_connect_api_meetings__meeting_id__complete_post","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"integer","title":"Meeting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/meetings/{meeting_id}/no-show":{"post":{"tags":["Meetings"],"summary":"No Show Meeting","description":"Mark a meeting as no-show. Auto-creates an Activity record with outcome=no_show.","operationId":"no_show_meeting_connect_api_meetings__meeting_id__no_show_post","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"integer","title":"Meeting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/meetings/{meeting_id}/reschedule":{"post":{"tags":["Meetings"],"summary":"Reschedule Meeting","description":"Reschedule a meeting. Updates times and creates an Activity with outcome=rescheduled.","operationId":"reschedule_meeting_connect_api_meetings__meeting_id__reschedule_post","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"integer","title":"Meeting Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingRescheduleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/meetings/{meeting_id}/attendees/{attendee_id}/rsvp":{"post":{"tags":["Meetings"],"summary":"Rsvp Attendee","description":"Update the RSVP status of a meeting attendee.","operationId":"rsvp_attendee_connect_api_meetings__meeting_id__attendees__attendee_id__rsvp_post","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"integer","title":"Meeting Id"}},{"name":"attendee_id","in":"path","required":true,"schema":{"type":"integer","title":"Attendee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RsvpBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/documents":{"get":{"tags":["Documents"],"summary":"List Documents","description":"List documents with filters and pagination.","operationId":"list_documents_connect_api_documents_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"document_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},{"name":"deal_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Documents"],"summary":"Create Document","description":"Create a document record.","operationId":"create_document_connect_api_documents_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/documents/{document_id}":{"get":{"tags":["Documents"],"summary":"Get Document","description":"Get document detail.","operationId":"get_document_connect_api_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Documents"],"summary":"Update Document","description":"Update a document. Only provided fields are updated.","operationId":"update_document_connect_api_documents__document_id__put","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Documents"],"summary":"Delete Document","description":"Delete a document (hard delete).","operationId":"delete_document_connect_api_documents__document_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/documents/{document_id}/send":{"post":{"tags":["Documents"],"summary":"Send Document","description":"Mark a document as sent. Creates an Activity on linked contact.","operationId":"send_document_connect_api_documents__document_id__send_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/documents/{document_id}/mark-viewed":{"post":{"tags":["Documents"],"summary":"Mark Document Viewed","description":"Mark a document as viewed.","operationId":"mark_document_viewed_connect_api_documents__document_id__mark_viewed_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/documents/{document_id}/mark-signed":{"post":{"tags":["Documents"],"summary":"Mark Document Signed","description":"Mark a document as signed. Creates an Activity on linked contact.","operationId":"mark_document_signed_connect_api_documents__document_id__mark_signed_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/documents/{document_id}/send-for-signature":{"post":{"tags":["Documents"],"summary":"Send For Signature","description":"Send a document for e-signature via configured provider (DocuSign/HelloSign).","operationId":"send_for_signature_connect_api_documents__document_id__send_for_signature_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/documents/{document_id}/signature-status":{"get":{"tags":["Documents"],"summary":"Get Signature Status","description":"Get the latest signature request status for a document.","operationId":"get_signature_status_connect_api_documents__document_id__signature_status_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/documents/esign-webhook":{"post":{"tags":["Documents"],"summary":"Esign Webhook","description":"Webhook endpoint for DocuSign/HelloSign status updates.\n\nBoth providers POST JSON payloads with event data.\nThis endpoint is unauthenticated (webhook callbacks).","operationId":"esign_webhook_connect_api_documents_esign_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/documents/{document_id}/download-signed":{"get":{"tags":["Documents"],"summary":"Download Signed Document","description":"Download the signed document from the e-signature provider.","operationId":"download_signed_document_connect_api_documents__document_id__download_signed_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/automations":{"get":{"tags":["Automations"],"summary":"List Automations","description":"List automation rules for the current org.","operationId":"list_automations_connect_api_automations_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"trigger_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Type"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Automations"],"summary":"Create Automation","description":"Create a new automation rule.","operationId":"create_automation_connect_api_automations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/automations/{rule_id}":{"get":{"tags":["Automations"],"summary":"Get Automation","description":"Get automation rule detail with recent execution logs.","operationId":"get_automation_connect_api_automations__rule_id__get","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Automations"],"summary":"Update Automation","description":"Update an automation rule.","operationId":"update_automation_connect_api_automations__rule_id__put","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Automations"],"summary":"Delete Automation","description":"Delete an automation rule and its logs.","operationId":"delete_automation_connect_api_automations__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/automations/{rule_id}/activate":{"post":{"tags":["Automations"],"summary":"Activate Automation","description":"Activate an automation rule.","operationId":"activate_automation_connect_api_automations__rule_id__activate_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/automations/{rule_id}/deactivate":{"post":{"tags":["Automations"],"summary":"Deactivate Automation","description":"Deactivate an automation rule.","operationId":"deactivate_automation_connect_api_automations__rule_id__deactivate_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/automations/{rule_id}/logs":{"get":{"tags":["Automations"],"summary":"List Automation Logs","description":"Get execution logs for an automation rule.","operationId":"list_automation_logs_connect_api_automations__rule_id__logs_get","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/emails/send":{"post":{"tags":["Emails"],"summary":"Send Email To Contact","description":"Send an email to a contact and log it as an activity.","operationId":"send_email_to_contact_connect_api_emails_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/emails":{"get":{"tags":["Emails"],"summary":"List Email Messages","description":"List email messages for the org, optionally filtered by contact or thread.","operationId":"list_email_messages_connect_api_emails_get","parameters":[{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},{"name":"thread_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/emails/bcc-address":{"get":{"tags":["Emails"],"summary":"Get Bcc Dropbox Address","description":"Return the BCC dropbox email address for this org.","operationId":"get_bcc_dropbox_address_connect_api_emails_bcc_address_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/emails/{email_id}":{"get":{"tags":["Emails"],"summary":"Get Email Message","description":"Get a single email message by ID.","operationId":"get_email_message_connect_api_emails__email_id__get","parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"integer","title":"Email Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/emails/inbound":{"post":{"tags":["Emails"],"summary":"Receive Inbound Email","description":"Webhook endpoint for receiving inbound emails (future: Resend inbound).\n\nThis endpoint stores the inbound email and links it to a contact if\nthe sender email matches an existing contact.","operationId":"receive_inbound_email_connect_api_emails_inbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/emails/webhook/resend":{"post":{"tags":["Emails"],"summary":"Resend Webhook","description":"Handle Resend webhook events to update email status.\n\nUpdates both Activity and EmailMessage records.","operationId":"resend_webhook_connect_api_emails_webhook_resend_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/emails/bulk-send":{"post":{"tags":["Emails"],"summary":"Bulk Send Emails","description":"Send emails to multiple contacts using a template or custom content.\n\nBody: { contact_ids: list[int], template_id: int, custom_subject?: str, custom_body?: str }\nMax 50 contacts per batch.","operationId":"bulk_send_emails_connect_api_emails_bulk_send_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/emails/preview":{"post":{"tags":["Emails"],"summary":"Preview Email","description":"Preview an email template rendered for a specific contact.\n\nBody: { template_id: int, contact_id: int, custom_subject?: str, custom_body?: str }","operationId":"preview_email_connect_api_emails_preview_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/custom-fields/definitions":{"get":{"tags":["Custom Fields"],"summary":"List Definitions","description":"List custom field definitions for an entity type.","operationId":"list_definitions_connect_api_custom_fields_definitions_get","parameters":[{"name":"entity_type","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Entity Type"}},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldDefResponse"},"title":"Response List Definitions Connect Api Custom Fields Definitions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Custom Fields"],"summary":"Create Definition","description":"Create a custom field definition.","operationId":"create_definition_connect_api_custom_fields_definitions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldDefCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldDefResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/custom-fields/definitions/{definition_id}":{"put":{"tags":["Custom Fields"],"summary":"Update Definition","description":"Update a custom field definition.","operationId":"update_definition_connect_api_custom_fields_definitions__definition_id__put","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"integer","title":"Definition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldDefUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldDefResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Custom Fields"],"summary":"Deactivate Definition","description":"Deactivate a custom field definition (set is_active=false).","operationId":"deactivate_definition_connect_api_custom_fields_definitions__definition_id__delete","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"integer","title":"Definition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/custom-fields/values":{"get":{"tags":["Custom Fields"],"summary":"Get Values","description":"Get all custom field values for an entity.","operationId":"get_values_connect_api_custom_fields_values_get","parameters":[{"name":"entity_type","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Entity Type"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValueResponse"},"title":"Response Get Values Connect Api Custom Fields Values Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Custom Fields"],"summary":"Bulk Upsert Values","description":"Bulk upsert custom field values for an entity.\n\nFor each value in the list:\n- Non-multi fields: upsert (update if exists, create if not)\n- Multi fields: delete existing values for that definition+entity, re-insert all provided values","operationId":"bulk_upsert_values_connect_api_custom_fields_values_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldValueSet"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValueResponse"},"title":"Response Bulk Upsert Values Connect Api Custom Fields Values Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/web-forms":{"get":{"tags":["Web Forms"],"summary":"List Web Forms","description":"List all web forms for the current org.","operationId":"list_web_forms_connect_api_web_forms_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Web Forms"],"summary":"Create Web Form","description":"Create a new web form.","operationId":"create_web_form_connect_api_web_forms_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/web-forms/{form_id}":{"get":{"tags":["Web Forms"],"summary":"Get Web Form","description":"Get a single web form by ID.","operationId":"get_web_form_connect_api_web_forms__form_id__get","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Web Forms"],"summary":"Update Web Form","description":"Update an existing web form.","operationId":"update_web_form_connect_api_web_forms__form_id__put","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Web Forms"],"summary":"Delete Web Form","description":"Deactivate a web form (soft delete).","operationId":"delete_web_form_connect_api_web_forms__form_id__delete","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/web-forms/{form_id}/submissions":{"get":{"tags":["Web Forms"],"summary":"List Submissions","description":"List submissions for a specific form.","operationId":"list_submissions_connect_api_web_forms__form_id__submissions_get","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer","title":"Form Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/public/forms/{form_key}/submit":{"post":{"tags":["Web Forms"],"summary":"Public Submit Form","description":"Public form submission endpoint — NO authentication required.\nUses public_key (UUID) instead of sequential ID to prevent enumeration/spam.","operationId":"public_submit_form_connect_api_public_forms__form_key__submit_post","parameters":[{"name":"form_key","in":"path","required":true,"schema":{"type":"string","title":"Form Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["Web Forms"],"summary":"Public Submit Form Options","description":"Handle CORS preflight for public form submission.","operationId":"public_submit_form_options_connect_api_public_forms__form_key__submit_options","parameters":[{"name":"form_key","in":"path","required":true,"schema":{"type":"string","title":"Form Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/pipelines":{"get":{"tags":["Pipelines"],"summary":"List Pipelines","description":"List all pipelines for the current org.","operationId":"list_pipelines_connect_api_pipelines_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Pipelines"],"summary":"Create Pipeline","description":"Create a new pipeline.","operationId":"create_pipeline_connect_api_pipelines_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/pipelines/{pipeline_id}":{"put":{"tags":["Pipelines"],"summary":"Update Pipeline","description":"Update a pipeline.","operationId":"update_pipeline_connect_api_pipelines__pipeline_id__put","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"integer","title":"Pipeline Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Pipelines"],"summary":"Delete Pipeline","description":"Deactivate a pipeline. Cannot deactivate the default pipeline.","operationId":"delete_pipeline_connect_api_pipelines__pipeline_id__delete","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"integer","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/pipelines/{pipeline_id}/stages":{"get":{"tags":["Pipelines"],"summary":"Get Pipeline Stages","description":"Get all stages for a specific pipeline.","operationId":"get_pipeline_stages_connect_api_pipelines__pipeline_id__stages_get","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"integer","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notifications":{"get":{"tags":["Notifications"],"summary":"List Notifications","description":"List user's notifications with optional unread filter and pagination.","operationId":"list_notifications_connect_api_notifications_get","parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notifications/unread-count":{"get":{"tags":["Notifications"],"summary":"Unread Count","description":"Get the count of unread notifications for the current user.","operationId":"unread_count_connect_api_notifications_unread_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/notifications/stream":{"get":{"tags":["Notifications"],"summary":"Notification Stream","description":"Server-Sent Events stream for real-time notifications.\nReplays unread notifications on initial connect, then streams new ones.","operationId":"notification_stream_connect_api_notifications_stream_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/notifications/unread":{"get":{"tags":["Notifications"],"summary":"List Unread Notifications","description":"Return unread notifications for the current user (polling fallback for SSE).","operationId":"list_unread_notifications_connect_api_notifications_unread_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/notifications/{notification_id}/read":{"post":{"tags":["Notifications"],"summary":"Mark As Read","description":"Mark a single notification as read.","operationId":"mark_as_read_connect_api_notifications__notification_id__read_post","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"integer","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notifications/read-all":{"post":{"tags":["Notifications"],"summary":"Mark All Read","description":"Mark all unread notifications as read for the current user.","operationId":"mark_all_read_connect_api_notifications_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/sequences":{"get":{"tags":["Sequences"],"summary":"List Sequences","description":"List all sequences for the current org.","operationId":"list_sequences_connect_api_sequences_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Sequences"],"summary":"Create Sequence","description":"Create a new sequence with steps.","operationId":"create_sequence_connect_api_sequences_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sequences/process":{"post":{"tags":["Sequences"],"summary":"Trigger Process Sequences Early","description":"Trigger processing of pending sequence enrollments.","operationId":"trigger_process_sequences_early_connect_api_sequences_process_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/sequences/templates":{"get":{"tags":["Sequences"],"summary":"List Sequence Templates Early","description":"Return the list of available sequence templates.","operationId":"list_sequence_templates_early_connect_api_sequences_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/sequences/from-template":{"post":{"tags":["Sequences"],"summary":"Create From Template Early","description":"Create a real sequence from a template.","operationId":"create_from_template_early_connect_api_sequences_from_template_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FromTemplateRequestEarly"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sequences/{sequence_id}":{"get":{"tags":["Sequences"],"summary":"Get Sequence","description":"Get a sequence with its steps.","operationId":"get_sequence_connect_api_sequences__sequence_id__get","parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"integer","title":"Sequence Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Sequences"],"summary":"Update Sequence","description":"Update a sequence and optionally replace its steps.","operationId":"update_sequence_connect_api_sequences__sequence_id__put","parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"integer","title":"Sequence Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Sequences"],"summary":"Delete Sequence","description":"Deactivate a sequence.","operationId":"delete_sequence_connect_api_sequences__sequence_id__delete","parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"integer","title":"Sequence Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sequences/{sequence_id}/enroll":{"post":{"tags":["Sequences"],"summary":"Enroll Contact","description":"Enroll a contact in a sequence.","operationId":"enroll_contact_connect_api_sequences__sequence_id__enroll_post","parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"integer","title":"Sequence Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sequences/enrollments/{enrollment_id}/pause":{"post":{"tags":["Sequences"],"summary":"Pause Enrollment","description":"Pause an active enrollment.","operationId":"pause_enrollment_connect_api_sequences_enrollments__enrollment_id__pause_post","parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"integer","title":"Enrollment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sequences/enrollments/{enrollment_id}/resume":{"post":{"tags":["Sequences"],"summary":"Resume Enrollment","description":"Resume a paused enrollment.","operationId":"resume_enrollment_connect_api_sequences_enrollments__enrollment_id__resume_post","parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"integer","title":"Enrollment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sequences/enrollments/{enrollment_id}/remove":{"post":{"tags":["Sequences"],"summary":"Remove Enrollment","description":"Remove a contact from a sequence.","operationId":"remove_enrollment_connect_api_sequences_enrollments__enrollment_id__remove_post","parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"integer","title":"Enrollment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sequences/{sequence_id}/enrollments":{"get":{"tags":["Sequences"],"summary":"List Sequence Enrollments","description":"List all enrollments for a sequence.","operationId":"list_sequence_enrollments_connect_api_sequences__sequence_id__enrollments_get","parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"integer","title":"Sequence Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/contacts/{contact_id}/sequences":{"get":{"tags":["Sequences"],"summary":"List Contact Enrollments","description":"List all sequence enrollments for a contact.","operationId":"list_contact_enrollments_connect_api_contacts__contact_id__sequences_get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sequences/{sequence_id}/stats":{"get":{"tags":["Sequences"],"summary":"Sequence Stats","description":"Get stats for a sequence: completion rate, avg time to complete.","operationId":"sequence_stats_connect_api_sequences__sequence_id__stats_get","parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"integer","title":"Sequence Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/custom-reports/columns":{"get":{"tags":["Custom Reports"],"summary":"List Available Columns","description":"Return available columns grouped by category for each entity type.","operationId":"list_available_columns_connect_api_custom_reports_columns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/custom-reports":{"get":{"tags":["Custom Reports"],"summary":"List Reports","description":"List all saved custom reports for the org.","operationId":"list_reports_connect_api_custom_reports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Custom Reports"],"summary":"Create Report","description":"Create a new custom report.","operationId":"create_report_connect_api_custom_reports_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCreateUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/custom-reports/{report_id}":{"get":{"tags":["Custom Reports"],"summary":"Get Report","description":"Get a single custom report definition.","operationId":"get_report_connect_api_custom_reports__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Custom Reports"],"summary":"Update Report","description":"Update a custom report.","operationId":"update_report_connect_api_custom_reports__report_id__put","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCreateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Custom Reports"],"summary":"Delete Report","description":"Delete a custom report.","operationId":"delete_report_connect_api_custom_reports__report_id__delete","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/custom-reports/{report_id}/run":{"post":{"tags":["Custom Reports"],"summary":"Run Report","description":"Execute a saved report and return data.","operationId":"run_report_connect_api_custom_reports__report_id__run_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/custom-reports/preview":{"post":{"tags":["Custom Reports"],"summary":"Preview Report","description":"Run a report definition without saving it.","operationId":"preview_report_connect_api_custom_reports_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/custom-reports/{report_id}/export":{"get":{"tags":["Custom Reports"],"summary":"Export Report Csv","description":"Export a saved report as CSV.","operationId":"export_report_csv_connect_api_custom_reports__report_id__export_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/webhooks":{"get":{"tags":["Webhooks"],"summary":"List Webhooks","description":"List all webhooks for the org.","operationId":"list_webhooks_connect_api_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Webhooks"],"summary":"Create Webhook","description":"Create a new webhook.","operationId":"create_webhook_connect_api_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/webhooks/{webhook_id}":{"put":{"tags":["Webhooks"],"summary":"Update Webhook","description":"Update a webhook.","operationId":"update_webhook_connect_api_webhooks__webhook_id__put","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","description":"Delete a webhook and its delivery history.","operationId":"delete_webhook_connect_api_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/webhooks/{webhook_id}/test":{"post":{"tags":["Webhooks"],"summary":"Test Webhook","description":"Send a test payload to the webhook URL.","operationId":"test_webhook_connect_api_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/webhooks/{webhook_id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List Deliveries","description":"List recent deliveries for a webhook.","operationId":"list_deliveries_connect_api_webhooks__webhook_id__deliveries_get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/webhooks/events/list":{"get":{"tags":["Webhooks"],"summary":"List Available Events","description":"Return the list of valid webhook events.","operationId":"list_available_events_connect_api_webhooks_events_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/assignment-rules":{"get":{"tags":["AssignmentRules"],"summary":"List Assignment Rules","description":"List all assignment rules for the current org.","operationId":"list_assignment_rules_connect_api_assignment_rules_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssignmentRuleResponse"},"title":"Response List Assignment Rules Connect Api Assignment Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["AssignmentRules"],"summary":"Create Assignment Rule","description":"Create a new assignment rule.","operationId":"create_assignment_rule_connect_api_assignment_rules_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentRuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/assignment-rules/{rule_id}":{"put":{"tags":["AssignmentRules"],"summary":"Update Assignment Rule","description":"Update an assignment rule.","operationId":"update_assignment_rule_connect_api_assignment_rules__rule_id__put","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["AssignmentRules"],"summary":"Delete Assignment Rule","description":"Delete an assignment rule.","operationId":"delete_assignment_rule_connect_api_assignment_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/rbac/roles":{"get":{"tags":["RBAC"],"summary":"List Roles","description":"List all roles for the current org.","operationId":"list_roles_connect_api_rbac_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["RBAC"],"summary":"Create Role","description":"Create a custom role.","operationId":"create_role_connect_api_rbac_roles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/rbac/roles/{role_id}":{"put":{"tags":["RBAC"],"summary":"Update Role","description":"Update a role's permissions or metadata.","operationId":"update_role_connect_api_rbac_roles__role_id__put","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["RBAC"],"summary":"Delete Role","description":"Delete a custom role. System roles cannot be deleted.","operationId":"delete_role_connect_api_rbac_roles__role_id__delete","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/rbac/users":{"get":{"tags":["RBAC"],"summary":"List User Roles","description":"List users with their assigned roles in this org.","operationId":"list_user_roles_connect_api_rbac_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/rbac/users/{user_id}":{"put":{"tags":["RBAC"],"summary":"Assign User Role","description":"Assign or update a user's role in this org.","operationId":"assign_user_role_connect_api_rbac_users__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleAssign"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["RBAC"],"summary":"Unassign User Role","description":"Remove a user's role assignment (they'll fall back to default admin access).","operationId":"unassign_user_role_connect_api_rbac_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/dashboard/stats":{"get":{"tags":["Dashboard"],"summary":"Dashboard Stats","description":"Lightweight aggregate stats for the unified dashboard cockpit.\n\nReturns total contacts, companies, open deals (count + value),\nand activities logged in the current week.\nAccepts JWT auth or localhost header-based auth (X-User-Id / X-Org-Id).","operationId":"dashboard_stats_connect_api_dashboard_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/dashboard/layout":{"get":{"tags":["Dashboard"],"summary":"Get Layout","description":"Get the current user's saved dashboard layout.","operationId":"get_layout_connect_api_dashboard_layout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["Dashboard"],"summary":"Save Layout","description":"Save the current user's dashboard layout.","operationId":"save_layout_connect_api_dashboard_layout_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/dashboard/widgets/data":{"get":{"tags":["Dashboard"],"summary":"Widget Data","description":"Get data for a specific widget type.","operationId":"widget_data_connect_api_dashboard_widgets_data_get","parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/import/presets":{"get":{"tags":["CRM Import"],"summary":"List Import Presets","description":"Return available import format presets with their descriptions.","operationId":"list_import_presets_connect_api_import_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/import/preview":{"post":{"tags":["CRM Import"],"summary":"Preview Import","description":"Upload CSV and return a preview of the first 5 rows with auto-detected or forced format.\n\n- format_hint=auto: detect the format automatically\n- format_hint=jobber/housecall_pro/salesforce/hubspot/generic: force a specific format","operationId":"preview_import_connect_api_import_preview_post","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"type":"string","default":"contacts","title":"Entity Type"}},{"name":"format_hint","in":"query","required":false,"schema":{"type":"string","default":"auto","title":"Format Hint"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_preview_import_connect_api_import_preview_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/import/detect-format":{"post":{"tags":["CRM Import"],"summary":"Detect Import Format","description":"Auto-detect if the CSV is from Salesforce, HubSpot, Jobber, HouseCall Pro, or generic format.\n\nSupports format_hint query param to force a specific format instead of auto-detecting.\nReturns detected format, headers, suggested column mapping, and preview rows.","operationId":"detect_import_format_connect_api_import_detect_format_post","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"type":"string","default":"contacts","title":"Entity Type"}},{"name":"format_hint","in":"query","required":false,"schema":{"type":"string","default":"auto","title":"Format Hint"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_detect_import_format_connect_api_import_detect_format_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportDetectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/import/execute":{"post":{"tags":["CRM Import"],"summary":"Execute Import","description":"Execute the import with the confirmed mapping.\n\nAccepts base64-encoded CSV content and a column mapping dict.\nCreates contacts, companies, or deals based on entity_type.","operationId":"execute_import_connect_api_import_execute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportExecuteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportExecuteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/import/fields/{entity_type}":{"get":{"tags":["CRM Import"],"summary":"Get Import Fields","description":"Return the list of valid import target fields for an entity type.","operationId":"get_import_fields_connect_api_import_fields__entity_type__get","parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"type":"string","title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/validation-rules/{entity_type}":{"get":{"tags":["Validation Rules"],"summary":"List Validation Rules","description":"List active validation rules for an entity type.","operationId":"list_validation_rules_connect_api_validation_rules__entity_type__get","parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"type":"string","title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ValidationRuleResponse"},"title":"Response List Validation Rules Connect Api Validation Rules  Entity Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Validation Rules"],"summary":"Bulk Upsert Validation Rules","description":"Bulk upsert validation rules for an entity type.\n\nFor each rule in the body: update if exists, create if not.\nRules not in the body are deactivated.","operationId":"bulk_upsert_validation_rules_connect_api_validation_rules__entity_type__put","parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"type":"string","title":"Entity Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ValidationRuleEntry"},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ValidationRuleResponse"},"title":"Response Bulk Upsert Validation Rules Connect Api Validation Rules  Entity Type  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/onboarding":{"get":{"tags":["Onboarding"],"summary":"Get Onboarding","description":"Get onboarding progress for the current user.","operationId":"get_onboarding_connect_api_onboarding_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingResponse"}}}}}}},"/connect/api/onboarding/step":{"put":{"tags":["Onboarding"],"summary":"Complete Onboarding Step","description":"Mark an onboarding step as completed.","operationId":"complete_onboarding_step_connect_api_onboarding_step_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStepRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/onboarding/dismiss":{"post":{"tags":["Onboarding"],"summary":"Dismiss Onboarding","description":"Dismiss the onboarding wizard permanently.","operationId":"dismiss_onboarding_connect_api_onboarding_dismiss_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/onboarding/sample-data":{"post":{"tags":["Onboarding"],"summary":"Create Sample Data","description":"Create sample contacts, a company, and a deal for new users.","operationId":"create_sample_data_connect_api_onboarding_sample_data_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SampleDataResponse"}}}}}}},"/connect/api/quote-templates":{"get":{"tags":["Quotes"],"summary":"List Quote Templates","description":"List all quote templates for the organization.","operationId":"list_quote_templates_connect_api_quote_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/QuoteTemplateResponse"},"type":"array","title":"Response List Quote Templates Connect Api Quote Templates Get"}}}}}},"post":{"tags":["Quotes"],"summary":"Create Quote Template","description":"Create a new quote template.","operationId":"create_quote_template_connect_api_quote_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteTemplateCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quote-templates/{template_id}":{"put":{"tags":["Quotes"],"summary":"Update Quote Template","description":"Update a quote template. Only provided fields are updated.","operationId":"update_quote_template_connect_api_quote_templates__template_id__put","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Quotes"],"summary":"Delete Quote Template","description":"Delete a quote template (hard delete).","operationId":"delete_quote_template_connect_api_quote_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/quote/preview":{"get":{"tags":["Quotes"],"summary":"Preview Quote","description":"Render a professional HTML quote for a deal.","operationId":"preview_quote_connect_api_deals__deal_id__quote_preview_get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}},{"name":"template_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/quote/pdf":{"get":{"tags":["Quotes"],"summary":"Download Quote Pdf","description":"Generate PDF from the quote HTML and return as downloadable file.","operationId":"download_quote_pdf_connect_api_deals__deal_id__quote_pdf_get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}},{"name":"template_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes":{"get":{"tags":["Quotes"],"summary":"List Quotes","operationId":"list_quotes_connect_api_quotes_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},{"name":"deal_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"title or quote_number search","title":"Q"},"description":"title or quote_number search"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Quotes"],"summary":"Create Quote","description":"Create a quote in ``draft`` status with optional line items.","operationId":"create_quote_connect_api_quotes_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}":{"get":{"tags":["Quotes"],"summary":"Get Quote","operationId":"get_quote_connect_api_quotes__quote_id__get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Quotes"],"summary":"Update Quote","operationId":"update_quote_connect_api_quotes__quote_id__patch","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Quotes"],"summary":"Delete Quote","operationId":"delete_quote_connect_api_quotes__quote_id__delete","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/send":{"post":{"tags":["Quotes"],"summary":"Send Quote","description":"Transition draft → sent. Stamps sent_at and ensures the\naccept_token exists. Email delivery is out of scope here —\nthat's a downstream automation. The quote becomes available at\nits public URL once status is sent.","operationId":"send_quote_connect_api_quotes__quote_id__send_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/cancel":{"post":{"tags":["Quotes"],"summary":"Cancel Quote","operationId":"cancel_quote_connect_api_quotes__quote_id__cancel_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StatusActionRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/reject":{"post":{"tags":["Quotes"],"summary":"Reject Quote Internal","description":"Internal-side reject — used when the salesperson knows the\ncustomer declined verbally. The customer's own click on the\npublic page goes through /public/reject.","operationId":"reject_quote_internal_connect_api_quotes__quote_id__reject_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StatusActionRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/spawn-contract":{"post":{"tags":["Quotes"],"summary":"Spawn Contract From Quote","description":"Once a quote is accepted, the salesperson clicks \"Generate\nContract\". Drafts a Contract from the quote's frozen snapshot\nand back-links the contract on the quote.\n\nContract starts in 'draft' status — the salesperson can review\nand edit before sending.","operationId":"spawn_contract_from_quote_connect_api_quotes__quote_id__spawn_contract_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/public":{"get":{"tags":["Quotes"],"summary":"Get Quote Public","description":"Public read of a quote via its accept token. Used by the\nhosted accept page so the prospect can review before clicking\nAccept. accept_token is stripped from the response so a\ndownload of the JSON doesn't echo the credential.","operationId":"get_quote_public_connect_api_quotes__quote_id__public_get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}},{"name":"accept_token","in":"query","required":true,"schema":{"type":"string","description":"Public accept token from the email link","title":"Accept Token"},"description":"Public accept token from the email link"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/public/view":{"post":{"tags":["Quotes"],"summary":"Public View Quote","description":"Stamp first_viewed_at the first time the prospect opens the\npublic page. Subsequent views are no-ops.","operationId":"public_view_quote_connect_api_quotes__quote_id__public_view_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}},{"name":"accept_token","in":"query","required":true,"schema":{"type":"string","title":"Accept Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/public/accept":{"post":{"tags":["Quotes"],"summary":"Public Accept Quote","description":"Public accept — the prospect's click on \"Accept Quote\".\n\nStatus transitions sent/viewed → accepted, freezes accepted_*\nfields, captures the source IP, and invalidates the token so\nit can't be replayed.","operationId":"public_accept_quote_connect_api_quotes__quote_id__public_accept_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}},{"name":"accept_token","in":"query","required":true,"schema":{"type":"string","title":"Accept Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAcceptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/public/reject":{"post":{"tags":["Quotes"],"summary":"Public Reject Quote","operationId":"public_reject_quote_connect_api_quotes__quote_id__public_reject_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}},{"name":"accept_token","in":"query","required":true,"schema":{"type":"string","title":"Accept Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/tiers":{"get":{"tags":["Quotes"],"summary":"List Quote Tiers","description":"List all pricing tiers for a quote.","operationId":"list_quote_tiers_connect_api_quotes__quote_id__tiers_get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TierResponse"},"title":"Response List Quote Tiers Connect Api Quotes  Quote Id  Tiers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Quotes"],"summary":"Create Quote Tier","description":"Add a pricing tier to a quote (max 4).","operationId":"create_quote_tier_connect_api_quotes__quote_id__tiers_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/tiers/{tier_id}":{"put":{"tags":["Quotes"],"summary":"Update Quote Tier","description":"Update a tier on a quote.","operationId":"update_quote_tier_connect_api_quotes__quote_id__tiers__tier_id__put","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}},{"name":"tier_id","in":"path","required":true,"schema":{"type":"integer","title":"Tier Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Quotes"],"summary":"Delete Quote Tier","description":"Remove a tier from a quote.","operationId":"delete_quote_tier_connect_api_quotes__quote_id__tiers__tier_id__delete","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}},{"name":"tier_id","in":"path","required":true,"schema":{"type":"integer","title":"Tier Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/tiers/{tier_id}/select":{"post":{"tags":["Quotes"],"summary":"Select Quote Tier","description":"Mark a tier as the client's selection. Deselects other tiers.","operationId":"select_quote_tier_connect_api_quotes__quote_id__tiers__tier_id__select_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}},{"name":"tier_id","in":"path","required":true,"schema":{"type":"integer","title":"Tier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notification-channels":{"get":{"tags":["Notification Channels"],"summary":"List Channels","description":"List all notification channels for the org.","operationId":"list_channels_connect_api_notification_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Notification Channels"],"summary":"Create Channel","description":"Create a new notification channel.","operationId":"create_channel_connect_api_notification_channels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelCreateUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notification-channels/{channel_id}":{"put":{"tags":["Notification Channels"],"summary":"Update Channel","description":"Update a notification channel.","operationId":"update_channel_connect_api_notification_channels__channel_id__put","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelCreateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Notification Channels"],"summary":"Delete Channel","description":"Delete a notification channel.","operationId":"delete_channel_connect_api_notification_channels__channel_id__delete","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notification-channels/{channel_id}/test":{"post":{"tags":["Notification Channels"],"summary":"Test Channel","description":"Send a test notification to the channel.","operationId":"test_channel_connect_api_notification_channels__channel_id__test_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notification-channels/types":{"get":{"tags":["Notification Channels"],"summary":"List Channel Types","description":"List available notification channel types with their config schemas.","operationId":"list_channel_types_connect_api_notification_channels_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/notification-channels/dead-letters":{"get":{"tags":["Notification Channels"],"summary":"List Dead Letters","description":"List dead letter notifications.","operationId":"list_dead_letters_connect_api_notification_channels_dead_letters_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notification-channels/dead-letters/{dead_letter_id}/retry":{"post":{"tags":["Notification Channels"],"summary":"Retry Dead Letter","description":"Re-enqueue a dead letter notification.","operationId":"retry_dead_letter_connect_api_notification_channels_dead_letters__dead_letter_id__retry_post","parameters":[{"name":"dead_letter_id","in":"path","required":true,"schema":{"type":"integer","title":"Dead Letter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notification-channels/dead-letters/{dead_letter_id}":{"delete":{"tags":["Notification Channels"],"summary":"Dismiss Dead Letter","description":"Dismiss (delete) a dead letter.","operationId":"dismiss_dead_letter_connect_api_notification_channels_dead_letters__dead_letter_id__delete","parameters":[{"name":"dead_letter_id","in":"path","required":true,"schema":{"type":"integer","title":"Dead Letter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notification-preferences":{"get":{"tags":["Notification Preferences"],"summary":"Get Preferences","description":"Get current user's notification preferences.","operationId":"get_preferences_connect_api_notification_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["Notification Preferences"],"summary":"Upsert Preference","description":"Create or update a notification preference.","operationId":"upsert_preference_connect_api_notification_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/notification-preferences/snooze":{"post":{"tags":["Notification Preferences"],"summary":"Snooze All","description":"Snooze all external notifications for N minutes.","operationId":"snooze_all_connect_api_notification_preferences_snooze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnoozeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Notification Preferences"],"summary":"Cancel Snooze","description":"Cancel the global snooze.","operationId":"cancel_snooze_connect_api_notification_preferences_snooze_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/exchange-rates":{"get":{"tags":["Exchange Rates"],"summary":"List Exchange Rates","description":"List all exchange rates for the current org.","operationId":"list_exchange_rates_connect_api_exchange_rates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["Exchange Rates"],"summary":"Upsert Exchange Rate","description":"Create or update an exchange rate for the org.","operationId":"upsert_exchange_rate_connect_api_exchange_rates_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRateEntry"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/exchange-rates/{rate_id}":{"delete":{"tags":["Exchange Rates"],"summary":"Delete Exchange Rate","description":"Delete an exchange rate.","operationId":"delete_exchange_rate_connect_api_exchange_rates__rate_id__delete","parameters":[{"name":"rate_id","in":"path","required":true,"schema":{"type":"integer","title":"Rate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/recently-viewed":{"get":{"tags":["Recently Viewed"],"summary":"List Recently Viewed","description":"Get the user's recently viewed entities (most recent first).","operationId":"list_recently_viewed_connect_api_recently_viewed_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":15,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecentlyViewedResponse"},"title":"Response List Recently Viewed Connect Api Recently Viewed Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Recently Viewed"],"summary":"Record Recently Viewed","description":"Record that the user viewed an entity. Deduplicates by upsert.","operationId":"record_recently_viewed_connect_api_recently_viewed_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentlyViewedRecord"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/visibility-rules":{"get":{"tags":["Visibility Rules"],"summary":"List Visibility Rules","description":"List all visibility rules for the current organization.","operationId":"list_visibility_rules_connect_api_visibility_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VisibilityRuleResponse"},"type":"array","title":"Response List Visibility Rules Connect Api Visibility Rules Get"}}}}}},"put":{"tags":["Visibility Rules"],"summary":"Update Visibility Rules","description":"Create or update visibility rules for the organization.\n\nAccepts a list of rules. Each rule specifies entity_type, rule_type, and optional role_id.\nUpserts based on (org_id, entity_type, role_id).","operationId":"update_visibility_rules_connect_api_visibility_rules_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilityRuleBulkUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/calendar/connect/google":{"get":{"tags":["Calendar Sync"],"summary":"Google Connect","description":"Return the Google OAuth consent URL.","operationId":"google_connect_connect_api_calendar_connect_google_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/calendar/callback/google":{"get":{"tags":["Calendar Sync"],"summary":"Google Callback","description":"Handle Google OAuth callback — exchange code for tokens and store connection.","operationId":"google_callback_connect_api_calendar_callback_google_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/calendar/status":{"get":{"tags":["Calendar Sync"],"summary":"Calendar Status","description":"Get the current calendar connection status for the user.","operationId":"calendar_status_connect_api_calendar_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/calendar/sync":{"post":{"tags":["Calendar Sync"],"summary":"Manual Sync","description":"Trigger a manual calendar sync for the current user.","operationId":"manual_sync_connect_api_calendar_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/calendar/disconnect":{"delete":{"tags":["Calendar Sync"],"summary":"Disconnect Calendar","description":"Remove the calendar connection for the current user.","operationId":"disconnect_calendar_connect_api_calendar_disconnect_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/integrations":{"get":{"tags":["Integrations"],"summary":"List Integrations","description":"List all integration statuses for the org.","operationId":"list_integrations_connect_api_integrations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/integrations/stripe/connect":{"post":{"tags":["Integrations"],"summary":"Connect Stripe","description":"Connect Stripe with an API key.","operationId":"connect_stripe_connect_api_integrations_stripe_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeConnectBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/integrations/{provider}/connect":{"get":{"tags":["Integrations"],"summary":"Initiate Oauth","description":"Initiate OAuth for a provider (QuickBooks, Xero).","operationId":"initiate_oauth_connect_api_integrations__provider__connect_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/integrations/{provider}/callback":{"get":{"tags":["Integrations"],"summary":"Oauth Callback","description":"Handle OAuth callback for a provider.","operationId":"oauth_callback_connect_api_integrations__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","title":"State"}},{"name":"realmId","in":"query","required":false,"schema":{"type":"string","title":"Realmid"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/integrations/{provider}/disconnect":{"delete":{"tags":["Integrations"],"summary":"Disconnect Integration","description":"Disconnect an integration.","operationId":"disconnect_integration_connect_api_integrations__provider__disconnect_delete","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/integrations/{provider}/sync":{"post":{"tags":["Integrations"],"summary":"Manual Sync","description":"Trigger a manual sync for a provider.","operationId":"manual_sync_connect_api_integrations__provider__sync_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/integrations/stripe/create-invoice":{"post":{"tags":["Integrations"],"summary":"Create Stripe Invoice","description":"Create a Stripe invoice from a CRM deal.","operationId":"create_stripe_invoice_connect_api_integrations_stripe_create_invoice_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/integrations/stripe/status":{"get":{"tags":["Integrations"],"summary":"Stripe Status","description":"Check if Stripe is connected for the org.","operationId":"stripe_status_connect_api_integrations_stripe_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/integrations/quickbooks/status":{"get":{"tags":["Integrations"],"summary":"Quickbooks Status","description":"Check if QuickBooks is connected for the org.","operationId":"quickbooks_status_connect_api_integrations_quickbooks_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/integrations/quickbooks/push-invoice":{"post":{"tags":["Integrations"],"summary":"Qb Push Invoice","description":"Push an invoice to QuickBooks from SkySuite ledger data.","operationId":"qb_push_invoice_connect_api_integrations_quickbooks_push_invoice_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QBPushInvoiceBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/integrations/quickbooks/payments":{"get":{"tags":["Integrations"],"summary":"Qb Pull Payments","description":"Pull recent payments from QuickBooks for matching to local invoices.","operationId":"qb_pull_payments_connect_api_integrations_quickbooks_payments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/integrations/xero/status":{"get":{"tags":["Integrations"],"summary":"Xero Status","description":"Check if Xero is connected for the org.","operationId":"xero_status_connect_api_integrations_xero_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/ai/deals/{deal_id}/win-probability":{"get":{"tags":["AI"],"summary":"Get Deal Win Probability","description":"Get ML-predicted win probability for a deal.","operationId":"get_deal_win_probability_connect_api_ai_deals__deal_id__win_probability_get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai/deals/{deal_id}/suggestions":{"get":{"tags":["AI"],"summary":"Get Deal Suggestions Endpoint","description":"Get next-best-action suggestions for a deal.","operationId":"get_deal_suggestions_endpoint_connect_api_ai_deals__deal_id__suggestions_get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai/contacts/{contact_id}/suggestions":{"get":{"tags":["AI"],"summary":"Get Contact Suggestions Endpoint","description":"Get suggestions for a contact.","operationId":"get_contact_suggestions_endpoint_connect_api_ai_contacts__contact_id__suggestions_get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai/deals/train-model":{"post":{"tags":["AI"],"summary":"Train Deal Model","description":"Manually trigger model training for the org.","operationId":"train_deal_model_connect_api_ai_deals_train_model_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/ai/dashboard/suggestions":{"get":{"tags":["AI"],"summary":"Get Dashboard Suggestions Endpoint","description":"Get top suggestions across all deals for the dashboard.","operationId":"get_dashboard_suggestions_endpoint_connect_api_ai_dashboard_suggestions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/ai/draft-reply":{"post":{"tags":["AI"],"summary":"Draft Reply","description":"Generate an AI-drafted reply to an email message.","operationId":"draft_reply_connect_api_ai_draft_reply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftReplyBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai/call-script/{contact_id}":{"post":{"tags":["AI"],"summary":"Generate Call Script","description":"Generate AI-powered cold call + voicemail scripts for a contact.","operationId":"generate_call_script_connect_api_ai_call_script__contact_id__post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["AI"],"summary":"Get Call Script","description":"Get stored call scripts for a contact.","operationId":"get_call_script_connect_api_ai_call_script__contact_id__get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai/cold-email/{contact_id}":{"post":{"tags":["AI"],"summary":"Generate Cold Email Endpoint","description":"Generate a personalized cold outreach email (subject + body) for a contact.","operationId":"generate_cold_email_endpoint_connect_api_ai_cold_email__contact_id__post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/admin/email-providers":{"get":{"tags":["Email Providers (Admin)"],"summary":"List Providers","description":"List all email provider configurations.","operationId":"list_providers_connect_api_admin_email_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Email Providers (Admin)"],"summary":"Create Provider","description":"Create a new email provider configuration.","operationId":"create_provider_connect_api_admin_email_providers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCreateUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/admin/email-providers/{provider_id}":{"put":{"tags":["Email Providers (Admin)"],"summary":"Update Provider","description":"Update an email provider configuration.","operationId":"update_provider_connect_api_admin_email_providers__provider_id__put","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCreateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Email Providers (Admin)"],"summary":"Delete Provider","description":"Delete an email provider configuration.","operationId":"delete_provider_connect_api_admin_email_providers__provider_id__delete","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/admin/email-providers/{provider_id}/test":{"post":{"tags":["Email Providers (Admin)"],"summary":"Test Provider","description":"Send a test email through a specific provider.","operationId":"test_provider_connect_api_admin_email_providers__provider_id__test_post","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/admin/email-providers/health":{"get":{"tags":["Email Providers (Admin)"],"summary":"Check All Health","description":"Run health check on all active providers.","operationId":"check_all_health_connect_api_admin_email_providers_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/email-domains":{"get":{"tags":["Email Domains"],"summary":"List Domains","description":"List all email domains for the org.","operationId":"list_domains_connect_api_email_domains_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Email Domains"],"summary":"Add Domain","description":"Add a new sending domain for the org.","operationId":"add_domain_connect_api_email_domains_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-domains/{domain_id}/verify":{"post":{"tags":["Email Domains"],"summary":"Verify Domain","description":"Verify DNS records for a domain.","operationId":"verify_domain_connect_api_email_domains__domain_id__verify_post","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"integer","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-domains/{domain_id}/auto-configure":{"post":{"tags":["Email Domains"],"summary":"Auto Configure Domain","description":"Auto-configure DNS records via a DNS provider API (e.g. Cloudflare).","operationId":"auto_configure_domain_connect_api_email_domains__domain_id__auto_configure_post","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"integer","title":"Domain Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoConfigureRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-domains/{domain_id}":{"delete":{"tags":["Email Domains"],"summary":"Delete Domain","description":"Delete an email domain.","operationId":"delete_domain_connect_api_email_domains__domain_id__delete","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"integer","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-domains/usage":{"get":{"tags":["Email Domains"],"summary":"Email Usage","description":"Get email usage stats for the org.","operationId":"email_usage_connect_api_email_domains_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/email-domains/suppressions":{"get":{"tags":["Email Domains"],"summary":"Email Suppressions","description":"List suppressed email addresses for the org.","operationId":"email_suppressions_connect_api_email_domains_suppressions_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-domains/suppressions/{suppression_id}":{"delete":{"tags":["Email Domains"],"summary":"Delete Suppression","description":"Remove an email address from the suppression list.","operationId":"delete_suppression_connect_api_email_domains_suppressions__suppression_id__delete","parameters":[{"name":"suppression_id","in":"path","required":true,"schema":{"type":"integer","title":"Suppression Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/auto-responders":{"get":{"tags":["Auto Responders"],"summary":"List Auto Responders","description":"List all auto-responders for the current org.","operationId":"list_auto_responders_connect_api_auto_responders_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"trigger_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Type"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Auto Responders"],"summary":"Create Auto Responder","description":"Create a new auto-responder.","operationId":"create_auto_responder_connect_api_auto_responders_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/auto-responders/{responder_id}":{"get":{"tags":["Auto Responders"],"summary":"Get Auto Responder","description":"Get a single auto-responder by ID.","operationId":"get_auto_responder_connect_api_auto_responders__responder_id__get","parameters":[{"name":"responder_id","in":"path","required":true,"schema":{"type":"integer","title":"Responder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Auto Responders"],"summary":"Update Auto Responder","description":"Update an existing auto-responder.","operationId":"update_auto_responder_connect_api_auto_responders__responder_id__put","parameters":[{"name":"responder_id","in":"path","required":true,"schema":{"type":"integer","title":"Responder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Auto Responders"],"summary":"Delete Auto Responder","description":"Deactivate an auto-responder.","operationId":"delete_auto_responder_connect_api_auto_responders__responder_id__delete","parameters":[{"name":"responder_id","in":"path","required":true,"schema":{"type":"integer","title":"Responder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/auto-responders/{responder_id}/test":{"post":{"tags":["Auto Responders"],"summary":"Test Auto Responder","description":"Send a test auto-response to a specific contact.","operationId":"test_auto_responder_connect_api_auto_responders__responder_id__test_post","parameters":[{"name":"responder_id","in":"path","required":true,"schema":{"type":"integer","title":"Responder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/auto-responders/{responder_id}/logs":{"get":{"tags":["Auto Responders"],"summary":"List Auto Responder Logs","description":"Get execution history for an auto-responder.","operationId":"list_auto_responder_logs_connect_api_auto_responders__responder_id__logs_get","parameters":[{"name":"responder_id","in":"path","required":true,"schema":{"type":"integer","title":"Responder Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sms/templates":{"get":{"tags":["SMS"],"summary":"List Sms Templates","description":"List all SMS templates for the current org.","operationId":"list_sms_templates_connect_api_sms_templates_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["SMS"],"summary":"Create Sms Template","description":"Create a new SMS template.","operationId":"create_sms_template_connect_api_sms_templates_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sms/templates/{template_id}":{"get":{"tags":["SMS"],"summary":"Get Sms Template","description":"Get a single SMS template.","operationId":"get_sms_template_connect_api_sms_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["SMS"],"summary":"Update Sms Template","description":"Update an existing SMS template.","operationId":"update_sms_template_connect_api_sms_templates__template_id__put","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SMS"],"summary":"Delete Sms Template","description":"Deactivate an SMS template.","operationId":"delete_sms_template_connect_api_sms_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sms/send":{"post":{"tags":["SMS"],"summary":"Send Sms To Contact","description":"Send an SMS to a contact.\n\nBody: { contact_id: int, body?: str, template_id?: int, variables?: dict }","operationId":"send_sms_to_contact_connect_api_sms_send_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sms/inbound":{"post":{"tags":["SMS"],"summary":"Sms Inbound Webhook","description":"Receive inbound SMS from Twilio webhook.\n\nMatches sender phone number to a contact and logs the message\nas an activity on their timeline. Does NOT require JWT auth\nsince Twilio calls this endpoint directly.\n\nConfigure in Twilio console:\n    Messaging > Phone Number > A MESSAGE COMES IN > Webhook\n    POST https://skysuite.pro/connect/api/sms/inbound","operationId":"sms_inbound_webhook_connect_api_sms_inbound_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_sms_inbound_webhook_connect_api_sms_inbound_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sms/webhook/twilio":{"post":{"tags":["SMS"],"summary":"Twilio Webhook","description":"Handle Twilio status callbacks and inbound SMS.\n\nTwilio sends form-encoded data for both status updates and inbound messages.\nThis endpoint handles both; the /inbound endpoint above is a dedicated\nalternative for inbound-only webhooks.","operationId":"twilio_webhook_connect_api_sms_webhook_twilio_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/sms/history":{"get":{"tags":["SMS"],"summary":"Sms History","description":"List SMS message history, optionally filtered by contact.","operationId":"sms_history_connect_api_sms_history_get","parameters":[{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},{"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":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-tracking/{token}/pixel.gif":{"get":{"tags":["Email Tracking"],"summary":"Tracking Pixel","description":"Record an email open event and return a 1x1 transparent GIF.\n\nAlways returns the GIF even if the token is invalid, to avoid breaking\nthe email display for the recipient.","operationId":"tracking_pixel_connect_api_email_tracking__token__pixel_gif_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-tracking/{token}/click":{"get":{"tags":["Email Tracking"],"summary":"Tracking Click","description":"Record an email click event and redirect to the original URL.\n\nAlways redirects even if the token is invalid, to avoid breaking links\nfor the recipient.","operationId":"tracking_click_connect_api_email_tracking__token__click_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"The original destination URL","title":"Url"},"description":"The original destination URL"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/booking-links":{"get":{"tags":["Booking Links"],"summary":"List Booking Links","description":"List current user's booking links.","operationId":"list_booking_links_connect_api_booking_links_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Booking Links"],"summary":"Create Booking Link","description":"Create a new booking link.","operationId":"create_booking_link_connect_api_booking_links_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/booking-links/{link_id}":{"put":{"tags":["Booking Links"],"summary":"Update Booking Link","description":"Update a booking link.","operationId":"update_booking_link_connect_api_booking_links__link_id__put","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"integer","title":"Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Booking Links"],"summary":"Delete Booking Link","description":"Deactivate a booking link (soft delete).","operationId":"delete_booking_link_connect_api_booking_links__link_id__delete","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"integer","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/booking/{slug}/slots":{"get":{"tags":["Booking Links"],"summary":"Get Booking Slots","description":"Public endpoint — get available time slots for a booking link.","operationId":"get_booking_slots_connect_api_booking__slug__slots_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"start","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start"},"description":"Start date YYYY-MM-DD"},{"name":"end","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End"},"description":"End date YYYY-MM-DD"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["Booking Links"],"summary":"Booking Slots Options","operationId":"booking_slots_options_connect_api_booking__slug__slots_options","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/booking/{slug}/book":{"post":{"tags":["Booking Links"],"summary":"Book Slot","description":"Public endpoint — book a time slot.","operationId":"book_slot_connect_api_booking__slug__book_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["Booking Links"],"summary":"Booking Book Options","operationId":"booking_book_options_connect_api_booking__slug__book_options","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/voice-notes":{"post":{"tags":["Voice Notes"],"summary":"Upload Voice Note","description":"Upload a voice note audio file. Starts transcription in background.","operationId":"upload_voice_note_connect_api_voice_notes_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_voice_note_connect_api_voice_notes_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Voice Notes"],"summary":"List Voice Notes","description":"List voice notes, optionally filtered by entity.","operationId":"list_voice_notes_connect_api_voice_notes_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entity Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/voice-notes/{note_id}":{"get":{"tags":["Voice Notes"],"summary":"Get Voice Note","description":"Get a single voice note (includes transcript if available).","operationId":"get_voice_note_connect_api_voice_notes__note_id__get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Voice Notes"],"summary":"Delete Voice Note","description":"Delete a voice note and its audio file.","operationId":"delete_voice_note_connect_api_voice_notes__note_id__delete","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/voice-notes/{note_id}/audio":{"get":{"tags":["Voice Notes"],"summary":"Serve Voice Note Audio","description":"Serve the audio file for a voice note.","operationId":"serve_voice_note_audio_connect_api_voice_notes__note_id__audio_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/products/categories":{"get":{"tags":["Products"],"summary":"List Categories","description":"List distinct product categories for this org.","operationId":"list_categories_connect_api_products_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/products/search":{"get":{"tags":["Products"],"summary":"Search Products","description":"Search products by name/SKU for autocomplete.","operationId":"search_products_connect_api_products_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/products":{"get":{"tags":["Products"],"summary":"List Products","description":"List products with optional filters.","operationId":"list_products_connect_api_products_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponse"},"title":"Response List Products Connect Api Products Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Products"],"summary":"Create Product","description":"Create a new product.","operationId":"create_product_connect_api_products_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/products/{product_id}":{"get":{"tags":["Products"],"summary":"Get Product","description":"Get product detail.","operationId":"get_product_connect_api_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Products"],"summary":"Update Product","description":"Update a product.","operationId":"update_product_connect_api_products__product_id__put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Products"],"summary":"Deactivate Product","description":"Soft deactivate a product (set is_active=False).","operationId":"deactivate_product_connect_api_products__product_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/price-lists":{"get":{"tags":["Products"],"summary":"List Price Lists","description":"List all price lists for this org.","operationId":"list_price_lists_connect_api_price_lists_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PriceListResponse"},"type":"array","title":"Response List Price Lists Connect Api Price Lists Get"}}}}}},"post":{"tags":["Products"],"summary":"Create Price List","description":"Create a new price list with optional items.","operationId":"create_price_list_connect_api_price_lists_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/price-lists/{price_list_id}":{"put":{"tags":["Products"],"summary":"Update Price List","description":"Update a price list, optionally replacing all items.","operationId":"update_price_list_connect_api_price_lists__price_list_id__put","parameters":[{"name":"price_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Price List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Products"],"summary":"Delete Price List","description":"Delete a price list and all its items.","operationId":"delete_price_list_connect_api_price_lists__price_list_id__delete","parameters":[{"name":"price_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Price List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/price-lists/{price_list_id}/items":{"get":{"tags":["Products"],"summary":"List Price List Items","description":"Get all items in a price list with product names.","operationId":"list_price_list_items_connect_api_price_lists__price_list_id__items_get","parameters":[{"name":"price_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Price List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PriceListItemResponse"},"title":"Response List Price List Items Connect Api Price Lists  Price List Id  Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotas":{"get":{"tags":["Quotas"],"summary":"List Quotas","operationId":"list_quotas_connect_api_quotas_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},{"name":"period_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type"}},{"name":"current","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Current"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Quotas"],"summary":"Create Quota","operationId":"create_quota_connect_api_quotas_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotas/{quota_id}":{"put":{"tags":["Quotas"],"summary":"Update Quota","operationId":"update_quota_connect_api_quotas__quota_id__put","parameters":[{"name":"quota_id","in":"path","required":true,"schema":{"type":"integer","title":"Quota Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Quotas"],"summary":"Delete Quota","operationId":"delete_quota_connect_api_quotas__quota_id__delete","parameters":[{"name":"quota_id","in":"path","required":true,"schema":{"type":"integer","title":"Quota Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotas/attainment":{"get":{"tags":["Quotas"],"summary":"Quota Attainment","description":"For each user with a quota in the current period, compute attainment.","operationId":"quota_attainment_connect_api_quotas_attainment_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/quotas/team-rollup":{"get":{"tags":["Quotas"],"summary":"Team Rollup","description":"Aggregate team quota performance: total target, total actual, team attainment %.","operationId":"team_rollup_connect_api_quotas_team_rollup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/report-schedules":{"get":{"tags":["Report Schedules"],"summary":"List Schedules","operationId":"list_schedules_connect_api_report_schedules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Report Schedules"],"summary":"Create Schedule","operationId":"create_schedule_connect_api_report_schedules_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/report-schedules/{schedule_id}":{"put":{"tags":["Report Schedules"],"summary":"Update Schedule","operationId":"update_schedule_connect_api_report_schedules__schedule_id__put","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"integer","title":"Schedule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Report Schedules"],"summary":"Delete Schedule","operationId":"delete_schedule_connect_api_report_schedules__schedule_id__delete","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"integer","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/report-schedules/{schedule_id}/send-now":{"post":{"tags":["Report Schedules"],"summary":"Send Now","operationId":"send_now_connect_api_report_schedules__schedule_id__send_now_post","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"integer","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/territories":{"get":{"tags":["Territories"],"summary":"List Territories","description":"List territories with user names resolved.","operationId":"list_territories_connect_api_territories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Territories"],"summary":"Create Territory","description":"Create a new territory.","operationId":"create_territory_connect_api_territories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerritoryCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/territories/{territory_id}":{"put":{"tags":["Territories"],"summary":"Update Territory","description":"Update a territory.","operationId":"update_territory_connect_api_territories__territory_id__put","parameters":[{"name":"territory_id","in":"path","required":true,"schema":{"type":"integer","title":"Territory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerritoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Territories"],"summary":"Delete Territory","description":"Deactivate a territory (soft delete).","operationId":"delete_territory_connect_api_territories__territory_id__delete","parameters":[{"name":"territory_id","in":"path","required":true,"schema":{"type":"integer","title":"Territory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/territories/match":{"get":{"tags":["Territories"],"summary":"Match Territory","description":"Find matching territory based on provided criteria.","operationId":"match_territory_connect_api_territories_match_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"zip_prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Prefix"}},{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"}},{"name":"company_size","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/territories/{territory_id}/stats":{"get":{"tags":["Territories"],"summary":"Territory Stats","description":"Get stats for a territory: deal count/value, contact count, revenue.","operationId":"territory_stats_connect_api_territories__territory_id__stats_get","parameters":[{"name":"territory_id","in":"path","required":true,"schema":{"type":"integer","title":"Territory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/comments":{"get":{"tags":["Comments"],"summary":"List Comments","description":"List comments for an entity — pinned first, then chronological.","operationId":"list_comments_connect_api_comments_get","parameters":[{"name":"entity_type","in":"query","required":true,"schema":{"type":"string","pattern":"^(deal|contact|company)$","title":"Entity Type"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Comments"],"summary":"Create Comment","description":"Create a comment. Parses @mentions and sends notifications.","operationId":"create_comment_connect_api_comments_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/comments/{comment_id}":{"put":{"tags":["Comments"],"summary":"Update Comment","description":"Edit own comment only.","operationId":"update_comment_connect_api_comments__comment_id__put","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Comments"],"summary":"Delete Comment","description":"Soft delete own comment.","operationId":"delete_comment_connect_api_comments__comment_id__delete","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/comments/{comment_id}/pin":{"post":{"tags":["Comments"],"summary":"Toggle Pin Comment","description":"Toggle pin on a comment (requires edit permission).","operationId":"toggle_pin_comment_connect_api_comments__comment_id__pin_post","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deal-templates":{"get":{"tags":["Deal Templates"],"summary":"List Deal Templates","description":"List org's deal templates.","operationId":"list_deal_templates_connect_api_deal_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Deal Templates"],"summary":"Create Deal Template","description":"Create a new deal template.","operationId":"create_deal_template_connect_api_deal_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealTemplateCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deal-templates/{template_id}":{"put":{"tags":["Deal Templates"],"summary":"Update Deal Template","description":"Update a deal template.","operationId":"update_deal_template_connect_api_deal_templates__template_id__put","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Deal Templates"],"summary":"Delete Deal Template","description":"Delete a deal template.","operationId":"delete_deal_template_connect_api_deal_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deal-templates/{template_id}/create-deal":{"post":{"tags":["Deal Templates"],"summary":"Create Deal From Template","description":"Create a new deal from a template.","operationId":"create_deal_from_template_connect_api_deal_templates__template_id__create_deal_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDealFromTemplate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deal-playbooks":{"get":{"tags":["Deal Playbooks"],"summary":"List Playbooks","description":"List playbooks, optionally filtered by pipeline/stage.","operationId":"list_playbooks_connect_api_deal_playbooks_get","parameters":[{"name":"pipeline_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Id"}},{"name":"stage_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stage Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Deal Playbooks"],"summary":"Create Playbook","description":"Create a playbook for a pipeline stage.","operationId":"create_playbook_connect_api_deal_playbooks_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deal-playbooks/{playbook_id}":{"put":{"tags":["Deal Playbooks"],"summary":"Update Playbook","description":"Update a playbook.","operationId":"update_playbook_connect_api_deal_playbooks__playbook_id__put","parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Deal Playbooks"],"summary":"Delete Playbook","description":"Delete a playbook.","operationId":"delete_playbook_connect_api_deal_playbooks__playbook_id__delete","parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/checklist":{"get":{"tags":["Deal Playbooks"],"summary":"Get Deal Checklist","description":"Get checklist progress for deal's current stage playbook.","operationId":"get_deal_checklist_connect_api_deals__deal_id__checklist_get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/deals/{deal_id}/checklist/{item_index}":{"put":{"tags":["Deal Playbooks"],"summary":"Toggle Checklist Item","description":"Toggle a checklist item's completion status.","operationId":"toggle_checklist_item_connect_api_deals__deal_id__checklist__item_index__put","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}},{"name":"item_index","in":"path","required":true,"schema":{"type":"integer","title":"Item Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-sync/gmail/connect":{"get":{"tags":["Email Sync"],"summary":"Gmail Connect","description":"Redirect to Google OAuth consent for Gmail read access.","operationId":"gmail_connect_connect_api_email_sync_gmail_connect_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/email-sync/gmail/callback":{"get":{"tags":["Email Sync"],"summary":"Gmail Callback","description":"Exchange Google auth code for tokens, store encrypted connection.","operationId":"gmail_callback_connect_api_email_sync_gmail_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"oauth_state_gmail","in":"cookie","required":false,"schema":{"type":"string","default":"","title":"Oauth State Gmail"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-sync/outlook/connect":{"get":{"tags":["Email Sync"],"summary":"Outlook Connect","description":"Redirect to Microsoft OAuth consent for Outlook mail read access.","operationId":"outlook_connect_connect_api_email_sync_outlook_connect_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/email-sync/outlook/callback":{"get":{"tags":["Email Sync"],"summary":"Outlook Callback","description":"Exchange Microsoft auth code for tokens, store encrypted connection.","operationId":"outlook_callback_connect_api_email_sync_outlook_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"oauth_state_outlook","in":"cookie","required":false,"schema":{"type":"string","default":"","title":"Oauth State Outlook"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/email-sync/status":{"get":{"tags":["Email Sync"],"summary":"Email Sync Status","description":"Get email sync connection status for the current user.","operationId":"email_sync_status_connect_api_email_sync_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/email-sync/sync":{"post":{"tags":["Email Sync"],"summary":"Manual Email Sync","description":"Trigger a manual email sync for all active connections of the current user.","operationId":"manual_email_sync_connect_api_email_sync_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/email-sync/disconnect":{"delete":{"tags":["Email Sync"],"summary":"Disconnect Email Sync","description":"Disconnect and revoke an email sync connection.","operationId":"disconnect_email_sync_connect_api_email_sync_disconnect_delete","parameters":[{"name":"provider","in":"query","required":true,"schema":{"type":"string","description":"gmail or outlook","title":"Provider"},"description":"gmail or outlook"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/sso/saml/{org_slug}/login":{"get":{"tags":["SSO"],"summary":"Saml Login","description":"Initiate SAML SSO — redirect to IdP.","operationId":"saml_login_connect_sso_saml__org_slug__login_get","parameters":[{"name":"org_slug","in":"path","required":true,"schema":{"type":"string","title":"Org Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/sso/saml/{org_slug}/acs":{"post":{"tags":["SSO"],"summary":"Saml Acs","description":"SAML Assertion Consumer Service — process IdP response.","operationId":"saml_acs_connect_sso_saml__org_slug__acs_post","parameters":[{"name":"org_slug","in":"path","required":true,"schema":{"type":"string","title":"Org Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/sso/oidc/{org_slug}/login":{"get":{"tags":["SSO"],"summary":"Oidc Login","description":"Initiate OIDC SSO — redirect to authorization endpoint.","operationId":"oidc_login_connect_sso_oidc__org_slug__login_get","parameters":[{"name":"org_slug","in":"path","required":true,"schema":{"type":"string","title":"Org Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/sso/oidc/{org_slug}/callback":{"get":{"tags":["SSO"],"summary":"Oidc Callback","description":"OIDC callback — exchange code for tokens, provision user.","operationId":"oidc_callback_connect_sso_oidc__org_slug__callback_get","parameters":[{"name":"org_slug","in":"path","required":true,"schema":{"type":"string","title":"Org Slug"}},{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/sso/config":{"get":{"tags":["SSO"],"summary":"Get Sso Config","description":"Get the org's SSO configuration.","operationId":"get_sso_config_connect_api_sso_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["SSO"],"summary":"Upsert Sso Config","description":"Create or update SSO configuration.","operationId":"upsert_sso_config_connect_api_sso_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOConfigCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SSO"],"summary":"Delete Sso Config","description":"Disable/delete SSO configuration.","operationId":"delete_sso_config_connect_api_sso_config_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/sso/test-metadata":{"post":{"tags":["SSO"],"summary":"Test Saml Metadata","description":"Test SAML metadata URL — fetch and parse to verify it works.","operationId":"test_saml_metadata_connect_api_sso_test_metadata_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/api-keys/scopes":{"get":{"tags":["API Keys"],"summary":"Get Available Scopes","description":"Return available API key scopes grouped by entity, with grantable info.","operationId":"get_available_scopes_connect_api_api_keys_scopes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/api-keys":{"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List API keys for the current org (never shows full key).","operationId":"list_api_keys_connect_api_api_keys_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a new API key. Returns the full key ONCE.","operationId":"create_api_key_connect_api_api_keys_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/api-keys/{key_id}":{"put":{"tags":["API Keys"],"summary":"Update Api Key","description":"Update API key name, scopes, allowed IPs, or active status.","operationId":"update_api_key_connect_api_api_keys__key_id__put","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["API Keys"],"summary":"Delete Api Key","description":"Delete an API key.","operationId":"delete_api_key_connect_api_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/api-keys/{key_id}/rotate":{"post":{"tags":["API Keys"],"summary":"Rotate Api Key","description":"Rotate an API key — generates a new key, returns it once.","operationId":"rotate_api_key_connect_api_api_keys__key_id__rotate_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/admin/permission-config":{"get":{"tags":["Permission Config"],"summary":"List Permission Configs","description":"List all permission configs grouped by resource.","operationId":"list_permission_configs_connect_api_admin_permission_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/admin/permission-config/{resource}":{"put":{"tags":["Permission Config"],"summary":"Update Resource Config","description":"Update operations for all levels of a resource.","operationId":"update_resource_config_connect_api_admin_permission_config__resource__put","parameters":[{"name":"resource","in":"path","required":true,"schema":{"type":"string","title":"Resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/admin/permission-config/reset":{"post":{"tags":["Permission Config"],"summary":"Reset Configs","description":"Reset all permission configs to defaults.","operationId":"reset_configs_connect_api_admin_permission_config_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/jobs/{job_id}/messages":{"get":{"tags":["Job Messages"],"summary":"List Job Messages","description":"Return the message thread for a job, newest last.","operationId":"list_job_messages_connect_api_jobs__job_id__messages_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Job Messages"],"summary":"Create Job Message","description":"Send a message from the authenticated user (pilot) on a job thread.\n\nBody: {\"body\": \"message text\", \"channel\": \"sms\"}","operationId":"create_job_message_connect_api_jobs__job_id__messages_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/jobs/{job_id}/messages/inbound":{"post":{"tags":["Job Messages"],"summary":"Inbound Job Message","description":"Webhook endpoint for inbound SMS from client.\n\nExpected body from provider adapter:\n{\"body\": \"...\", \"sender_phone\": \"+1...\", \"contact_id\": 123}\n\nGated the same way as the other Twilio webhooks in this service\n(see sms.py's ``_verify_twilio_signature``): validates the\nX-Twilio-Signature header against the TWILIO_AUTH_TOKEN env var.\nUnlike those webhooks this one fails closed (``required=True``):\nif no auth token is configured the request is rejected rather than\nwaved through unverified.\norg_id is never taken from the client payload — it's resolved\nserver-side from the Deal record that owns this job_id, so a caller\ncan't forge messages into another org's thread by supplying an\narbitrary org_id.","operationId":"inbound_job_message_connect_api_jobs__job_id__messages_inbound_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/referrals":{"post":{"tags":["referrals"],"summary":"Create Referral","description":"Generate a referral code for a contact.","operationId":"create_referral_connect_api_referrals_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["referrals"],"summary":"List Referrals","description":"List referrals for the authenticated org.","operationId":"list_referrals_connect_api_referrals_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/referrals/lookup/{code}":{"get":{"tags":["referrals"],"summary":"Lookup Referral","description":"Public lookup -- validate a referral code (no auth required).","operationId":"lookup_referral_connect_api_referrals_lookup__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/referrals/convert":{"post":{"tags":["referrals"],"summary":"Convert Referral","description":"Mark a referral as converted when the referred contact books.","operationId":"convert_referral_connect_api_referrals_convert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralConvertRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/referrals/{referral_id}/credit":{"post":{"tags":["referrals"],"summary":"Credit Referral","description":"Mark a referral as credited (reward issued to referrer).","operationId":"credit_referral_connect_api_referrals__referral_id__credit_post","parameters":[{"name":"referral_id","in":"path","required":true,"schema":{"type":"integer","title":"Referral Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai-receptionist/config":{"get":{"tags":["AI Receptionist"],"summary":"Get Config","description":"Get the AI receptionist config for the current org (creates default if missing).","operationId":"get_config_connect_api_ai_receptionist_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["AI Receptionist"],"summary":"Update Config","description":"Update the AI receptionist configuration.","operationId":"update_config_connect_api_ai_receptionist_config_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai-receptionist/provision":{"post":{"tags":["AI Receptionist"],"summary":"Provision Receptionist","description":"Provision an inbound number (and SignalWire subproject) for this org.\n\nSAFETY: defaults to dry-run. Buying a real number costs money, so a real\npurchase requires BOTH ``dry_run=false`` in the body AND the\n``AI_RECEPTIONIST_ALLOW_LIVE_PROVISION=1`` env flag. Without the env flag we\nforce dry-run regardless of the request, so no accidental spend is possible.","operationId":"provision_receptionist_connect_api_ai_receptionist_provision_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai-receptionist/calls":{"get":{"tags":["AI Receptionist"],"summary":"List Calls","description":"List AI receptionist call logs.","operationId":"list_calls_connect_api_ai_receptionist_calls_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai-receptionist/calls/{call_id}":{"get":{"tags":["AI Receptionist"],"summary":"Get Call","description":"Get a single call log with full conversation.","operationId":"get_call_connect_api_ai_receptionist_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai-receptionist/voice":{"post":{"tags":["AI Receptionist"],"summary":"Twilio Voice Webhook","description":"Provider calls this when a call comes in. Returns TwiML greeting + Gather.\n\nThe provisioned webhook carries ``?org_id=<id>`` so the call routes to the\nright tenant's config (multi-tenant).","operationId":"twilio_voice_webhook_connect_api_ai_receptionist_voice_post","parameters":[{"name":"org_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai-receptionist/process":{"post":{"tags":["AI Receptionist"],"summary":"Twilio Process Speech","description":"Process the caller's speech via Claude and respond.","operationId":"twilio_process_speech_connect_api_ai_receptionist_process_post","parameters":[{"name":"call_id","in":"query","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai-receptionist/transfer-status":{"post":{"tags":["AI Receptionist"],"summary":"Twilio Transfer Status","description":"Provider POSTs here after a <Dial> to the user's cell. If the cell didn't\nanswer (no-answer/busy/failed) we fall through to voicemail; if it was\nanswered the call is already bridged, so we just hang up cleanly.","operationId":"twilio_transfer_status_connect_api_ai_receptionist_transfer_status_post","parameters":[{"name":"call_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai-receptionist/voicemail":{"post":{"tags":["AI Receptionist"],"summary":"Twilio Voicemail","description":"Provider POSTs the recorded voicemail here. Store the recording URL on the\ncall log and append it to the conversation transcript.","operationId":"twilio_voicemail_connect_api_ai_receptionist_voicemail_post","parameters":[{"name":"call_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/ai-receptionist/complete":{"post":{"tags":["AI Receptionist"],"summary":"Twilio Call Complete","description":"Called when the call ends (provider status callback). Finalises the call\nand meters the billed voice minutes. Fires once per call.","operationId":"twilio_call_complete_connect_api_ai_receptionist_complete_post","parameters":[{"name":"call_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/discovery/search":{"post":{"tags":["Discovery"],"summary":"Search Prospects","description":"Discover business prospects in a city matched to the user's equipment.\n\nUses Google Places API first, falls back to Claude AI analysis.\nReturns scored list of businesses with contact info and outreach tips.\nPersists every search as an OutreachSearch row so the user can revisit\nprior locations + results without re-running the AI prompt.","operationId":"search_prospects_connect_api_discovery_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/discovery/industries":{"post":{"tags":["Discovery"],"summary":"Get Industries","description":"Get the list of target industries based on equipment capabilities.\nUseful for showing the user which industries will be searched before running discovery.","operationId":"get_industries_connect_api_discovery_industries_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EquipmentItem"},"type":"array","title":"Equipment","default":[]}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndustriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/discovery/score":{"post":{"tags":["Discovery"],"summary":"Score Prospect","description":"Score a single prospect based on equipment capabilities and business signals.\nUseful for re-scoring after equipment changes or manual prospect entry.","operationId":"score_prospect_connect_api_discovery_score_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/discovery/reverse-geocode":{"post":{"tags":["Discovery"],"summary":"Reverse Geocode","description":"Convert GPS lat/lng to city/state/zip.\n\nUses OpenStreetMap Nominatim (free, no API key) so we don't depend on\nGoogle API keys whose IP/referer restrictions block this server.\nReturns empty fields if Nominatim is unreachable; the frontend falls\nback to letting the user type a city/state manually.","operationId":"reverse_geocode_connect_api_discovery_reverse_geocode_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReverseGeocodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReverseGeocodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/discovery/call-times":{"get":{"tags":["Discovery"],"summary":"Get Call Times","description":"Get best call times for all industries.","operationId":"get_call_times_connect_api_discovery_call_times_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/discovery/searches":{"get":{"tags":["Discovery"],"summary":"List Recent Searches","operationId":"list_recent_searches_connect_api_discovery_searches_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OutreachSearchSummary"},"title":"Response List Recent Searches Connect Api Discovery Searches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/discovery/searches/{search_id}":{"get":{"tags":["Discovery"],"summary":"Get Saved Search","operationId":"get_saved_search_connect_api_discovery_searches__search_id__get","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"integer","title":"Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutreachSearchDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Discovery"],"summary":"Delete Saved Search","description":"Delete a saved search and archive its remaining leads.\n\nCascade rule: any lead row still in the leads table with this\noutreach_search_id is archived (archived_at = now()). Leads that\nhave already been promoted to a Prospect/Contact are unaffected\nbecause they were physically moved out of the leads table at\npromotion time and don't carry the search_id any more.","operationId":"delete_saved_search_connect_api_discovery_searches__search_id__delete","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"integer","title":"Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/equipment":{"get":{"tags":["Equipment"],"summary":"List Equipment","description":"List all equipment for the current user.","operationId":"list_equipment_connect_api_equipment_get","parameters":[{"name":"equipment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EquipmentResponse"},"title":"Response List Equipment Connect Api Equipment Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Equipment"],"summary":"Create Equipment","description":"Add a new piece of equipment (drone, sensor, etc.).\n\nIf the user did not provide capabilities, kicks off the AI lookup against\nClaude using display_name (or \"<manufacturer> <model>\") and auto-fills\ncapabilities, service_categories, specs, and equipment_type from the\nresearch result. Equipment quality directly drives Lead-Gen match\nquality, so we DON'T want the user to have to think about capability\nflags by hand.","operationId":"create_equipment_connect_api_equipment_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/equipment/stats":{"get":{"tags":["Equipment"],"summary":"Equipment Stats","description":"Get summary stats for the user's equipment fleet.","operationId":"equipment_stats_connect_api_equipment_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/equipment/{equipment_id}":{"get":{"tags":["Equipment"],"summary":"Get Equipment","description":"Get a single equipment item by ID.","operationId":"get_equipment_connect_api_equipment__equipment_id__get","parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"integer","title":"Equipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Equipment"],"summary":"Update Equipment","description":"Update an equipment item.","operationId":"update_equipment_connect_api_equipment__equipment_id__put","parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"integer","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Equipment"],"summary":"Delete Equipment","description":"Delete an equipment item.","operationId":"delete_equipment_connect_api_equipment__equipment_id__delete","parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"integer","title":"Equipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/equipment/{equipment_id}/maintenance":{"get":{"tags":["Equipment"],"summary":"List Maintenance","description":"List maintenance records for an equipment item.","operationId":"list_maintenance_connect_api_equipment__equipment_id__maintenance_get","parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"integer","title":"Equipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaintenanceResponse"},"title":"Response List Maintenance Connect Api Equipment  Equipment Id  Maintenance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Equipment"],"summary":"Add Maintenance","description":"Add a maintenance record for an equipment item.","operationId":"add_maintenance_connect_api_equipment__equipment_id__maintenance_post","parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"integer","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/equipment/lookup":{"post":{"tags":["Equipment"],"summary":"Lookup Equipment","description":"Lookup equipment capabilities. First checks our cached database; on\nmiss, calls Claude to research the equipment and caches the result for\nfuture users. Returns the same FAQLookupResponse shape either way.","operationId":"lookup_equipment_connect_api_equipment_lookup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FAQLookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FAQLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/equipment/rates":{"get":{"tags":["Equipment"],"summary":"Get Rates","description":"Get the user's pricing rates with defaults.","operationId":"get_rates_connect_api_equipment_rates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["Equipment"],"summary":"Save Rates","description":"Save user pricing rates.","operationId":"save_rates_connect_api_equipment_rates_put","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PricingRateUpdate"},"type":"array","title":"Rates"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/equipment/calculate":{"post":{"tags":["Equipment"],"summary":"Calculate Quote","description":"Real-time drone quote calculator using 10-step pricing engine.","operationId":"calculate_quote_connect_api_equipment_calculate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateCalculateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/packages":{"get":{"tags":["Packages"],"summary":"List Packages","description":"List all available industry sales packages.","operationId":"list_packages_connect_api_packages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PackageSummary"},"type":"array","title":"Response List Packages Connect Api Packages Get"}}}}}}},"/connect/api/packages/{industry}":{"get":{"tags":["Packages"],"summary":"Get Package","description":"Get full detail for an industry sales package.","operationId":"get_package_connect_api_packages__industry__get","parameters":[{"name":"industry","in":"path","required":true,"schema":{"type":"string","title":"Industry"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Packages"],"summary":"Update Package","description":"Update or create a customized industry package in the database.","operationId":"update_package_connect_api_packages__industry__put","parameters":[{"name":"industry","in":"path","required":true,"schema":{"type":"string","title":"Industry"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/packages/{industry}/equipment-guide":{"get":{"tags":["Packages"],"summary":"Equipment Guide","description":"Get the recommended equipment guide for an industry.","operationId":"equipment_guide_connect_api_packages__industry__equipment_guide_get","parameters":[{"name":"industry","in":"path","required":true,"schema":{"type":"string","title":"Industry"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/packages/terms/all":{"get":{"tags":["Packages"],"summary":"List Terms","description":"List industry glossary terms, optionally filtered.","operationId":"list_terms_connect_api_packages_terms_all_get","parameters":[{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IndustryTermResponse"},"title":"Response List Terms Connect Api Packages Terms All Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/packages/terms":{"post":{"tags":["Packages"],"summary":"Create Term","description":"Add a new industry glossary term.","operationId":"create_term_connect_api_packages_terms_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndustryTermCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndustryTermResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/packages/{industry}/generate-onepager":{"post":{"tags":["Packages"],"summary":"Generate Onepager","description":"Generate an AI-powered one-page sales proposal for a prospect.","operationId":"generate_onepager_connect_api_packages__industry__generate_onepager_post","parameters":[{"name":"industry","in":"path","required":true,"schema":{"type":"string","title":"Industry"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnePagerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/leads":{"get":{"tags":["leads"],"summary":"Leads Page","description":"Leads list — raw output of the AI search, awaiting review.\n\nThe page embeds the Lead Search form at the top so the user can\nsearch and immediately see results without leaving the page.","operationId":"leads_page_connect_leads_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/connect/api/leads":{"get":{"tags":["leads"],"summary":"List Leads","operationId":"list_leads_connect_api_leads_get","parameters":[{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived rows","default":false,"title":"Archived"},"description":"Include archived rows"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text filter on company name","title":"Q"},"description":"Free-text filter on company name"},{"name":"outreach_search_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Show only leads sourced from this saved search id","title":"Outreach Search Id"},"description":"Show only leads sourced from this saved search id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeadResponse"},"title":"Response List Leads Connect Api Leads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["leads"],"summary":"Create Lead","description":"Save a row to the leads table. Idempotent on company_name within an\norg — if the company is already a lead OR a contact (any lifecycle\nstage), the existing row is returned with a `dedup` marker so the\ncaller can count duplicates instead of double-saving.","operationId":"create_lead_connect_api_leads_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/leads/{lead_id}":{"get":{"tags":["leads"],"summary":"Get Lead","operationId":"get_lead_connect_api_leads__lead_id__get","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["leads"],"summary":"Update Lead","operationId":"update_lead_connect_api_leads__lead_id__put","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","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/LeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["leads"],"summary":"Delete Lead","description":"Hard delete — row is removed from the database. Use archive for a\nreversible action.","operationId":"delete_lead_connect_api_leads__lead_id__delete","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/leads/{lead_id}/promote":{"post":{"tags":["leads"],"summary":"Promote Lead To Prospect","description":"Move a lead row into the contacts table as a prospect, then delete\nthe lead. The contacts table IS the prospects list — there is no\nseparate prospects table.","operationId":"promote_lead_to_prospect_connect_api_leads__lead_id__promote_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Promote Lead To Prospect Connect Api Leads  Lead Id  Promote Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/leads/{lead_id}/research":{"post":{"tags":["leads"],"summary":"Research Lead","description":"Run deep AI research (Claude + web search) on a prospect's company and\nstore it on ``lead.ai_research`` IN PLACE — the prospect stays a prospect.\nCached 7 days; pass ``force=true`` to refresh sooner.","operationId":"research_lead_connect_api_leads__lead_id__research_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Re-run now instead of using the 7-day cache","default":false,"title":"Force"},"description":"Re-run now instead of using the 7-day cache"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/leads/{lead_id}/mark-dead":{"post":{"tags":["leads"],"summary":"Mark Lead Dead","description":"Mark a prospect as dead (not a fit). Sets disposition='dead' and\narchives it so it leaves the active list. Reversible via /restore.","operationId":"mark_lead_dead_connect_api_leads__lead_id__mark_dead_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/leads/{lead_id}/archive":{"post":{"tags":["leads"],"summary":"Archive Lead","description":"Soft-archive — sets archived_at. Restorable via /restore.","operationId":"archive_lead_connect_api_leads__lead_id__archive_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/leads/{lead_id}/restore":{"post":{"tags":["leads"],"summary":"Restore Lead","operationId":"restore_lead_connect_api_leads__lead_id__restore_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quote-rates/industries":{"get":{"tags":["Quote Rates"],"summary":"List Industries","operationId":"list_industries_connect_api_quote_rates_industries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IndustryOut"},"type":"array","title":"Response List Industries Connect Api Quote Rates Industries Get"}}}}}}},"/connect/api/quote-rates/baselines":{"get":{"tags":["Quote Rates"],"summary":"List Baselines","operationId":"list_baselines_connect_api_quote_rates_baselines_get","parameters":[{"name":"industry_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BaselineOut"},"title":"Response List Baselines Connect Api Quote Rates Baselines Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quote-rates/packages":{"get":{"tags":["Quote Rates"],"summary":"List Packages","operationId":"list_packages_connect_api_quote_rates_packages_get","parameters":[{"name":"industry_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PackageOut"},"title":"Response List Packages Connect Api Quote Rates Packages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quote-rates/hazards":{"get":{"tags":["Quote Rates"],"summary":"List Hazards","operationId":"list_hazards_connect_api_quote_rates_hazards_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HazardOut"},"type":"array","title":"Response List Hazards Connect Api Quote Rates Hazards Get"}}}}}}},"/connect/api/quote-rates/addons":{"get":{"tags":["Quote Rates"],"summary":"List Addons","operationId":"list_addons_connect_api_quote_rates_addons_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AddonOut"},"type":"array","title":"Response List Addons Connect Api Quote Rates Addons Get"}}}}}}},"/connect/api/quote-rates/drones":{"get":{"tags":["Quote Rates"],"summary":"List Drone Adders","description":"Return the pilot's actual drones from the Equipment table,\nwith rate adders applied from drone_adders where a match exists.\n\nMatch priority:\n  1. drone_adders.drone_model == equipment.model (exact)\n  2. drone_adders.drone_model == equipment.display_name (exact)\n  3. case-insensitive contains (e.g. 'mavic_3e' inside 'DJI Mavic 3E')\n  4. default — flat_adder = 0, the equipment shows up but doesn't\n     add to the quote unless the pilot or org admin sets a rate.","operationId":"list_drone_adders_connect_api_quote_rates_drones_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DroneAdderOut"},"type":"array","title":"Response List Drone Adders Connect Api Quote Rates Drones Get"}}}}}}},"/connect/api/quote-rates/pricing-rule":{"get":{"tags":["Quote Rates"],"summary":"Get Pricing Rule","operationId":"get_pricing_rule_connect_api_quote_rates_pricing_rule_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingRuleOut"}}}}}}},"/connect/api/quote-rates/pilot-overrides":{"post":{"tags":["Quote Rates"],"summary":"Submit Pilot Override","operationId":"submit_pilot_override_connect_api_quote_rates_pilot_overrides_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PilotOverrideIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quote-rates/calculate":{"post":{"tags":["Quote Rates"],"summary":"Calculate Preview","description":"Preview-only — no snapshot persisted. Use for live UI updates.","operationId":"calculate_preview_connect_api_quote_rates_calculate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationInternalOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/calculate":{"post":{"tags":["Quote Rates"],"summary":"Calculate And Snapshot","description":"Calculate and persist a snapshot — call when quote moves draft→sent.","operationId":"calculate_and_snapshot_connect_api_quotes__quote_id__calculate_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationInternalOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/api/quotes/{quote_id}/snapshots":{"get":{"tags":["Quote Rates"],"summary":"List Snapshots","description":"Audit trail — returns ALL snapshots ordered newest first.","operationId":"list_snapshots_connect_api_quotes__quote_id__snapshots_get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"integer","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect/health":{"get":{"summary":"Health Check","operationId":"health_check_connect_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect/api/health/detailed":{"get":{"summary":"Detailed Health","description":"Detailed health check with subsystem status.","operationId":"detailed_health_connect_api_health_detailed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ActivityCreate":{"properties":{"activity_type":{"type":"string","minLength":1,"title":"Activity Type"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"visibility":{"type":"string","title":"Visibility","default":"team"},"attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments"},"mentions":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Mentions"}},"type":"object","required":["activity_type"],"title":"ActivityCreate"},"ActivityListResponse":{"properties":{"activities":{"items":{"$ref":"#/components/schemas/ActivityResponse"},"type":"array","title":"Activities"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["activities","total","page","per_page","total_pages"],"title":"ActivityListResponse"},"ActivityReport":{"properties":{"by_type":{"items":{"$ref":"#/components/schemas/ActivityTypeCount"},"type":"array","title":"By Type"},"by_user":{"items":{"$ref":"#/components/schemas/ActivityUserCount"},"type":"array","title":"By User"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["by_type","by_user","total"],"title":"ActivityReport"},"ActivityResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"activity_type":{"type":"string","title":"Activity Type"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"is_pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pinned","default":false},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility","default":"team"},"attachments":{"anyOf":[{},{"type":"null"}],"title":"Attachments"},"mentions":{"anyOf":[{},{"type":"null"}],"title":"Mentions"},"email_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Message Id"},"email_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Status"},"email_opens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Email Opens","default":0},"email_clicks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Email Clicks","default":0},"email_opened_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Opened At"},"email_clicked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Clicked At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","activity_type"],"title":"ActivityResponse"},"ActivityTypeCount":{"properties":{"activity_type":{"type":"string","title":"Activity Type"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["activity_type","count"],"title":"ActivityTypeCount"},"ActivityUpdate":{"properties":{"activity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity Type"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"},"attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments"}},"type":"object","title":"ActivityUpdate"},"ActivityUserCount":{"properties":{"user_id":{"type":"integer","title":"User Id"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["user_id","count"],"title":"ActivityUserCount"},"AddonOut":{"properties":{"id":{"type":"integer","title":"Id"},"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"pct_uplift":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Pct Uplift"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","code","label","amount_cents","unit","pct_uplift","category","description"],"title":"AddonOut"},"ApiKeyCreate":{"properties":{"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":[]},"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"resource_permissions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resource Permissions"},"row_restrictions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Row Restrictions"},"field_restrictions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Field Restrictions"},"ip_restriction_enabled":{"type":"boolean","title":"Ip Restriction Enabled","default":true}},"type":"object","required":["name"],"title":"ApiKeyCreate"},"ApiKeyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"resource_permissions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resource Permissions"},"row_restrictions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Row Restrictions"},"field_restrictions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Field Restrictions"},"ip_restriction_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ip Restriction Enabled"}},"type":"object","title":"ApiKeyUpdate"},"AssignmentRuleCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"entity_type":{"type":"string","minLength":1,"title":"Entity Type"},"rule_type":{"type":"string","minLength":1,"title":"Rule Type"},"criteria":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Criteria"},"assigned_to_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To User Id"},"round_robin_users":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Round Robin Users"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","entity_type","rule_type"],"title":"AssignmentRuleCreate"},"AssignmentRuleResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"entity_type":{"type":"string","title":"Entity Type"},"rule_type":{"type":"string","title":"Rule Type"},"criteria":{"anyOf":[{},{"type":"null"}],"title":"Criteria"},"assigned_to_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To User Id"},"round_robin_users":{"anyOf":[{},{"type":"null"}],"title":"Round Robin Users"},"round_robin_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Round Robin Index","default":0},"sort_order":{"type":"integer","title":"Sort Order","default":0},"is_active":{"type":"boolean","title":"Is Active","default":true},"created_at":{"anyOf":[{},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","org_id","name","entity_type","rule_type"],"title":"AssignmentRuleResponse"},"AssignmentRuleUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"rule_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Type"},"criteria":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Criteria"},"assigned_to_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To User Id"},"round_robin_users":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Round Robin Users"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"AssignmentRuleUpdate"},"AuditLogListResponse":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/AuditLogResponse"},"type":"array","title":"Logs"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["logs","total","page","per_page","total_pages"],"title":"AuditLogListResponse"},"AuditLogResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"integer","title":"Entity Id"},"action":{"type":"string","title":"Action"},"changes_json":{"anyOf":[{},{"type":"null"}],"title":"Changes Json"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"}},"type":"object","required":["id","org_id","entity_type","entity_id","action"],"title":"AuditLogResponse"},"AutoConfigureRequest":{"properties":{"dns_provider_type":{"type":"string","title":"Dns Provider Type"},"credentials":{"additionalProperties":true,"type":"object","title":"Credentials"}},"type":"object","required":["dns_provider_type","credentials"],"title":"AutoConfigureRequest"},"AutomationLogListResponse":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/AutomationLogResponse"},"type":"array","title":"Logs"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["logs","total","page","per_page","total_pages"],"title":"AutomationLogListResponse"},"AutomationLogResponse":{"properties":{"id":{"type":"integer","title":"Id"},"automation_rule_id":{"type":"integer","title":"Automation Rule Id"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"integer","title":"Entity Id"},"executed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Executed At"},"status":{"type":"string","title":"Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"actions_executed":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Actions Executed"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","automation_rule_id","entity_type","entity_id","status"],"title":"AutomationLogResponse"},"AutomationRuleCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"trigger_type":{"type":"string","maxLength":50,"minLength":1,"title":"Trigger Type"},"trigger_criteria":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Criteria","default":{}},"action_type":{"type":"string","maxLength":50,"minLength":1,"title":"Action Type"},"action_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Action Config","default":{}},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","trigger_type","action_type"],"title":"AutomationRuleCreate"},"AutomationRuleDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"trigger_type":{"type":"string","title":"Trigger Type"},"trigger_criteria":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Criteria","default":{}},"action_type":{"type":"string","title":"Action Type"},"action_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Action Config","default":{}},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true},"run_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Run Count","default":0},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"recent_logs":{"items":{"$ref":"#/components/schemas/AutomationLogResponse"},"type":"array","title":"Recent Logs","default":[]}},"type":"object","required":["id","org_id","name","trigger_type","action_type"],"title":"AutomationRuleDetailResponse"},"AutomationRuleListResponse":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/AutomationRuleResponse"},"type":"array","title":"Rules"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["rules","total","page","per_page","total_pages"],"title":"AutomationRuleListResponse"},"AutomationRuleResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"trigger_type":{"type":"string","title":"Trigger Type"},"trigger_criteria":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Criteria","default":{}},"action_type":{"type":"string","title":"Action Type"},"action_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Action Config","default":{}},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true},"run_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Run Count","default":0},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","name","trigger_type","action_type"],"title":"AutomationRuleResponse"},"AutomationRuleUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"trigger_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Type"},"trigger_criteria":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Criteria"},"action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Type"},"action_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Action Config"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"AutomationRuleUpdate"},"BaselineOut":{"properties":{"id":{"type":"integer","title":"Id"},"industry_code":{"type":"string","title":"Industry Code"},"category":{"type":"string","title":"Category"},"amount_cents":{"type":"integer","title":"Amount Cents"},"unit":{"type":"string","title":"Unit"},"tier_min":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tier Min"},"tier_max":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tier Max"},"source":{"type":"string","title":"Source"},"is_locked":{"type":"boolean","title":"Is Locked"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"included_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Included Summary"}},"type":"object","required":["id","industry_code","category","amount_cents","unit","tier_min","tier_max","source","is_locked","notes"],"title":"BaselineOut"},"BatchResolveRequest":{"properties":{"org_id":{"type":"integer","title":"Org Id"},"contact_ids":{"items":{"type":"integer"},"type":"array","title":"Contact Ids"}},"type":"object","required":["org_id","contact_ids"],"title":"BatchResolveRequest"},"BattleCardSchema":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"}},"type":"object","required":["title","content"],"title":"BattleCardSchema"},"Body_detect_import_format_connect_api_import_detect_format_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_detect_import_format_connect_api_import_detect_format_post"},"Body_import_contacts_connect_api_contacts_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_contacts_connect_api_contacts_import_post"},"Body_preview_import_connect_api_import_preview_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_preview_import_connect_api_import_preview_post"},"Body_sms_inbound_webhook_connect_api_sms_inbound_post":{"properties":{"From":{"type":"string","title":"From","default":""},"To":{"type":"string","title":"To","default":""},"Body":{"type":"string","title":"Body","default":""},"MessageSid":{"type":"string","title":"Messagesid","default":""}},"type":"object","title":"Body_sms_inbound_webhook_connect_api_sms_inbound_post"},"Body_upload_voice_note_connect_api_voice_notes_post":{"properties":{"audio":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entity Id"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"}},"type":"object","required":["audio"],"title":"Body_upload_voice_note_connect_api_voice_notes_post"},"BulkContactDeleteRequest":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Ids"}},"type":"object","required":["ids"],"title":"BulkContactDeleteRequest"},"BulkContactTagRequest":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Ids"},"tag_id":{"type":"integer","title":"Tag Id"}},"type":"object","required":["ids","tag_id"],"title":"BulkContactTagRequest"},"BulkContactUpdateRequest":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Ids"},"changes":{"additionalProperties":true,"type":"object","title":"Changes"}},"type":"object","required":["ids","changes"],"title":"BulkContactUpdateRequest"},"BulkDealStageRequest":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Ids"},"stage_id":{"type":"integer","title":"Stage Id"}},"type":"object","required":["ids","stage_id"],"title":"BulkDealStageRequest"},"CalculateIn":{"properties":{"segments":{"items":{"$ref":"#/components/schemas/SegmentIn"},"type":"array","title":"Segments"},"drone_models":{"items":{"type":"string"},"type":"array","title":"Drone Models"},"hazard_codes":{"items":{"type":"string"},"type":"array","title":"Hazard Codes"},"addon_codes":{"items":{"type":"string"},"type":"array","title":"Addon Codes"},"package_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Package Id"},"location_zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Zip"},"location_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location State"},"drive_miles_round_trip":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Drive Miles Round Trip"},"is_rush":{"type":"boolean","title":"Is Rush","default":false},"is_same_day":{"type":"boolean","title":"Is Same Day","default":false},"is_weekend":{"type":"boolean","title":"Is Weekend","default":false},"is_night":{"type":"boolean","title":"Is Night","default":false},"is_recurring_visit":{"type":"boolean","title":"Is Recurring Visit","default":false},"multi_day_count":{"type":"integer","title":"Multi Day Count","default":1},"pilot_pay_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pilot Pay Amount Cents"},"pilot_pay_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pilot Pay Hours"},"equipment_rental_cents":{"type":"integer","title":"Equipment Rental Cents","default":0},"vehicle_cost_cents":{"type":"integer","title":"Vehicle Cost Cents","default":0},"processing_cost_cents":{"type":"integer","title":"Processing Cost Cents","default":0}},"type":"object","title":"CalculateIn"},"CalculationInternalOut":{"properties":{"line_items":{"items":{"$ref":"#/components/schemas/LineItemOut"},"type":"array","title":"Line Items"},"segments_subtotal_cents":{"type":"integer","title":"Segments Subtotal Cents"},"drone_adder_cents":{"type":"integer","title":"Drone Adder Cents"},"hazard_cents":{"type":"integer","title":"Hazard Cents"},"addon_cents":{"type":"integer","title":"Addon Cents"},"travel_cents":{"type":"integer","title":"Travel Cents"},"multiplier_uplift_cents":{"type":"integer","title":"Multiplier Uplift Cents"},"discount_cents":{"type":"integer","title":"Discount Cents"},"subtotal_before_min_cents":{"type":"integer","title":"Subtotal Before Min Cents"},"min_quote_applied_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Quote Applied Cents"},"subtotal_cents":{"type":"integer","title":"Subtotal Cents"},"tax_cents":{"type":"integer","title":"Tax Cents"},"total_cents":{"type":"integer","title":"Total Cents"},"estimated_cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Cost Cents"},"estimated_margin_pct":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimated Margin Pct"},"snapshot_hash":{"type":"string","title":"Snapshot Hash"}},"type":"object","required":["line_items","segments_subtotal_cents","drone_adder_cents","hazard_cents","addon_cents","travel_cents","multiplier_uplift_cents","discount_cents","subtotal_before_min_cents","min_quote_applied_cents","subtotal_cents","tax_cents","total_cents","estimated_cost_cents","estimated_margin_pct","snapshot_hash"],"title":"CalculationInternalOut","description":"Internal-only response — adds margin + snapshot hash."},"ChannelCreateUpdate":{"properties":{"channel_type":{"type":"string","maxLength":30,"title":"Channel Type"},"name":{"type":"string","maxLength":255,"title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":[]},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["channel_type","name","config"],"title":"ChannelCreateUpdate"},"ChecklistItemSchema":{"properties":{"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":false}},"type":"object","required":["label"],"title":"ChecklistItemSchema"},"ClickToCallRequest":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"},"user_phone":{"type":"string","title":"User Phone","description":"Pilot's phone — Twilio rings this first"}},"type":"object","required":["contact_id","user_phone"],"title":"ClickToCallRequest"},"ClickToCallResponse":{"properties":{"call_sid":{"type":"string","title":"Call Sid"},"status":{"type":"string","title":"Status"},"contact_phone":{"type":"string","title":"Contact Phone"},"bridged_via":{"type":"string","title":"Bridged Via"}},"type":"object","required":["call_sid","status","contact_phone","bridged_via"],"title":"ClickToCallResponse"},"CommentCreate":{"properties":{"entity_type":{"type":"string","pattern":"^(deal|contact|company)$","title":"Entity Type"},"entity_id":{"type":"integer","title":"Entity Id"},"body":{"type":"string","maxLength":10000,"minLength":1,"title":"Body"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"}},"type":"object","required":["entity_type","entity_id","body"],"title":"CommentCreate"},"CommentUpdate":{"properties":{"body":{"type":"string","maxLength":10000,"minLength":1,"title":"Body"}},"type":"object","required":["body"],"title":"CommentUpdate"},"CompanyAddressEntry":{"properties":{"address_type":{"type":"string","title":"Address Type","default":"office"},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street"},"street2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"country":{"type":"string","title":"Country","default":"US"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","title":"CompanyAddressEntry"},"CompanyAddressResponse":{"properties":{"id":{"type":"integer","title":"Id"},"address_type":{"type":"string","title":"Address Type","default":"office"},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street"},"street2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"country":{"type":"string","title":"Country","default":"US"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","required":["id"],"title":"CompanyAddressResponse"},"CompanyCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"company_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Size"},"annual_revenue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Annual Revenue"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"address_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address Json"},"parent_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Company Id"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"lifecycle_stage":{"type":"string","title":"Lifecycle Stage","default":"lead"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating"},"employees_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employees Count"},"ticker_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker Symbol"},"ownership":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownership"},"sic_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic Code"},"fax":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fax"},"emails":{"anyOf":[{"items":{"$ref":"#/components/schemas/CompanyEmailEntry"},"type":"array"},{"type":"null"}],"title":"Emails"},"phones":{"anyOf":[{"items":{"$ref":"#/components/schemas/CompanyPhoneEntry"},"type":"array"},{"type":"null"}],"title":"Phones"},"addresses":{"anyOf":[{"items":{"$ref":"#/components/schemas/CompanyAddressEntry"},"type":"array"},{"type":"null"}],"title":"Addresses"}},"type":"object","required":["name"],"title":"CompanyCreate"},"CompanyDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"company_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Size"},"annual_revenue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Annual Revenue"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"address_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address Json"},"parent_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Company Id"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"lifecycle_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage","default":"lead"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating"},"employees_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employees Count"},"ticker_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker Symbol"},"ownership":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownership"},"sic_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic Code"},"fax":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fax"},"emails":{"items":{"$ref":"#/components/schemas/CompanyEmailResponse"},"type":"array","title":"Emails","default":[]},"phones":{"items":{"$ref":"#/components/schemas/CompanyPhoneResponse"},"type":"array","title":"Phones","default":[]},"addresses":{"items":{"$ref":"#/components/schemas/CompanyAddressResponse"},"type":"array","title":"Addresses","default":[]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"contact_count":{"type":"integer","title":"Contact Count","default":0}},"type":"object","required":["id","org_id","name"],"title":"CompanyDetailResponse"},"CompanyEmailEntry":{"properties":{"email":{"type":"string","title":"Email"},"email_type":{"type":"string","title":"Email Type","default":"work"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"opt_out":{"type":"boolean","title":"Opt Out","default":false}},"type":"object","required":["email"],"title":"CompanyEmailEntry"},"CompanyEmailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"email_type":{"type":"string","title":"Email Type","default":"work"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"opt_out":{"type":"boolean","title":"Opt Out","default":false}},"type":"object","required":["id","email"],"title":"CompanyEmailResponse"},"CompanyListResponse":{"properties":{"companies":{"items":{"$ref":"#/components/schemas/CompanyResponse"},"type":"array","title":"Companies"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["companies","total","page","per_page","total_pages"],"title":"CompanyListResponse"},"CompanyPhoneEntry":{"properties":{"phone":{"type":"string","title":"Phone"},"phone_type":{"type":"string","title":"Phone Type","default":"office"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"do_not_call":{"type":"boolean","title":"Do Not Call","default":false}},"type":"object","required":["phone"],"title":"CompanyPhoneEntry"},"CompanyPhoneResponse":{"properties":{"id":{"type":"integer","title":"Id"},"phone":{"type":"string","title":"Phone"},"phone_type":{"type":"string","title":"Phone Type","default":"office"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"do_not_call":{"type":"boolean","title":"Do Not Call","default":false}},"type":"object","required":["id","phone"],"title":"CompanyPhoneResponse"},"CompanyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"company_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Size"},"annual_revenue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Annual Revenue"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"address_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address Json"},"parent_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Company Id"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"lifecycle_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage","default":"lead"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating"},"employees_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employees Count"},"ticker_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker Symbol"},"ownership":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownership"},"sic_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic Code"},"fax":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fax"},"emails":{"items":{"$ref":"#/components/schemas/CompanyEmailResponse"},"type":"array","title":"Emails","default":[]},"phones":{"items":{"$ref":"#/components/schemas/CompanyPhoneResponse"},"type":"array","title":"Phones","default":[]},"addresses":{"items":{"$ref":"#/components/schemas/CompanyAddressResponse"},"type":"array","title":"Addresses","default":[]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},"type":"object","required":["id","org_id","name"],"title":"CompanyResponse"},"CompanyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"company_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Size"},"annual_revenue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Annual Revenue"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"address_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address Json"},"parent_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Company Id"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"lifecycle_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating"},"employees_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employees Count"},"ticker_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker Symbol"},"ownership":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownership"},"sic_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic Code"},"fax":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fax"},"emails":{"anyOf":[{"items":{"$ref":"#/components/schemas/CompanyEmailEntry"},"type":"array"},{"type":"null"}],"title":"Emails"},"phones":{"anyOf":[{"items":{"$ref":"#/components/schemas/CompanyPhoneEntry"},"type":"array"},{"type":"null"}],"title":"Phones"},"addresses":{"anyOf":[{"items":{"$ref":"#/components/schemas/CompanyAddressEntry"},"type":"array"},{"type":"null"}],"title":"Addresses"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},"type":"object","title":"CompanyUpdate"},"ConnectionRequest":{"properties":{"target_org_id":{"type":"integer","title":"Target Org Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["target_org_id","scopes"],"title":"ConnectionRequest"},"ConnectionRespond":{"properties":{"action":{"type":"string","title":"Action"},"scopes":{"additionalProperties":{"type":"string"},"type":"object","title":"Scopes","default":{}}},"type":"object","required":["action"],"title":"ConnectionRespond"},"ContactAddressEntry":{"properties":{"address_type":{"type":"string","title":"Address Type","default":"mailing"},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street"},"street2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"country":{"type":"string","title":"Country","default":"US"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","title":"ContactAddressEntry"},"ContactAddressResponse":{"properties":{"id":{"type":"integer","title":"Id"},"address_type":{"type":"string","title":"Address Type","default":"mailing"},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street"},"street2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"country":{"type":"string","title":"Country","default":"US"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","required":["id"],"title":"ContactAddressResponse"},"ContactCreate":{"properties":{"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"emails":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactEmailEntry"},"type":"array"},{"type":"null"}],"title":"Emails"},"phones":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactPhoneEntry"},"type":"array"},{"type":"null"}],"title":"Phones"},"addresses":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactAddressEntry"},"type":"array"},{"type":"null"}],"title":"Addresses"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"lifecycle_stage":{"type":"string","title":"Lifecycle Stage","default":"lead"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"lead_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Status"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation"},"middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle Name"},"suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suffix"},"birthdate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthdate"},"referred_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referred By"},"assistant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Name"},"assistant_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Phone"},"twitter_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Url"},"facebook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Url"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"contact_type":{"type":"string","title":"Contact Type","default":"client"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"default_expense_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Expense Category"},"credit_limit":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Credit Limit"}},"type":"object","required":["first_name","last_name"],"title":"ContactCreate"},"ContactDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"emails":{"items":{"$ref":"#/components/schemas/ContactEmailResponse"},"type":"array","title":"Emails","default":[]},"phones":{"items":{"$ref":"#/components/schemas/ContactPhoneResponse"},"type":"array","title":"Phones","default":[]},"addresses":{"items":{"$ref":"#/components/schemas/ContactAddressResponse"},"type":"array","title":"Addresses","default":[]},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"lifecycle_stage":{"type":"string","title":"Lifecycle Stage","default":"lead"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"lead_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Status"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"last_contacted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Contacted At"},"contact_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Score","default":0},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation"},"middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle Name"},"suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suffix"},"birthdate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthdate"},"referred_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referred By"},"assistant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Name"},"assistant_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Phone"},"twitter_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Url"},"facebook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Url"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"contact_type":{"type":"string","title":"Contact Type","default":"client"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"default_expense_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Expense Category"},"credit_limit":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Credit Limit"},"ai_research":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Research"},"activity_count":{"type":"integer","title":"Activity Count","default":0},"deal_count":{"type":"integer","title":"Deal Count","default":0},"task_count":{"type":"integer","title":"Task Count","default":0}},"type":"object","required":["id","org_id","first_name","last_name"],"title":"ContactDetailResponse","description":"Contact detail with counts for related entities."},"ContactEmailEntry":{"properties":{"email":{"type":"string","title":"Email"},"email_type":{"type":"string","title":"Email Type","default":"work"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"opt_out":{"type":"boolean","title":"Opt Out","default":false}},"type":"object","required":["email"],"title":"ContactEmailEntry"},"ContactEmailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"email_type":{"type":"string","title":"Email Type","default":"work"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"opt_out":{"type":"boolean","title":"Opt Out","default":false}},"type":"object","required":["id","email"],"title":"ContactEmailResponse"},"ContactListResponse":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/ContactResponse"},"type":"array","title":"Contacts"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["contacts","total","page","per_page","total_pages"],"title":"ContactListResponse"},"ContactMergeRequest":{"properties":{"merge_from_id":{"type":"integer","title":"Merge From Id"},"field_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Field Overrides"}},"type":"object","required":["merge_from_id"],"title":"ContactMergeRequest"},"ContactPhoneEntry":{"properties":{"phone":{"type":"string","title":"Phone"},"phone_type":{"type":"string","title":"Phone Type","default":"work"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"do_not_call":{"type":"boolean","title":"Do Not Call","default":false}},"type":"object","required":["phone"],"title":"ContactPhoneEntry"},"ContactPhoneResponse":{"properties":{"id":{"type":"integer","title":"Id"},"phone":{"type":"string","title":"Phone"},"phone_type":{"type":"string","title":"Phone Type","default":"work"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"do_not_call":{"type":"boolean","title":"Do Not Call","default":false}},"type":"object","required":["id","phone"],"title":"ContactPhoneResponse"},"ContactResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"emails":{"items":{"$ref":"#/components/schemas/ContactEmailResponse"},"type":"array","title":"Emails","default":[]},"phones":{"items":{"$ref":"#/components/schemas/ContactPhoneResponse"},"type":"array","title":"Phones","default":[]},"addresses":{"items":{"$ref":"#/components/schemas/ContactAddressResponse"},"type":"array","title":"Addresses","default":[]},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"lifecycle_stage":{"type":"string","title":"Lifecycle Stage","default":"lead"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"lead_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Status"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"last_contacted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Contacted At"},"contact_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Score","default":0},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation"},"middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle Name"},"suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suffix"},"birthdate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthdate"},"referred_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referred By"},"assistant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Name"},"assistant_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Phone"},"twitter_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Url"},"facebook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Url"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"contact_type":{"type":"string","title":"Contact Type","default":"client"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"default_expense_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Expense Category"},"credit_limit":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Credit Limit"},"ai_research":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Research"}},"type":"object","required":["id","org_id","first_name","last_name"],"title":"ContactResponse"},"ContactTagBody":{"properties":{"tag_id":{"type":"integer","title":"Tag Id"}},"type":"object","required":["tag_id"],"title":"ContactTagBody"},"ContactUpdate":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"emails":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactEmailEntry"},"type":"array"},{"type":"null"}],"title":"Emails"},"phones":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactPhoneEntry"},"type":"array"},{"type":"null"}],"title":"Phones"},"addresses":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactAddressEntry"},"type":"array"},{"type":"null"}],"title":"Addresses"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"lifecycle_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"lead_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Status"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation"},"middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle Name"},"suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suffix"},"birthdate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthdate"},"referred_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referred By"},"assistant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Name"},"assistant_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Phone"},"twitter_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Url"},"facebook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Url"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"contact_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"default_expense_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Expense Category"},"credit_limit":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Credit Limit"}},"type":"object","title":"ContactUpdate"},"ContactsReport":{"properties":{"total_contacts":{"type":"integer","title":"Total Contacts"},"new_this_month":{"type":"integer","title":"New This Month"},"by_lifecycle_stage":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Lifecycle Stage"},"by_lead_source":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Lead Source"}},"type":"object","required":["total_contacts","new_this_month","by_lifecycle_stage","by_lead_source"],"title":"ContactsReport"},"ContractCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"contract_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Contract Number"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"},"template_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Variables"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"scope_of_work":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Of Work"},"deliverables":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Deliverables","description":"List of deliverable dicts; stored as JSONB"},"timeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeline"},"terms_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Conditions"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"total_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Amount"},"currency":{"type":"string","maxLength":3,"title":"Currency","default":"USD"},"client_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Client Email"},"client_phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Client Phone"},"client_company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Client Company"},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address"},"milestones":{"anyOf":[{"items":{"$ref":"#/components/schemas/MilestoneCreate"},"type":"array"},{"type":"null"}],"title":"Milestones"}},"type":"object","required":["title"],"title":"ContractCreate","description":"Create a new contract.\n\nSupply ``template_id`` to render the body from a ContractTemplate\n(the server substitutes ``{{ variables }}`` with the values in\n``template_variables``). OR supply ``body`` directly for a\nfree-form contract. Both are valid; if neither is given the\ncontract starts empty and must be edited before sending."},"ContractListResponse":{"properties":{"contracts":{"items":{"$ref":"#/components/schemas/ContractResponse"},"type":"array","title":"Contracts"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["contracts","total","page","per_page","total_pages"],"title":"ContractListResponse"},"ContractResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"contract_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Number"},"status":{"type":"string","title":"Status"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"},"parent_contract_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Contract Id"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"scope_of_work":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Of Work"},"deliverables_json":{"anyOf":[{},{"type":"null"}],"title":"Deliverables Json"},"timeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeline"},"terms_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Conditions"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"total_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Amount"},"currency":{"type":"string","title":"Currency"},"amount_paid":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Paid"},"payment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Status"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"client_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Phone"},"client_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Company"},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address"},"signed_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed By Name"},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At"},"sign_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sign Token"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"voided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Voided At"},"amendment_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amendment Note"},"version":{"type":"integer","title":"Version"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"milestones":{"items":{"$ref":"#/components/schemas/MilestoneResponse"},"type":"array","title":"Milestones","default":[]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","title","status","currency","amount_paid","version"],"title":"ContractResponse"},"ContractSendRequest":{"properties":{"recipient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Email"},"cc_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cc Emails"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"ContractSendRequest","description":"Body for POST /contracts/{id}/send.\n\nOptional overrides for the recipient — default is the contract's\nclient_email. Empty body (``{}``) uses the defaults."},"ContractSignRequest":{"properties":{"signer_name":{"type":"string","maxLength":255,"minLength":1,"title":"Signer Name"},"signature_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature Hash","description":"SHA-256 of the signature image / typed-name payload"}},"type":"object","required":["signer_name"],"title":"ContractSignRequest","description":"Body for POST /contracts/{id}/sign — the receiver side of a\npublic signing link.\n\nThis is the only way to flip a contract to ``signed``. Requires\nthe ``sign_token`` in the URL (not in the body) so a leaked body\ncan't sign a contract without the link."},"ContractTemplateCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category"},"body_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Template"},"variables":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Variables"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["name"],"title":"ContractTemplateCreate"},"ContractTemplateListResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/ContractTemplateResponse"},"type":"array","title":"Templates"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["templates","total"],"title":"ContractTemplateListResponse"},"ContractTemplateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"body_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Template"},"variables":{"anyOf":[{},{"type":"null"}],"title":"Variables"},"is_default":{"type":"boolean","title":"Is Default"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","name","is_default"],"title":"ContractTemplateResponse"},"ContractTemplateUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category"},"body_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Template"},"variables":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Variables"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"}},"additionalProperties":false,"type":"object","title":"ContractTemplateUpdate","description":"Partial update. Every field is optional."},"ContractUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"contract_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Contract Number"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"scope_of_work":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Of Work"},"deliverables":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Deliverables"},"timeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeline"},"terms_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Conditions"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"total_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Amount"},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Currency"},"client_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Client Email"},"client_phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Client Phone"},"client_company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Client Company"},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address"}},"additionalProperties":false,"type":"object","title":"ContractUpdate","description":"Partial update. Deliberately does NOT allow mass-assignment of\nsign_*, sent_at, status, amount_paid, payment_status fields —\nthose flow through the dedicated action endpoints (/sign, /send,\n/void, /record-payment) so an admin edit can't silently flip a\ncontract's legal state."},"ContractVoidRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"ContractVoidRequest"},"CreateDealFromTemplate":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"}},"type":"object","required":["title"],"title":"CreateDealFromTemplate"},"CreateInvoiceBody":{"properties":{"deal_id":{"type":"integer","title":"Deal Id"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"}},"type":"object","required":["deal_id"],"title":"CreateInvoiceBody"},"CustomFieldDefCreate":{"properties":{"entity_type":{"type":"string","title":"Entity Type"},"field_name":{"type":"string","title":"Field Name"},"field_label":{"type":"string","title":"Field Label"},"field_type":{"type":"string","title":"Field Type","default":"text"},"field_options":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Field Options"},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Value"},"is_required":{"type":"boolean","title":"Is Required","default":false},"is_multi":{"type":"boolean","title":"Is Multi","default":false},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["entity_type","field_name","field_label"],"title":"CustomFieldDefCreate"},"CustomFieldDefResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"entity_type":{"type":"string","title":"Entity Type"},"field_name":{"type":"string","title":"Field Name"},"field_label":{"type":"string","title":"Field Label"},"field_type":{"type":"string","title":"Field Type"},"field_options":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Field Options"},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Value"},"is_required":{"type":"boolean","title":"Is Required"},"is_multi":{"type":"boolean","title":"Is Multi"},"is_active":{"type":"boolean","title":"Is Active"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","org_id","entity_type","field_name","field_label","field_type","is_required","is_multi","is_active","sort_order"],"title":"CustomFieldDefResponse"},"CustomFieldDefUpdate":{"properties":{"field_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Label"},"field_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Type"},"field_options":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Field Options"},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Value"},"is_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Required"},"is_multi":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Multi"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"CustomFieldDefUpdate"},"CustomFieldResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"integer","title":"Entity Id"},"field_name":{"type":"string","title":"Field Name"},"field_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Value"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","entity_type","entity_id","field_name"],"title":"CustomFieldResponse"},"CustomFieldValueResponse":{"properties":{"id":{"type":"integer","title":"Id"},"definition_id":{"type":"integer","title":"Definition Id"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"integer","title":"Entity Id"},"value_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Text"},"value_number":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Number"},"value_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Date"},"value_boolean":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Value Boolean"},"value_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Label"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["id","definition_id","entity_type","entity_id"],"title":"CustomFieldValueResponse"},"CustomFieldValueSet":{"properties":{"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"integer","title":"Entity Id"},"values":{"items":{},"type":"array","title":"Values"}},"type":"object","required":["entity_type","entity_id","values"],"title":"CustomFieldValueSet"},"DealCloseRequest":{"properties":{"outcome":{"type":"string","title":"Outcome"},"actual_close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Actual Close Date"},"loss_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loss Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"create_success_deal":{"type":"boolean","title":"Create Success Deal","default":true}},"type":"object","required":["outcome"],"title":"DealCloseRequest"},"DealCloseResponse":{"properties":{"deal_id":{"type":"integer","title":"Deal Id"},"outcome":{"type":"string","title":"Outcome"},"success_deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Success Deal Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["deal_id","outcome","message"],"title":"DealCloseResponse"},"DealContactEntry":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"},"role":{"type":"string","title":"Role","default":"other"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","required":["contact_id"],"title":"DealContactEntry"},"DealContactResponse":{"properties":{"id":{"type":"integer","title":"Id"},"deal_id":{"type":"integer","title":"Deal Id"},"contact_id":{"type":"integer","title":"Contact Id"},"role":{"type":"string","title":"Role","default":"other"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"}},"type":"object","required":["id","deal_id","contact_id"],"title":"DealContactResponse"},"DealConvertRequest":{"properties":{"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"job_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Description"}},"type":"object","title":"DealConvertRequest","description":"Optional body for deal conversion."},"DealCreate":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"stage_id":{"type":"integer","title":"Stage Id"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"currency":{"type":"string","title":"Currency","default":"USD"},"expected_close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Close Date"},"win_probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Win Probability"},"priority":{"type":"string","title":"Priority","default":"medium"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"deal_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Type"},"next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Step"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"forecast_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecast Category"},"is_recurring":{"type":"boolean","title":"Is Recurring","default":false},"recurrence_interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recurrence Interval"},"renewal_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Renewal Date"},"auto_create_renewal_task":{"type":"boolean","title":"Auto Create Renewal Task","default":true},"contacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/DealContactEntry"},"type":"array"},{"type":"null"}],"title":"Contacts"},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/DealLineItemEntry"},"type":"array"},{"type":"null"}],"title":"Line Items"}},"type":"object","required":["title","stage_id"],"title":"DealCreate"},"DealDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"stage_id":{"type":"integer","title":"Stage Id"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","default":"USD"},"expected_close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Close Date"},"actual_close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Actual Close Date"},"win_probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Win Probability"},"loss_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loss Reason"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority","default":"medium"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"job_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Job Id"},"deal_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Type"},"next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Step"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"forecast_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecast Category"},"contacts_roles":{"items":{"$ref":"#/components/schemas/DealContactResponse"},"type":"array","title":"Contacts Roles","default":[]},"line_items":{"items":{"$ref":"#/components/schemas/DealLineItemResponse"},"type":"array","title":"Line Items","default":[]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"days_in_current_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days In Current Stage"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"stage":{"anyOf":[{"$ref":"#/components/schemas/DealStageResponse"},{"type":"null"}]},"history":{"items":{"$ref":"#/components/schemas/DealStageHistoryResponse"},"type":"array","title":"History","default":[]}},"type":"object","required":["id","org_id","title","stage_id"],"title":"DealDetailResponse"},"DealLineItemEntry":{"properties":{"product_name":{"type":"string","title":"Product Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"quantity":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Quantity","default":"1"},"unit_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Unit Price","default":"0"},"discount_percent":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Discount Percent","default":"0"},"tax_percent":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Tax Percent","default":"0"},"product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Id"}},"type":"object","required":["product_name"],"title":"DealLineItemEntry"},"DealLineItemResponse":{"properties":{"id":{"type":"integer","title":"Id"},"deal_id":{"type":"integer","title":"Deal Id"},"product_name":{"type":"string","title":"Product Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"quantity":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Quantity","default":"1"},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Price","default":"0"},"discount_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discount Percent","default":"0"},"tax_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Percent","default":"0"},"line_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Line Total","default":"0"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"external_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"External Product Id"},"product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Id"}},"type":"object","required":["id","deal_id","product_name"],"title":"DealLineItemResponse"},"DealListResponse":{"properties":{"deals":{"items":{"$ref":"#/components/schemas/DealResponse"},"type":"array","title":"Deals"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["deals","total","page","per_page","total_pages"],"title":"DealListResponse"},"DealResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"stage_id":{"type":"integer","title":"Stage Id"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","default":"USD"},"expected_close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Close Date"},"actual_close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Actual Close Date"},"win_probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Win Probability"},"loss_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loss Reason"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority","default":"medium"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"job_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Job Id"},"deal_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Type"},"next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Step"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"forecast_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecast Category"},"contacts_roles":{"items":{"$ref":"#/components/schemas/DealContactResponse"},"type":"array","title":"Contacts Roles","default":[]},"line_items":{"items":{"$ref":"#/components/schemas/DealLineItemResponse"},"type":"array","title":"Line Items","default":[]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"days_in_current_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days In Current Stage"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},"type":"object","required":["id","org_id","title","stage_id"],"title":"DealResponse"},"DealStageCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"color":{"type":"string","title":"Color","default":"#6c757d"},"default_probability":{"type":"integer","title":"Default Probability","default":0},"is_active":{"type":"boolean","title":"Is Active","default":true},"pipeline_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Id"}},"type":"object","required":["name"],"title":"DealStageCreate"},"DealStageHistoryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"deal_id":{"type":"integer","title":"Deal Id"},"from_stage_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"From Stage Id"},"to_stage_id":{"type":"integer","title":"To Stage Id"},"moved_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Moved By User Id"},"moved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Moved At"},"time_in_previous_stage_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time In Previous Stage Days"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["id","deal_id","to_stage_id"],"title":"DealStageHistoryResponse"},"DealStageResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"sort_order":{"type":"integer","title":"Sort Order"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","default":"#6c757d"},"default_probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Probability","default":0},"is_system":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is System","default":false},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true},"pipeline_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","org_id","name","slug","sort_order"],"title":"DealStageResponse"},"DealStageUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"default_probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Probability"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"pipeline_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Id"}},"type":"object","title":"DealStageUpdate"},"DealTemplateCreate":{"properties":{"name":{"type":"string","maxLength":500,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"pipeline_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Id"},"stage_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stage Id"},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItemSchema"},"type":"array"},{"type":"null"}],"title":"Line Items"},"tags":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Tags"},"custom_field_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","required":["name"],"title":"DealTemplateCreate"},"DealTemplateUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"pipeline_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Id"},"stage_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stage Id"},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItemSchema"},"type":"array"},{"type":"null"}],"title":"Line Items"},"tags":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Tags"},"custom_field_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","title":"DealTemplateUpdate"},"DealUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"stage_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stage Id"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"expected_close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Close Date"},"actual_close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Actual Close Date"},"win_probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Win Probability"},"loss_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loss Reason"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"deal_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Type"},"next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Step"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"forecast_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecast Category"},"is_recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Recurring"},"recurrence_interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recurrence Interval"},"renewal_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Renewal Date"},"auto_create_renewal_task":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Create Renewal Task"},"contacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/DealContactEntry"},"type":"array"},{"type":"null"}],"title":"Contacts"},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/DealLineItemEntry"},"type":"array"},{"type":"null"}],"title":"Line Items"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},"type":"object","title":"DealUpdate"},"DiscoveryRequest":{"properties":{"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City name to search (optional if zipcode given)"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"State abbreviation or name (optional if zipcode given)"},"zipcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zipcode","description":"5-digit US ZIP code (optional if city+state given)"},"equipment":{"items":{"$ref":"#/components/schemas/EquipmentItem"},"type":"array","title":"Equipment","description":"User's drone equipment list"},"quick_trip":{"type":"boolean","title":"Quick Trip","description":"Deprecated (UI no longer exposes this)","default":false},"max_results_per_industry":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Max Results Per Industry","description":"Max results per industry (capped at 20)","default":10},"radius_miles":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Radius Miles","description":"Max distance willing to travel from the search location (1-500 miles)","default":25}},"type":"object","title":"DiscoveryRequest"},"DiscoveryResponse":{"properties":{"prospects":{"items":{"$ref":"#/components/schemas/ProspectResult"},"type":"array","title":"Prospects"},"source":{"type":"string","title":"Source"},"analysis_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Text"},"industries_searched":{"items":{"type":"string"},"type":"array","title":"Industries Searched"},"capability_profile":{"additionalProperties":true,"type":"object","title":"Capability Profile"},"count":{"type":"integer","title":"Count"},"city":{"type":"string","title":"City"},"state":{"type":"string","title":"State"},"search_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Search Id"}},"type":"object","required":["prospects","source","industries_searched","capability_profile","count","city","state"],"title":"DiscoveryResponse"},"DocumentCreate":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"document_type":{"type":"string","title":"Document Type","default":"other"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"}},"type":"object","required":["title"],"title":"DocumentCreate"},"DocumentListResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/DocumentResponse"},"type":"array","title":"Documents"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["documents","total","page","per_page","total_pages"],"title":"DocumentListResponse"},"DocumentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type","default":"other"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","default":1},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","default":"draft"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Viewed At"},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","title"],"title":"DocumentResponse"},"DocumentUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"DocumentUpdate"},"DomainCreateRequest":{"properties":{"domain":{"type":"string","maxLength":255,"title":"Domain"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name"},"from_email_prefix":{"type":"string","title":"From Email Prefix","default":"noreply"}},"type":"object","required":["domain"],"title":"DomainCreateRequest"},"DraftReplyBody":{"properties":{"email_message_id":{"type":"integer","title":"Email Message Id"},"tone":{"type":"string","title":"Tone","description":"professional, casual, or friendly","default":"professional"},"user_instructions":{"type":"string","maxLength":1000,"title":"User Instructions","default":""}},"type":"object","required":["email_message_id"],"title":"DraftReplyBody"},"DroneAdderOut":{"properties":{"id":{"type":"integer","title":"Id"},"drone_model":{"type":"string","title":"Drone Model"},"flat_adder_cents":{"type":"integer","title":"Flat Adder Cents"},"per_acre_adder_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Acre Adder Cents"},"per_hour_adder_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per Hour Adder Cents"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["id","drone_model","flat_adder_cents","per_acre_adder_cents","per_hour_adder_cents","notes"],"title":"DroneAdderOut"},"DuplicatePair":{"properties":{"contact_a":{"$ref":"#/components/schemas/ContactResponse"},"contact_b":{"$ref":"#/components/schemas/ContactResponse"},"match_reason":{"type":"string","title":"Match Reason"},"match_score":{"type":"integer","title":"Match Score"}},"type":"object","required":["contact_a","contact_b","match_reason","match_score"],"title":"DuplicatePair"},"EmailSendRequest":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"},"template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"},"subject":{"type":"string","title":"Subject"},"body_html":{"type":"string","title":"Body Html"},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"}},"type":"object","required":["contact_id","subject","body_html"],"title":"EmailSendRequest"},"EmailSendResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"activity_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Activity Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"EmailSendResponse"},"EmailTemplateCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"subject":{"type":"string","maxLength":500,"minLength":1,"title":"Subject"},"body_html":{"type":"string","minLength":1,"title":"Body Html"},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables"},"category":{"type":"string","title":"Category","default":"general"}},"type":"object","required":["name","subject","body_html"],"title":"EmailTemplateCreate"},"EmailTemplateRenderRequest":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"}},"type":"object","required":["contact_id"],"title":"EmailTemplateRenderRequest"},"EmailTemplateRenderResponse":{"properties":{"subject":{"type":"string","title":"Subject"},"body_html":{"type":"string","title":"Body Html"},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"}},"type":"object","required":["subject","body_html"],"title":"EmailTemplateRenderResponse"},"EmailTemplateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"subject":{"type":"string","title":"Subject"},"body_html":{"type":"string","title":"Body Html"},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","default":"general"},"usage_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Count","default":0},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","name","subject","body_html"],"title":"EmailTemplateResponse"},"EmailTemplateUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","title":"EmailTemplateUpdate"},"EnrollRequest":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"}},"type":"object","required":["contact_id"],"title":"EnrollRequest"},"EnrollmentListResponse":{"properties":{"enrollments":{"items":{"$ref":"#/components/schemas/EnrollmentResponse"},"type":"array","title":"Enrollments"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["enrollments","total"],"title":"EnrollmentListResponse"},"EnrollmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"sequence_id":{"type":"integer","title":"Sequence Id"},"contact_id":{"type":"integer","title":"Contact Id"},"org_id":{"type":"integer","title":"Org Id"},"current_step":{"type":"integer","title":"Current Step"},"status":{"type":"string","title":"Status"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"next_action_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"sequence_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sequence Name"},"total_steps":{"type":"integer","title":"Total Steps","default":0}},"type":"object","required":["id","sequence_id","contact_id","org_id","current_step","status","started_at","created_at"],"title":"EnrollmentResponse"},"EquipmentCreate":{"properties":{"equipment_type":{"type":"string","maxLength":30,"title":"Equipment Type","default":"drone"},"display_name":{"type":"string","maxLength":200,"minLength":1,"title":"Display Name"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number"},"registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Number"},"remote_id_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Id Serial"},"capabilities":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Capabilities"},"service_categories":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Service Categories"},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight"},"max_flight_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Flight Time"},"max_range":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Range"},"max_speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Speed"},"camera_resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera Resolution"},"sensor_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sensor Size"},"status":{"type":"string","title":"Status","default":"active"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"purchase_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Price"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname"},"hourly_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Multiplier","default":1.0},"insurance_expiry":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Insurance Expiry"},"known_equipment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Known Equipment Id"},"service_interval_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Service Interval Hours"},"service_interval_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Interval Days"},"last_service_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Service At"},"next_service_due":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Service Due"},"total_flight_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Flight Minutes"},"flight_minutes_at_service":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Flight Minutes At Service"},"battery_cycle_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Battery Cycle Count"}},"type":"object","required":["display_name"],"title":"EquipmentCreate"},"EquipmentItem":{"properties":{"display_name":{"type":"string","title":"Display Name","default":""},"name":{"type":"string","title":"Name","default":""},"type":{"type":"string","title":"Type","default":"drone"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","title":"EquipmentItem"},"EquipmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"equipment_type":{"type":"string","title":"Equipment Type"},"display_name":{"type":"string","title":"Display Name"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number"},"registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Number"},"remote_id_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Id Serial"},"capabilities":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Capabilities"},"service_categories":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Service Categories"},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight"},"max_flight_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Flight Time"},"max_range":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Range"},"max_speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Speed"},"camera_resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera Resolution"},"sensor_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sensor Size"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"purchase_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Price"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname"},"hourly_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Multiplier"},"insurance_expiry":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Insurance Expiry"},"known_equipment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Known Equipment Id"},"service_interval_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Service Interval Hours"},"service_interval_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Interval Days"},"last_service_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Service At"},"next_service_due":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Service Due"},"total_flight_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Flight Minutes"},"flight_minutes_at_service":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Flight Minutes At Service"},"battery_cycle_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Battery Cycle Count"},"created_at":{"anyOf":[{},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","user_id","equipment_type","display_name"],"title":"EquipmentResponse"},"EquipmentUpdate":{"properties":{"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number"},"registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Number"},"remote_id_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Id Serial"},"capabilities":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Capabilities"},"service_categories":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Service Categories"},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight"},"max_flight_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Flight Time"},"max_range":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Range"},"max_speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Speed"},"camera_resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera Resolution"},"sensor_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sensor Size"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"purchase_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Price"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname"},"hourly_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Multiplier"},"insurance_expiry":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Insurance Expiry"},"known_equipment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Known Equipment Id"},"service_interval_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Service Interval Hours"},"service_interval_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Interval Days"},"last_service_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Service At"},"next_service_due":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Service Due"},"total_flight_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Flight Minutes"},"flight_minutes_at_service":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Flight Minutes At Service"},"battery_cycle_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Battery Cycle Count"}},"type":"object","title":"EquipmentUpdate"},"ExchangeRateEntry":{"properties":{"from_currency":{"type":"string","maxLength":3,"minLength":3,"title":"From Currency"},"to_currency":{"type":"string","maxLength":3,"minLength":3,"title":"To Currency"},"rate":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Rate"}},"type":"object","required":["from_currency","to_currency","rate"],"title":"ExchangeRateEntry"},"FAQLookupRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"FAQLookupRequest"},"FAQLookupResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"confidence":{"type":"string","title":"Confidence","default":"low"},"equipment":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Equipment"},"suggestions":{"items":{},"type":"array","title":"Suggestions","default":[]}},"type":"object","required":["success"],"title":"FAQLookupResponse"},"ForecastCategoryBreakdown":{"properties":{"pipeline":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Pipeline","default":"0"},"best_case":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Best Case","default":"0"},"commit":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Commit","default":"0"},"closed":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Closed","default":"0"}},"type":"object","title":"ForecastCategoryBreakdown"},"ForecastMonth":{"properties":{"month":{"type":"string","title":"Month"},"pipeline_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Pipeline Total","default":"0"},"weighted_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Weighted Total","default":"0"},"deal_count":{"type":"integer","title":"Deal Count","default":0},"by_category":{"$ref":"#/components/schemas/ForecastCategoryBreakdown","default":{"pipeline":"0","best_case":"0","commit":"0","closed":"0"}}},"type":"object","required":["month"],"title":"ForecastMonth"},"ForecastReport":{"properties":{"months":{"items":{"$ref":"#/components/schemas/ForecastMonth"},"type":"array","title":"Months"},"total_pipeline":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Pipeline","default":"0"},"total_weighted":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Weighted","default":"0"},"total_committed":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Committed","default":"0"},"total_closed":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Closed","default":"0"}},"type":"object","required":["months"],"title":"ForecastReport"},"FromTemplateRequestEarly":{"properties":{"template_index":{"type":"integer","title":"Template Index"}},"type":"object","required":["template_index"],"title":"FromTemplateRequestEarly"},"GlobalSearchResponse":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/SearchResultContact"},"type":"array","title":"Contacts","default":[]},"companies":{"items":{"$ref":"#/components/schemas/SearchResultCompany"},"type":"array","title":"Companies","default":[]},"deals":{"items":{"$ref":"#/components/schemas/SearchResultDeal"},"type":"array","title":"Deals","default":[]},"tasks":{"items":{"$ref":"#/components/schemas/SearchResultTask"},"type":"array","title":"Tasks","default":[]}},"type":"object","title":"GlobalSearchResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HazardOut":{"properties":{"id":{"type":"integer","title":"Id"},"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"},"pct_uplift":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Pct Uplift"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","code","label","amount_cents","pct_uplift","description"],"title":"HazardOut"},"ImportDetectResponse":{"properties":{"format":{"type":"string","title":"Format"},"entity_type":{"type":"string","title":"Entity Type"},"headers":{"items":{"type":"string"},"type":"array","title":"Headers"},"suggested_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Suggested Mapping"},"row_count":{"type":"integer","title":"Row Count"},"preview":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Preview"}},"type":"object","required":["format","entity_type","headers","suggested_mapping","row_count","preview"],"title":"ImportDetectResponse"},"ImportExecuteRequest":{"properties":{"entity_type":{"type":"string","title":"Entity Type"},"mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Mapping"},"data_b64":{"type":"string","title":"Data B64"},"skip_duplicates":{"type":"boolean","title":"Skip Duplicates","default":true}},"type":"object","required":["entity_type","mapping","data_b64"],"title":"ImportExecuteRequest"},"ImportExecuteResponse":{"properties":{"imported":{"type":"integer","title":"Imported"},"skipped":{"type":"integer","title":"Skipped"},"errors":{"items":{"$ref":"#/components/schemas/ImportRowError"},"type":"array","title":"Errors"}},"type":"object","required":["imported","skipped","errors"],"title":"ImportExecuteResponse"},"ImportRowError":{"properties":{"row":{"type":"integer","title":"Row"},"error":{"type":"string","title":"Error"}},"type":"object","required":["row","error"],"title":"ImportRowError"},"IndustriesResponse":{"properties":{"industries":{"items":{"$ref":"#/components/schemas/IndustryInfo"},"type":"array","title":"Industries"},"capability_profile":{"additionalProperties":true,"type":"object","title":"Capability Profile"},"equipment_count":{"type":"integer","title":"Equipment Count"}},"type":"object","required":["industries","capability_profile","equipment_count"],"title":"IndustriesResponse"},"IndustryInfo":{"properties":{"key":{"type":"string","title":"Key"},"search_queries":{"items":{"type":"string"},"type":"array","title":"Search Queries"},"best_call_time":{"type":"string","title":"Best Call Time"},"best_call_days":{"items":{"type":"string"},"type":"array","title":"Best Call Days"}},"type":"object","required":["key","search_queries","best_call_time","best_call_days"],"title":"IndustryInfo"},"IndustryOut":{"properties":{"id":{"type":"integer","title":"Id"},"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"size_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size Unit"},"default_min_quote_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Min Quote Cents"},"primary_pricing_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Pricing Model"},"sort_order":{"type":"integer","title":"Sort Order"},"is_active":{"type":"boolean","title":"Is Active"},"how_billed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"How Billed"},"example_job":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Example Job"}},"type":"object","required":["id","code","label","description","size_unit","default_min_quote_cents","primary_pricing_model","sort_order","is_active"],"title":"IndustryOut"},"IndustryTermCreate":{"properties":{"term":{"type":"string","maxLength":100,"minLength":1,"title":"Term"},"definition":{"type":"string","minLength":1,"title":"Definition"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"related_services":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Services"},"pilot_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pilot Role"},"deliverables":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deliverables"}},"type":"object","required":["term","definition"],"title":"IndustryTermCreate"},"IndustryTermResponse":{"properties":{"id":{"type":"integer","title":"Id"},"term":{"type":"string","title":"Term"},"definition":{"type":"string","title":"Definition"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"related_services":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Services"},"pilot_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pilot Role"},"deliverables":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deliverables"}},"type":"object","required":["id","term","definition"],"title":"IndustryTermResponse"},"LeadCreate":{"properties":{"company_name":{"type":"string","title":"Company Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zipcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zipcode"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score","default":0},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","default":"manual"},"outreach_search_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outreach Search Id"}},"type":"object","required":["company_name"],"title":"LeadCreate"},"LeadResponse":{"properties":{"dedup":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dedup"},"existing_contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Existing Contact Id"},"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"},"company_name":{"type":"string","title":"Company Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zipcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zipcode"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"ai_research":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Research"},"outreach_search_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outreach Search Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"disposition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disposition"}},"type":"object","required":["id","org_id","company_name"],"title":"LeadResponse"},"LeadUpdate":{"properties":{"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zipcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zipcode"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"}},"type":"object","title":"LeadUpdate"},"LineItemCreate":{"properties":{"description":{"type":"string","maxLength":500,"title":"Description"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Id"},"quantity":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Quantity","default":"1"},"unit_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Unit Price","default":"0"},"discount_percent":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Discount Percent","default":"0"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["description"],"title":"LineItemCreate"},"LineItemOut":{"properties":{"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"qty":{"type":"number","title":"Qty"},"unit":{"type":"string","title":"Unit"},"unit_price_cents":{"type":"integer","title":"Unit Price Cents"},"total_cents":{"type":"integer","title":"Total Cents"},"category":{"type":"string","title":"Category"},"is_taxable":{"type":"boolean","title":"Is Taxable"},"taxable_category":{"type":"string","title":"Taxable Category"}},"type":"object","required":["label","description","qty","unit","unit_price_cents","total_cents","category","is_taxable","taxable_category"],"title":"LineItemOut"},"LineItemResponse":{"properties":{"id":{"type":"integer","title":"Id"},"sort_order":{"type":"integer","title":"Sort Order"},"product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Id"},"description":{"type":"string","title":"Description"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"quantity":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Quantity"},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Price"},"discount_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discount Percent"},"line_subtotal":{"type":"number","title":"Line Subtotal","default":0},"line_discount_amount":{"type":"number","title":"Line Discount Amount","default":0},"line_total":{"type":"number","title":"Line Total","default":0}},"type":"object","required":["id","sort_order","description","quantity","unit_price","discount_percent"],"title":"LineItemResponse"},"LineItemSchema":{"properties":{"product_name":{"type":"string","title":"Product Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"quantity":{"type":"number","title":"Quantity","default":1},"unit_price":{"type":"number","title":"Unit Price","default":0},"discount_percent":{"type":"number","title":"Discount Percent","default":0},"tax_percent":{"type":"number","title":"Tax Percent","default":0}},"type":"object","required":["product_name"],"title":"LineItemSchema"},"MaintenanceCreate":{"properties":{"equipment_id":{"type":"integer","title":"Equipment Id"},"date":{"type":"string","format":"date","title":"Date"},"maintenance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maintenance Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"performed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performed By"},"next_due":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Due"}},"type":"object","required":["equipment_id","date"],"title":"MaintenanceCreate"},"MaintenanceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"equipment_id":{"type":"integer","title":"Equipment Id"},"date":{"type":"string","format":"date","title":"Date"},"maintenance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maintenance Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"performed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performed By"},"next_due":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Due"},"created_at":{"anyOf":[{},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","equipment_id","date"],"title":"MaintenanceResponse"},"MeetingAttendeeEntry":{"properties":{"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"rsvp_status":{"type":"string","title":"Rsvp Status","default":"pending"}},"type":"object","title":"MeetingAttendeeEntry"},"MeetingAttendeeResponse":{"properties":{"id":{"type":"integer","title":"Id"},"meeting_id":{"type":"integer","title":"Meeting Id"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"rsvp_status":{"type":"string","title":"Rsvp Status","default":"pending"}},"type":"object","required":["id","meeting_id"],"title":"MeetingAttendeeResponse"},"MeetingCreate":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"assigned_to_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To User Id"},"meeting_type":{"type":"string","title":"Meeting Type","default":"other"},"start_at":{"type":"string","format":"date-time","title":"Start At"},"end_at":{"type":"string","format":"date-time","title":"End At"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"meeting_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Link"},"attendees":{"anyOf":[{"items":{"$ref":"#/components/schemas/MeetingAttendeeEntry"},"type":"array"},{"type":"null"}],"title":"Attendees"}},"type":"object","required":["title","start_at","end_at"],"title":"MeetingCreate"},"MeetingListResponse":{"properties":{"meetings":{"items":{"$ref":"#/components/schemas/MeetingResponse"},"type":"array","title":"Meetings"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["meetings","total","page","per_page","total_pages"],"title":"MeetingListResponse"},"MeetingRescheduleRequest":{"properties":{"start_at":{"type":"string","format":"date-time","title":"Start At"},"end_at":{"type":"string","format":"date-time","title":"End At"}},"type":"object","required":["start_at","end_at"],"title":"MeetingRescheduleRequest"},"MeetingResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"scheduled_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scheduled By User Id"},"assigned_to_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To User Id"},"meeting_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Type","default":"other"},"start_at":{"type":"string","format":"date-time","title":"Start At"},"end_at":{"type":"string","format":"date-time","title":"End At"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","default":"UTC"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"meeting_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Link"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","default":"scheduled"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"reminder_sent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reminder Sent","default":false},"attendees":{"items":{"$ref":"#/components/schemas/MeetingAttendeeResponse"},"type":"array","title":"Attendees","default":[]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","title","start_at","end_at"],"title":"MeetingResponse"},"MeetingUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"assigned_to_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To User Id"},"meeting_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Type"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"meeting_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Link"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"attendees":{"anyOf":[{"items":{"$ref":"#/components/schemas/MeetingAttendeeEntry"},"type":"array"},{"type":"null"}],"title":"Attendees"}},"type":"object","title":"MeetingUpdate"},"MilestoneCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["title","amount"],"title":"MilestoneCreate"},"MilestoneResponse":{"properties":{"id":{"type":"integer","title":"Id"},"contract_id":{"type":"integer","title":"Contract Id"},"org_id":{"type":"integer","title":"Org Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"status":{"type":"string","title":"Status"},"paid_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Paid Date"},"paid_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Paid Amount"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"},"sort_order":{"type":"integer","title":"Sort Order"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","contract_id","org_id","title","amount","status","paid_amount","sort_order"],"title":"MilestoneResponse"},"MilestoneUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","title":"MilestoneUpdate"},"NoteCreate":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"NoteCreate"},"NoteUpdate":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"NoteUpdate"},"OnboardingResponse":{"properties":{"steps_completed":{"items":{"type":"string"},"type":"array","title":"Steps Completed","default":[]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"dismissed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dismissed At"},"contact_count":{"type":"integer","title":"Contact Count","default":0},"deal_count":{"type":"integer","title":"Deal Count","default":0},"should_show":{"type":"boolean","title":"Should Show","default":true}},"type":"object","title":"OnboardingResponse"},"OnboardingStepRequest":{"properties":{"step":{"type":"string","title":"Step"}},"type":"object","required":["step"],"title":"OnboardingStepRequest"},"OnePagerRequest":{"properties":{"company_name":{"type":"string","minLength":1,"title":"Company Name"},"industry":{"type":"string","minLength":1,"title":"Industry"},"address":{"type":"string","title":"Address","default":""},"contact_name":{"type":"string","title":"Contact Name","default":""},"contact_email":{"type":"string","title":"Contact Email","default":""},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["company_name","industry"],"title":"OnePagerRequest"},"OutreachSearchDetail":{"properties":{"id":{"type":"integer","title":"Id"},"location_input":{"type":"string","title":"Location Input"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zipcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zipcode"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"quick_trip":{"type":"boolean","title":"Quick Trip","default":false},"capability_profile":{"additionalProperties":true,"type":"object","title":"Capability Profile"},"equipment_snapshot":{"items":{},"type":"array","title":"Equipment Snapshot"},"results":{"items":{},"type":"array","title":"Results"},"result_count":{"type":"integer","title":"Result Count"},"industries_found":{"items":{},"type":"array","title":"Industries Found"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","location_input","result_count","created_at"],"title":"OutreachSearchDetail"},"OutreachSearchSummary":{"properties":{"id":{"type":"integer","title":"Id"},"location_input":{"type":"string","title":"Location Input"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zipcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zipcode"},"result_count":{"type":"integer","title":"Result Count"},"industries_found":{"items":{},"type":"array","title":"Industries Found"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","location_input","result_count","created_at"],"title":"OutreachSearchSummary"},"PackageDetail":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"pricing_tiers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pricing Tiers","default":[]},"equipment":{"items":{"type":"string"},"type":"array","title":"Equipment","default":[]},"deliverables":{"items":{"type":"string"},"type":"array","title":"Deliverables","default":[]},"executive_summary_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Executive Summary Template"},"has_db_record":{"type":"boolean","title":"Has Db Record","default":false}},"type":"object","required":["code","name","description"],"title":"PackageDetail"},"PackageOut":{"properties":{"id":{"type":"integer","title":"Id"},"industry_code":{"type":"string","title":"Industry Code"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"default_tier":{"type":"string","title":"Default Tier"},"estimated_total_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Total Cents"},"default_line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Default Line Items"}},"type":"object","required":["id","industry_code","name","description","default_tier","estimated_total_cents","default_line_items"],"title":"PackageOut"},"PackageSummary":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"has_db_record":{"type":"boolean","title":"Has Db Record","default":false}},"type":"object","required":["code","name","description"],"title":"PackageSummary"},"PackageUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"pricing_tiers_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Tiers Json"},"equipment_required_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Required Json"},"deliverables_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deliverables Json"},"executive_summary_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Executive Summary Template"}},"type":"object","title":"PackageUpdateRequest"},"PilotOverrideIn":{"properties":{"industry_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry Code"},"category":{"type":"string","title":"Category"},"amount_cents":{"type":"integer","title":"Amount Cents"},"unit":{"type":"string","title":"Unit"},"tier_min":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tier Min"},"tier_max":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tier Max"},"override_reason":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Override Reason"}},"type":"object","required":["category","amount_cents","unit"],"title":"PilotOverrideIn"},"PipelineCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_default":{"type":"boolean","title":"Is Default","default":false},"pipeline_type":{"type":"string","title":"Pipeline Type","default":"sales"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["name"],"title":"PipelineCreate"},"PipelineReport":{"properties":{"stages":{"items":{"$ref":"#/components/schemas/PipelineStageReport"},"type":"array","title":"Stages"},"win_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Rate"},"avg_days_to_close":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Days To Close"},"avg_deal_size":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Avg Deal Size"},"total_value":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Value"}},"type":"object","required":["stages"],"title":"PipelineReport"},"PipelineResponse":{"properties":{"stages":{"items":{"$ref":"#/components/schemas/PipelineStage"},"type":"array","title":"Stages"}},"type":"object","required":["stages"],"title":"PipelineResponse"},"PipelineStage":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"sort_order":{"type":"integer","title":"Sort Order"},"deals":{"items":{"$ref":"#/components/schemas/DealResponse"},"type":"array","title":"Deals"},"total_value":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Value","default":"0"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["id","name","slug","sort_order","deals"],"title":"PipelineStage"},"PipelineStageReport":{"properties":{"stage_name":{"type":"string","title":"Stage Name"},"deal_count":{"type":"integer","title":"Deal Count"},"total_value":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Value","default":"0"},"avg_value":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Avg Value","default":"0"}},"type":"object","required":["stage_name","deal_count"],"title":"PipelineStageReport"},"PipelineUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"PipelineUpdate"},"PlaybookCreate":{"properties":{"pipeline_id":{"type":"integer","title":"Pipeline Id"},"stage_id":{"type":"integer","title":"Stage Id"},"name":{"type":"string","maxLength":500,"minLength":1,"title":"Name"},"checklist_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChecklistItemSchema"},"type":"array"},{"type":"null"}],"title":"Checklist Items"},"battle_cards":{"anyOf":[{"items":{"$ref":"#/components/schemas/BattleCardSchema"},"type":"array"},{"type":"null"}],"title":"Battle Cards"}},"type":"object","required":["pipeline_id","stage_id","name"],"title":"PlaybookCreate"},"PlaybookUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"checklist_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChecklistItemSchema"},"type":"array"},{"type":"null"}],"title":"Checklist Items"},"battle_cards":{"anyOf":[{"items":{"$ref":"#/components/schemas/BattleCardSchema"},"type":"array"},{"type":"null"}],"title":"Battle Cards"}},"type":"object","title":"PlaybookUpdate"},"PreferenceUpdate":{"properties":{"channel_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Id"},"is_muted":{"type":"boolean","title":"Is Muted","default":false},"event_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Event Filter"}},"type":"object","title":"PreferenceUpdate"},"PriceListCreate":{"properties":{"name":{"type":"string","maxLength":300,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_default":{"type":"boolean","title":"Is Default","default":false},"currency":{"type":"string","title":"Currency","default":"USD"},"items":{"items":{"$ref":"#/components/schemas/PriceListItemEntry"},"type":"array","title":"Items","default":[]}},"type":"object","required":["name"],"title":"PriceListCreate"},"PriceListItemEntry":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"unit_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Unit Price"},"min_quantity":{"type":"integer","title":"Min Quantity","default":1},"max_discount_pct":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Discount Pct"}},"type":"object","required":["product_id","unit_price"],"title":"PriceListItemEntry"},"PriceListItemResponse":{"properties":{"id":{"type":"integer","title":"Id"},"price_list_id":{"type":"integer","title":"Price List Id"},"product_id":{"type":"integer","title":"Product Id"},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Price"},"min_quantity":{"type":"integer","title":"Min Quantity","default":1},"max_discount_pct":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Discount Pct"},"created_at":{"anyOf":[{},{"type":"null"}],"title":"Created At"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"}},"type":"object","required":["id","price_list_id","product_id","unit_price"],"title":"PriceListItemResponse"},"PriceListResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_default":{"type":"boolean","title":"Is Default","default":false},"currency":{"type":"string","title":"Currency","default":"USD"},"item_count":{"type":"integer","title":"Item Count","default":0},"created_at":{"anyOf":[{},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","name"],"title":"PriceListResponse"},"PriceListUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/PriceListItemEntry"},"type":"array"},{"type":"null"}],"title":"Items"}},"type":"object","title":"PriceListUpdate"},"PricingRateUpdate":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"number","title":"Value"}},"type":"object","required":["key","value"],"title":"PricingRateUpdate"},"PricingRuleOut":{"properties":{"org_id":{"type":"integer","title":"Org Id"},"rush_multiplier":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Rush Multiplier"},"same_day_multiplier":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Same Day Multiplier"},"weekend_multiplier":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Weekend Multiplier"},"night_multiplier":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Night Multiplier"},"weather_multiplier":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Weather Multiplier"},"billable_mileage_cents_per_mi":{"type":"integer","title":"Billable Mileage Cents Per Mi"},"free_radius_miles":{"type":"integer","title":"Free Radius Miles"},"recurring_visit_discount_pct":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Recurring Visit Discount Pct"},"multi_day_discount_pct":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Multi Day Discount Pct"},"max_pilot_override_pct":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Max Pilot Override Pct"},"min_margin_pct_warn":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Min Margin Pct Warn"}},"type":"object","required":["org_id","rush_multiplier","same_day_multiplier","weekend_multiplier","night_multiplier","weather_multiplier","billable_mileage_cents_per_mi","free_radius_miles","recurring_visit_discount_pct","multi_day_discount_pct","max_pilot_override_pct","min_margin_pct_warn"],"title":"PricingRuleOut"},"ProductCreate":{"properties":{"name":{"type":"string","maxLength":500,"minLength":1,"title":"Name"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"unit_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Unit Price","default":"0"},"cost":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost"},"currency":{"type":"string","title":"Currency","default":"USD"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name"],"title":"ProductCreate"},"ProductResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Price","default":"0"},"cost":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost"},"currency":{"type":"string","title":"Currency","default":"USD"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"is_active":{"type":"boolean","title":"Is Active","default":true},"created_at":{"anyOf":[{},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","name"],"title":"ProductResponse"},"ProductUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"unit_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unit Price"},"cost":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"ProductUpdate"},"ProspectResult":{"properties":{"company_name":{"type":"string","title":"Company Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"industry":{"type":"string","title":"Industry"},"google_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Google Rating"},"review_count":{"type":"integer","title":"Review Count","default":0},"score":{"type":"integer","title":"Score","default":0},"sale_probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sale Probability"},"place_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Id"},"source":{"type":"string","title":"Source","default":"google_places"},"best_call_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Best Call Time"},"best_call_days":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Best Call Days"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["company_name","industry"],"title":"ProspectResult"},"ProviderCreateUpdate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"provider_type":{"type":"string","maxLength":30,"title":"Provider Type"},"pool":{"type":"string","maxLength":20,"title":"Pool"},"api_key":{"type":"string","title":"Api Key"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"is_active":{"type":"boolean","title":"Is Active","default":true},"priority":{"type":"integer","title":"Priority","default":0}},"type":"object","required":["name","provider_type","pool","api_key"],"title":"ProviderCreateUpdate"},"ProviderTestRequest":{"properties":{"to":{"type":"string","title":"To"},"subject":{"type":"string","title":"Subject","default":"SkyConnect Test Email"},"body":{"type":"string","title":"Body","default":"<p>This is a test email from SkyConnect email provider configuration.</p>"}},"type":"object","required":["to"],"title":"ProviderTestRequest"},"PublicAcceptRequest":{"properties":{"accepted_by_name":{"type":"string","maxLength":255,"minLength":1,"title":"Accepted By Name"},"accepted_by_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Accepted By Email"}},"type":"object","required":["accepted_by_name"],"title":"PublicAcceptRequest"},"QBPushInvoiceBody":{"properties":{"customer_ref":{"type":"string","title":"Customer Ref","description":"QBO Customer Id"},"line_items":{"items":{},"type":"array","title":"Line Items","description":"List of {description, amount, quantity}"}},"type":"object","required":["customer_ref","line_items"],"title":"QBPushInvoiceBody"},"QuoteCreate":{"properties":{"title":{"type":"string","maxLength":255,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"quote_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Quote Number"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"currency":{"type":"string","maxLength":3,"title":"Currency","default":"USD"},"tax_rate_percent":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Tax Rate Percent","default":"0"},"customer_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Message"},"terms_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Conditions"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"client_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Phone"},"client_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Company"},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address"},"line_items":{"items":{"$ref":"#/components/schemas/LineItemCreate"},"type":"array","title":"Line Items","default":[]}},"type":"object","required":["title"],"title":"QuoteCreate"},"QuoteListResponse":{"properties":{"quotes":{"items":{"$ref":"#/components/schemas/QuoteResponse"},"type":"array","title":"Quotes"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["quotes","total","page","per_page","total_pages"],"title":"QuoteListResponse"},"QuoteResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"quote_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote Number"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"},"contract_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contract Id"},"job_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Job Id"},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"first_viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Viewed At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"rejected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rejected At"},"expired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expired At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"accept_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept Token"},"accepted_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accepted By Name"},"accepted_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accepted By Email"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"currency":{"type":"string","title":"Currency","default":"USD"},"subtotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal"},"discount_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discount Amount"},"tax_rate_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Rate Percent"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"client_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Phone"},"client_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Company"},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"customer_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Message"},"terms_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Conditions"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"line_items":{"items":{"$ref":"#/components/schemas/LineItemResponse"},"type":"array","title":"Line Items","default":[]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","title","status","subtotal","discount_amount","tax_rate_percent","tax_amount","total_amount"],"title":"QuoteResponse"},"QuoteTemplateCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"is_default":{"type":"boolean","title":"Is Default","default":false},"sections":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sections"},"header_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Html"},"footer_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Footer Html"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"accent_color":{"type":"string","title":"Accent Color","default":"#0369a1"},"terms_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Text"},"validity_days":{"type":"integer","title":"Validity Days","default":30}},"type":"object","required":["name"],"title":"QuoteTemplateCreate"},"QuoteTemplateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"is_default":{"type":"boolean","title":"Is Default"},"sections":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sections"},"header_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Html"},"footer_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Footer Html"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"accent_color":{"type":"string","title":"Accent Color"},"terms_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Text"},"validity_days":{"type":"integer","title":"Validity Days"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","org_id","name","is_default","accent_color","validity_days"],"title":"QuoteTemplateResponse"},"QuoteTemplateUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"sections":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sections"},"header_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Html"},"footer_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Footer Html"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color"},"terms_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Text"},"validity_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Validity Days"}},"type":"object","title":"QuoteTemplateUpdate"},"QuoteUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"quote_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Quote Number"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"tax_rate_percent":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Rate Percent"},"customer_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Message"},"terms_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Conditions"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"client_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Phone"},"client_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Company"},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address"},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItemCreate"},"type":"array"},{"type":"null"}],"title":"Line Items"}},"type":"object","title":"QuoteUpdate","description":"Same fields as Create but every one optional. Status changes\ngo through dedicated endpoints so the transition table is in\none place."},"RateCalculateRequest":{"properties":{"service":{"type":"string","title":"Service","default":"mapping"},"acres":{"type":"number","title":"Acres","default":0},"hours":{"type":"number","title":"Hours","default":2},"flights":{"type":"integer","title":"Flights","default":1},"distance":{"type":"number","title":"Distance","default":0},"service_tier":{"type":"string","title":"Service Tier","default":"standard"},"drone_name":{"type":"string","title":"Drone Name","default":""},"addons":{"items":{"type":"string"},"type":"array","title":"Addons","default":[]},"complexity":{"items":{"type":"string"},"type":"array","title":"Complexity","default":[]},"deliverables_package":{"type":"string","title":"Deliverables Package","default":"basic"},"risk_flag":{"type":"boolean","title":"Risk Flag","default":false},"laanc_flag":{"type":"boolean","title":"Laanc Flag","default":false},"waive_mobilization":{"type":"boolean","title":"Waive Mobilization","default":false},"waive_laanc":{"type":"boolean","title":"Waive Laanc","default":false},"custom_discount_amt":{"type":"number","title":"Custom Discount Amt","default":0}},"type":"object","title":"RateCalculateRequest"},"RecentlyViewedRecord":{"properties":{"entity_type":{"type":"string","maxLength":30,"title":"Entity Type"},"entity_id":{"type":"integer","title":"Entity Id"},"entity_name":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Entity Name"}},"type":"object","required":["entity_type","entity_id"],"title":"RecentlyViewedRecord"},"RecentlyViewedResponse":{"properties":{"id":{"type":"integer","title":"Id"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"integer","title":"Entity Id"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"viewed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Viewed At"}},"type":"object","required":["id","entity_type","entity_id","entity_name","viewed_at"],"title":"RecentlyViewedResponse"},"RecordPaymentRequest":{"properties":{"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"payment_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Payment Date"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["amount"],"title":"RecordPaymentRequest","description":"POST /contracts/{id}/record-payment — manual payment entry.\n\nFor contracts not yet wired to the ledger P4 money loop. Updates\n``amount_paid`` and derives ``payment_status``."},"ReferralConvertRequest":{"properties":{"referral_code":{"type":"string","title":"Referral Code"},"referred_contact_id":{"type":"integer","title":"Referred Contact Id"}},"type":"object","required":["referral_code","referred_contact_id"],"title":"ReferralConvertRequest"},"ReferralCreateRequest":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"}},"type":"object","required":["contact_id"],"title":"ReferralCreateRequest"},"ReportCreateUpdate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"entity_type":{"type":"string","pattern":"^(contacts|companies|deals|tasks|activities)$","title":"Entity Type"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReportFilter"},"type":"array"},{"type":"null"}],"title":"Filters"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group By"},"sort_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"},"sort_dir":{"type":"string","title":"Sort Dir","default":"asc"},"chart_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chart Type"},"is_shared":{"type":"boolean","title":"Is Shared","default":false}},"type":"object","required":["name","entity_type","columns"],"title":"ReportCreateUpdate"},"ReportFilter":{"properties":{"field":{"type":"string","title":"Field"},"op":{"type":"string","title":"Op","default":"eq"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Value"}},"type":"object","required":["field"],"title":"ReportFilter"},"ReportPreviewRequest":{"properties":{"entity_type":{"type":"string","pattern":"^(contacts|companies|deals|tasks|activities)$","title":"Entity Type"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReportFilter"},"type":"array"},{"type":"null"}],"title":"Filters"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group By"},"sort_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"},"sort_dir":{"type":"string","title":"Sort Dir","default":"asc"}},"type":"object","required":["entity_type","columns"],"title":"ReportPreviewRequest"},"ResourceConfigUpdate":{"properties":{"read":{"items":{"type":"string"},"type":"array","title":"Read"},"write":{"items":{"type":"string"},"type":"array","title":"Write"},"full":{"items":{"type":"string"},"type":"array","title":"Full"}},"type":"object","title":"ResourceConfigUpdate"},"ReverseGeocodeRequest":{"properties":{"latitude":{"type":"number","title":"Latitude"},"longitude":{"type":"number","title":"Longitude"}},"type":"object","required":["latitude","longitude"],"title":"ReverseGeocodeRequest"},"ReverseGeocodeResponse":{"properties":{"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zipcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zipcode"},"formatted_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Formatted Address"}},"type":"object","title":"ReverseGeocodeResponse"},"RoleCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"permissions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Permissions"},"resource_permissions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resource Permissions"},"row_restrictions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Row Restrictions"},"field_restrictions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Field Restrictions"}},"type":"object","required":["name"],"title":"RoleCreate"},"RoleUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"permissions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Permissions"},"resource_permissions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resource Permissions"},"row_restrictions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Row Restrictions"},"field_restrictions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Field Restrictions"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"RoleUpdate"},"RsvpBody":{"properties":{"rsvp_status":{"type":"string","title":"Rsvp Status"}},"type":"object","required":["rsvp_status"],"title":"RsvpBody"},"SSOConfigCreate":{"properties":{"provider_type":{"type":"string","title":"Provider Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Url"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"sso_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sso Url"},"certificate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificate"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"authorization_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization Url"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"userinfo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userinfo Url"},"attribute_mapping":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attribute Mapping"},"jit_provisioning":{"type":"boolean","title":"Jit Provisioning","default":true},"default_role_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Role Id"},"is_active":{"type":"boolean","title":"Is Active","default":false}},"type":"object","required":["provider_type"],"title":"SSOConfigCreate"},"SampleDataResponse":{"properties":{"contacts_created":{"type":"integer","title":"Contacts Created"},"companies_created":{"type":"integer","title":"Companies Created"},"deals_created":{"type":"integer","title":"Deals Created"}},"type":"object","required":["contacts_created","companies_created","deals_created"],"title":"SampleDataResponse"},"SavedFilterCreate":{"properties":{"entity_type":{"type":"string","maxLength":30,"minLength":1,"title":"Entity Type"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"filter_criteria":{"additionalProperties":true,"type":"object","title":"Filter Criteria","default":{}},"sort_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"},"is_shared":{"type":"boolean","title":"Is Shared","default":false},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["entity_type","name"],"title":"SavedFilterCreate"},"SavedFilterResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"user_id":{"type":"integer","title":"User Id"},"entity_type":{"type":"string","title":"Entity Type"},"name":{"type":"string","title":"Name"},"filter_criteria":{"additionalProperties":true,"type":"object","title":"Filter Criteria","default":{}},"sort_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"},"is_shared":{"type":"boolean","title":"Is Shared","default":false},"is_default":{"type":"boolean","title":"Is Default","default":false},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","user_id","entity_type","name"],"title":"SavedFilterResponse"},"SavedFilterUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"filter_criteria":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter Criteria"},"sort_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"},"is_shared":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Shared"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"}},"type":"object","title":"SavedFilterUpdate"},"ScopeUpdate":{"properties":{"scopes":{"additionalProperties":{"type":"string"},"type":"object","title":"Scopes"}},"type":"object","required":["scopes"],"title":"ScopeUpdate","description":"Body for POST /connect/{id}/scopes/update — update individual scope statuses."},"ScoreRequest":{"properties":{"company_name":{"type":"string","title":"Company Name"},"industry":{"type":"string","title":"Industry"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"google_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Google Rating"},"review_count":{"type":"integer","title":"Review Count","default":0},"equipment":{"items":{"$ref":"#/components/schemas/EquipmentItem"},"type":"array","title":"Equipment"}},"type":"object","required":["company_name","industry"],"title":"ScoreRequest"},"ScoreResponse":{"properties":{"company_name":{"type":"string","title":"Company Name"},"score":{"type":"integer","title":"Score"},"sale_probability":{"type":"integer","title":"Sale Probability"},"industry":{"type":"string","title":"Industry"},"capability_profile":{"additionalProperties":true,"type":"object","title":"Capability Profile"}},"type":"object","required":["company_name","score","sale_probability","industry","capability_profile"],"title":"ScoreResponse"},"SearchResultCompany":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"match_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Field"}},"type":"object","required":["id","name"],"title":"SearchResultCompany"},"SearchResultContact":{"properties":{"id":{"type":"integer","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"primary_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Email"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"lifecycle_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage"},"match_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Field"}},"type":"object","required":["id","first_name","last_name"],"title":"SearchResultContact"},"SearchResultDeal":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"match_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Field"}},"type":"object","required":["id","title"],"title":"SearchResultDeal"},"SearchResultTask":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"match_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Field"}},"type":"object","required":["id","title"],"title":"SearchResultTask"},"SeedOrgRequest":{"properties":{"org_id":{"type":"integer","title":"Org Id"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id"}},"type":"object","required":["org_id"],"title":"SeedOrgRequest"},"SegmentIn":{"properties":{"industry_code":{"type":"string","title":"Industry Code"},"category":{"type":"string","title":"Category"},"size_value":{"type":"number","title":"Size Value"},"size_unit":{"type":"string","title":"Size Unit"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["industry_code","category","size_value","size_unit"],"title":"SegmentIn"},"SequenceCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active","default":true},"steps":{"items":{"$ref":"#/components/schemas/StepCreate"},"type":"array","title":"Steps","default":[]}},"type":"object","required":["name"],"title":"SequenceCreateRequest"},"SequenceDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"steps_count":{"type":"integer","title":"Steps Count","default":0},"active_enrollments":{"type":"integer","title":"Active Enrollments","default":0},"steps":{"items":{"$ref":"#/components/schemas/StepResponse"},"type":"array","title":"Steps","default":[]}},"type":"object","required":["id","org_id","name","is_active","created_at"],"title":"SequenceDetailResponse"},"SequenceListResponse":{"properties":{"sequences":{"items":{"$ref":"#/components/schemas/SequenceResponse"},"type":"array","title":"Sequences"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["sequences","total","page","per_page","total_pages"],"title":"SequenceListResponse"},"SequenceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"steps_count":{"type":"integer","title":"Steps Count","default":0},"active_enrollments":{"type":"integer","title":"Active Enrollments","default":0}},"type":"object","required":["id","org_id","name","is_active","created_at"],"title":"SequenceResponse"},"SequenceUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/StepCreate"},"type":"array"},{"type":"null"}],"title":"Steps"}},"type":"object","title":"SequenceUpdateRequest"},"SignatureRequestBody":{"properties":{"signers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Signers"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"}},"type":"object","required":["signers"],"title":"SignatureRequestBody"},"SnoozeRequest":{"properties":{"minutes":{"type":"integer","maximum":10080.0,"minimum":1.0,"title":"Minutes","default":60}},"type":"object","title":"SnoozeRequest"},"StatusActionRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"StatusActionRequest","description":"Used by /reject and /cancel which want a free-text reason."},"StepCreate":{"properties":{"step_order":{"type":"integer","title":"Step Order"},"action_type":{"type":"string","title":"Action Type"},"delay_days":{"type":"integer","title":"Delay Days","default":0},"email_template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Email Template Id"},"task_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["step_order","action_type"],"title":"StepCreate"},"StepResponse":{"properties":{"id":{"type":"integer","title":"Id"},"sequence_id":{"type":"integer","title":"Sequence Id"},"step_order":{"type":"integer","title":"Step Order"},"action_type":{"type":"string","title":"Action Type"},"delay_days":{"type":"integer","title":"Delay Days"},"email_template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Email Template Id"},"task_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","sequence_id","step_order","action_type","delay_days","created_at"],"title":"StepResponse"},"StripeConnectBody":{"properties":{"api_key":{"type":"string","minLength":10,"title":"Api Key","description":"Stripe secret API key (sk_live_... or sk_test_...)"}},"type":"object","required":["api_key"],"title":"StripeConnectBody"},"TagCreate":{"properties":{"name":{"type":"string","title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","default":"#6366f1"}},"type":"object","required":["name"],"title":"TagCreate"},"TagUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","title":"TagUpdate"},"TaskCreate":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"task_type":{"type":"string","title":"Task Type","default":"follow_up"},"priority":{"type":"string","title":"Priority","default":"normal"},"status":{"type":"string","title":"Status","default":"not_started"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"due_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Due Time"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"assigned_to_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To User Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_recurring":{"type":"boolean","title":"Is Recurring","default":false},"recurrence_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Rule"},"reminder_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reminder At"}},"type":"object","required":["title"],"title":"TaskCreate"},"TaskListResponse":{"properties":{"tasks":{"items":{"$ref":"#/components/schemas/TaskResponse"},"type":"array","title":"Tasks"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["tasks","total","page","per_page","total_pages"],"title":"TaskListResponse"},"TaskResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connection Id"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type","default":"follow_up"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority","default":"normal"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","default":"not_started"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"due_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Due Time"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed By User Id"},"assigned_to_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To User Id"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"is_recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Recurring","default":false},"recurrence_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Rule"},"parent_task_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Task Id"},"reminder_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reminder At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","org_id","title"],"title":"TaskResponse"},"TaskUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"due_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Due Time"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"deal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Id"},"assigned_to_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned To User Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Recurring"},"recurrence_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Rule"},"reminder_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reminder At"}},"type":"object","title":"TaskUpdate"},"TerritoryCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assigned_users":{"items":{"type":"integer"},"type":"array","title":"Assigned Users","default":[]},"rules":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rules","default":[]},"parent_territory_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Territory Id"}},"type":"object","required":["name"],"title":"TerritoryCreate"},"TerritoryUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assigned_users":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Assigned Users"},"rules":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Rules"},"parent_territory_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Territory Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"TerritoryUpdate"},"TierCreate":{"properties":{"name":{"type":"string","title":"Name"},"tier_level":{"type":"integer","title":"Tier Level","default":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Items","default":[]},"total_cents":{"type":"integer","title":"Total Cents","default":0},"subtotal":{"type":"number","title":"Subtotal","default":0},"discount_amount":{"type":"number","title":"Discount Amount","default":0},"is_recommended":{"type":"boolean","title":"Is Recommended","default":false},"badge_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Text"},"badge_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Color"}},"type":"object","required":["name"],"title":"TierCreate"},"TierResponse":{"properties":{"id":{"type":"integer","title":"Id"},"quote_id":{"type":"integer","title":"Quote Id"},"name":{"type":"string","title":"Name"},"tier_level":{"type":"integer","title":"Tier Level"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Items","default":[]},"total_cents":{"type":"integer","title":"Total Cents","default":0},"subtotal":{"type":"number","title":"Subtotal","default":0},"discount_amount":{"type":"number","title":"Discount Amount","default":0},"is_recommended":{"type":"boolean","title":"Is Recommended","default":false},"is_selected":{"type":"boolean","title":"Is Selected","default":false},"badge_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Text"},"badge_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Color"}},"type":"object","required":["id","quote_id","name","tier_level"],"title":"TierResponse"},"TrashCompanyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"can_restore":{"type":"boolean","title":"Can Restore","default":true}},"type":"object","required":["id","name"],"title":"TrashCompanyResponse"},"TrashContactResponse":{"properties":{"id":{"type":"integer","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"primary_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Email"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"can_restore":{"type":"boolean","title":"Can Restore","default":true}},"type":"object","required":["id","first_name","last_name"],"title":"TrashContactResponse"},"TrashDealResponse":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"can_restore":{"type":"boolean","title":"Can Restore","default":true}},"type":"object","required":["id","title"],"title":"TrashDealResponse"},"UserRoleAssign":{"properties":{"role_id":{"type":"integer","title":"Role Id"}},"type":"object","required":["role_id"],"title":"UserRoleAssign"},"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"},"ValidationRuleEntry":{"properties":{"field_name":{"type":"string","title":"Field Name"},"is_required":{"type":"boolean","title":"Is Required","default":false},"validation_regex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Regex"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["field_name"],"title":"ValidationRuleEntry"},"ValidationRuleResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"entity_type":{"type":"string","title":"Entity Type"},"field_name":{"type":"string","title":"Field Name"},"is_required":{"type":"boolean","title":"Is Required"},"validation_regex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Regex"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","org_id","entity_type","field_name","is_required","is_active"],"title":"ValidationRuleResponse"},"VisibilityRuleBulkUpdate":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/VisibilityRuleUpdate"},"type":"array","title":"Rules"}},"type":"object","required":["rules"],"title":"VisibilityRuleBulkUpdate"},"VisibilityRuleResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"entity_type":{"type":"string","title":"Entity Type"},"rule_type":{"type":"string","title":"Rule Type"},"role_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Role Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","org_id","entity_type","rule_type","role_id","created_at"],"title":"VisibilityRuleResponse"},"VisibilityRuleUpdate":{"properties":{"entity_type":{"type":"string","maxLength":30,"title":"Entity Type"},"rule_type":{"type":"string","maxLength":20,"title":"Rule Type"},"role_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Role Id"}},"type":"object","required":["entity_type","rule_type"],"title":"VisibilityRuleUpdate"},"WebhookCreateUpdate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"url":{"type":"string","maxLength":500,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","url","events"],"title":"WebhookCreateUpdate"},"app__schemas__connect__CustomFieldCreate":{"properties":{"field_name":{"type":"string","title":"Field Name"},"field_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Value"}},"type":"object","required":["field_name"],"title":"CustomFieldCreate"},"app__schemas__crm__CustomFieldCreate":{"properties":{"field_name":{"type":"string","maxLength":100,"minLength":1,"title":"Field Name"},"field_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Value"}},"type":"object","required":["field_name"],"title":"CustomFieldCreate"}}}}