{"openapi":"3.1.0","info":{"title":"OmniMark Pro REST API","version":"1.0","description":"Use your workspace's data from your own code, Zapier, Make or n8n.\n\n**Authentication** — create a key in Settings → Developer and send it as `Authorization: Bearer om_live_…`. A key acts inside its workspace with the scopes you gave it (`contacts:read`, `contacts:write`, `*:read`, …); each operation lists the scope it needs.\n\n**Limits** — 600 requests per minute per key; over that you get 429 with a Retry-After header.\n\n**Errors** — JSON `{\"detail\": …}` with the HTTP status: 401 bad key, 403 missing scope (`required_scope` says which), 404 not found or not yours, 422 invalid input, 429 too many requests."},"servers":[{"url":"https://api.omnimarkpro.com"}],"paths":{"/api/v1/reports/growth/settings":{"get":{"tags":["Reports"],"summary":"Get Settings","operationId":"get_settings_api_v1_reports_growth_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Settings Api V1 Reports Growth Settings Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"},"put":{"tags":["Reports"],"summary":"Put Settings","operationId":"put_settings_api_v1_reports_growth_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__analytics__api__growth_report_router__SettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Settings Api V1 Reports Growth Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write","description":"**Scope:** `reports:write`"}},"/api/v1/reports/growth/preview":{"get":{"tags":["Reports"],"summary":"Preview","description":"**Scope:** `reports:read`\n\nThis week's report as it would be sent now (nothing is sent or saved).","operationId":"preview_api_v1_reports_growth_preview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Preview Api V1 Reports Growth Preview Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/reports/growth/send-test":{"post":{"tags":["Reports"],"summary":"Send Test","operationId":"send_test_api_v1_reports_growth_send_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Send Test Api V1 Reports Growth Send Test Post"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write","description":"**Scope:** `reports:write`"}},"/api/v1/reports/growth/history":{"get":{"tags":["Reports"],"summary":"History","operationId":"history_api_v1_reports_growth_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response History Api V1 Reports Growth History Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"}},"/api/v1/crm/contacts/imports":{"get":{"tags":["Contacts"],"summary":"History","operationId":"history_api_v1_crm_contacts_imports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["contacts:read"]}],"x-required-scope":"contacts:read","description":"**Scope:** `contacts:read`"},"post":{"tags":["Contacts"],"summary":"Upload","operationId":"upload_api_v1_crm_contacts_imports_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_api_v1_crm_contacts_imports_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["contacts:write"]}],"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"}},"/api/v1/crm/contacts/imports/{job_id}/start":{"post":{"tags":["Contacts"],"summary":"Start","operationId":"start_api_v1_crm_contacts_imports__job_id__start_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__crm__api__contact_import_router__StartIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"}},"/api/v1/crm/contacts/imports/api":{"post":{"tags":["Contacts"],"summary":"Import From Api","description":"**Scope:** `contacts:write`\n\nMove contacts (and deals) over from HubSpot, Mailchimp or GoHighLevel. The token is used for this\nrun only and never stored (P3-05).","operationId":"import_from_api_api_v1_crm_contacts_imports_api_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiImportIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["contacts:write"]}],"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/imports/{job_id}":{"get":{"tags":["Contacts"],"summary":"Status","operationId":"status_api_v1_crm_contacts_imports__job_id__get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read","description":"**Scope:** `contacts:read`"}},"/api/v1/crm/deals":{"get":{"tags":["Deals"],"summary":"Get Deals","operationId":"get_deals_api_v1_crm_deals_get","security":[{"ApiKey":["deals:read"]}],"parameters":[{"name":"pipeline_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DealSchema"},"title":"Response Get Deals Api V1 Crm Deals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:read","description":"**Scope:** `deals:read`"},"post":{"tags":["Deals"],"summary":"Create Deal","operationId":"create_deal_api_v1_crm_deals_post","security":[{"ApiKey":["deals:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealCreateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:write","description":"**Scope:** `deals:write`"}},"/api/v1/crm/deals/kanban":{"get":{"tags":["Deals"],"summary":"Get Deals Kanban","description":"**Scope:** `deals:read`\n\nDeals of one pipeline grouped by its stages (in order), with count, total and weighted value per column and\ndays-in-stage / rotting per deal (P4-01).","operationId":"get_deals_kanban_api_v1_crm_deals_kanban_get","security":[{"ApiKey":["deals:read"]}],"parameters":[{"name":"pipeline_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:read"}},"/api/v1/crm/deals/{deal_id}":{"put":{"tags":["Deals"],"summary":"Update Deal","operationId":"update_deal_api_v1_crm_deals__deal_id__put","security":[{"ApiKey":["deals:write"]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Deal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:write","description":"**Scope:** `deals:write`"},"delete":{"tags":["Deals"],"summary":"Delete Deal","operationId":"delete_deal_api_v1_crm_deals__deal_id__delete","security":[{"ApiKey":["deals:write"]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Deal Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:write","description":"**Scope:** `deals:write`"}},"/api/v1/crm/deals/{deal_id}/stage":{"patch":{"tags":["Deals"],"summary":"Update Deal Stage","description":"**Scope:** `deals:write`\n\nSpecific endpoint for moving deals between Kanban columns.","operationId":"update_deal_stage_api_v1_crm_deals__deal_id__stage_patch","security":[{"ApiKey":["deals:write"]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Deal Id"}},{"name":"stage","in":"query","required":true,"schema":{"type":"string","title":"Stage"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:write"}},"/api/v1/crm/contacts":{"get":{"tags":["Contacts"],"summary":"Get Contacts","operationId":"get_contacts_api_v1_crm_contacts_get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"segment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Segment Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedContactsSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read","description":"**Scope:** `contacts:read`"},"post":{"tags":["Contacts"],"summary":"Create Contact","operationId":"create_contact_api_v1_crm_contacts_post","security":[{"ApiKey":["contacts:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"}},"/api/v1/crm/contacts/{contact_id}":{"patch":{"tags":["Contacts"],"summary":"Update Contact","description":"**Scope:** `contacts:write`\n\nUpdate a contact's details — only the fields sent.","operationId":"update_contact_api_v1_crm_contacts__contact_id__patch","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"},"delete":{"tags":["Contacts"],"summary":"Delete Contact","description":"**Scope:** `contacts:write`\n\nDelete a contact by ID.","operationId":"delete_contact_api_v1_crm_contacts__contact_id__delete","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Contact Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/{contact_id}/rescore":{"post":{"tags":["Contacts"],"summary":"Rescore Contact","operationId":"rescore_contact_api_v1_crm_contacts__contact_id__rescore_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"}},"/api/v1/crm/contacts/{contact_id}/recalculate-score":{"post":{"tags":["Contacts"],"summary":"Recalculate Contact Score","description":"**Scope:** `contacts:write`\n\n6-Dimension AI Lead Scoring: recalculates the contact's score using\nemail engagement, website behavior, ICP fit, social engagement,\ninteraction recency, and intent signals. Updates the contact record\nand returns the full scoring breakdown.","operationId":"recalculate_contact_score_api_v1_crm_contacts__contact_id__recalculate_score_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/{contact_id}/score/ai":{"post":{"tags":["Contacts"],"summary":"Ai Rescore Contact","description":"**Scope:** `contacts:write`\n\nPhase 3+ AI Behavioral Scoring. \nTriggers OpenAI to evaluate the contact details securely on-demand to save costs.","operationId":"ai_rescore_contact_api_v1_crm_contacts__contact_id__score_ai_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/import":{"post":{"tags":["Contacts"],"summary":"Import Contacts","description":"**Scope:** `contacts:write`\n\nImport contacts from CSV or Excel (.xlsx). Required column: email\nOptional columns: first_name, last_name, company, position, phone, linkedin_url\n\nEvery imported contact is auto-tagged with `import_tag` (caller-supplied)\nor an auto-generated tag based on filename + date. This is the canonical\nway to slice cold-import lists without forking the contact data model.","operationId":"import_contacts_api_v1_crm_contacts_import_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"import_tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Tag"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_contacts_api_v1_crm_contacts_import_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/crm/segments":{"get":{"tags":["Contacts"],"summary":"Get Segments","operationId":"get_segments_api_v1_crm_segments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ContactSegmentSchema"},"type":"array","title":"Response Get Segments Api V1 Crm Segments Get"}}}}},"security":[{"ApiKey":["contacts:read"]}],"x-required-scope":"contacts:read","description":"**Scope:** `contacts:read`"},"post":{"tags":["Contacts"],"summary":"Create Segment","operationId":"create_segment_api_v1_crm_segments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSegmentCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSegmentSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["contacts:write"]}],"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"}},"/api/v1/crm/segments/{segment_id}":{"delete":{"tags":["Contacts"],"summary":"Delete Segment","operationId":"delete_segment_api_v1_crm_segments__segment_id__delete","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Segment Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"}},"/api/v1/crm/contacts/{contact_id}/icebreaker":{"post":{"tags":["Contacts"],"summary":"Get Contact Icebreaker","description":"**Scope:** `contacts:write`\n\nGenerate a personalized AI icebreaker for a contact.","operationId":"get_contact_icebreaker_api_v1_crm_contacts__contact_id__icebreaker_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/bulk-enrich":{"post":{"tags":["Contacts"],"summary":"Bulk Enrich Contacts","description":"**Scope:** `contacts:write`\n\nFill empty fields (job title, company, LinkedIn, website, name) for up to 200 contacts from their email —\nClearbit / Apollo / Hunter, whichever is connected; each person found is billed to the usage wallet. Existing\nvalues are never overwritten. Up to 25 run now and return the result; larger batches run after the response\nand you get a notification with the result.","operationId":"bulk_enrich_contacts_api_v1_crm_contacts_bulk_enrich_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkEnrichIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["contacts:write"]}],"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/{contact_id}/enrich":{"post":{"tags":["Contacts"],"summary":"Enrich Contact","description":"**Scope:** `contacts:write`\n\nFill this contact's empty fields from their email (Clearbit / Apollo / Hunter — billed per person found),\nand add LinkedIn profile notes when a LinkedIn URL is set and LinkedIn enrichment is configured.","operationId":"enrich_contact_api_v1_crm_contacts__contact_id__enrich_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/unsubscribe":{"post":{"tags":["Contacts"],"summary":"Unsubscribe Contact","description":"**Scope:** `contacts:write`\n\nGDPR/CAN-SPAM compliant unsubscribe.","operationId":"unsubscribe_contact_api_v1_crm_contacts_unsubscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["contacts:write"]}],"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/{contact_id}/timeline":{"get":{"tags":["Contacts"],"summary":"Get Contact Timeline","description":"**Scope:** `contacts:read`\n\n360° contact view: returns contact data + activities + deals + tasks in one call.\nUsed by the CRM contact detail page.","operationId":"get_contact_timeline_api_v1_crm_contacts__contact_id__timeline_get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Contact Timeline Api V1 Crm Contacts  Contact Id  Timeline Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read"}},"/api/v1/crm/contacts/{contact_id}/activities":{"post":{"tags":["Contacts"],"summary":"Log Contact Activity","description":"**Scope:** `contacts:write`\n\nManually log an activity (call / meeting / note / email) onto a contact —\nappears in the unified timeline. Powers the 'Log activity' CRM action.","operationId":"log_contact_activity_api_v1_crm_contacts__contact_id__activities_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityLogCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Log Contact Activity Api V1 Crm Contacts  Contact Id  Activities Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/crm/activities":{"post":{"tags":["Contacts"],"summary":"Create Activity Flat","description":"**Scope:** `contacts:write`\n\nCompatibility endpoint: the contact detail UI posts notes here with\ncontact_id in the body. Delegates to the same activity-logging logic.","operationId":"create_activity_flat_api_v1_crm_activities_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCreateFlat"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Create Activity Flat Api V1 Crm Activities Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["contacts:write"]}],"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/duplicates":{"get":{"tags":["Contacts"],"summary":"Find Duplicate Contacts","description":"**Scope:** `contacts:read`\n\nFind contacts with similar names or emails within the organization.\nUses SQL LIKE for fuzzy matching on first_name, last_name, and email.\nReturns pairs of potential duplicates.","operationId":"find_duplicate_contacts_api_v1_crm_contacts_duplicates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Find Duplicate Contacts Api V1 Crm Contacts Duplicates Get"}}}}},"security":[{"ApiKey":["contacts:read"]}],"x-required-scope":"contacts:read"}},"/api/v1/crm/contacts/merge":{"post":{"tags":["Contacts"],"summary":"Merge Contacts","description":"**Scope:** `contacts:write`\n\nMerge two contacts. The primary contact is kept, and any empty fields\nare filled from the secondary contact. The secondary contact is deleted.","operationId":"merge_contacts_api_v1_crm_contacts_merge_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"primary_id","in":"query","required":true,"schema":{"type":"string","title":"Primary Id"}},{"name":"secondary_id","in":"query","required":true,"schema":{"type":"string","title":"Secondary Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Merge Contacts Api V1 Crm Contacts Merge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/crm/pipelines":{"get":{"tags":["Deals"],"summary":"Get Pipelines","description":"**Scope:** `deals:read`\n\nThe workspace's pipelines with their stages (probability, rotting days, won/lost).","operationId":"get_pipelines_api_v1_crm_pipelines_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Pipelines Api V1 Crm Pipelines Get"}}}}},"security":[{"ApiKey":["deals:read"]}],"x-required-scope":"deals:read"},"post":{"tags":["Deals"],"summary":"Create Pipeline","operationId":"create_pipeline_api_v1_crm_pipelines_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Create Pipeline Api V1 Crm Pipelines Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["deals:write"]}],"x-required-scope":"deals:write","description":"**Scope:** `deals:write`"}},"/api/v1/crm/pipelines/{pipeline_id}":{"put":{"tags":["Deals"],"summary":"Update Pipeline","description":"**Scope:** `deals:write`\n\nRename, add, remove, reorder or re-tune stages. Deals in a removed stage move per `stage_map`.","operationId":"update_pipeline_api_v1_crm_pipelines__pipeline_id__put","security":[{"ApiKey":["deals:write"]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Update Pipeline Api V1 Crm Pipelines  Pipeline Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:write"},"delete":{"tags":["Deals"],"summary":"Delete Pipeline","description":"**Scope:** `deals:write`\n\nDelete a pipeline; its deals move to `move_to` (required when it has deals).","operationId":"delete_pipeline_api_v1_crm_pipelines__pipeline_id__delete","security":[{"ApiKey":["deals:write"]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"move_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Move To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Delete Pipeline Api V1 Crm Pipelines  Pipeline Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:write"}},"/api/v1/crm/contacts/bulk-tag":{"post":{"tags":["Contacts"],"summary":"Bulk Tag Contacts","description":"**Scope:** `contacts:write`\n\nBulk add or remove tags from multiple contacts.","operationId":"bulk_tag_contacts_api_v1_crm_contacts_bulk_tag_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTagPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Bulk Tag Contacts Api V1 Crm Contacts Bulk Tag Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["contacts:write"]}],"x-required-scope":"contacts:write"}},"/api/v1/crm/deals/{deal_id}/line-items":{"get":{"tags":["Deals"],"summary":"List Deal Line Items","description":"**Scope:** `deals:read`\n\nLine items + quote totals for a deal.","operationId":"list_deal_line_items_api_v1_crm_deals__deal_id__line_items_get","security":[{"ApiKey":["deals:read"]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Deal Line Items Api V1 Crm Deals  Deal Id  Line Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:read"},"post":{"tags":["Deals"],"summary":"Add Deal Line Item","description":"**Scope:** `deals:write`\n\nAdd a product line to a deal; the deal's value is recomputed from its lines.","operationId":"add_deal_line_item_api_v1_crm_deals__deal_id__line_items_post","security":[{"ApiKey":["deals:write"]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Deal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Add Deal Line Item Api V1 Crm Deals  Deal Id  Line Items Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:write"}},"/api/v1/crm/deals/{deal_id}/line-items/{item_id}":{"delete":{"tags":["Deals"],"summary":"Delete Deal Line Item","operationId":"delete_deal_line_item_api_v1_crm_deals__deal_id__line_items__item_id__delete","security":[{"ApiKey":["deals:write"]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Deal Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Delete Deal Line Item Api V1 Crm Deals  Deal Id  Line Items  Item Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"deals:write","description":"**Scope:** `deals:write`"}},"/api/v1/dashboard/layout":{"get":{"tags":["Reports"],"summary":"Get Dashboard Layout","operationId":"get_dashboard_layout_api_v1_dashboard_layout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"},"put":{"tags":["Reports"],"summary":"Update Dashboard Layout","operationId":"update_dashboard_layout_api_v1_dashboard_layout_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardLayoutUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write","description":"**Scope:** `reports:write`"}},"/api/v1/dashboard/website":{"get":{"tags":["Reports"],"summary":"Website Traffic","description":"**Scope:** `reports:read`\n\nWebsite traffic from the pixel: sessions, page views, visitors, time on page, daily series, top pages and\nsources — answered by ClickHouse when it's provisioned (P2-07), by Postgres otherwise.","operationId":"website_traffic_api_v1_dashboard_website_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","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"}}}}},"x-required-scope":"reports:read"}},"/api/v1/dashboard/metrics":{"get":{"tags":["Reports"],"summary":"Get Dashboard Metrics","operationId":"get_dashboard_metrics_api_v1_dashboard_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardMetrics"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"}},"/api/v1/dashboard/pipeline-chart":{"get":{"tags":["Reports"],"summary":"Get Pipeline Chart","operationId":"get_pipeline_chart_api_v1_dashboard_pipeline_chart_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChartDataPoint"},"type":"array","title":"Response Get Pipeline Chart Api V1 Dashboard Pipeline Chart Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"}},"/api/v1/dashboard/marketing-trend":{"get":{"tags":["Reports"],"summary":"Get Marketing Trend","description":"**Scope:** `reports:read`\n\nReal per-day email + lead activity for the last N days:\n  • leads  = contacts created that day\n  • emails = campaign emails actually sent that day (email_campaign_contacts.sent_at)\nDays with no activity return 0 — an honest empty chart, never fabricated numbers.","operationId":"get_marketing_trend_api_v1_dashboard_marketing_trend_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/api/v1/dashboard/attribution":{"get":{"tags":["Reports"],"summary":"Get Attribution","description":"**Scope:** `reports:read`\n\nMulti-touch attribution engine.\nSupported models: first_touch, last_touch, linear, time_decay, data_driven, custom.\nWhen model=custom, pass weights as JSON: {\"first_touch\": 40, \"middle_touches\": 30, \"last_touch\": 30}","operationId":"get_attribution_api_v1_dashboard_attribution_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"model","in":"query","required":false,"schema":{"type":"string","default":"linear","title":"Model"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}},{"name":"weights","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weights"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/api/v1/dashboard/funnels":{"get":{"tags":["Reports"],"summary":"Get Funnels","description":"**Scope:** `reports:read`\n\nReturn only persisted funnel events and orders for the dashboard.\n\nAn empty organization returns empty arrays and unavailable comparisons;\nno stage, trend, audience, or previous-period numbers are manufactured.","operationId":"get_funnels_api_v1_dashboard_funnels_get","security":[{"ApiKey":["reports:read"]}],"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"}}}}},"x-required-scope":"reports:read"}},"/api/v1/dashboard/insights":{"get":{"tags":["Reports"],"summary":"Get Dashboard Insights","description":"**Scope:** `reports:read`\n\nReturns AI-generated insight cards for the dashboard.\nChecks real metrics and produces actionable insights.","operationId":"get_dashboard_insights_api_v1_dashboard_insights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/dashboard/forecast":{"get":{"tags":["Reports"],"summary":"Get Revenue Forecast","description":"**Scope:** `reports:read`\n\nRevenue Forecasting Engine.\nReturns weighted pipeline forecast, conversion rates, and monthly predictions\nwith confidence intervals based on historical deal data.","operationId":"get_revenue_forecast_api_v1_dashboard_forecast_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","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"}}}}},"x-required-scope":"reports:read"}},"/api/v1/dashboard/recent-activity":{"get":{"tags":["Reports"],"summary":"Get Recent Activity","operationId":"get_recent_activity_api_v1_dashboard_recent_activity_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"}},"/api/v1/email/campaigns":{"get":{"tags":["Email Campaigns"],"summary":"Get Campaigns","operationId":"get_campaigns_api_v1_email_campaigns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CampaignSchema"},"type":"array","title":"Response Get Campaigns Api V1 Email Campaigns Get"}}}}},"security":[{"ApiKey":["email_campaigns:read"]}],"x-required-scope":"email_campaigns:read","description":"**Scope:** `email_campaigns:read`"},"post":{"tags":["Email Campaigns"],"summary":"Create Campaign","operationId":"create_campaign_api_v1_email_campaigns_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["email_campaigns:write"]}],"x-required-scope":"email_campaigns:write","description":"**Scope:** `email_campaigns:write`"}},"/api/v1/email/audience/segments":{"get":{"tags":["Email Campaigns"],"summary":"List Audience Segments","description":"**Scope:** `email_campaigns:read`\n\nReturns the org's saved AudienceSegments + a synthetic 'all contacts' option.","operationId":"list_audience_segments_api_v1_email_audience_segments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["email_campaigns:read"]}],"x-required-scope":"email_campaigns:read"}},"/api/v1/email/audience/segments/from-tag":{"post":{"tags":["Email Campaigns"],"summary":"Create Segment From Tag","description":"**Scope:** `email_campaigns:write`\n\nOne-shot: turns a contact tag into an AudienceSegment so the user can\ntarget a freshly imported list without authoring filter JSON by hand.\nCounts the matching contacts at create time so the segment shows a\ncontact_count immediately.","operationId":"create_segment_from_tag_api_v1_email_audience_segments_from_tag_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceSegmentFromTagSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["email_campaigns:write"]}],"x-required-scope":"email_campaigns:write"}},"/api/v1/email/campaigns/preview-recipients":{"get":{"tags":["Email Campaigns"],"summary":"Preview Recipients","description":"**Scope:** `email_campaigns:read`\n\nLive preview of who would actually receive a campaign.\n\n- If `campaign_id` is given AND that campaign is in ephemeral mode, preview\n  counts from EphemeralCampaignRecipient.\n- Otherwise (segment_id provided OR omitted), preview counts from the CRM\n  Contact pool with optional segment filter.\n\nUsed by the Initialize Campaign modal so the user sees the real number\nBEFORE clicking Launch (instead of being surprised at send time).","operationId":"preview_recipients_api_v1_email_campaigns_preview_recipients_get","security":[{"ApiKey":["email_campaigns:read"]}],"parameters":[{"name":"segment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Segment Id"}},{"name":"campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:read"}},"/api/v1/email/campaigns/{campaign_id}/ephemeral-recipients":{"post":{"tags":["Email Campaigns"],"summary":"Upload Ephemeral Recipients","description":"**Scope:** `email_campaigns:write`\n\nUpload a CSV/XLSX of one-off recipients for an ephemeral campaign.\nRequired column: email. Optional: name, first_name, last_name, company.\n\nCompliance gates applied AT UPLOAD TIME:\n  - Format check (rows that fail are stored with status='skipped', skip_reason='invalid_format')\n  - Org UnsubscribeList check (status='skipped', skip_reason='opt_out')\n  - Duplicate dedup within the file + against any existing rows for this campaign","operationId":"upload_ephemeral_recipients_api_v1_email_campaigns__campaign_id__ephemeral_recipients_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"replace","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Replace"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_ephemeral_recipients_api_v1_email_campaigns__campaign_id__ephemeral_recipients_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"}},"/api/v1/email/campaigns/{campaign_id}":{"patch":{"tags":["Email Campaigns"],"summary":"Update Campaign","description":"**Scope:** `email_campaigns:write`\n\nUpdate a campaign's metadata (name, subject, status, body).","operationId":"update_campaign_api_v1_email_campaigns__campaign_id__patch","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"},"delete":{"tags":["Email Campaigns"],"summary":"Delete Campaign","operationId":"delete_campaign_api_v1_email_campaigns__campaign_id__delete","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write","description":"**Scope:** `email_campaigns:write`"}},"/api/v1/email/campaigns/{campaign_id}/send":{"post":{"tags":["Email Campaigns"],"summary":"Send Campaign","description":"**Scope:** `email_campaigns:write`\n\nDispatch a campaign to all org contacts.","operationId":"send_campaign_api_v1_email_campaigns__campaign_id__send_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"}},"/api/v1/email/campaigns/{campaign_id}/schedule":{"post":{"tags":["Email Campaigns"],"summary":"Schedule Campaign","description":"**Scope:** `email_campaigns:write`\n\nSend later (P5-36): the time is converted to UTC from the zone it was picked in (DST-safe); the\nemail_campaigns_due job starts it. Pause to unschedule.","operationId":"schedule_campaign_api_v1_email_campaigns__campaign_id__schedule_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignScheduleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"}},"/api/v1/email/campaigns/{campaign_id}/duplicate":{"post":{"tags":["Email Campaigns"],"summary":"Duplicate Campaign","description":"**Scope:** `email_campaigns:write`\n\nCopy a campaign's content, audience and A/B setup into a new draft (no\nschedule, no results).","operationId":"duplicate_campaign_api_v1_email_campaigns__campaign_id__duplicate_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"}},"/api/v1/email/campaigns/{campaign_id}/pause":{"post":{"tags":["Email Campaigns"],"summary":"Pause Campaign","description":"**Scope:** `email_campaigns:write`\n\nPause an in-flight send. The chunked dispatcher checks status between\nbatches, so the send stops after the current batch (already-sent contacts keep\ntheir delivery; the rest stay queued for resume).","operationId":"pause_campaign_api_v1_email_campaigns__campaign_id__pause_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"}},"/api/v1/email/campaigns/{campaign_id}/resume":{"post":{"tags":["Email Campaigns"],"summary":"Resume Campaign","description":"**Scope:** `email_campaigns:write`\n\nResume a paused send — continues to the remaining (unsent) recipients only,\nso already-delivered contacts are never emailed twice.","operationId":"resume_campaign_api_v1_email_campaigns__campaign_id__resume_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"}},"/api/v1/email/campaigns/deliverability":{"get":{"tags":["Email Campaigns"],"summary":"Get Deliverability","description":"**Scope:** `email_campaigns:read`\n\nAggregate delivery, bounce, complaint, and unsubscribe stats from email_campaign_contacts.","operationId":"get_deliverability_api_v1_email_campaigns_deliverability_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["email_campaigns:read"]}],"x-required-scope":"email_campaigns:read"}},"/api/v1/email/campaigns/{campaign_id}/optimal-send-times":{"get":{"tags":["Email Campaigns"],"summary":"Get Optimal Send Times","description":"**Scope:** `email_campaigns:read`\n\nFor each contact, find the hour they most frequently open emails.","operationId":"get_optimal_send_times_api_v1_email_campaigns__campaign_id__optimal_send_times_get","security":[{"ApiKey":["email_campaigns:read"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:read"}},"/api/v1/email/campaigns/{campaign_id}/ab-prediction":{"get":{"tags":["Email Campaigns"],"summary":"Get Ab Prediction","description":"**Scope:** `email_campaigns:read`\n\nLive Bayesian prediction for an in-flight A/B test.\n\nReturns the same prediction shape the worker stores plus the\nauto-pick gate state so the UI can show a 'will auto-promote at X%'\nprogress bar.","operationId":"get_ab_prediction_api_v1_email_campaigns__campaign_id__ab_prediction_get","security":[{"ApiKey":["email_campaigns:read"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"open_rate","title":"Metric"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:read"}},"/api/v1/email/templates/remix":{"post":{"tags":["Email Campaigns"],"summary":"Remix Template","description":"**Scope:** `email_campaigns:write`\n\nRewrite a block-based design's text/CTA copy to match new constraints\nwhile preserving structure. Returns the modified blocks; the frontend\ncan save them back to the design with a single PATCH.","operationId":"remix_template_api_v1_email_templates_remix_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemixTemplateBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["email_campaigns:write"]}],"x-required-scope":"email_campaigns:write"}},"/api/v1/email/templates/{template_key}/benchmarks":{"get":{"tags":["Email Campaigns"],"summary":"Template Benchmarks","description":"**Scope:** `email_campaigns:read`\n\nAggregate open / click rates across every campaign that was seeded\nfrom this template_key (for the current org). Returns enough data\nto render an \"avg open rate using this template: X%\" badge.","operationId":"template_benchmarks_api_v1_email_templates__template_key__benchmarks_get","security":[{"ApiKey":["email_campaigns:read"]}],"parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:read"}},"/api/v1/email/campaigns/{campaign_id}/performance":{"get":{"tags":["Email Campaigns"],"summary":"Campaign Performance","description":"**Scope:** `email_campaigns:read`\n\nPer-campaign engagement funnel + influenced revenue.\n\nEngagement is computed from per-recipient EmailCampaignContact timestamps.\nInfluenced revenue = sum of WON deal value for contacts who received this\ncampaign (native attribution — no external dependency).","operationId":"campaign_performance_api_v1_email_campaigns__campaign_id__performance_get","security":[{"ApiKey":["email_campaigns:read"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:read"}},"/api/v1/email/campaigns/grade":{"post":{"tags":["Email Campaigns"],"summary":"Grade Email Draft","description":"**Scope:** `email_campaigns:write`\n\nPre-launch test for an email DRAFT (not yet saved) — rule-based 0-100\nscore + per-check results + strengths/weaknesses/fixes.","operationId":"grade_email_draft_api_v1_email_campaigns_grade_post","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"}}}}},"security":[{"ApiKey":["email_campaigns:write"]}],"x-required-scope":"email_campaigns:write"}},"/api/v1/email/campaigns/{campaign_id}/grade":{"post":{"tags":["Email Campaigns"],"summary":"Grade Email Saved","description":"**Scope:** `email_campaigns:write`\n\nPre-launch test for a saved email campaign.","operationId":"grade_email_saved_api_v1_email_campaigns__campaign_id__grade_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"}},"/api/v1/email/campaigns/{campaign_id}/resend-unopened":{"post":{"tags":["Email Campaigns"],"summary":"Resend To Non Openers","description":"**Scope:** `email_campaigns:write`\n\nCreate a DRAFT follow-up campaign targeting recipients who were sent the\noriginal but never opened it. Returns the new draft (review, then send via\nthe normal send endpoint) — never auto-sends.","operationId":"resend_to_non_openers_api_v1_email_campaigns__campaign_id__resend_unopened_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendUnopenedBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"}},"/api/v1/sequences/":{"get":{"tags":["Sequences"],"summary":"List Sequences","description":"**Scope:** `sequences:read`\n\nGet all email sequences for the current org.","operationId":"list_sequences_api_v1_sequences__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SequenceSchema"},"type":"array","title":"Response List Sequences Api V1 Sequences  Get"}}}}},"security":[{"ApiKey":["sequences:read"]}],"x-required-scope":"sequences:read"},"post":{"tags":["Sequences"],"summary":"Create Sequence","description":"**Scope:** `sequences:write`\n\nCreate a new sequence (optionally with initial steps).","operationId":"create_sequence_api_v1_sequences__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceCreateSchema"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sequences:write"]}],"x-required-scope":"sequences:write"}},"/api/v1/sequences/{sequence_id}":{"get":{"tags":["Sequences"],"summary":"Get Sequence","operationId":"get_sequence_api_v1_sequences__sequence_id__get","security":[{"ApiKey":["sequences:read"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:read","description":"**Scope:** `sequences:read`"},"patch":{"tags":["Sequences"],"summary":"Update Sequence","operationId":"update_sequence_api_v1_sequences__sequence_id__patch","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write","description":"**Scope:** `sequences:write`"},"delete":{"tags":["Sequences"],"summary":"Delete Sequence","operationId":"delete_sequence_api_v1_sequences__sequence_id__delete","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write","description":"**Scope:** `sequences:write`"}},"/api/v1/sequences/{sequence_id}/activate":{"post":{"tags":["Sequences"],"summary":"Activate Sequence","description":"**Scope:** `sequences:write`\n\nSet a sequence to 'active' — it will start sending to enrolled contacts.","operationId":"activate_sequence_api_v1_sequences__sequence_id__activate_post","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write"}},"/api/v1/sequences/{sequence_id}/pause":{"post":{"tags":["Sequences"],"summary":"Pause Sequence","description":"**Scope:** `sequences:write`\n\nPause an active sequence.","operationId":"pause_sequence_api_v1_sequences__sequence_id__pause_post","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write"}},"/api/v1/sequences/{sequence_id}/steps":{"get":{"tags":["Sequences"],"summary":"Get Sequence Steps","description":"**Scope:** `sequences:read`\n\nGet all steps for a sequence (ordered).","operationId":"get_sequence_steps_api_v1_sequences__sequence_id__steps_get","security":[{"ApiKey":["sequences:read"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StepSchema"},"title":"Response Get Sequence Steps Api V1 Sequences  Sequence Id  Steps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:read"},"post":{"tags":["Sequences"],"summary":"Add Sequence Step","description":"**Scope:** `sequences:write`\n\nAdd a new step to a sequence.","operationId":"add_sequence_step_api_v1_sequences__sequence_id__steps_post","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepCreateSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write"}},"/api/v1/sequences/{sequence_id}/steps/{step_id}":{"put":{"tags":["Sequences"],"summary":"Update Sequence Step","description":"**Scope:** `sequences:write`\n\nUpdate a sequence step.","operationId":"update_sequence_step_api_v1_sequences__sequence_id__steps__step_id__put","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}},{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Step Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepCreateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write"},"delete":{"tags":["Sequences"],"summary":"Delete Sequence Step","description":"**Scope:** `sequences:write`\n\nRemove a step from a sequence.","operationId":"delete_sequence_step_api_v1_sequences__sequence_id__steps__step_id__delete","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}},{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Step Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write"}},"/api/v1/sequences/ai/suggest-subjects":{"post":{"tags":["Sequences"],"summary":"Suggest Subject Lines","description":"**Scope:** `sequences:write`\n\nUse OpenAI to generate A/B subject line variants in the org's brand voice.","operationId":"suggest_subject_lines_api_v1_sequences_ai_suggest_subjects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectSuggestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sequences:write"]}],"x-required-scope":"sequences:write"}},"/api/v1/sequences/ai/generate":{"post":{"tags":["Sequences"],"summary":"Ai Generate Sequence Ep","description":"**Scope:** `sequences:write`\n\nGenerate a fresh email sequence from a natural-language prompt via\nthe multi-provider AI failover stack. Optionally saves the result as a\npaused draft sequence so the user can review + activate.","operationId":"ai_generate_sequence_ep_api_v1_sequences_ai_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__email__api__sequence_router__AIGenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sequences:write"]}],"x-required-scope":"sequences:write"}},"/api/v1/sequences/{sequence_id}/cohort-comparison":{"get":{"tags":["Sequences"],"summary":"Cohort Comparison","description":"**Scope:** `sequences:read`\n\nFor each step in this sequence, return variant A vs B engagement.\n\nReads SequenceEnrollment.step_history rows\n([{step, sent_at, opened_at, clicked_at, replied_at, variant}]) and\naggregates counts per (step_order, variant). Returns a structure the\nfrontend can chart directly:\n\n  {\n    \"sequence_id\": \"...\",\n    \"steps\": [\n      {\"step_order\":1, \"subject_a\":\"...\", \"subject_b\":\"...\",\n       \"a\":{\"sent\":120,\"opens\":40,\"clicks\":12,\"replies\":3,\"open_rate\":0.33,...},\n       \"b\":{...},\n       \"winning_variant\":\"A\",\"winning_metric\":\"open_rate\",\"lift_pct\":12.4\n      },\n      ...\n    ]\n  }","operationId":"cohort_comparison_api_v1_sequences__sequence_id__cohort_comparison_get","security":[{"ApiKey":["sequences:read"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:read"}},"/api/v1/sequences/{sequence_id}/enroll":{"post":{"tags":["Sequences"],"summary":"Enroll Contact","description":"**Scope:** `sequences:write`\n\nEnroll a contact into a sequence.\n\nCross-sequence dedup: if the org has `cross_sequence_dedup_enabled`\n(default True) and the contact is active in ANY other sequence, we\nreject the enrollment with 409. Caller can pass `allow_concurrent=True`\nto override.","operationId":"enroll_contact_api_v1_sequences__sequence_id__enroll_post","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","title":"Sequence Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write"}},"/api/v1/sequences/{sequence_id}/bulk-enroll":{"post":{"tags":["Sequences"],"summary":"Bulk Enroll Contacts","description":"**Scope:** `sequences:write`\n\nBulk enroll with cross-sequence dedup. Returns the split:\nenrolled vs skipped (reason=already_in_this|cross_sequence_conflict).","operationId":"bulk_enroll_contacts_api_v1_sequences__sequence_id__bulk_enroll_post","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","title":"Sequence Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkEnrollRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write"}},"/api/v1/sequences/{sequence_id}/enrollments":{"get":{"tags":["Sequences"],"summary":"List Enrollments","description":"**Scope:** `sequences:read`\n\nList enrollments for a sequence, optionally filtered by status.","operationId":"list_enrollments_api_v1_sequences__sequence_id__enrollments_get","security":[{"ApiKey":["sequences:read"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:read"}},"/api/v1/sequences/{sequence_id}/enrollments/{enrollment_id}/reply":{"post":{"tags":["Sequences"],"summary":"Mark Replied","description":"**Scope:** `sequences:write`\n\nMark a sequence enrollment as replied — automatically stops further steps.\nCalled by reply-detection webhook or manual trigger.","operationId":"mark_replied_api_v1_sequences__sequence_id__enrollments__enrollment_id__reply_post","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","title":"Sequence Id"}},{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","title":"Enrollment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write"}},"/api/v1/sequences/templates":{"get":{"tags":["Sequences"],"summary":"List Sequence Templates","description":"**Scope:** `sequences:read`\n\nBrowse the curated sequence-template library. Returns lightweight\nsummaries (no full step bodies) so the picker stays fast.","operationId":"list_sequence_templates_api_v1_sequences_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["sequences:read"]}],"x-required-scope":"sequences:read"}},"/api/v1/sequences/templates/{template_key}":{"get":{"tags":["Sequences"],"summary":"Get Sequence Template","description":"**Scope:** `sequences:read`\n\nFull template detail incl. all step subjects + body HTML.","operationId":"get_sequence_template_api_v1_sequences_templates__template_key__get","security":[{"ApiKey":["sequences:read"]}],"parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:read"}},"/api/v1/sequences/from-template":{"post":{"tags":["Sequences"],"summary":"Create Sequence From Template","description":"**Scope:** `sequences:write`\n\nClone a curated template into a new draft EmailSequence + SequenceSteps\nfor the current org. Sequence is created in 'paused' status so the\nuser can review + activate.","operationId":"create_sequence_from_template_api_v1_sequences_from_template_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantiateTemplateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sequences:write"]}],"x-required-scope":"sequences:write"}},"/api/v1/sequences/ai-generate":{"post":{"tags":["Sequences"],"summary":"Ai Generate Sequence V2","description":"**Scope:** `sequences:write`\n\nGenerate a fully-fleshed sequence from a natural-language description.\n\nUses Claude claude-sonnet-4-6 with RAG context from the org's highest-performing\nsequences. Results are cached in Redis for 24h.\n\nReturns {sequence, rag_context, usage_tokens}.","operationId":"ai_generate_sequence_v2_api_v1_sequences_ai_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIGenerateV2Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sequences:write"]}],"x-required-scope":"sequences:write"}},"/api/v1/sequences/{sequence_id}/steps/{step_number}/rewrite":{"post":{"tags":["Sequences"],"summary":"Rewrite Sequence Step","description":"**Scope:** `sequences:write`\n\nRewrite a specific step body in-place using an instruction.\n\nThe step is fetched from DB to extract current body + merge tags.\nReturns the rewritten body and confirmation of preserved merge tags.","operationId":"rewrite_sequence_step_api_v1_sequences__sequence_id__steps__step_number__rewrite_post","security":[{"ApiKey":["sequences:write"]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Sequence Id"}},{"name":"step_number","in":"path","required":true,"schema":{"type":"integer","title":"Step Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepRewriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sequences:write"}},"/api/v1/reports/overview":{"get":{"tags":["Reports"],"summary":"Get Platform Overview","description":"**Scope:** `reports:read`\n\nAggregate stats for the current org (used by the Reports dashboard).","operationId":"get_platform_overview_api_v1_reports_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/reports/overview/pdf":{"get":{"tags":["Reports"],"summary":"Download Platform Overview Pdf","description":"**Scope:** `reports:read`\n\nThe branded client report for the last `days` days (same PDF as /reports/client-report.pdf).","operationId":"download_platform_overview_pdf_api_v1_reports_overview_pdf_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"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"}}}}},"x-required-scope":"reports:read"}},"/api/v1/reports/campaigns/{campaign_id}/pdf":{"get":{"tags":["Reports"],"summary":"Download Campaign Report Pdf","description":"**Scope:** `reports:read`\n\nGenerate a PDF performance report for a completed campaign.","operationId":"download_campaign_report_pdf_api_v1_reports_campaigns__campaign_id__pdf_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/api/v1/reports/unsubscribes":{"get":{"tags":["Reports"],"summary":"List Unsubscribes","description":"**Scope:** `reports:read`\n\nList all unsubscribed emails for the current org.","operationId":"list_unsubscribes_api_v1_reports_unsubscribes_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","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"}}}}},"x-required-scope":"reports:read"},"post":{"tags":["Reports"],"summary":"Add Unsubscribe","description":"**Scope:** `reports:write`\n\nAdd an email to the unsubscribe list and mark the contact as churned.","operationId":"add_unsubscribe_api_v1_reports_unsubscribes_post","security":[{"ApiKey":["reports:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:write"}},"/api/v1/reports/unsubscribes/{email}":{"delete":{"tags":["Reports"],"summary":"Remove Unsubscribe","description":"**Scope:** `reports:write`\n\nRemove an email from the unsubscribe list (re-subscribe).","operationId":"remove_unsubscribe_api_v1_reports_unsubscribes__email__delete","security":[{"ApiKey":["reports:write"]}],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:write"}},"/api/v1/reports/unsubscribes/export/csv":{"get":{"tags":["Reports"],"summary":"Export Unsubscribes Csv","description":"**Scope:** `reports:read`\n\nExport all unsubscribe records as a CSV file (GDPR data export).","operationId":"export_unsubscribes_csv_api_v1_reports_unsubscribes_export_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/reports/custom":{"post":{"tags":["Reports"],"summary":"Run Custom Report","description":"**Scope:** `reports:write`\n\nRun a custom report by selecting metrics, date range, and grouping.\nReturns data series ready for a line/bar chart.\n\n`custom_definitions` lets the caller include user-defined metrics with\ninline specs — see GET /reports/custom-metrics/schema for what each\nspec can contain.","operationId":"run_custom_report_api_v1_reports_custom_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Custom Report Api V1 Reports Custom Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write"}},"/api/v1/reports/custom-metrics/schema":{"get":{"tags":["Reports"],"summary":"Custom Metric Schema","description":"**Scope:** `reports:read`\n\nReturn the public schema for the custom-metric builder UI:\nwhich sources, columns, operators, and aggregates are allowed.\nFrontend uses this to render the typed form.","operationId":"custom_metric_schema_api_v1_reports_custom_metrics_schema_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Custom Metric Schema Api V1 Reports Custom Metrics Schema Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/reports/custom-metrics/validate":{"post":{"tags":["Reports"],"summary":"Custom Metric Validate","description":"**Scope:** `reports:write`\n\nDry-run validation of a custom-metric spec — no DB call. Returns\n`{ok: bool, errors: [str]}`. Used by the Save button to surface errors\ninline before submission.","operationId":"custom_metric_validate_api_v1_reports_custom_metrics_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomMetricSpec"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Custom Metric Validate Api V1 Reports Custom Metrics Validate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write"}},"/api/v1/reports/custom-metrics/evaluate":{"post":{"tags":["Reports"],"summary":"Custom Metric Evaluate","description":"**Scope:** `reports:write`\n\nEvaluate a one-off custom metric without saving it. Useful for the\nbuilder UI's 'preview' button.","operationId":"custom_metric_evaluate_api_v1_reports_custom_metrics_evaluate_post","security":[{"ApiKey":["reports:write"]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomMetricSpec"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Custom Metric Evaluate Api V1 Reports Custom Metrics Evaluate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:write"}},"/api/v1/reports/custom/metrics":{"get":{"tags":["Reports"],"summary":"List Available Metrics","description":"**Scope:** `reports:read`\n\nReturn available metric keys for the custom report builder.\n\nMETRIC_REGISTRY values today are plain description strings; this handler\nused to call `v.get(...)` which crashed with AttributeError. We tolerate\nboth shapes (string description OR a {label, unit, description} dict)\nso future enrichment of the registry doesn't break the FE.","operationId":"list_available_metrics_api_v1_reports_custom_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Available Metrics Api V1 Reports Custom Metrics Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/reports/save":{"post":{"tags":["Reports"],"summary":"Save Report","description":"**Scope:** `reports:write`\n\nSave a custom drag-drop report configuration.","operationId":"save_report_api_v1_reports_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveReportRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Save Report Api V1 Reports Save Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write"}},"/api/v1/reports/saved":{"get":{"tags":["Reports"],"summary":"List Saved Reports","description":"**Scope:** `reports:read`\n\nList all saved custom reports for the org.","operationId":"list_saved_reports_api_v1_reports_saved_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{},"type":"array","title":"Response List Saved Reports Api V1 Reports Saved Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/reports/saved/{report_id}":{"delete":{"tags":["Reports"],"summary":"Delete Saved Report","description":"**Scope:** `reports:write`\n\nDelete a saved custom report.","operationId":"delete_saved_report_api_v1_reports_saved__report_id__delete","security":[{"ApiKey":["reports:write"]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Saved Report Api V1 Reports Saved  Report Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:write"}},"/api/v1/reports/saved/{report_id}/export":{"post":{"tags":["Reports"],"summary":"Export Saved Report","description":"**Scope:** `reports:write`\n\nGenerate report data for a saved report (used for PDF export).","operationId":"export_saved_report_api_v1_reports_saved__report_id__export_post","security":[{"ApiKey":["reports:write"]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Saved Report Api V1 Reports Saved  Report Id  Export Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:write"}},"/api/v1/reports/export-pdf":{"post":{"tags":["Reports"],"summary":"Export Report Pdf","description":"**Scope:** `reports:write`\n\nThe white-label PDF for the builder's date range — the client report (real numbers, agency/workspace brand).","operationId":"export_report_pdf_api_v1_reports_export_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDFExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write"}},"/api/v1/reports/export-excel":{"post":{"tags":["Reports"],"summary":"Export Report Excel","description":"**Scope:** `reports:write`\n\nGenerate an .xlsx workbook of a custom report's widgets.\n\nFalls back gracefully to CSV if `openpyxl` is not installed in this\nenvironment — never returns an empty body. The CSV fallback uses a\nsingle sheet equivalent: header row + one row per widget.","operationId":"export_report_excel_api_v1_reports_export_excel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDFExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write"}},"/api/v1/reports/drill-down/{metric_key}":{"get":{"tags":["Reports"],"summary":"Drill Down Metric","description":"**Scope:** `reports:read`\n\nReturn the underlying rows that contributed to a metric on the\ncustom report. Powers the click-to-expand UX in the report builder.\n\nSupported metric keys (extend as new widgets land):\n  - total_contacts, recent_contacts\n  - total_deals, won_deals, open_deals\n  - total_campaigns_sent, total_emails_sent","operationId":"drill_down_metric_api_v1_reports_drill_down__metric_key__get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"metric_key","in":"path","required":true,"schema":{"type":"string","title":"Metric Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/api/v1/reports/anomalies":{"get":{"tags":["Reports"],"summary":"Get Anomaly Alerts","description":"**Scope:** `reports:read`\n\nRun anomaly detection and return current anomalies.\nCompares current week vs previous week for key metrics.","operationId":"get_anomaly_alerts_api_v1_reports_anomalies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Anomaly Alerts Api V1 Reports Anomalies Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/reports/client-report/sections":{"get":{"tags":["Reports"],"summary":"Client Report Sections","operationId":"client_report_sections_api_v1_reports_client_report_sections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Client Report Sections Api V1 Reports Client Report Sections Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"}},"/api/v1/reports/client-report.pdf":{"get":{"tags":["Reports"],"summary":"Client Report Download","operationId":"client_report_download_api_v1_reports_client_report_pdf_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"minimum":1,"default":30,"title":"Days"}},{"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":"sections","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Sections"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"}},"/api/v1/reports/scheduled":{"get":{"tags":["Reports"],"summary":"List Scheduled Reports","operationId":"list_scheduled_reports_api_v1_reports_scheduled_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{},"type":"array","title":"Response List Scheduled Reports Api V1 Reports Scheduled Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"},"post":{"tags":["Reports"],"summary":"Create Scheduled Report","operationId":"create_scheduled_report_api_v1_reports_scheduled_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Scheduled Report Api V1 Reports Scheduled Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write","description":"**Scope:** `reports:write`"}},"/api/v1/reports/scheduled/{report_id}":{"put":{"tags":["Reports"],"summary":"Update Scheduled Report","operationId":"update_scheduled_report_api_v1_reports_scheduled__report_id__put","security":[{"ApiKey":["reports:write"]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Scheduled Report Api V1 Reports Scheduled  Report Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:write","description":"**Scope:** `reports:write`"},"delete":{"tags":["Reports"],"summary":"Delete Scheduled Report","operationId":"delete_scheduled_report_api_v1_reports_scheduled__report_id__delete","security":[{"ApiKey":["reports:write"]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Scheduled Report Api V1 Reports Scheduled  Report Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:write","description":"**Scope:** `reports:write`"}},"/api/v1/reports/scheduled/{report_id}/send-now":{"post":{"tags":["Reports"],"summary":"Send Scheduled Report Now","description":"**Scope:** `reports:write`\n\nSend the report for its most recent full period right now (the schedule itself is unchanged).","operationId":"send_scheduled_report_now_api_v1_reports_scheduled__report_id__send_now_post","security":[{"ApiKey":["reports:write"]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Scheduled Report Now Api V1 Reports Scheduled  Report Id  Send Now Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:write"}},"/api/v1/analytics/money":{"get":{"tags":["Reports"],"summary":"Money","operationId":"money_api_v1_analytics_money_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":730,"minimum":7,"default":90,"title":"Days"}},{"name":"model","in":"query","required":false,"schema":{"type":"string","default":"linear","title":"Model"}},{"name":"lookback_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Lookback Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read","description":"**Scope:** `reports:read`"}},"/api/v1/analytics/access":{"get":{"tags":["Reports"],"summary":"Get Access Mode","description":"**Scope:** `reports:read`\n\nResolve the analytics MODE this org is entitled to from its plan tier —\nso the dashboard shows the right view (Solo / Agency / White-label) by\npricing tier instead of letting anyone switch between all three.\n\n  white_label limit            -> \"wl\"\n  agency (max_client_orgs > 0) -> \"agency\"\n  otherwise                    -> \"solo\"","operationId":"get_access_mode_api_v1_analytics_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Access Mode Api V1 Analytics Access Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/analytics/cross-channel":{"get":{"tags":["Reports"],"summary":"Get Cross Channel","description":"**Scope:** `reports:read`\n\nBlended analytics across ads + email + social + seo + revenue.\n\nThe one view native ad managers and single specialists can't offer, because\nnone of them hold every channel AND the revenue.\n\nQuery params:\n  date_from / date_to : ISO dates (default last 30 days)\n  channels            : CSV subset of ads,email,social,seo,revenue (default all)\n  group_by            : channel | source | date","operationId":"get_cross_channel_api_v1_analytics_cross_channel_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"channels","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channels"}},{"name":"group_by","in":"query","required":false,"schema":{"type":"string","default":"channel","title":"Group By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Cross Channel Api V1 Analytics Cross Channel Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/api/v1/analytics/attribution":{"get":{"tags":["Reports"],"summary":"Get Attribution","description":"**Scope:** `reports:read`\n\nFull-funnel, cross-channel attribution (E3).\n\nDistributes won-deal revenue across every channel that touched the journey\n(ads, email, social, organic, …) using the selected model. Reuses the\nexisting multi-touch engine — this layer only exposes it cross-channel.","operationId":"get_attribution_api_v1_analytics_attribution_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"model","in":"query","required":false,"schema":{"type":"string","default":"linear","title":"Model"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Attribution Api V1 Analytics Attribution Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/api/v1/analytics/portfolio":{"get":{"tags":["Reports"],"summary":"Get Portfolio","description":"**Scope:** `reports:read`\n\nAgency / white-label multi-client rollup (E2 agency view).\n\nAggregates EVERY client workspace's blended cross-channel performance into\none portfolio — the agency moat native tools and single specialists can't\nmatch. Reuses the decoupled cross_channel collectors per client org (read\nonly). Returns {is_agency, totals, clients:[...]} or is_agency=False for a\nsolo account so the UI can fall back to the single-workspace view.","operationId":"get_portfolio_api_v1_analytics_portfolio_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"revenue","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Portfolio Api V1 Analytics Portfolio Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/api/v1/analytics/insights":{"get":{"tags":["Reports"],"summary":"Get Insights","description":"**Scope:** `reports:read`\n\nAI/heuristic cross-channel insights (E5): what changed and why, plus\nnext-best-actions, comparing this period to the previous one.","operationId":"get_insights_api_v1_analytics_insights_get","security":[{"ApiKey":["reports:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Insights Api V1 Analytics Insights Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/api/v1/analytics/reports/schedule":{"post":{"tags":["Reports"],"summary":"Schedule Cross Channel Report","description":"**Scope:** `reports:write`\n\nE4 — schedule a recurring cross-channel report. Reuses the existing\nScheduledReport infrastructure (delivery worker + white-label branding);\nreport_type 'cross_channel' selects the blended payload.","operationId":"schedule_cross_channel_report_api_v1_analytics_reports_schedule_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrossChannelReportIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Schedule Cross Channel Report Api V1 Analytics Reports Schedule Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reports:write"]}],"x-required-scope":"reports:write"}},"/api/v1/analytics/reports":{"get":{"tags":["Reports"],"summary":"List Cross Channel Reports","description":"**Scope:** `reports:read`\n\nE4 — list scheduled cross-channel reports for this org.","operationId":"list_cross_channel_reports_api_v1_analytics_reports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Cross Channel Reports Api V1 Analytics Reports Get"}}}}},"security":[{"ApiKey":["reports:read"]}],"x-required-scope":"reports:read"}},"/api/v1/leads/search":{"post":{"tags":["Leads"],"summary":"Search Leads","description":"**Scope:** `leads:write`\n\nReal prospects from Apollo (and Hunter for a domain) — nothing padded or guessed (P4-20). Emails the provider\nhides can be revealed for a credit.","operationId":"search_leads_api_v1_leads_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSearchQuery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Search Leads Api V1 Leads Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/reveal":{"post":{"tags":["Leads"],"summary":"Reveal Leads","description":"**Scope:** `leads:write`\n\nReveal emails: 1 credit per email found (allowance first, then wallet); people revealed before are free.","operationId":"reveal_leads_api_v1_leads_reveal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Reveal Leads Api V1 Leads Reveal Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/import":{"post":{"tags":["Leads"],"summary":"Import Leads To Crm","description":"**Scope:** `leads:write`\n\nProspects into the CRM (dedupe by email, tagged lead-finder) and optionally a prospect list.","operationId":"import_leads_to_crm_api_v1_leads_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadImportPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Import Leads To Crm Api V1 Leads Import Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/sync":{"post":{"tags":["Leads"],"summary":"Sync Lead Engine","description":"**Scope:** `leads:write`\n\nSync engine: refreshes the Lead Identification pipeline.\n- Re-scores all unconverted leads from the last 30 days\n- Recomputes anonymous-visitor enrichment counters\n- Returns aggregate counters so the UI can show a live status badge\nIdempotent and safe to call from a button click.","operationId":"sync_lead_engine_api_v1_leads_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Sync Lead Engine Api V1 Leads Sync Post"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/visitors":{"get":{"tags":["Leads"],"summary":"Get Visitors","description":"**Scope:** `leads:read`\n\nReturn one row per unique visitor (deduped by visitor_id cookie), showing\naggregated stats + the latest pageview. Without this dedup a single\nchatty visitor floods the list with 50 rows of their own pageviews.\n\nFor events without a visitor_id (older rows from before the v2 pixel),\nwe fall back to grouping by ip_address.","operationId":"get_visitors_api_v1_leads_visitors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Visitors Api V1 Leads Visitors Get"}}}}},"security":[{"ApiKey":["leads:read"]}],"x-required-scope":"leads:read"}},"/api/v1/leads/track":{"post":{"tags":["Leads"],"summary":"Track Visitor","description":"**Scope:** `leads:write`\n\nIngest JS pixel beacon events from external client websites.\nIndustry-standard approach: identical to Segment, Hotjar, and Clearbit Reveal.\n- Captures IP, referrer, page URL, user-agent\n- Persists to VisitorEvent table in DB\n- Company identification (visitor_resolver, P4-22) is queued to a Celery task\nNo authentication required — public endpoint secured by org_id pixel key.","operationId":"track_visitor_api_v1_leads_track_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PixelEventPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/pixel-snippet":{"get":{"tags":["Leads"],"summary":"Get Pixel Snippet","description":"**Scope:** `leads:read`\n\nReturns the copy-paste JavaScript snippet for this organization's tracking pixel.\nIndustry standard: async non-blocking script beacon, like Segment/Hotjar.","operationId":"get_pixel_snippet_api_v1_leads_pixel_snippet_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["leads:read"]}],"x-required-scope":"leads:read"}},"/api/v1/leads/verify-email":{"post":{"tags":["Leads"],"summary":"Verify Single Email","description":"**Scope:** `leads:write`\n\nVerify a single email address via NeverBounce → Hunter → MX fallback chain.","operationId":"verify_single_email_api_v1_leads_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Verify Single Email Api V1 Leads Verify Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/verify-emails-bulk":{"post":{"tags":["Leads"],"summary":"Verify Bulk Emails","description":"**Scope:** `leads:write`\n\nBulk verify up to 100 email addresses concurrently.","operationId":"verify_bulk_emails_api_v1_leads_verify_emails_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Verify Bulk Emails Api V1 Leads Verify Emails Bulk Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/search/apollo":{"post":{"tags":["Leads"],"summary":"Search Apollo Leads","description":"**Scope:** `leads:write`\n\nSearch Apollo.io for leads matching the given criteria. Returns an honest\nempty result (`{\"leads\": [], \"total\": 0, \"error\": \"No Apollo API key configured\"}`)\nwhen APOLLO_API_KEY is not set — never mock data.","operationId":"search_apollo_leads_api_v1_leads_search_apollo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApolloSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Search Apollo Leads Api V1 Leads Search Apollo Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/visitor-identification":{"get":{"tags":["Leads"],"summary":"Visitor Identification Status","description":"**Scope:** `leads:read`\n\nIs visitor identification set up, what does a company cost, and what was identified (P4-22).","operationId":"visitor_identification_status_api_v1_leads_visitor_identification_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Visitor Identification Status Api V1 Leads Visitor Identification Get"}}}}},"security":[{"ApiKey":["leads:read"]}],"x-required-scope":"leads:read"}},"/api/v1/leads/visitors/{visitor_id}/enrich":{"post":{"tags":["Leads"],"summary":"Enrich Visitor","description":"**Scope:** `leads:write`\n\nManually trigger IP enrichment for a specific visitor event.","operationId":"enrich_visitor_api_v1_leads_visitors__visitor_id__enrich_post","security":[{"ApiKey":["leads:write"]}],"parameters":[{"name":"visitor_id","in":"path","required":true,"schema":{"type":"string","title":"Visitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Enrich Visitor Api V1 Leads Visitors  Visitor Id  Enrich Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"}},"/api/v1/leads/lists":{"get":{"tags":["Leads"],"summary":"Get Prospect Lists","description":"**Scope:** `leads:read`\n\nReturn all saved prospect lists for the current org.","operationId":"get_prospect_lists_api_v1_leads_lists_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Prospect Lists Api V1 Leads Lists Get"}}}}},"security":[{"ApiKey":["leads:read"]}],"x-required-scope":"leads:read"},"post":{"tags":["Leads"],"summary":"Create Prospect List","description":"**Scope:** `leads:write`\n\nCreate a new saved prospect list.","operationId":"create_prospect_list_api_v1_leads_lists_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Create Prospect List Api V1 Leads Lists Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/lists/{list_id}/add":{"post":{"tags":["Leads"],"summary":"Add To Prospect List","description":"**Scope:** `leads:write`\n\nAdd a prospect to an existing list.","operationId":"add_to_prospect_list_api_v1_leads_lists__list_id__add_post","security":[{"ApiKey":["leads:write"]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Add To Prospect List Api V1 Leads Lists  List Id  Add Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"}},"/api/v1/leads/lists/{list_id}":{"delete":{"tags":["Leads"],"summary":"Delete Prospect List","description":"**Scope:** `leads:write`\n\nDelete a saved prospect list.","operationId":"delete_prospect_list_api_v1_leads_lists__list_id__delete","security":[{"ApiKey":["leads:write"]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Delete Prospect List Api V1 Leads Lists  List Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"}},"/api/v1/leads/credits":{"get":{"tags":["Leads"],"summary":"Get Lead Finder Credits","description":"**Scope:** `leads:read`\n\nThis month's lead credits: included with the Leads Hub, used, remaining, and whether the wallet covers more.","operationId":"get_lead_finder_credits_api_v1_leads_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Lead Finder Credits Api V1 Leads Credits Get"}}}}},"security":[{"ApiKey":["leads:read"]}],"x-required-scope":"leads:read"}},"/api/v1/leads/credits/increment":{"post":{"tags":["Leads"],"summary":"Increment Lead Credits","description":"**Scope:** `leads:write`\n\nRetired: credits are taken on the server when an email is revealed (P4-20).","operationId":"increment_lead_credits_api_v1_leads_credits_increment_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Increment Lead Credits Api V1 Leads Credits Increment Post"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/track/pixel":{"post":{"tags":["Leads"],"summary":"Track Pixel Event","description":"**Scope:** `leads:write`\n\nPixel ingest. Public endpoint — no auth, secured by org_id existence check.\n\nPipeline:\n  1. Validate org exists (silently drop bad org_id — never break customer site)\n  2. Honour X-Forwarded-For (Cloudflare/Nginx)\n  3. Dedupe by (org_id, visitor_id) cookie — NOT by IP (shared offices)\n  4. Compute session_id: reuse most-recent if last event < 30 min, else new\n  5. Inherit contact_id from prior events (back-attribute identified visitors)\n  6. Compute intent score from page weights + visit frequency\n  7. Enqueue async enrichment if company_name still empty\n  8. Fire high-intent notification once per session per org\n\nSchema-validated; bad payloads return 200 + drop so a misconfigured pixel\ncan never break the customer's page.","operationId":"track_pixel_event_api_v1_leads_track_pixel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhancedPixelPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/track/identify":{"post":{"tags":["Leads"],"summary":"Identify Visitor","description":"**Scope:** `leads:write`\n\nLink an anonymous visitor_id to a real Contact. Public endpoint — called\nby the pixel SDK (omk('identify', {email})) when the user logs in or\nsubmits a form. Back-attributes every prior anonymous event for that\nvisitor_id to the contact, so when sales views the contact they see the\nfull history including pre-identification browsing.","operationId":"identify_visitor_api_v1_leads_track_identify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifyPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["leads:write"]}],"x-required-scope":"leads:write"}},"/api/v1/leads/companies":{"get":{"tags":["Leads"],"summary":"Get Visitor Companies","description":"**Scope:** `leads:read`\n\nVisitors aggregated by company — the B2B sales view. Returns top accounts\nby total intent score in the past N days. The view sales actually want\ninstead of a flat pageview list.","operationId":"get_visitor_companies_api_v1_leads_companies_get","security":[{"ApiKey":["leads:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Visitor Companies Api V1 Leads Companies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/api/v1/leads/visitors/{visitor_cookie}/timeline":{"get":{"tags":["Leads"],"summary":"Get Visitor Timeline","description":"**Scope:** `leads:read`\n\nFull pageview history for a visitor cookie, grouped by session. Sales\nexpands a row in the visitor list to see \"what did they actually do\".","operationId":"get_visitor_timeline_api_v1_leads_visitors__visitor_cookie__timeline_get","security":[{"ApiKey":["leads:read"]}],"parameters":[{"name":"visitor_cookie","in":"path","required":true,"schema":{"type":"string","title":"Visitor Cookie"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Visitor Timeline Api V1 Leads Visitors  Visitor Cookie  Timeline Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/api/v1/lead-gen/contacts/export.csv":{"get":{"tags":["Contacts"],"summary":"Export Contacts Csv","description":"**Scope:** `contacts:read`\n\nStream contacts as CSV — bulk export for sales ops / data warehouses.","operationId":"export_contacts_csv_api_v1_lead_gen_contacts_export_csv_get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":1,"default":10000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read"}},"/api/v1/lead-gen/contacts/{contact_id}/similar":{"get":{"tags":["Contacts"],"summary":"Similar Contacts","description":"**Scope:** `contacts:read`\n\nFind prospects similar to this one. Naive but effective: matches on\nsame company, same position, or same tag set. A real ML embedding-based\nsimilarity is a 6-month item per the doc; this is the v1.","operationId":"similar_contacts_api_v1_lead_gen_contacts__contact_id__similar_get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read"}},"/api/v1/lead-gen/contacts/{contact_id}/why-hot":{"get":{"tags":["Contacts"],"summary":"Why Hot","operationId":"why_hot_api_v1_lead_gen_contacts__contact_id__why_hot_get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read","description":"**Scope:** `contacts:read`"}},"/api/v1/lead-gen/forms/generate":{"post":{"tags":["Forms"],"summary":"Generate Form","description":"**Scope:** `forms:write`\n\nGenerate a complete form schema from a one-line goal prompt. The\nresponse includes ai_goal so the frontend can offer 'Tweak & regenerate'.","operationId":"generate_form_api_v1_lead_gen_forms_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormGenPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write"}},"/api/v1/lead-gen/forms/conversational/next":{"post":{"tags":["Forms"],"summary":"Conversational Next","description":"**Scope:** `forms:write`\n\nPublic endpoint — pixel/form-renderer calls this to get the next\nquestion to ask. Stateless: client sends prior answers each turn.\nRate-limited per visitor (it calls the AI) and only for published forms.","operationId":"conversational_next_api_v1_lead_gen_forms_conversational_next_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvFormStepPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write"}},"/api/v1/lead-gen/contacts/{contact_id}/dedup-suggestions":{"get":{"tags":["Contacts"],"summary":"Dedup Suggestions","description":"**Scope:** `contacts:read`\n\nFind probable duplicates of a contact. Heuristics:\n- same email domain + similar name\n- same phone number\n- same first+last name (different email)","operationId":"dedup_suggestions_api_v1_lead_gen_contacts__contact_id__dedup_suggestions_get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read"}},"/api/v1/lead-gen/contacts/{contact_id}/merge-into/{target_id}":{"post":{"tags":["Contacts"],"summary":"Merge Contacts","description":"**Scope:** `contacts:write`\n\nMerge contact_id INTO target_id. Source contact is deleted; references\nin form_submissions, visitor_events, etc. are repointed to the target.","operationId":"merge_contacts_api_v1_lead_gen_contacts__contact_id__merge_into__target_id__post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/lead-gen/contacts/lookalike":{"post":{"tags":["Contacts"],"summary":"Lookalike","description":"**Scope:** `contacts:write`\n\nFind prospects 'like' a set of seed contacts. v1: aggregate the seeds'\nmost common attributes and surface other contacts that match the most.\nA real ML embedding-based version is in the 6-month roadmap.","operationId":"lookalike_api_v1_lead_gen_contacts_lookalike_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__leadgen__api__lead_gen_router__LookalikePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["contacts:write"]}],"x-required-scope":"contacts:write"}},"/api/v1/lead-gen/contacts/{contact_id}/churn-score":{"post":{"tags":["Contacts"],"summary":"Churn Score Ep","operationId":"churn_score_ep_api_v1_lead_gen_contacts__contact_id__churn_score_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"}},"/api/v1/lead-gen/contacts/at-risk":{"get":{"tags":["Contacts"],"summary":"At Risk Ep","operationId":"at_risk_ep_api_v1_lead_gen_contacts_at_risk_get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"min_score","in":"query","required":false,"schema":{"type":"number","default":0.4,"title":"Min Score"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read","description":"**Scope:** `contacts:read`"}},"/api/v1/lead-gen/forms/upload/{embed_key}":{"post":{"tags":["Forms"],"summary":"Upload Form File","description":"**Scope:** `forms:write`\n\nPublic upload for a form's file field (P3-24). Stored with the platform's file storage under an\nunguessable name and recorded, so the submission can only reference files uploaded to this form.","operationId":"upload_form_file_api_v1_lead_gen_forms_upload__embed_key__post","parameters":[{"name":"embed_key","in":"path","required":true,"schema":{"type":"string","title":"Embed Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_form_file_api_v1_lead_gen_forms_upload__embed_key__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write"}},"/api/v1/lead-gen/forms/files/{filename}":{"get":{"tags":["Forms"],"summary":"Get Uploaded File","description":"**Scope:** `forms:read`\n\nFiles uploaded before P3-24 (local disk). Always downloaded, never rendered in the browser.","operationId":"get_uploaded_file_api_v1_lead_gen_forms_files__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:read"]}],"x-required-scope":"forms:read"}},"/api/v1/lead-gen/forms/payment/create-intent":{"post":{"tags":["Forms"],"summary":"Create Payment Intent Retired","operationId":"create_payment_intent_retired_api_v1_lead_gen_forms_payment_create_intent_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write","description":"**Scope:** `forms:write`"}},"/api/v1/lead-gen/forms/embed/{embed_key}/ab-variant":{"get":{"tags":["Forms"],"summary":"Pick Ab Variant","description":"**Scope:** `forms:read`\n\nPublic endpoint — when the embed JS/iframe loads, it calls this to get\nthe actual embed_key to render. If the requested form is part of a variant\ngroup, we randomly pick one weighted by ab_traffic_split. Otherwise we\nreturn the same key (no-op).","operationId":"pick_ab_variant_api_v1_lead_gen_forms_embed__embed_key__ab_variant_get","parameters":[{"name":"embed_key","in":"path","required":true,"schema":{"type":"string","title":"Embed Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:read"]}],"x-required-scope":"forms:read"}},"/api/v1/lead-gen/forms/{form_id}/variants":{"post":{"tags":["Forms"],"summary":"Create Variant","description":"**Scope:** `forms:write`\n\nSpawn a sibling variant from an existing form. Both forms get\ngrouped under the same variant_group_id (created if absent). The user\ncan then edit each variant independently in the Form Builder.","operationId":"create_variant_api_v1_lead_gen_forms__form_id__variants_post","security":[{"ApiKey":["forms:write"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVariantPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:write"}},"/api/v1/lead-gen/forms/{form_id}/variants/results":{"get":{"tags":["Forms"],"summary":"Variant Results","description":"**Scope:** `forms:read`\n\nA/B comparison view — submission counts + conversion rate per variant\nin the group.","operationId":"variant_results_api_v1_lead_gen_forms__form_id__variants_results_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read"}},"/api/v1/lead-gen/contacts/dedup/candidates":{"get":{"tags":["Contacts"],"summary":"Contacts Dedup Candidates","description":"**Scope:** `contacts:read`\n\nSurface probable duplicate contact pairs for review (semantic dedup).\nReturns candidate pairs above the similarity threshold; the existing\n`/admin/bulk/contacts/merge` endpoint executes the merge.","operationId":"contacts_dedup_candidates_api_v1_lead_gen_contacts_dedup_candidates_get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"threshold","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.5,"default":0.85,"title":"Threshold"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read"}},"/api/v1/automation/workflows":{"get":{"tags":["Workflows"],"summary":"List Workflows","operationId":"list_workflows_api_v1_automation_workflows_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["workflows:read"]}],"x-required-scope":"workflows:read","description":"**Scope:** `workflows:read`"},"post":{"tags":["Workflows"],"summary":"Create Workflow","operationId":"create_workflow_api_v1_automation_workflows_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["workflows:write"]}],"x-required-scope":"workflows:write","description":"**Scope:** `workflows:write`"}},"/api/v1/automation/workflows/{wf_id}":{"put":{"tags":["Workflows"],"summary":"Update Workflow","operationId":"update_workflow_api_v1_automation_workflows__wf_id__put","security":[{"ApiKey":["workflows:write"]}],"parameters":[{"name":"wf_id","in":"path","required":true,"schema":{"type":"string","title":"Wf Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"workflows:write","description":"**Scope:** `workflows:write`"},"delete":{"tags":["Workflows"],"summary":"Delete Workflow","operationId":"delete_workflow_api_v1_automation_workflows__wf_id__delete","security":[{"ApiKey":["workflows:write"]}],"parameters":[{"name":"wf_id","in":"path","required":true,"schema":{"type":"string","title":"Wf Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"workflows:write","description":"**Scope:** `workflows:write`"}},"/api/v1/automation/workflows/{wf_id}/versions":{"get":{"tags":["Workflows"],"summary":"Versions","operationId":"versions_api_v1_automation_workflows__wf_id__versions_get","security":[{"ApiKey":["workflows:read"]}],"parameters":[{"name":"wf_id","in":"path","required":true,"schema":{"type":"string","title":"Wf Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"workflows:read","description":"**Scope:** `workflows:read`"}},"/api/v1/automation/workflows/{wf_id}/validate":{"post":{"tags":["Workflows"],"summary":"Validate","operationId":"validate_api_v1_automation_workflows__wf_id__validate_post","security":[{"ApiKey":["workflows:write"]}],"parameters":[{"name":"wf_id","in":"path","required":true,"schema":{"type":"string","title":"Wf Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"workflows:write","description":"**Scope:** `workflows:write`"}},"/api/v1/automation/workflows/{wf_id}/runs":{"get":{"tags":["Workflows"],"summary":"List Runs","operationId":"list_runs_api_v1_automation_workflows__wf_id__runs_get","security":[{"ApiKey":["workflows:read"]}],"parameters":[{"name":"wf_id","in":"path","required":true,"schema":{"type":"string","title":"Wf Id"}},{"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"}}}}},"x-required-scope":"workflows:read","description":"**Scope:** `workflows:read`"}},"/api/v1/automation/workflows/{wf_id}/start":{"post":{"tags":["Workflows"],"summary":"Start For Contacts","description":"**Scope:** `workflows:write`\n\nStart the workflow for chosen contacts now. A test run works on drafts too (one contact, steps really run).","operationId":"start_for_contacts_api_v1_automation_workflows__wf_id__start_post","security":[{"ApiKey":["workflows:write"]}],"parameters":[{"name":"wf_id","in":"path","required":true,"schema":{"type":"string","title":"Wf Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__automation__api__workflows_router__StartIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"workflows:write"}},"/api/v1/automation/workflows/templates":{"get":{"tags":["Workflows"],"summary":"List Templates","operationId":"list_templates_api_v1_automation_workflows_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["workflows:read"]}],"x-required-scope":"workflows:read","description":"**Scope:** `workflows:read`"}},"/api/v1/automation/workflows/templates/install":{"post":{"tags":["Workflows"],"summary":"Install Template","operationId":"install_template_api_v1_automation_workflows_templates_install_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["workflows:write"]}],"x-required-scope":"workflows:write","description":"**Scope:** `workflows:write`"}},"/api/v1/automation/workflows/from-template":{"post":{"tags":["Workflows"],"summary":"From Template","operationId":"from_template_api_v1_automation_workflows_from_template_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["workflows:write"]}],"x-required-scope":"workflows:write","description":"**Scope:** `workflows:write`"}},"/api/v1/automation/workflows/{wf_id}/export":{"get":{"tags":["Workflows"],"summary":"Export Workflow","operationId":"export_workflow_api_v1_automation_workflows__wf_id__export_get","security":[{"ApiKey":["workflows:read"]}],"parameters":[{"name":"wf_id","in":"path","required":true,"schema":{"type":"string","title":"Wf Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"workflows:read","description":"**Scope:** `workflows:read`"}},"/api/v1/automation/workflows/import":{"post":{"tags":["Workflows"],"summary":"Import Workflow","operationId":"import_workflow_api_v1_automation_workflows_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["workflows:write"]}],"x-required-scope":"workflows:write","description":"**Scope:** `workflows:write`"}},"/api/v1/automation/workflows/{wf_id}/perf":{"get":{"tags":["Workflows"],"summary":"Perf","operationId":"perf_api_v1_automation_workflows__wf_id__perf_get","security":[{"ApiKey":["workflows:read"]}],"parameters":[{"name":"wf_id","in":"path","required":true,"schema":{"type":"string","title":"Wf Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Window Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"workflows:read","description":"**Scope:** `workflows:read`"}},"/api/v1/automation/workflows/ai-generate":{"post":{"tags":["Workflows"],"summary":"Ai Generate Workflow","description":"**Scope:** `workflows:write`\n\nPOST /workflows/ai-generate\nGenerate a workflow DAG from a plain-English description using Claude.\nRate-limited to 3 generations per org per day (tracked in Redis).\nReturns {workflow, from_cache, generation_ms, rate_limit_remaining}.","operationId":"ai_generate_workflow_api_v1_automation_workflows_ai_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__automation__api__automation_router__AIGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Ai Generate Workflow Api V1 Automation Workflows Ai Generate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["workflows:write"]}],"x-required-scope":"workflows:write"}},"/api/v1/settings/webhooks/events":{"get":{"tags":["Webhooks"],"summary":"Webhook Event Catalog","operationId":"webhook_event_catalog_api_v1_settings_webhooks_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Webhook Event Catalog Api V1 Settings Webhooks Events Get"}}}}},"security":[{"ApiKey":["webhooks:read"]}],"x-required-scope":"webhooks:read","description":"**Scope:** `webhooks:read`"}},"/api/v1/settings/webhooks":{"get":{"tags":["Webhooks"],"summary":"Get Webhooks","operationId":"get_webhooks_api_v1_settings_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Webhooks Api V1 Settings Webhooks Get"}}}}},"security":[{"ApiKey":["webhooks:read"]}],"x-required-scope":"webhooks:read","description":"**Scope:** `webhooks:read`"},"post":{"tags":["Webhooks"],"summary":"Create Webhook","operationId":"create_webhook_api_v1_settings_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Create Webhook Api V1 Settings Webhooks Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write","description":"**Scope:** `webhooks:write`"}},"/api/v1/settings/webhooks/{hook_id}":{"patch":{"tags":["Webhooks"],"summary":"Update Webhook","operationId":"update_webhook_api_v1_settings_webhooks__hook_id__patch","security":[{"ApiKey":["webhooks:write"]}],"parameters":[{"name":"hook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Hook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Update Webhook Api V1 Settings Webhooks  Hook Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"webhooks:write","description":"**Scope:** `webhooks:write`"},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","operationId":"delete_webhook_api_v1_settings_webhooks__hook_id__delete","security":[{"ApiKey":["webhooks:write"]}],"parameters":[{"name":"hook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Hook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Delete Webhook Api V1 Settings Webhooks  Hook Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"webhooks:write","description":"**Scope:** `webhooks:write`"}},"/api/v1/settings/webhooks/{hook_id}/rotate-secret":{"post":{"tags":["Webhooks"],"summary":"Rotate Webhook Secret","description":"**Scope:** `webhooks:write`\n\nA new signing secret (shown once); the old one stops working immediately.","operationId":"rotate_webhook_secret_api_v1_settings_webhooks__hook_id__rotate_secret_post","security":[{"ApiKey":["webhooks:write"]}],"parameters":[{"name":"hook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Hook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Rotate Webhook Secret Api V1 Settings Webhooks  Hook Id  Rotate Secret Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"webhooks:write"}},"/api/v1/settings/webhooks/{hook_id}/test":{"post":{"tags":["Webhooks"],"summary":"Test Webhook","description":"**Scope:** `webhooks:write`\n\nSend a signed `ping` event right now and show what the endpoint answered.","operationId":"test_webhook_api_v1_settings_webhooks__hook_id__test_post","security":[{"ApiKey":["webhooks:write"]}],"parameters":[{"name":"hook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Hook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Test Webhook Api V1 Settings Webhooks  Hook Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"webhooks:write"}},"/api/v1/settings/webhooks/{hook_id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"Webhook Deliveries","description":"**Scope:** `webhooks:read`\n\nLatest deliveries to this endpoint: event, status, attempts, response code and body, next retry.","operationId":"webhook_deliveries_api_v1_settings_webhooks__hook_id__deliveries_get","security":[{"ApiKey":["webhooks:read"]}],"parameters":[{"name":"hook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Hook Id"}},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Webhook Deliveries Api V1 Settings Webhooks  Hook Id  Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"webhooks:read"}},"/api/v1/settings/webhooks/deliveries/{delivery_id}/redeliver":{"post":{"tags":["Webhooks"],"summary":"Redeliver Webhook","description":"**Scope:** `webhooks:write`\n\nSend one delivery again now (same event id, so your handler can de-duplicate).","operationId":"redeliver_webhook_api_v1_settings_webhooks_deliveries__delivery_id__redeliver_post","security":[{"ApiKey":["webhooks:write"]}],"parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Redeliver Webhook Api V1 Settings Webhooks Deliveries  Delivery Id  Redeliver Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"webhooks:write"}},"/api/v1/inbox/{channel}/{source_id}/messages":{"get":{"tags":["Inbox"],"summary":"Conversation Messages","operationId":"conversation_messages_api_v1_inbox__channel___source_id__messages_get","security":[{"ApiKey":["inbox:read"]}],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string","title":"Channel"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"inbox:read","description":"**Scope:** `inbox:read`"}},"/api/v1/inbox/{channel}/{source_id}/reply":{"post":{"tags":["Inbox"],"summary":"Conversation Reply","description":"**Scope:** `inbox:write`\n\nSend a reply through the conversation's own channel. `delivered` says\nwhether it reached the customer (helpdesk replies are stored on the ticket).","operationId":"conversation_reply_api_v1_inbox__channel___source_id__reply_post","security":[{"ApiKey":["inbox:write"]}],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string","title":"Channel"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__messaging__api__inbox_router__ReplyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"inbox:write"}},"/api/v1/inbox/{channel}/{source_id}":{"patch":{"tags":["Inbox"],"summary":"Update Conversation","operationId":"update_conversation_api_v1_inbox__channel___source_id__patch","security":[{"ApiKey":["inbox:write"]}],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string","title":"Channel"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"inbox:write","description":"**Scope:** `inbox:write`"}},"/api/v1/inbox/{channel}/{source_id}/draft":{"post":{"tags":["Inbox"],"summary":"Draft Reply","operationId":"draft_reply_api_v1_inbox__channel___source_id__draft_post","security":[{"ApiKey":["inbox:write"]}],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string","title":"Channel"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"inbox:write","description":"**Scope:** `inbox:write`"}},"/api/v1/inbox/email/send":{"post":{"tags":["Inbox"],"summary":"Send One Email","description":"**Scope:** `inbox:write`\n\nSend one email to one recipient from the workspace sender.","operationId":"send_one_email_api_v1_inbox_email_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSendIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["inbox:write"]}],"x-required-scope":"inbox:write"}},"/api/v1/custom-fields/{object_type}":{"get":{"tags":["Custom Fields"],"summary":"Get Custom Fields","operationId":"get_custom_fields_api_v1_custom_fields__object_type__get","security":[{"ApiKey":["custom_fields:read"]}],"parameters":[{"name":"object_type","in":"path","required":true,"schema":{"type":"string","title":"Object Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldResponse"},"title":"Response Get Custom Fields Api V1 Custom Fields  Object Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_fields:read","description":"**Scope:** `custom_fields:read`"}},"/api/v1/custom-fields/":{"post":{"tags":["Custom Fields"],"summary":"Create Custom Field","operationId":"create_custom_field_api_v1_custom_fields__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["custom_fields:write"]}],"x-required-scope":"custom_fields:write","description":"**Scope:** `custom_fields:write`"}},"/api/v1/custom-fields/{field_id}":{"delete":{"tags":["Custom Fields"],"summary":"Delete Custom Field","operationId":"delete_custom_field_api_v1_custom_fields__field_id__delete","security":[{"ApiKey":["custom_fields:write"]}],"parameters":[{"name":"field_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Field Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_fields:write","description":"**Scope:** `custom_fields:write`"}},"/api/v1/webhooks/social/meta":{"get":{"tags":["Webhooks"],"summary":"Verify Meta Webhook","description":"**Scope:** `webhooks:read`\n\nMeta webhook verification (GET).\nMeta sends hub.mode=subscribe, hub.challenge=<int>, hub.verify_token=<token>.\nReturn the challenge value to complete verification.","operationId":"verify_meta_webhook_api_v1_webhooks_social_meta_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["webhooks:read"]}],"x-required-scope":"webhooks:read"},"post":{"tags":["Webhooks"],"summary":"Handle Meta Event","description":"**Scope:** `webhooks:write`\n\nMeta webhook receiver for Facebook + Instagram.\nHandles: page comments, DMs, reactions, leadgen, and messaging events.\nReturns 200 immediately to avoid webhook delivery retries.","operationId":"handle_meta_event_api_v1_webhooks_social_meta_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/social/linkedin":{"post":{"tags":["Webhooks"],"summary":"Handle Linkedin Event","description":"**Scope:** `webhooks:write`\n\nLinkedIn webhook receiver for organization events.\nHandles: comments, shares, mentions on organization posts.","operationId":"handle_linkedin_event_api_v1_webhooks_social_linkedin_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/social/twitter":{"get":{"tags":["Webhooks"],"summary":"Twitter Crc Validation","description":"**Scope:** `webhooks:read`\n\nTwitter CRC (Challenge-Response Check) validation.\nTwitter sends GET with crc_token; we respond with sha256 HMAC using consumer secret.","operationId":"twitter_crc_validation_api_v1_webhooks_social_twitter_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["webhooks:read"]}],"x-required-scope":"webhooks:read"},"post":{"tags":["Webhooks"],"summary":"Handle Twitter Event","description":"**Scope:** `webhooks:write`\n\nTwitter Account Activity API webhook.\nHandles: tweet_create_events, direct_message_events, favorite_events, follow_events.","operationId":"handle_twitter_event_api_v1_webhooks_social_twitter_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/pinterest":{"post":{"tags":["Webhooks"],"summary":"Pinterest Webhook","description":"**Scope:** `webhooks:write`\n\nReceive Pinterest events. Pinterest webhooks are limited;\nfor now this is a stub for future use.","operationId":"pinterest_webhook_api_v1_webhooks_pinterest_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/meta/data-deletion":{"post":{"tags":["Webhooks"],"summary":"Data Deletion","operationId":"data_deletion_api_v1_webhooks_meta_data_deletion_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_data_deletion_api_v1_webhooks_meta_data_deletion_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write","description":"**Scope:** `webhooks:write`"}},"/api/v1/webhooks/meta/deauthorize":{"post":{"tags":["Webhooks"],"summary":"Deauthorize","operationId":"deauthorize_api_v1_webhooks_meta_deauthorize_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_deauthorize_api_v1_webhooks_meta_deauthorize_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write","description":"**Scope:** `webhooks:write`"}},"/api/v1/webhooks/email/inbound":{"post":{"tags":["Webhooks"],"summary":"Inbound Email Webhook","description":"**Scope:** `webhooks:write`\n\nReceives inbound email notifications from Resend / SendGrid / any ESP.\nParses sender email -> matches to contact -> checks if contact is in\nactive sequence -> auto-pauses enrollment and notifies the rep.","operationId":"inbound_email_webhook_api_v1_webhooks_email_inbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Inbound Email Webhook Api V1 Webhooks Email Inbound Post"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/email/inbound/{token}":{"post":{"tags":["Webhooks"],"summary":"Inbound Token","operationId":"inbound_token_api_v1_webhooks_email_inbound__token__post","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"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write","description":"**Scope:** `webhooks:write`"}},"/api/v1/webhooks/ecommerce/{provider}/{org_id}":{"post":{"tags":["Webhooks"],"summary":"Retired","operationId":"retired_api_v1_webhooks_ecommerce__provider___org_id__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write","description":"**Scope:** `webhooks:write`"}},"/api/v1/webhooks/inbox/events":{"get":{"tags":["Webhooks"],"summary":"Get Inbox Events Since","description":"**Scope:** `webhooks:read`\n\nReplay inbox events since a given timestamp.\n\nCalled by the frontend on WS reconnect to reconcile missed events.\nReturns events in ascending order (oldest first) so the client can\nprepend them in chronological order.\n\nScoped to the current user's org — cross-org access is impossible.","operationId":"get_inbox_events_since_api_v1_webhooks_inbox_events_get","security":[{"ApiKey":["webhooks:read"]}],"parameters":[{"name":"ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO timestamp — returns events after this time","title":"Ts"},"description":"ISO timestamp — returns events after this time"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"channel","in":"query","required":false,"schema":{"type":"string","default":"inbox","title":"Channel"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Inbox Events Since Api V1 Webhooks Inbox Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"webhooks:read"}},"/api/v1/webhooks/sendgrid":{"post":{"tags":["Webhooks"],"summary":"Sendgrid Webhook","description":"**Scope:** `webhooks:write`\n\nWebhook receiver for SendGrid Event Webhook.\nHandles bounces and complaints to protect sender reputation by marking contacts as invalid.","operationId":"sendgrid_webhook_api_v1_webhooks_sendgrid_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmailEvent"},"type":"array","title":"Events"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Sendgrid Webhook Api V1 Webhooks Sendgrid Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/resend":{"post":{"tags":["Webhooks"],"summary":"Resend Webhook","description":"**Scope:** `webhooks:write`\n\nApply a verified Resend event to the exact provider-correlated send.","operationId":"resend_webhook_api_v1_webhooks_resend_post","parameters":[{"name":"max_age_seconds","in":"query","required":false,"schema":{"type":"integer","default":300,"title":"Max Age Seconds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Resend Webhook Api V1 Webhooks Resend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/whatsapp":{"get":{"tags":["Webhooks"],"summary":"Whatsapp Verify","description":"**Scope:** `webhooks:read`\n\nMeta webhook verification handshake. Returns hub.challenge if token matches.","operationId":"whatsapp_verify_api_v1_webhooks_whatsapp_get","parameters":[{"name":"hub.mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hub.Mode"}},{"name":"hub.challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hub.Challenge"}},{"name":"hub.verify_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hub.Verify Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:read"]}],"x-required-scope":"webhooks:read"},"post":{"tags":["Webhooks"],"summary":"Whatsapp Receive","description":"**Scope:** `webhooks:write`\n\nReceive incoming WhatsApp messages, statuses, and events.","operationId":"whatsapp_receive_api_v1_webhooks_whatsapp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/api/v1/forms/":{"get":{"tags":["Forms"],"summary":"List Forms","operationId":"list_forms_api_v1_forms__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["forms:read"]}],"x-required-scope":"forms:read","description":"**Scope:** `forms:read`"},"post":{"tags":["Forms"],"summary":"Create Form","operationId":"create_form_api_v1_forms__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write","description":"**Scope:** `forms:write`"}},"/api/v1/forms/{form_id}":{"get":{"tags":["Forms"],"summary":"Get Form","operationId":"get_form_api_v1_forms__form_id__get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read","description":"**Scope:** `forms:read`"},"put":{"tags":["Forms"],"summary":"Update Form","operationId":"update_form_api_v1_forms__form_id__put","security":[{"ApiKey":["forms:write"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:write","description":"**Scope:** `forms:write`"},"delete":{"tags":["Forms"],"summary":"Delete Form","operationId":"delete_form_api_v1_forms__form_id__delete","security":[{"ApiKey":["forms:write"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:write","description":"**Scope:** `forms:write`"}},"/api/v1/forms/{form_id}/submissions":{"get":{"tags":["Forms"],"summary":"List Submissions","operationId":"list_submissions_api_v1_forms__form_id__submissions_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","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"}}}}},"x-required-scope":"forms:read","description":"**Scope:** `forms:read`"}},"/api/v1/forms/public/{embed_key}/submit":{"post":{"tags":["Forms"],"summary":"Public Submit","description":"**Scope:** `forms:write`\n\nPublic endpoint embedded in customer websites (validated server-side; see services/form_submissions.py).","operationId":"public_submit_api_v1_forms_public__embed_key__submit_post","parameters":[{"name":"embed_key","in":"path","required":true,"schema":{"type":"string","title":"Embed Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write"}},"/api/v1/forms/public/{embed_key}/submissions/{submission_id}/pay":{"post":{"tags":["Forms"],"summary":"Public Pay","description":"**Scope:** `forms:write`\n\nStart payment for a submitted form with a payment field — paid to the business's own account.","operationId":"public_pay_api_v1_forms_public__embed_key__submissions__submission_id__pay_post","parameters":[{"name":"embed_key","in":"path","required":true,"schema":{"type":"string","title":"Embed Key"}},{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","title":"Submission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__leadgen__api__form_router__PayIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write"}},"/api/v1/forms/public/{embed_key}/view":{"post":{"tags":["Forms"],"summary":"Public View","description":"**Scope:** `forms:write`\n\nThe form was shown (once per visitor session), started (first field touched), or reached a field.","operationId":"public_view_api_v1_forms_public__embed_key__view_post","parameters":[{"name":"embed_key","in":"path","required":true,"schema":{"type":"string","title":"Embed Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write"}},"/api/v1/forms/embed/{embed_key}/schema":{"get":{"tags":["Forms"],"summary":"Get Form Schema","description":"**Scope:** `forms:read`\n\nPublic endpoint to get form fields for embedding.","operationId":"get_form_schema_api_v1_forms_embed__embed_key__schema_get","parameters":[{"name":"embed_key","in":"path","required":true,"schema":{"type":"string","title":"Embed Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:read"]}],"x-required-scope":"forms:read"}},"/api/v1/forms/{form_id}/analytics":{"get":{"tags":["Forms"],"summary":"Form Analytics","description":"**Scope:** `forms:read`\n\nPer-form analytics surface used by the Form Builder UI:\n  - daily submission counts for the past N days (sparkline)\n  - top UTM sources/mediums/campaigns\n  - conversion rate vs visitor pageviews on the host site (if pixel installed)\n  - average time-to-submit (first pageview → form submit)","operationId":"form_analytics_api_v1_forms__form_id__analytics_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","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"}}}}},"x-required-scope":"forms:read"}},"/api/v1/forms/{form_id}/embed-snippet":{"get":{"tags":["Forms"],"summary":"Form Embed Snippet","description":"**Scope:** `forms:read`\n\nReturns the three install options the customer can copy-paste:\n  - hosted page URL (no setup)\n  - JS embed (script + target div)\n  - iframe embed","operationId":"form_embed_snippet_api_v1_forms__form_id__embed_snippet_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read"}},"/api/v1/forms/f/{slug}":{"get":{"tags":["Forms"],"summary":"Get Published Form By Slug","description":"**Scope:** `forms:read`\n\nReturn the published form schema + theme for the public renderer.","operationId":"get_published_form_by_slug_api_v1_forms_f__slug__get","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"}}}}},"security":[{"ApiKey":["forms:read"]}],"x-required-scope":"forms:read"}},"/api/v1/forms/f/{slug}/submit":{"post":{"tags":["Forms"],"summary":"Submit Form By Slug","description":"**Scope:** `forms:write`\n\nPublic submission endpoint with server-side logic evaluation and CRM sync.","operationId":"submit_form_by_slug_api_v1_forms_f__slug__submit_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"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write"}},"/api/v1/forms/{form_id}/versions/draft":{"post":{"tags":["Forms"],"summary":"Create Form Draft","description":"**Scope:** `forms:write`\n\nCreate a new draft version cloned from the published schema (or blank).","operationId":"create_form_draft_api_v1_forms__form_id__versions_draft_post","security":[{"ApiKey":["forms:write"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:write"}},"/api/v1/forms/{form_id}/versions/{version_id}/publish":{"post":{"tags":["Forms"],"summary":"Publish Form Version","description":"**Scope:** `forms:write`\n\nPromote a specific draft version to published.","operationId":"publish_form_version_api_v1_forms__form_id__versions__version_id__publish_post","security":[{"ApiKey":["forms:write"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:write"}},"/api/v1/forms/{form_id}/versions":{"get":{"tags":["Forms"],"summary":"List Form Versions","description":"**Scope:** `forms:read`\n\nList all versions for a form ordered by version_no DESC with submission counts.","operationId":"list_form_versions_api_v1_forms__form_id__versions_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read"}},"/api/v1/tasks/":{"get":{"tags":["Tasks"],"summary":"List Tasks","operationId":"list_tasks_api_v1_tasks__get","security":[{"ApiKey":["tasks:read"]}],"parameters":[{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"}},{"name":"deal_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"tasks:read","description":"**Scope:** `tasks:read`"},"post":{"tags":["Tasks"],"summary":"Create Task","operationId":"create_task_api_v1_tasks__post","security":[{"ApiKey":["tasks:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"tasks:write","description":"**Scope:** `tasks:write`"}},"/api/v1/tasks/{task_id}":{"put":{"tags":["Tasks"],"summary":"Update Task","operationId":"update_task_api_v1_tasks__task_id__put","security":[{"ApiKey":["tasks:write"]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"tasks:write","description":"**Scope:** `tasks:write`"},"delete":{"tags":["Tasks"],"summary":"Delete Task","operationId":"delete_task_api_v1_tasks__task_id__delete","security":[{"ApiKey":["tasks:write"]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"tasks:write","description":"**Scope:** `tasks:write`"}},"/api/v1/tasks/{task_id}/complete":{"post":{"tags":["Tasks"],"summary":"Complete Task","operationId":"complete_task_api_v1_tasks__task_id__complete_post","security":[{"ApiKey":["tasks:write"]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"tasks:write","description":"**Scope:** `tasks:write`"}},"/api/v1/email/campaigns/{campaign_id}/variants":{"get":{"tags":["Email Campaigns"],"summary":"List Variants","operationId":"list_variants_api_v1_email_campaigns__campaign_id__variants_get","security":[{"ApiKey":["email_campaigns:read"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Variants Api V1 Email Campaigns  Campaign Id  Variants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:read","description":"**Scope:** `email_campaigns:read`"},"post":{"tags":["Email Campaigns"],"summary":"Add Variant","operationId":"add_variant_api_v1_email_campaigns__campaign_id__variants_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Variant Api V1 Email Campaigns  Campaign Id  Variants Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write","description":"**Scope:** `email_campaigns:write`"}},"/api/v1/email/campaigns/{campaign_id}/variants/{variant_id}":{"put":{"tags":["Email Campaigns"],"summary":"Update Variant","operationId":"update_variant_api_v1_email_campaigns__campaign_id__variants__variant_id__put","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Variant Api V1 Email Campaigns  Campaign Id  Variants  Variant Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write","description":"**Scope:** `email_campaigns:write`"},"delete":{"tags":["Email Campaigns"],"summary":"Delete Variant","operationId":"delete_variant_api_v1_email_campaigns__campaign_id__variants__variant_id__delete","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Variant Api V1 Email Campaigns  Campaign Id  Variants  Variant Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write","description":"**Scope:** `email_campaigns:write`"}},"/api/v1/email/campaigns/{campaign_id}/variants/predict-winner":{"get":{"tags":["Email Campaigns"],"summary":"Predict Winner","description":"**Scope:** `email_campaigns:read`\n\nReal-time prediction for the deliverability dashboard. Doesn't promote.","operationId":"predict_winner_api_v1_email_campaigns__campaign_id__variants_predict_winner_get","security":[{"ApiKey":["email_campaigns:read"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"open_rate","title":"Metric"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Predict Winner Api V1 Email Campaigns  Campaign Id  Variants Predict Winner Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:read"}},"/api/v1/email/campaigns/{campaign_id}/variants/pick-winner":{"post":{"tags":["Email Campaigns"],"summary":"Pick Winner","description":"**Scope:** `email_campaigns:write`\n\nRun the predictor + promote the winner if all three gates pass.","operationId":"pick_winner_api_v1_email_campaigns__campaign_id__variants_pick_winner_post","security":[{"ApiKey":["email_campaigns:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"open_rate","title":"Metric"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pick Winner Api V1 Email Campaigns  Campaign Id  Variants Pick Winner Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"email_campaigns:write"}},"/api/v1/sms/campaigns":{"get":{"tags":["Sms"],"summary":"List Campaigns","operationId":"list_campaigns_api_v1_sms_campaigns_get","security":[{"ApiKey":["sms:read"]}],"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":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Campaigns Api V1 Sms Campaigns Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:read","description":"**Scope:** `sms:read`"},"post":{"tags":["Sms"],"summary":"Create Campaign","operationId":"create_campaign_api_v1_sms_campaigns_post","security":[{"ApiKey":["sms:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Campaign Api V1 Sms Campaigns Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/campaigns/{campaign_id}":{"put":{"tags":["Sms"],"summary":"Update Campaign","operationId":"update_campaign_api_v1_sms_campaigns__campaign_id__put","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Campaign Api V1 Sms Campaigns  Campaign Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"},"delete":{"tags":["Sms"],"summary":"Delete Campaign","operationId":"delete_campaign_api_v1_sms_campaigns__campaign_id__delete","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Campaign Api V1 Sms Campaigns  Campaign Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/campaigns/{campaign_id}/send-now":{"post":{"tags":["Sms"],"summary":"Send Campaign Now","operationId":"send_campaign_now_api_v1_sms_campaigns__campaign_id__send_now_post","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Campaign Now Api V1 Sms Campaigns  Campaign Id  Send Now Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/campaigns/{campaign_id}/messages":{"get":{"tags":["Sms"],"summary":"List Campaign Messages","operationId":"list_campaign_messages_api_v1_sms_campaigns__campaign_id__messages_get","security":[{"ApiKey":["sms:read"]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Campaign Messages Api V1 Sms Campaigns  Campaign Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:read","description":"**Scope:** `sms:read`"}},"/api/v1/sms/messages/send":{"post":{"tags":["Sms"],"summary":"Send One Off","operationId":"send_one_off_api_v1_sms_messages_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOneShot"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Send One Off Api V1 Sms Messages Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sms:write"]}],"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/subscribers":{"get":{"tags":["Sms"],"summary":"List Subscribers","operationId":"list_subscribers_api_v1_sms_subscribers_get","security":[{"ApiKey":["sms:read"]}],"parameters":[{"name":"opt_in","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Opt In"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"phone substring","title":"Q"},"description":"phone substring"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Subscribers Api V1 Sms Subscribers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:read","description":"**Scope:** `sms:read`"},"post":{"tags":["Sms"],"summary":"Upsert Subscribers","operationId":"upsert_subscribers_api_v1_sms_subscribers_post","security":[{"ApiKey":["sms:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSubscriberUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upsert Subscribers Api V1 Sms Subscribers Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/subscribers/{sub_id}/opt-out":{"post":{"tags":["Sms"],"summary":"Opt Out","operationId":"opt_out_api_v1_sms_subscribers__sub_id__opt_out_post","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Opt Out Api V1 Sms Subscribers  Sub Id  Opt Out Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/subscribers/{sub_id}/opt-in":{"post":{"tags":["Sms"],"summary":"Opt In","operationId":"opt_in_api_v1_sms_subscribers__sub_id__opt_in_post","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Opt In Api V1 Sms Subscribers  Sub Id  Opt In Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/webhooks/twilio-inbound/{org_id}":{"post":{"tags":["Sms"],"summary":"Twilio Inbound","description":"**Scope:** `sms:write`\n\nTwilio expects TwiML back. With SMS_KEYWORD_REPLIES on, HELP / STOP / START get the\nworkspace's registered reply (P3-25); otherwise an empty response (Twilio's own opt-out answers).","operationId":"twilio_inbound_api_v1_sms_webhooks_twilio_inbound__org_id__post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"x-twilio-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Twilio-Signature"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_twilio_inbound_api_v1_sms_webhooks_twilio_inbound__org_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sms:write"]}],"x-required-scope":"sms:write"}},"/api/v1/sms/webhooks/twilio-status/{org_id}":{"post":{"tags":["Sms"],"summary":"Twilio Status","description":"**Scope:** `sms:write`\n\nTwilio fires this on every status transition (queued → sent →\ndelivered / failed / undelivered). We update the matching SMSMessage.","operationId":"twilio_status_api_v1_sms_webhooks_twilio_status__org_id__post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"x-twilio-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Twilio-Signature"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_twilio_status_api_v1_sms_webhooks_twilio_status__org_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Twilio Status Api V1 Sms Webhooks Twilio Status  Org Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sms:write"]}],"x-required-scope":"sms:write"}},"/api/v1/sms/stats":{"get":{"tags":["Sms"],"summary":"Stats","operationId":"stats_api_v1_sms_stats_get","security":[{"ApiKey":["sms:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":180,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stats Api V1 Sms Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:read","description":"**Scope:** `sms:read`"}},"/api/v1/sms/stats/timeseries":{"get":{"tags":["Sms"],"summary":"Stats Timeseries","description":"**Scope:** `sms:read`\n\nDaily sent / delivered / failed buckets for the chart strip.","operationId":"stats_timeseries_api_v1_sms_stats_timeseries_get","security":[{"ApiKey":["sms:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":180,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Stats Timeseries Api V1 Sms Stats Timeseries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:read"}},"/api/v1/sms/broadcasts":{"post":{"tags":["Sms"],"summary":"Create Sms Broadcast","operationId":"create_sms_broadcast_api_v1_sms_broadcasts_post","security":[{"ApiKey":["sms:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Sms Broadcast Api V1 Sms Broadcasts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"},"get":{"tags":["Sms"],"summary":"List Sms Broadcasts","operationId":"list_sms_broadcasts_api_v1_sms_broadcasts_get","security":[{"ApiKey":["sms:read"]}],"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":500,"minimum":1,"default":100,"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":{"type":"object","additionalProperties":true,"title":"Response List Sms Broadcasts Api V1 Sms Broadcasts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:read","description":"**Scope:** `sms:read`"}},"/api/v1/sms/broadcasts/{broadcast_id}":{"get":{"tags":["Sms"],"summary":"Get Sms Broadcast","operationId":"get_sms_broadcast_api_v1_sms_broadcasts__broadcast_id__get","security":[{"ApiKey":["sms:read"]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Broadcast Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Sms Broadcast Api V1 Sms Broadcasts  Broadcast Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:read","description":"**Scope:** `sms:read`"}},"/api/v1/sms/broadcasts/{broadcast_id}/send-now":{"post":{"tags":["Sms"],"summary":"Send Sms Broadcast Now","operationId":"send_sms_broadcast_now_api_v1_sms_broadcasts__broadcast_id__send_now_post","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Broadcast Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Sms Broadcast Now Api V1 Sms Broadcasts  Broadcast Id  Send Now Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/broadcasts/{broadcast_id}/cancel":{"post":{"tags":["Sms"],"summary":"Cancel Sms Broadcast","operationId":"cancel_sms_broadcast_api_v1_sms_broadcasts__broadcast_id__cancel_post","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Broadcast Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Sms Broadcast Api V1 Sms Broadcasts  Broadcast Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/broadcasts/{broadcast_id}/analytics":{"get":{"tags":["Sms"],"summary":"Sms Broadcast Analytics","operationId":"sms_broadcast_analytics_api_v1_sms_broadcasts__broadcast_id__analytics_get","security":[{"ApiKey":["sms:read"]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Broadcast Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sms Broadcast Analytics Api V1 Sms Broadcasts  Broadcast Id  Analytics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:read","description":"**Scope:** `sms:read`"}},"/api/v1/sms/broadcasts/estimate":{"post":{"tags":["Sms"],"summary":"Estimate Sms Broadcast","operationId":"estimate_sms_broadcast_api_v1_sms_broadcasts_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastEstimate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Estimate Sms Broadcast Api V1 Sms Broadcasts Estimate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sms:write"]}],"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/compliance":{"get":{"tags":["Sms"],"summary":"Get Sms Compliance","description":"**Scope:** `sms:read`\n\nThis workspace's carrier registrations and what is still missing.","operationId":"get_sms_compliance_api_v1_sms_compliance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["sms:read"]}],"x-required-scope":"sms:read"}},"/api/v1/sms/compliance/{kind}":{"put":{"tags":["Sms"],"summary":"Save Sms Registration","description":"**Scope:** `sms:write`\n\nSave the form as a draft (also after a rejection, to fix and resubmit).","operationId":"save_sms_registration_api_v1_sms_compliance__kind__put","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsRegistrationIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write"}},"/api/v1/sms/compliance/{kind}/submit":{"post":{"tags":["Sms"],"summary":"Submit Sms Registration","operationId":"submit_sms_registration_api_v1_sms_compliance__kind__submit_post","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/us-rules":{"get":{"tags":["Sms"],"summary":"Get Us Rules","description":"**Scope:** `sms:read`\n\nTexting windows by state / province, this workspace's switches, the do-not-contact count and CAN-SPAM status.","operationId":"get_us_rules_api_v1_sms_us_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["sms:read"]}],"x-required-scope":"sms:read"},"put":{"tags":["Sms"],"summary":"Save Us Rules","operationId":"save_us_rules_api_v1_sms_us_rules_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsRulesIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sms:write"]}],"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/sms/us-rules/check":{"post":{"tags":["Sms"],"summary":"Check Us Number","description":"**Scope:** `sms:write`\n\nCan a marketing text go to this number right now? Where it is, its local time, the rule, when it can.","operationId":"check_us_number_api_v1_sms_us_rules_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["sms:write"]}],"x-required-scope":"sms:write"}},"/api/v1/sms/us-rules/dnc":{"get":{"tags":["Sms"],"summary":"List Dnc","operationId":"list_dnc_api_v1_sms_us_rules_dnc_get","security":[{"ApiKey":["sms:read"]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:read","description":"**Scope:** `sms:read`"},"post":{"tags":["Sms"],"summary":"Add Dnc","description":"**Scope:** `sms:write`\n\nNever text or call this number from this workspace (marketing texts, broadcasts and the dialer).","operationId":"add_dnc_api_v1_sms_us_rules_dnc_post","security":[{"ApiKey":["sms:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write"}},"/api/v1/sms/us-rules/dnc/{phone}":{"delete":{"tags":["Sms"],"summary":"Remove Dnc","operationId":"remove_dnc_api_v1_sms_us_rules_dnc__phone__delete","security":[{"ApiKey":["sms:write"]}],"parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string","title":"Phone"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"sms:write","description":"**Scope:** `sms:write`"}},"/api/v1/surveys/":{"get":{"tags":["Forms"],"summary":"List Surveys","operationId":"list_surveys_api_v1_surveys__get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"survey_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Survey Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Surveys Api V1 Surveys  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read","description":"**Scope:** `forms:read`"},"post":{"tags":["Forms"],"summary":"Create Survey","operationId":"create_survey_api_v1_surveys__post","security":[{"ApiKey":["forms:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurveyCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Survey Api V1 Surveys  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:write","description":"**Scope:** `forms:write`"}},"/api/v1/surveys/{form_id}/score":{"get":{"tags":["Forms"],"summary":"Survey Score","operationId":"survey_score_api_v1_surveys__form_id__score_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Survey Score Api V1 Surveys  Form Id  Score Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read","description":"**Scope:** `forms:read`"}},"/api/v1/surveys/{form_id}/analytics":{"get":{"tags":["Forms"],"summary":"Survey Analytics","description":"**Scope:** `forms:read`\n\nFull analytics rollup for a survey: score over time + verbatim themes\n+ response volume + promoter/passive/detractor split (for NPS) or\nsatisfaction band breakdown (CSAT/CES). Powers the survey dashboard.","operationId":"survey_analytics_api_v1_surveys__form_id__analytics_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Survey Analytics Api V1 Surveys  Form Id  Analytics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read"}},"/api/v1/surveys/{form_id}/verbatims":{"get":{"tags":["Forms"],"summary":"Survey Verbatims","operationId":"survey_verbatims_api_v1_surveys__form_id__verbatims_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Survey Verbatims Api V1 Surveys  Form Id  Verbatims Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read","description":"**Scope:** `forms:read`"}},"/api/v1/surveys/{form_id}/invitations":{"get":{"tags":["Forms"],"summary":"List Invitations","operationId":"list_invitations_api_v1_surveys__form_id__invitations_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}},{"name":"completed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Completed"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Invitations Api V1 Surveys  Form Id  Invitations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read","description":"**Scope:** `forms:read`"},"post":{"tags":["Forms"],"summary":"Create Invitations","operationId":"create_invitations_api_v1_surveys__form_id__invitations_post","security":[{"ApiKey":["forms:write"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationsCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Invitations Api V1 Surveys  Form Id  Invitations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:write","description":"**Scope:** `forms:write`"}},"/api/v1/surveys/{form_id}/invitations/send":{"post":{"tags":["Forms"],"summary":"Send Invitations","description":"**Scope:** `forms:write`\n\nEmail / text the survey link to each invitation (P3-24). Unsubscribed and opted-out people are skipped.","operationId":"send_invitations_api_v1_surveys__form_id__invitations_send_post","security":[{"ApiKey":["forms:write"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__leadgen__api__surveys_router__SendIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Invitations Api V1 Surveys  Form Id  Invitations Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:write"}},"/api/v1/surveys/{form_id}/automation":{"get":{"tags":["Forms"],"summary":"Get Automation","operationId":"get_automation_api_v1_surveys__form_id__automation_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Automation Api V1 Surveys  Form Id  Automation Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read","description":"**Scope:** `forms:read`"},"put":{"tags":["Forms"],"summary":"Put Automation","description":"**Scope:** `forms:write`\n\nWhen the survey sends itself (after a solved ticket, or every N days), throttling, reminders, and what\nhappens after an unhappy or happy answer.","operationId":"put_automation_api_v1_surveys__form_id__automation_put","security":[{"ApiKey":["forms:write"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Automation Api V1 Surveys  Form Id  Automation Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:write"}},"/api/v1/surveys/{form_id}/themes":{"get":{"tags":["Forms"],"summary":"Survey Themes","description":"**Scope:** `forms:read`\n\nAI groups the written comments into themes with counts, sentiment and the average score.","operationId":"survey_themes_api_v1_surveys__form_id__themes_get","security":[{"ApiKey":["forms:read"]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Survey Themes Api V1 Surveys  Form Id  Themes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"forms:read"}},"/api/v1/surveys/invitations/track-open/{token}":{"post":{"tags":["Forms"],"summary":"Track Open","description":"**Scope:** `forms:write`\n\nHit by the survey landing page when the recipient opens it.\nIdempotent — only the first open wins.","operationId":"track_open_api_v1_surveys_invitations_track_open__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Track Open Api V1 Surveys Invitations Track Open  Token  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write"}},"/api/v1/surveys/invitations/complete/{token}":{"post":{"tags":["Forms"],"summary":"Complete Invitation","description":"**Scope:** `forms:write`\n\nCalled by the form-render endpoint after a successful FormSubmission.\nLinks the submission_id back to the invitation so we can compute\nresponse rate.","operationId":"complete_invitation_api_v1_surveys_invitations_complete__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"submission_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Submission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Complete Invitation Api V1 Surveys Invitations Complete  Token  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["forms:write"]}],"x-required-scope":"forms:write"}},"/api/v1/reviews/platforms":{"get":{"tags":["Reviews"],"summary":"Supported Platforms","operationId":"supported_platforms_api_v1_reviews_platforms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Supported Platforms Api V1 Reviews Platforms Get"}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"}},"/api/v1/reviews/reputation":{"get":{"tags":["Reviews"],"summary":"Reputation","operationId":"reputation_api_v1_reviews_reputation_get","security":[{"ApiKey":["reviews:read"]}],"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":{"type":"object","additionalProperties":true,"title":"Response Reputation Api V1 Reviews Reputation Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"}},"/api/v1/reviews/sources":{"get":{"tags":["Reviews"],"summary":"List Sources","operationId":"list_sources_api_v1_reviews_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Sources Api V1 Reviews Sources Get"}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"},"post":{"tags":["Reviews"],"summary":"Create Source","operationId":"create_source_api_v1_reviews_sources_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Source Api V1 Reviews Sources Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reviews:write"]}],"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"}},"/api/v1/reviews/sources/{source_id}":{"put":{"tags":["Reviews"],"summary":"Update Source","operationId":"update_source_api_v1_reviews_sources__source_id__put","security":[{"ApiKey":["reviews:write"]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Source Api V1 Reviews Sources  Source Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"},"delete":{"tags":["Reviews"],"summary":"Delete Source","operationId":"delete_source_api_v1_reviews_sources__source_id__delete","security":[{"ApiKey":["reviews:write"]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Source Api V1 Reviews Sources  Source Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"}},"/api/v1/reviews/sources/{source_id}/sync":{"post":{"tags":["Reviews"],"summary":"Sync Source","operationId":"sync_source_api_v1_reviews_sources__source_id__sync_post","security":[{"ApiKey":["reviews:write"]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sync Source Api V1 Reviews Sources  Source Id  Sync Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"}},"/api/v1/reviews/items":{"get":{"tags":["Reviews"],"summary":"List Items","operationId":"list_items_api_v1_reviews_items_get","security":[{"ApiKey":["reviews:read"]}],"parameters":[{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"}},{"name":"sentiment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentiment"}},{"name":"response_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Status"}},{"name":"min_rating","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":5,"minimum":0},{"type":"null"}],"title":"Min Rating"}},{"name":"max_rating","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":5,"minimum":0},{"type":"null"}],"title":"Max Rating"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Items Api V1 Reviews Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"},"post":{"tags":["Reviews"],"summary":"Create Item","operationId":"create_item_api_v1_reviews_items_post","security":[{"ApiKey":["reviews:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Item Api V1 Reviews Items Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"}},"/api/v1/reviews/items/{item_id}/response":{"put":{"tags":["Reviews"],"summary":"Update Response","operationId":"update_response_api_v1_reviews_items__item_id__response_put","security":[{"ApiKey":["reviews:write"]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Response Api V1 Reviews Items  Item Id  Response Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"}},"/api/v1/reviews/items/{item_id}/draft-response":{"post":{"tags":["Reviews"],"summary":"Ai Draft Response","operationId":"ai_draft_response_api_v1_reviews_items__item_id__draft_response_post","security":[{"ApiKey":["reviews:write"]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}},{"name":"brand_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ai Draft Response Api V1 Reviews Items  Item Id  Draft Response Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"}},"/api/v1/reviews/requests":{"get":{"tags":["Reviews"],"summary":"List Requests","operationId":"list_requests_api_v1_reviews_requests_get","security":[{"ApiKey":["reviews:read"]}],"parameters":[{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"}},{"name":"completed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Completed"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Requests Api V1 Reviews Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"},"post":{"tags":["Reviews"],"summary":"Create Requests","operationId":"create_requests_api_v1_reviews_requests_post","security":[{"ApiKey":["reviews:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Requests Api V1 Reviews Requests Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"}},"/api/v1/reviews/requests/{request_id}/send":{"post":{"tags":["Reviews"],"summary":"Send Request","description":"**Scope:** `reviews:write`\n\nSend (or resend) one review request.","operationId":"send_request_api_v1_reviews_requests__request_id__send_post","security":[{"ApiKey":["reviews:write"]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Request Api V1 Reviews Requests  Request Id  Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write"}},"/api/v1/reviews/requests/{request_id}/mark-sent":{"post":{"tags":["Reviews"],"summary":"Mark Request Sent","operationId":"mark_request_sent_api_v1_reviews_requests__request_id__mark_sent_post","security":[{"ApiKey":["reviews:write"]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mark Request Sent Api V1 Reviews Requests  Request Id  Mark Sent Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"}},"/api/v1/reviews/requests/funnel":{"get":{"tags":["Reviews"],"summary":"Request Funnel","operationId":"request_funnel_api_v1_reviews_requests_funnel_get","security":[{"ApiKey":["reviews:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":180,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Request Funnel Api V1 Reviews Requests Funnel Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"}},"/api/v1/reviews/r/{token}":{"get":{"tags":["Reviews"],"summary":"Public Click","description":"**Scope:** `reviews:read`\n\nPublic — frontend hits this when a review-request recipient clicks\nthe link. Returns the redirect target so the browser can navigate.","operationId":"public_click_api_v1_reviews_r__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Public Click Api V1 Reviews R  Token  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read"}},"/api/v1/reviews/go/{token}":{"get":{"tags":["Reviews"],"summary":"Public Go","description":"**Scope:** `reviews:read`\n\nPublic link in review-request emails/SMS: record the click, then send the\ncustomer to the platform's write-a-review page.","operationId":"public_go_api_v1_reviews_go__token__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"}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read"}},"/api/v1/reviews/google/status":{"get":{"tags":["Reviews"],"summary":"Google Status","operationId":"google_status_api_v1_reviews_google_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"}},"/api/v1/reviews/google/connect":{"get":{"tags":["Reviews"],"summary":"Google Connect","operationId":"google_connect_api_v1_reviews_google_connect_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"}},"/api/v1/reviews/google/callback":{"get":{"tags":["Reviews"],"summary":"Google Callback","description":"**Scope:** `reviews:read`\n\nGoogle redirects here after consent. The signed state names the workspace.","operationId":"google_callback_api_v1_reviews_google_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read"}},"/api/v1/reviews/google/locations":{"get":{"tags":["Reviews"],"summary":"Google Locations","operationId":"google_locations_api_v1_reviews_google_locations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"},"post":{"tags":["Reviews"],"summary":"Add Google Location","description":"**Scope:** `reviews:write`\n\nTrack a Business Profile location as a review source and import its reviews.","operationId":"add_google_location_api_v1_reviews_google_locations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleLocationIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Add Google Location Api V1 Reviews Google Locations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reviews:write"]}],"x-required-scope":"reviews:write"}},"/api/v1/reviews/aspect-analysis":{"get":{"tags":["Reviews"],"summary":"Aspect Analysis","description":"**Scope:** `reviews:read`\n\nAspect-based sentiment across recent reviews — what customers praise vs\ncriticize (price, support, quality, speed, usability, shipping). Native.","operationId":"aspect_analysis_api_v1_reviews_aspect_analysis_get","security":[{"ApiKey":["reviews:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Aspect Analysis Api V1 Reviews Aspect Analysis Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:read"}},"/api/v1/reviews/widgets":{"get":{"tags":["Reviews"],"summary":"List Review Widgets","operationId":"list_review_widgets_api_v1_reviews_widgets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read","description":"**Scope:** `reviews:read`"},"post":{"tags":["Reviews"],"summary":"Create Review Widget","description":"**Scope:** `reviews:write`\n\nA widget to show your reviews on your website — copy the embed code it returns.","operationId":"create_review_widget_api_v1_reviews_widgets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewWidgetIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reviews:write"]}],"x-required-scope":"reviews:write"}},"/api/v1/reviews/widgets/{widget_id}":{"put":{"tags":["Reviews"],"summary":"Update Review Widget","operationId":"update_review_widget_api_v1_reviews_widgets__widget_id__put","security":[{"ApiKey":["reviews:write"]}],"parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Widget Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewWidgetIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"},"delete":{"tags":["Reviews"],"summary":"Delete Review Widget","operationId":"delete_review_widget_api_v1_reviews_widgets__widget_id__delete","security":[{"ApiKey":["reviews:write"]}],"parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Widget Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reviews:write","description":"**Scope:** `reviews:write`"}},"/api/v1/reviews/public/widgets/{key}":{"get":{"tags":["Reviews"],"summary":"Public Review Widget","description":"**Scope:** `reviews:read`\n\nWhat the embedded widget shows (no login). The embed page passes the page it's on in X-Embed-Referrer so a\nwidget limited to certain domains only answers there.","operationId":"public_review_widget_api_v1_reviews_public_widgets__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"preview","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Preview"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["reviews:read"]}],"x-required-scope":"reviews:read"}},"/api/v1/helpdesk/tickets":{"get":{"tags":["Helpdesk"],"summary":"List Tickets","operationId":"list_tickets_api_v1_helpdesk_tickets_get","security":[{"ApiKey":["helpdesk:read"]}],"parameters":[{"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":"assignee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee Id"}},{"name":"requester_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester Email"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"subject substring","title":"Q"},"description":"subject substring"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Tickets Api V1 Helpdesk Tickets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read","description":"**Scope:** `helpdesk:read`"},"post":{"tags":["Helpdesk"],"summary":"Create Ticket","operationId":"create_ticket_api_v1_helpdesk_tickets_post","security":[{"ApiKey":["helpdesk:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Ticket Api V1 Helpdesk Tickets Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/tickets/{ticket_id}":{"get":{"tags":["Helpdesk"],"summary":"Get Ticket","operationId":"get_ticket_api_v1_helpdesk_tickets__ticket_id__get","security":[{"ApiKey":["helpdesk:read"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Ticket Api V1 Helpdesk Tickets  Ticket Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read","description":"**Scope:** `helpdesk:read`"},"put":{"tags":["Helpdesk"],"summary":"Update Ticket","operationId":"update_ticket_api_v1_helpdesk_tickets__ticket_id__put","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Ticket Api V1 Helpdesk Tickets  Ticket Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/tickets/{ticket_id}/messages":{"post":{"tags":["Helpdesk"],"summary":"Post Message","operationId":"post_message_api_v1_helpdesk_tickets__ticket_id__messages_post","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Message Api V1 Helpdesk Tickets  Ticket Id  Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/tickets/{ticket_id}/status":{"post":{"tags":["Helpdesk"],"summary":"Change Status","operationId":"change_status_api_v1_helpdesk_tickets__ticket_id__status_post","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Change Status Api V1 Helpdesk Tickets  Ticket Id  Status Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/tickets/{ticket_id}/csat":{"post":{"tags":["Helpdesk"],"summary":"Record Csat","operationId":"record_csat_api_v1_helpdesk_tickets__ticket_id__csat_post","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CSATBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Record Csat Api V1 Helpdesk Tickets  Ticket Id  Csat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/tickets/{ticket_id}/draft-reply":{"post":{"tags":["Helpdesk"],"summary":"Ai Draft Reply","operationId":"ai_draft_reply_api_v1_helpdesk_tickets__ticket_id__draft_reply_post","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}},{"name":"brand_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ai Draft Reply Api V1 Helpdesk Tickets  Ticket Id  Draft Reply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/tickets/{ticket_id}/apply-macro/{macro_id}":{"post":{"tags":["Helpdesk"],"summary":"Apply Macro","operationId":"apply_macro_api_v1_helpdesk_tickets__ticket_id__apply_macro__macro_id__post","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}},{"name":"macro_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Macro Id"}},{"name":"is_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Is Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Apply Macro Api V1 Helpdesk Tickets  Ticket Id  Apply Macro  Macro Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/macros":{"get":{"tags":["Helpdesk"],"summary":"List Macros","operationId":"list_macros_api_v1_helpdesk_macros_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Macros Api V1 Helpdesk Macros Get"}}}}},"security":[{"ApiKey":["helpdesk:read"]}],"x-required-scope":"helpdesk:read","description":"**Scope:** `helpdesk:read`"},"post":{"tags":["Helpdesk"],"summary":"Create Macro","operationId":"create_macro_api_v1_helpdesk_macros_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MacroUpsert"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Macro Api V1 Helpdesk Macros Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["helpdesk:write"]}],"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/macros/{macro_id}":{"put":{"tags":["Helpdesk"],"summary":"Update Macro","operationId":"update_macro_api_v1_helpdesk_macros__macro_id__put","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"macro_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Macro Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MacroUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Macro Api V1 Helpdesk Macros  Macro Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"},"delete":{"tags":["Helpdesk"],"summary":"Delete Macro","operationId":"delete_macro_api_v1_helpdesk_macros__macro_id__delete","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"macro_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Macro Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Macro Api V1 Helpdesk Macros  Macro Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/stats":{"get":{"tags":["Helpdesk"],"summary":"Stats","operationId":"stats_api_v1_helpdesk_stats_get","security":[{"ApiKey":["helpdesk:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":180,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stats Api V1 Helpdesk Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read","description":"**Scope:** `helpdesk:read`"}},"/api/v1/helpdesk/queue":{"get":{"tags":["Helpdesk"],"summary":"Queue","description":"**Scope:** `helpdesk:read`\n\nOpen + pending tickets ranked by priority and SLA proximity.\nBuilt for the agent inbox view.","operationId":"queue_api_v1_helpdesk_queue_get","security":[{"ApiKey":["helpdesk:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Queue Api V1 Helpdesk Queue Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read"}},"/api/v1/helpdesk/kb/articles":{"get":{"tags":["Helpdesk"],"summary":"List Kb Articles","description":"**Scope:** `helpdesk:read`\n\nList knowledge-base articles for the org (optionally filter by status).","operationId":"list_kb_articles_api_v1_helpdesk_kb_articles_get","security":[{"ApiKey":["helpdesk:read"]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Kb Articles Api V1 Helpdesk Kb Articles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read"},"post":{"tags":["Helpdesk"],"summary":"Create Kb Article","operationId":"create_kb_article_api_v1_helpdesk_kb_articles_post","security":[{"ApiKey":["helpdesk:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbArticleUpsert"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Create Kb Article Api V1 Helpdesk Kb Articles Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/kb/articles/{article_id}":{"get":{"tags":["Helpdesk"],"summary":"Get Kb Article","operationId":"get_kb_article_api_v1_helpdesk_kb_articles__article_id__get","security":[{"ApiKey":["helpdesk:read"]}],"parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Article Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Kb Article Api V1 Helpdesk Kb Articles  Article Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read","description":"**Scope:** `helpdesk:read`"},"put":{"tags":["Helpdesk"],"summary":"Update Kb Article","operationId":"update_kb_article_api_v1_helpdesk_kb_articles__article_id__put","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Article Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbArticleUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Update Kb Article Api V1 Helpdesk Kb Articles  Article Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"},"delete":{"tags":["Helpdesk"],"summary":"Delete Kb Article","operationId":"delete_kb_article_api_v1_helpdesk_kb_articles__article_id__delete","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Article Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/kb/deflect":{"get":{"tags":["Helpdesk"],"summary":"Kb Deflect","description":"**Scope:** `helpdesk:read`\n\nTry a customer question: the published public articles it finds (full-text, best first) and, with ai=true,\nthe AI answer written only from them. Agents' tests are not counted in the insights.","operationId":"kb_deflect_api_v1_helpdesk_kb_deflect_get","security":[{"ApiKey":["helpdesk:read"]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":500,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Limit"}},{"name":"ai","in":"query","required":false,"schema":{"type":"boolean","description":"also write the AI answer customers would see","default":false,"title":"Ai"},"description":"also write the AI answer customers would see"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Kb Deflect Api V1 Helpdesk Kb Deflect Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read"}},"/api/v1/helpdesk/kb/settings":{"get":{"tags":["Helpdesk"],"summary":"Get Kb Settings","operationId":"get_kb_settings_api_v1_helpdesk_kb_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Kb Settings Api V1 Helpdesk Kb Settings Get"}}}}},"security":[{"ApiKey":["helpdesk:read"]}],"x-required-scope":"helpdesk:read","description":"**Scope:** `helpdesk:read`"},"put":{"tags":["Helpdesk"],"summary":"Put Kb Settings","operationId":"put_kb_settings_api_v1_helpdesk_kb_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbSettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Put Kb Settings Api V1 Helpdesk Kb Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["helpdesk:write"]}],"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/kb/insights":{"get":{"tags":["Helpdesk"],"summary":"Kb Insights","description":"**Scope:** `helpdesk:read`\n\nDeflection rate, top customer questions, content gaps, and articles that need work.","operationId":"kb_insights_api_v1_helpdesk_kb_insights_get","security":[{"ApiKey":["helpdesk:read"]}],"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":{"title":"Response Kb Insights Api V1 Helpdesk Kb Insights Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read"}},"/api/v1/helpdesk/tickets/{ticket_id}/kb-draft":{"post":{"tags":["Helpdesk"],"summary":"Kb Draft From Ticket","description":"**Scope:** `helpdesk:write`\n\nTurn this ticket's conversation into a DRAFT help article (personal details removed) for you to review.","operationId":"kb_draft_from_ticket_api_v1_helpdesk_tickets__ticket_id__kb_draft_post","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Kb Draft From Ticket Api V1 Helpdesk Tickets  Ticket Id  Kb Draft Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write"}},"/api/v1/helpdesk/tickets/{ticket_id}/auto-assign":{"post":{"tags":["Helpdesk"],"summary":"Auto Assign Ticket","description":"**Scope:** `helpdesk:write`\n\nLoad-based routing: assign the ticket to the agent in this org with the\nfewest currently-open tickets (round-robin under equal load).","operationId":"auto_assign_ticket_api_v1_helpdesk_tickets__ticket_id__auto_assign_post","security":[{"ApiKey":["helpdesk:write"]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Auto Assign Ticket Api V1 Helpdesk Tickets  Ticket Id  Auto Assign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:write"}},"/api/v1/helpdesk/sla-policy":{"get":{"tags":["Helpdesk"],"summary":"Get Sla Policy","operationId":"get_sla_policy_api_v1_helpdesk_sla_policy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Sla Policy Api V1 Helpdesk Sla Policy Get"}}}}},"security":[{"ApiKey":["helpdesk:read"]}],"x-required-scope":"helpdesk:read","description":"**Scope:** `helpdesk:read`"},"put":{"tags":["Helpdesk"],"summary":"Put Sla Policy","operationId":"put_sla_policy_api_v1_helpdesk_sla_policy_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlaPolicyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Sla Policy Api V1 Helpdesk Sla Policy Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["helpdesk:write"]}],"x-required-scope":"helpdesk:write","description":"**Scope:** `helpdesk:write`"}},"/api/v1/helpdesk/sla-policy/public-holidays":{"get":{"tags":["Helpdesk"],"summary":"Sla Public Holidays","description":"**Scope:** `helpdesk:read`\n\nA country's nationwide public holidays for a year, to add to the holiday calendar.","operationId":"sla_public_holidays_api_v1_helpdesk_sla_policy_public_holidays_get","security":[{"ApiKey":["helpdesk:read"]}],"parameters":[{"name":"country","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":2,"title":"Country"}},{"name":"year","in":"query","required":true,"schema":{"type":"integer","title":"Year"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sla Public Holidays Api V1 Helpdesk Sla Policy Public Holidays Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read"}},"/api/v1/helpdesk/sla-policy/preview":{"post":{"tags":["Helpdesk"],"summary":"Sla Preview","description":"**Scope:** `helpdesk:write`\n\nWhich policy a ticket like this would follow, and its exact due times — try changes before saving them.","operationId":"sla_preview_api_v1_helpdesk_sla_policy_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlaPreviewIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sla Preview Api V1 Helpdesk Sla Policy Preview Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["helpdesk:write"]}],"x-required-scope":"helpdesk:write"}},"/api/v1/helpdesk/sla-policy/compliance":{"get":{"tags":["Helpdesk"],"summary":"Sla Compliance","description":"**Scope:** `helpdesk:read`\n\nTargets met per policy for tickets created in the last `days` days (only timers that are decided).","operationId":"sla_compliance_api_v1_helpdesk_sla_policy_compliance_get","security":[{"ApiKey":["helpdesk:read"]}],"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":{"type":"object","additionalProperties":true,"title":"Response Sla Compliance Api V1 Helpdesk Sla Policy Compliance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"helpdesk:read"}},"/api/v1/chat/widget/{install_key}/config":{"get":{"tags":["Livechat"],"summary":"Widget Config","description":"**Scope:** `livechat:read`\n\nLook and online/offline state for the bubble — nothing is stored until the visitor opens the chat.","operationId":"widget_config_api_v1_chat_widget__install_key__config_get","parameters":[{"name":"install_key","in":"path","required":true,"schema":{"type":"string","title":"Install Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Widget Config Api V1 Chat Widget  Install Key  Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["livechat:read"]}],"x-required-scope":"livechat:read"}},"/api/v1/chat/widget/{install_key}/start":{"post":{"tags":["Livechat"],"summary":"Widget Start","description":"**Scope:** `livechat:write`\n\nVisitor opens chat. Returns the conversation + a stable visitor_token\nthe browser should set in localStorage and reuse on subsequent calls.","operationId":"widget_start_api_v1_chat_widget__install_key__start_post","parameters":[{"name":"install_key","in":"path","required":true,"schema":{"type":"string","title":"Install Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Widget Start Api V1 Chat Widget  Install Key  Start Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["livechat:write"]}],"x-required-scope":"livechat:write"}},"/api/v1/chat/widget/{install_key}/identify":{"post":{"tags":["Livechat"],"summary":"Widget Identify","description":"**Scope:** `livechat:write`\n\nThe visitor leaves their name and email. Outside business hours, a chat nobody can answer becomes a ticket.","operationId":"widget_identify_api_v1_chat_widget__install_key__identify_post","parameters":[{"name":"install_key","in":"path","required":true,"schema":{"type":"string","title":"Install Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifyBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Widget Identify Api V1 Chat Widget  Install Key  Identify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["livechat:write"]}],"x-required-scope":"livechat:write"}},"/api/v1/chat/widget/{install_key}/message":{"post":{"tags":["Livechat"],"summary":"Widget Message","operationId":"widget_message_api_v1_chat_widget__install_key__message_post","parameters":[{"name":"install_key","in":"path","required":true,"schema":{"type":"string","title":"Install Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitorMessage"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Widget Message Api V1 Chat Widget  Install Key  Message Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["livechat:write"]}],"x-required-scope":"livechat:write","description":"**Scope:** `livechat:write`"}},"/api/v1/chat/widget/{install_key}/rate":{"post":{"tags":["Livechat"],"summary":"Widget Rate","operationId":"widget_rate_api_v1_chat_widget__install_key__rate_post","parameters":[{"name":"install_key","in":"path","required":true,"schema":{"type":"string","title":"Install Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Widget Rate Api V1 Chat Widget  Install Key  Rate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["livechat:write"]}],"x-required-scope":"livechat:write","description":"**Scope:** `livechat:write`"}},"/api/v1/chat/widget/{install_key}/messages":{"get":{"tags":["Livechat"],"summary":"Widget Messages","description":"**Scope:** `livechat:read`\n\nPolling fallback when WebSocket isn't available. Returns messages\nnewer than after_id (or all). Also tells us the visitor is still on the page.","operationId":"widget_messages_api_v1_chat_widget__install_key__messages_get","parameters":[{"name":"install_key","in":"path","required":true,"schema":{"type":"string","title":"Install Key"}},{"name":"visitor_token","in":"query","required":true,"schema":{"type":"string","maxLength":64,"title":"Visitor Token"}},{"name":"after_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"After Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Widget Messages Api V1 Chat Widget  Install Key  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["livechat:read"]}],"x-required-scope":"livechat:read"}},"/api/v1/chat/widgets":{"get":{"tags":["Livechat"],"summary":"List Widgets","operationId":"list_widgets_api_v1_chat_widgets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Widgets Api V1 Chat Widgets Get"}}}}},"security":[{"ApiKey":["livechat:read"]}],"x-required-scope":"livechat:read","description":"**Scope:** `livechat:read`"},"post":{"tags":["Livechat"],"summary":"Create Widget","operationId":"create_widget_api_v1_chat_widgets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetUpsert"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Widget Api V1 Chat Widgets Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["livechat:write"]}],"x-required-scope":"livechat:write","description":"**Scope:** `livechat:write`"}},"/api/v1/chat/widgets/{widget_id}":{"put":{"tags":["Livechat"],"summary":"Update Widget","operationId":"update_widget_api_v1_chat_widgets__widget_id__put","security":[{"ApiKey":["livechat:write"]}],"parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Widget Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Widget Api V1 Chat Widgets  Widget Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:write","description":"**Scope:** `livechat:write`"},"delete":{"tags":["Livechat"],"summary":"Delete Widget","operationId":"delete_widget_api_v1_chat_widgets__widget_id__delete","security":[{"ApiKey":["livechat:write"]}],"parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Widget Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Widget Api V1 Chat Widgets  Widget Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:write","description":"**Scope:** `livechat:write`"}},"/api/v1/chat/widgets/{widget_id}/embed-snippet":{"get":{"tags":["Livechat"],"summary":"Embed Snippet","description":"**Scope:** `livechat:read`\n\nReturns an HTML snippet the customer drops into the <head> of\ntheir site to install the widget. Frontend `/chat-widget.js` is\nserved from the static bundle.","operationId":"embed_snippet_api_v1_chat_widgets__widget_id__embed_snippet_get","security":[{"ApiKey":["livechat:read"]}],"parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Widget Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Embed Snippet Api V1 Chat Widgets  Widget Id  Embed Snippet Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:read"}},"/api/v1/chat/widgets/{widget_id}/identity-secret":{"get":{"tags":["Livechat"],"summary":"Reveal Identity Secret","operationId":"reveal_identity_secret_api_v1_chat_widgets__widget_id__identity_secret_get","security":[{"ApiKey":["livechat:read"]}],"parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Widget Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reveal Identity Secret Api V1 Chat Widgets  Widget Id  Identity Secret Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:read","description":"**Scope:** `livechat:read`"},"post":{"tags":["Livechat"],"summary":"Set Identity Secret","description":"**Scope:** `livechat:write`\n\nOn: a new secret (any old one stops working). Your server signs each signed-in user's email with it:\nhex HMAC-SHA256(secret, lower-cased email) → data-user-hash on the widget script.","operationId":"set_identity_secret_api_v1_chat_widgets__widget_id__identity_secret_post","security":[{"ApiKey":["livechat:write"]}],"parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Widget Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentitySecretBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Identity Secret Api V1 Chat Widgets  Widget Id  Identity Secret Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:write"}},"/api/v1/chat/conversations":{"get":{"tags":["Livechat"],"summary":"List Conversations","operationId":"list_conversations_api_v1_chat_conversations_get","security":[{"ApiKey":["livechat:read"]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"assignee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Conversations Api V1 Chat Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:read","description":"**Scope:** `livechat:read`"}},"/api/v1/chat/conversations/{conv_id}":{"get":{"tags":["Livechat"],"summary":"Get Conversation","operationId":"get_conversation_api_v1_chat_conversations__conv_id__get","security":[{"ApiKey":["livechat:read"]}],"parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Conversation Api V1 Chat Conversations  Conv Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:read","description":"**Scope:** `livechat:read`"}},"/api/v1/chat/conversations/{conv_id}/reply":{"post":{"tags":["Livechat"],"summary":"Agent Reply","operationId":"agent_reply_api_v1_chat_conversations__conv_id__reply_post","security":[{"ApiKey":["livechat:write"]}],"parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conv Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentReply"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Agent Reply Api V1 Chat Conversations  Conv Id  Reply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:write","description":"**Scope:** `livechat:write`"}},"/api/v1/chat/conversations/{conv_id}/assign":{"post":{"tags":["Livechat"],"summary":"Assign","operationId":"assign_api_v1_chat_conversations__conv_id__assign_post","security":[{"ApiKey":["livechat:write"]}],"parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conv Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Assign Api V1 Chat Conversations  Conv Id  Assign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:write","description":"**Scope:** `livechat:write`"}},"/api/v1/chat/conversations/{conv_id}/status":{"post":{"tags":["Livechat"],"summary":"Change Status","operationId":"change_status_api_v1_chat_conversations__conv_id__status_post","security":[{"ApiKey":["livechat:write"]}],"parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conv Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Change Status Api V1 Chat Conversations  Conv Id  Status Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:write","description":"**Scope:** `livechat:write`"}},"/api/v1/chat/conversations/{conv_id}/promote-to-ticket":{"post":{"tags":["Livechat"],"summary":"Promote To Ticket","operationId":"promote_to_ticket_api_v1_chat_conversations__conv_id__promote_to_ticket_post","security":[{"ApiKey":["livechat:write"]}],"parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conv Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Promote To Ticket Api V1 Chat Conversations  Conv Id  Promote To Ticket Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:write","description":"**Scope:** `livechat:write`"}},"/api/v1/chat/stats":{"get":{"tags":["Livechat"],"summary":"Stats","operationId":"stats_api_v1_chat_stats_get","security":[{"ApiKey":["livechat:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":180,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stats Api V1 Chat Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"livechat:read","description":"**Scope:** `livechat:read`"}},"/api/v1/developers/events/sample":{"get":{"tags":["Webhooks"],"summary":"Sample Events","description":"**Scope:** `webhooks:read`\n\nNewest real events of this type in the workspace, exactly as a webhook would deliver them (no made-up data;\nempty when nothing has happened yet).","operationId":"sample_events_api_v1_developers_events_sample_get","security":[{"ApiKey":["webhooks:read"]}],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","maxLength":60,"title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"default":3,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{},"title":"Response Sample Events Api V1 Developers Events Sample Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"webhooks:read"}},"/api/v1/custom-objects":{"get":{"tags":["Custom Objects"],"summary":"List Object Types","description":"**Scope:** `custom_objects:read`\n\nList all active custom object types for the current org.","operationId":"list_object_types_api_v1_custom_objects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ObjectTypeWithCountsResponse"},"type":"array","title":"Response List Object Types Api V1 Custom Objects Get"}}}}},"security":[{"ApiKey":["custom_objects:read"]}],"x-required-scope":"custom_objects:read"},"post":{"tags":["Custom Objects"],"summary":"Create Object Type","description":"**Scope:** `custom_objects:write`\n\nCreate a new custom object type.","operationId":"create_object_type_api_v1_custom_objects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectTypeCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["custom_objects:write"]}],"x-required-scope":"custom_objects:write"}},"/api/v1/custom-objects/{object_id}":{"get":{"tags":["Custom Objects"],"summary":"Get Object Type","description":"**Scope:** `custom_objects:read`\n\nGet a single object type with its field schema.","operationId":"get_object_type_api_v1_custom_objects__object_id__get","security":[{"ApiKey":["custom_objects:read"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectTypeWithFieldsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:read"},"patch":{"tags":["Custom Objects"],"summary":"Update Object Type","description":"**Scope:** `custom_objects:write`\n\nUpdate an object type's metadata.","operationId":"update_object_type_api_v1_custom_objects__object_id__patch","security":[{"ApiKey":["custom_objects:write"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:write"},"delete":{"tags":["Custom Objects"],"summary":"Delete Object Type","description":"**Scope:** `custom_objects:write`\n\nSoft-delete an object type (marks is_active=False).","operationId":"delete_object_type_api_v1_custom_objects__object_id__delete","security":[{"ApiKey":["custom_objects:write"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:write"}},"/api/v1/custom-objects/{object_id}/fields":{"post":{"tags":["Custom Objects"],"summary":"Add Field","description":"**Scope:** `custom_objects:write`\n\nAdd a new field to an object type's schema.","operationId":"add_field_api_v1_custom_objects__object_id__fields_post","security":[{"ApiKey":["custom_objects:write"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:write"}},"/api/v1/custom-objects/{object_id}/fields/{field_id}":{"patch":{"tags":["Custom Objects"],"summary":"Update Field","description":"**Scope:** `custom_objects:write`\n\nUpdate a field's properties.","operationId":"update_field_api_v1_custom_objects__object_id__fields__field_id__patch","security":[{"ApiKey":["custom_objects:write"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}},{"name":"field_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Field Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:write"},"delete":{"tags":["Custom Objects"],"summary":"Delete Field","description":"**Scope:** `custom_objects:write`\n\nRemove a field from an object type's schema.","operationId":"delete_field_api_v1_custom_objects__object_id__fields__field_id__delete","security":[{"ApiKey":["custom_objects:write"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}},{"name":"field_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Field Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:write"}},"/api/v1/custom-objects/{object_id}/records":{"get":{"tags":["Custom Objects"],"summary":"List Records","description":"**Scope:** `custom_objects:read`\n\nList records for a custom object with optional search and pagination.","operationId":"list_records_api_v1_custom_objects__object_id__records_get","security":[{"ApiKey":["custom_objects:read"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full-text search across record data","title":"Search"},"description":"Full-text search across record data"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRecords"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:read"},"post":{"tags":["Custom Objects"],"summary":"Create Record","description":"**Scope:** `custom_objects:write`\n\nCreate a new record for a custom object.","operationId":"create_record_api_v1_custom_objects__object_id__records_post","security":[{"ApiKey":["custom_objects:write"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:write"}},"/api/v1/custom-objects/{object_id}/records/bulk-import":{"post":{"tags":["Custom Objects"],"summary":"Bulk Import Records","description":"**Scope:** `custom_objects:write`\n\nBulk import records from a JSON array of dicts (e.g. parsed CSV rows).","operationId":"bulk_import_records_api_v1_custom_objects__object_id__records_bulk_import_post","security":[{"ApiKey":["custom_objects:write"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:write"}},"/api/v1/custom-objects/{object_id}/records/{record_id}":{"get":{"tags":["Custom Objects"],"summary":"Get Record","description":"**Scope:** `custom_objects:read`\n\nGet a single record by ID.","operationId":"get_record_api_v1_custom_objects__object_id__records__record_id__get","security":[{"ApiKey":["custom_objects:read"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:read"},"patch":{"tags":["Custom Objects"],"summary":"Update Record","description":"**Scope:** `custom_objects:write`\n\nUpdate (merge-patch) a record's data payload.","operationId":"update_record_api_v1_custom_objects__object_id__records__record_id__patch","security":[{"ApiKey":["custom_objects:write"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:write"},"delete":{"tags":["Custom Objects"],"summary":"Delete Record","description":"**Scope:** `custom_objects:write`\n\nDelete a record permanently.","operationId":"delete_record_api_v1_custom_objects__object_id__records__record_id__delete","security":[{"ApiKey":["custom_objects:write"]}],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Object Id"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"custom_objects:write"}},"/api/v1/crm/contacts/{contact_id}/memory":{"get":{"tags":["Contacts"],"summary":"Get Memory","operationId":"get_memory_api_v1_crm_contacts__contact_id__memory_get","security":[{"ApiKey":["contacts:read"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Memory Api V1 Crm Contacts  Contact Id  Memory Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:read","description":"**Scope:** `contacts:read`"},"post":{"tags":["Contacts"],"summary":"Add Fact","operationId":"add_fact_api_v1_crm_contacts__contact_id__memory_post","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Add Fact Api V1 Crm Contacts  Contact Id  Memory Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"},"delete":{"tags":["Contacts"],"summary":"Forget All","description":"**Scope:** `contacts:write`\n\nForget everything the agents remember about this contact (their records and messages stay).","operationId":"forget_all_api_v1_crm_contacts__contact_id__memory_delete","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Forget All Api V1 Crm Contacts  Contact Id  Memory Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write"}},"/api/v1/crm/contacts/{contact_id}/memory/{fact_id}":{"patch":{"tags":["Contacts"],"summary":"Edit Fact","operationId":"edit_fact_api_v1_crm_contacts__contact_id__memory__fact_id__patch","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}},{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Edit Fact Api V1 Crm Contacts  Contact Id  Memory  Fact Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"},"delete":{"tags":["Contacts"],"summary":"Delete Fact","operationId":"delete_fact_api_v1_crm_contacts__contact_id__memory__fact_id__delete","security":[{"ApiKey":["contacts:write"]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}},{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Delete Fact Api V1 Crm Contacts  Contact Id  Memory  Fact Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"contacts:write","description":"**Scope:** `contacts:write`"}},"/api/v1/webhooks/stores/shopify":{"post":{"tags":["Webhooks"],"summary":"Shopify Webhook","operationId":"shopify_webhook_api_v1_webhooks_stores_shopify_post","parameters":[{"name":"x-shopify-hmac-sha256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Hmac-Sha256"}},{"name":"x-shopify-topic","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Topic"}},{"name":"x-shopify-shop-domain","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Shop-Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write","description":"**Scope:** `webhooks:write`"}},"/api/v1/webhooks/stores/shopify/gdpr/{topic}":{"post":{"tags":["Webhooks"],"summary":"Shopify Gdpr","description":"**Scope:** `webhooks:write`\n\nMandatory privacy webhooks: customers/data_request, customers/redact, shop/redact.","operationId":"shopify_gdpr_api_v1_webhooks_stores_shopify_gdpr__topic__post","parameters":[{"name":"topic","in":"path","required":true,"schema":{"type":"string","title":"Topic"}},{"name":"x-shopify-hmac-sha256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Hmac-Sha256"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/api/v1/webhooks/stores/woocommerce/{store_id}":{"post":{"tags":["Webhooks"],"summary":"Woo Webhook","operationId":"woo_webhook_api_v1_webhooks_stores_woocommerce__store_id__post","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Store Id"}},{"name":"x-wc-webhook-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Wc-Webhook-Signature"}},{"name":"x-wc-webhook-topic","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Wc-Webhook-Topic"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["webhooks:write"]}],"x-required-scope":"webhooks:write","description":"**Scope:** `webhooks:write`"}},"/api/v1/payments/account":{"get":{"tags":["Payments"],"summary":"Account","operationId":"account_api_v1_payments_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["payments:read"]}],"x-required-scope":"payments:read","description":"**Scope:** `payments:read`"}},"/api/v1/payments/account/stripe":{"post":{"tags":["Payments"],"summary":"Connect Stripe","operationId":"connect_stripe_api_v1_payments_account_stripe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["payments:write"]}],"x-required-scope":"payments:write","description":"**Scope:** `payments:write`"}},"/api/v1/payments/invoices":{"get":{"tags":["Payments"],"summary":"List Invoices","operationId":"list_invoices_api_v1_payments_invoices_get","security":[{"ApiKey":["payments:read"]}],"parameters":[{"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"}}}}},"x-required-scope":"payments:read","description":"**Scope:** `payments:read`"},"post":{"tags":["Payments"],"summary":"Create Invoice","operationId":"create_invoice_api_v1_payments_invoices_post","security":[{"ApiKey":["payments:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"payments:write","description":"**Scope:** `payments:write`"}},"/api/v1/payments/invoices/{invoice_id}/send":{"post":{"tags":["Payments"],"summary":"Send Invoice","operationId":"send_invoice_api_v1_payments_invoices__invoice_id__send_post","security":[{"ApiKey":["payments:write"]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__hubs__commerce__api__payments_router__SendIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"payments:write","description":"**Scope:** `payments:write`"}},"/api/v1/payments/invoices/{invoice_id}":{"put":{"tags":["Payments"],"summary":"Edit Invoice","description":"**Scope:** `payments:write`\n\nChange a draft invoice (once sent, void it and create a new one).","operationId":"edit_invoice_api_v1_payments_invoices__invoice_id__put","security":[{"ApiKey":["payments:write"]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"payments:write"}},"/api/v1/payments/invoices/{invoice_id}/pdf":{"get":{"tags":["Payments"],"summary":"Invoice Pdf","operationId":"invoice_pdf_api_v1_payments_invoices__invoice_id__pdf_get","security":[{"ApiKey":["payments:read"]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"payments:read","description":"**Scope:** `payments:read`"}},"/api/v1/payments/settings":{"get":{"tags":["Payments"],"summary":"Get Payment Settings","operationId":"get_payment_settings_api_v1_payments_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["payments:read"]}],"x-required-scope":"payments:read","description":"**Scope:** `payments:read`"},"put":{"tags":["Payments"],"summary":"Put Payment Settings","operationId":"put_payment_settings_api_v1_payments_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["payments:write"]}],"x-required-scope":"payments:write","description":"**Scope:** `payments:write`"}},"/api/v1/payments/invoices/{invoice_id}/void":{"post":{"tags":["Payments"],"summary":"Void Invoice","operationId":"void_invoice_api_v1_payments_invoices__invoice_id__void_post","security":[{"ApiKey":["payments:write"]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"payments:write","description":"**Scope:** `payments:write`"}},"/api/v1/payments/links":{"get":{"tags":["Payments"],"summary":"List Links","operationId":"list_links_api_v1_payments_links_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["payments:read"]}],"x-required-scope":"payments:read","description":"**Scope:** `payments:read`"},"post":{"tags":["Payments"],"summary":"Create Link","operationId":"create_link_api_v1_payments_links_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["payments:write"]}],"x-required-scope":"payments:write","description":"**Scope:** `payments:write`"}},"/api/v1/payments/links/{link_id}":{"patch":{"tags":["Payments"],"summary":"Update Link","operationId":"update_link_api_v1_payments_links__link_id__patch","security":[{"ApiKey":["payments:write"]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"payments:write","description":"**Scope:** `payments:write`"}},"/api/v1/payments/links/{link_id}/text":{"post":{"tags":["Payments"],"summary":"Text Link","description":"**Scope:** `payments:write`\n\nText-to-pay: send a payment link by SMS.","operationId":"text_link_api_v1_payments_links__link_id__text_post","security":[{"ApiKey":["payments:write"]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextLinkIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"payments:write"}},"/api/v1/payments/payments":{"get":{"tags":["Payments"],"summary":"List Payments","operationId":"list_payments_api_v1_payments_payments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["payments:read"]}],"x-required-scope":"payments:read","description":"**Scope:** `payments:read`"}},"/api/v1/payments/subscriptions":{"get":{"tags":["Payments"],"summary":"List Subscriptions","operationId":"list_subscriptions_api_v1_payments_subscriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["payments:read"]}],"x-required-scope":"payments:read","description":"**Scope:** `payments:read`"}},"/api/v1/payments/subscriptions/{sub_id}/cancel":{"post":{"tags":["Payments"],"summary":"Cancel Subscription","operationId":"cancel_subscription_api_v1_payments_subscriptions__sub_id__cancel_post","security":[{"ApiKey":["payments:write"]}],"parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"payments:write","description":"**Scope:** `payments:write`"}},"/api/v1/payments/webhooks/stripe":{"post":{"tags":["Payments"],"summary":"Stripe Webhook","description":"**Scope:** `payments:write`\n\nStripe Connect webhook ('Events on connected accounts').","operationId":"stripe_webhook_api_v1_payments_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["payments:write"]}],"x-required-scope":"payments:write"}},"/api/v1/payments/webhooks/razorpay":{"post":{"tags":["Payments"],"summary":"Razorpay Webhook","operationId":"razorpay_webhook_api_v1_payments_webhooks_razorpay_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["payments:write"]}],"x-required-scope":"payments:write","description":"**Scope:** `payments:write`"}},"/api/v1/booking/pages":{"get":{"tags":["Booking"],"summary":"List Pages","operationId":"list_pages_api_v1_booking_pages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["booking:read"]}],"x-required-scope":"booking:read","description":"**Scope:** `booking:read`"},"post":{"tags":["Booking"],"summary":"Create Page","operationId":"create_page_api_v1_booking_pages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["booking:write"]}],"x-required-scope":"booking:write","description":"**Scope:** `booking:write`"}},"/api/v1/booking/pages/{page_id}":{"put":{"tags":["Booking"],"summary":"Update Page","operationId":"update_page_api_v1_booking_pages__page_id__put","security":[{"ApiKey":["booking:write"]}],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"booking:write","description":"**Scope:** `booking:write`"},"delete":{"tags":["Booking"],"summary":"Delete Page","operationId":"delete_page_api_v1_booking_pages__page_id__delete","security":[{"ApiKey":["booking:write"]}],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"booking:write","description":"**Scope:** `booking:write`"}},"/api/v1/booking/bookings":{"get":{"tags":["Booking"],"summary":"List Bookings","operationId":"list_bookings_api_v1_booking_bookings_get","security":[{"ApiKey":["booking:read"]}],"parameters":[{"name":"upcoming","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Upcoming"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"booking:read","description":"**Scope:** `booking:read`"}},"/api/v1/booking/bookings/{booking_id}/cancel":{"post":{"tags":["Booking"],"summary":"Cancel Booking","operationId":"cancel_booking_api_v1_booking_bookings__booking_id__cancel_post","security":[{"ApiKey":["booking:write"]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"booking:write","description":"**Scope:** `booking:write`"}},"/api/v1/booking/team":{"get":{"tags":["Booking"],"summary":"Team","description":"**Scope:** `booking:read`\n\nWho can host meetings, and whether their calendar is connected.","operationId":"team_api_v1_booking_team_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["booking:read"]}],"x-required-scope":"booking:read"}},"/api/v1/booking/calendars":{"get":{"tags":["Booking"],"summary":"My Calendars","operationId":"my_calendars_api_v1_booking_calendars_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":["booking:read"]}],"x-required-scope":"booking:read","description":"**Scope:** `booking:read`"}},"/api/v1/booking/calendars/{provider}/connect":{"get":{"tags":["Booking"],"summary":"Connect Calendar","description":"**Scope:** `booking:read`\n\nmail=true also asks for the mailbox (two-way email sync, P4-03).","operationId":"connect_calendar_api_v1_booking_calendars__provider__connect_get","security":[{"ApiKey":["booking:read"]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"mail","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Mail"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"booking:read"}},"/api/v1/booking/calendars/{provider}/callback":{"get":{"tags":["Booking"],"summary":"Calendar Callback","description":"**Scope:** `booking:read`\n\nOAuth redirect (no session — the signed `state` says whose calendar this is).","operationId":"calendar_callback_api_v1_booking_calendars__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":["booking:read"]}],"x-required-scope":"booking:read"}},"/api/v1/booking/calendars/{connection_id}/sync":{"post":{"tags":["Booking"],"summary":"Sync Now","operationId":"sync_now_api_v1_booking_calendars__connection_id__sync_post","security":[{"ApiKey":["booking:write"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"booking:write","description":"**Scope:** `booking:write`"}},"/api/v1/booking/calendars/{connection_id}":{"delete":{"tags":["Booking"],"summary":"Disconnect Calendar","operationId":"disconnect_calendar_api_v1_booking_calendars__connection_id__delete","security":[{"ApiKey":["booking:write"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"booking:write","description":"**Scope:** `booking:write`"}}},"components":{"schemas":{"AIGenerateV2Request":{"properties":{"description":{"type":"string","title":"Description"},"steps":{"type":"integer","title":"Steps","default":4},"channels":{"items":{"type":"string"},"type":"array","title":"Channels","default":["email"]},"tone":{"type":"string","title":"Tone","default":"professional"}},"type":"object","required":["description"],"title":"AIGenerateV2Request"},"ActivityCreateFlat":{"properties":{"contact_id":{"type":"string","title":"Contact Id"},"type":{"type":"string","title":"Type","default":"note"},"description":{"type":"string","title":"Description"},"deal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Id"}},"type":"object","required":["contact_id","description"],"title":"ActivityCreateFlat"},"ActivityLogCreate":{"properties":{"type":{"type":"string","title":"Type"},"description":{"type":"string","title":"Description"},"deal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Id"}},"type":"object","required":["type","description"],"title":"ActivityLogCreate"},"AgentReply":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"AgentReply"},"ApiImportIn":{"properties":{"provider":{"type":"string","pattern":"^(hubspot|mailchimp|gohighlevel)$","title":"Provider"},"token":{"type":"string","maxLength":500,"minLength":8,"title":"Token"},"location_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Location Id"},"dedupe":{"type":"string","pattern":"^(skip|update)$","title":"Dedupe","default":"skip"},"tag":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tag"},"include_deals":{"type":"boolean","title":"Include Deals","default":true}},"type":"object","required":["provider","token"],"title":"ApiImportIn"},"ApolloSearchRequest":{"properties":{"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"company_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Size"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"page":{"type":"integer","title":"Page","default":1},"per_page":{"type":"integer","title":"Per Page","default":25}},"type":"object","title":"ApolloSearchRequest"},"AssignBody":{"properties":{"agent_user_id":{"type":"string","format":"uuid","title":"Agent User Id"}},"type":"object","required":["agent_user_id"],"title":"AssignBody"},"AudienceSegmentFromTagSchema":{"properties":{"name":{"type":"string","title":"Name"},"tag":{"type":"string","title":"Tag"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","tag"],"title":"AudienceSegmentFromTagSchema","description":"Convenience schema for the 'turn this import into a segment' button."},"AutomationIn":{"properties":{"trigger":{"additionalProperties":true,"type":"object","title":"Trigger"},"throttle_days":{"type":"integer","title":"Throttle Days","default":30},"reminder_days":{"type":"integer","title":"Reminder Days","default":3},"alert_unhappy":{"type":"boolean","title":"Alert Unhappy","default":true},"ticket_unhappy":{"type":"boolean","title":"Ticket Unhappy","default":false},"review_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Url"}},"type":"object","title":"AutomationIn"},"Body_data_deletion_api_v1_webhooks_meta_data_deletion_post":{"properties":{"signed_request":{"type":"string","title":"Signed Request"}},"type":"object","required":["signed_request"],"title":"Body_data_deletion_api_v1_webhooks_meta_data_deletion_post"},"Body_deauthorize_api_v1_webhooks_meta_deauthorize_post":{"properties":{"signed_request":{"type":"string","title":"Signed Request"}},"type":"object","required":["signed_request"],"title":"Body_deauthorize_api_v1_webhooks_meta_deauthorize_post"},"Body_import_contacts_api_v1_crm_contacts_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_contacts_api_v1_crm_contacts_import_post"},"Body_twilio_inbound_api_v1_sms_webhooks_twilio_inbound__org_id__post":{"properties":{"From":{"type":"string","title":"From"},"To":{"type":"string","title":"To"},"Body":{"type":"string","title":"Body","default":""},"MessageSid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Messagesid"}},"type":"object","required":["From","To"],"title":"Body_twilio_inbound_api_v1_sms_webhooks_twilio_inbound__org_id__post"},"Body_twilio_status_api_v1_sms_webhooks_twilio_status__org_id__post":{"properties":{"MessageSid":{"type":"string","title":"Messagesid"},"MessageStatus":{"type":"string","title":"Messagestatus"},"ErrorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"}},"type":"object","required":["MessageSid","MessageStatus"],"title":"Body_twilio_status_api_v1_sms_webhooks_twilio_status__org_id__post"},"Body_upload_api_v1_crm_contacts_imports_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_api_v1_crm_contacts_imports_post"},"Body_upload_ephemeral_recipients_api_v1_email_campaigns__campaign_id__ephemeral_recipients_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_ephemeral_recipients_api_v1_email_campaigns__campaign_id__ephemeral_recipients_post"},"Body_upload_form_file_api_v1_lead_gen_forms_upload__embed_key__post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_form_file_api_v1_lead_gen_forms_upload__embed_key__post"},"BroadcastCreate":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"message":{"type":"string","title":"Message"},"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Segment Id"},"mms_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Mms Url"},"send_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Send At"}},"type":"object","required":["name","message"],"title":"BroadcastCreate"},"BroadcastEstimate":{"properties":{"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Segment Id"},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"BroadcastEstimate"},"BulkEnrichIn":{"properties":{"contact_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Contact Ids"}},"type":"object","required":["contact_ids"],"title":"BulkEnrichIn"},"BulkEnrollRequest":{"properties":{"contact_ids":{"items":{"type":"string"},"type":"array","title":"Contact Ids"},"allow_concurrent":{"type":"boolean","title":"Allow Concurrent","default":false}},"type":"object","required":["contact_ids"],"title":"BulkEnrollRequest"},"BulkImportBody":{"properties":{"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"BulkImportBody"},"BulkImportResult":{"properties":{"imported":{"type":"integer","title":"Imported"}},"type":"object","required":["imported"],"title":"BulkImportResult"},"BulkSubscriberUpsert":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/SubscriberUpsert"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"BulkSubscriberUpsert"},"BulkTagPayload":{"properties":{"contact_ids":{"items":{"type":"string"},"type":"array","title":"Contact Ids"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"action":{"type":"string","title":"Action","default":"add"}},"type":"object","required":["contact_ids","tags"],"title":"BulkTagPayload"},"BulkVerifyRequest":{"properties":{"emails":{"items":{"type":"string"},"type":"array","title":"Emails"}},"type":"object","required":["emails"],"title":"BulkVerifyRequest"},"CSATBody":{"properties":{"score":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Score"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","required":["score"],"title":"CSATBody"},"CampaignCreateSchema":{"properties":{"name":{"type":"string","title":"Name"},"subject":{"type":"string","title":"Subject"},"body_html":{"type":"string","title":"Body Html","default":"<p>Hello {{first_name}},<br><br>Your message here.</p>"},"preheader":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preheader"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name"},"from_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Email"},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To"},"template_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Key"},"is_ab_test":{"type":"boolean","title":"Is Ab Test","default":false},"ab_test_duration_hours":{"type":"integer","title":"Ab Test Duration Hours","default":4},"subject_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject B"},"body_html_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html B"},"ab_test_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ab Test Config"},"send_time_optimization":{"type":"boolean","title":"Send Time Optimization","default":false},"audience_mode":{"type":"string","title":"Audience Mode","default":"crm"},"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Segment Id"}},"type":"object","required":["name","subject"],"title":"CampaignCreateSchema"},"CampaignScheduleIn":{"properties":{"send_at":{"type":"string","title":"Send At"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["send_at"],"title":"CampaignScheduleIn"},"CampaignSchema":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"subject":{"type":"string","title":"Subject"},"preheader":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preheader"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name"},"from_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Email"},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To"},"template_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Key"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"status":{"type":"string","title":"Status"},"paused_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused Reason"},"recipient_count":{"type":"integer","title":"Recipient Count"},"sent_count":{"type":"integer","title":"Sent Count"},"opened_count":{"type":"integer","title":"Opened Count"},"clicked_count":{"type":"integer","title":"Clicked Count","default":0},"bounced_count":{"type":"integer","title":"Bounced Count","default":0},"is_ab_test":{"type":"boolean","title":"Is Ab Test","default":false},"ab_test_duration_hours":{"type":"integer","title":"Ab Test Duration Hours","default":4},"ab_test_winner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ab Test Winner"},"subject_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject B"},"ab_test_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ab Test Config"},"send_time_optimization":{"type":"boolean","title":"Send Time Optimization","default":false},"audience_mode":{"type":"string","title":"Audience Mode","default":"crm"},"segment_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Segment Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","subject","status","recipient_count","sent_count","opened_count","created_at"],"title":"CampaignSchema"},"CampaignUpdateSchema":{"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"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"is_ab_test":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Ab Test"},"ab_test_duration_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ab Test Duration Hours"},"subject_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject B"},"body_html_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html B"},"ab_test_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ab Test Config"},"send_time_optimization":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Send Time Optimization"}},"type":"object","title":"CampaignUpdateSchema"},"CampaignUpsert":{"properties":{"name":{"type":"string","title":"Name"},"body":{"type":"string","title":"Body"},"sender_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Number"},"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Segment Id"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"}},"type":"object","required":["name","body"],"title":"CampaignUpsert"},"CancelIn":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"CancelIn"},"ChartDataPoint":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"number","title":"Value"}},"type":"object","required":["name","value"],"title":"ChartDataPoint"},"ContactCreateSchema":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"type":"string","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"type":"string","title":"Status","default":"active"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","required":["first_name","email"],"title":"ContactCreateSchema"},"ContactSchema":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"status":{"type":"string","title":"Status"},"lead_score":{"type":"number","title":"Lead Score"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","required":["id","first_name","email","status","lead_score"],"title":"ContactSchema"},"ContactSegmentCreateSchema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rules":{"additionalProperties":true,"type":"object","title":"Rules"}},"type":"object","required":["name","rules"],"title":"ContactSegmentCreateSchema"},"ContactSegmentSchema":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rules":{"additionalProperties":true,"type":"object","title":"Rules"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","rules","created_at"],"title":"ContactSegmentSchema"},"ContactUpdateSchema":{"properties":{"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"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"ContactUpdateSchema","description":"Partial update — only the fields sent change (P5-22: the API and Zapier update one field at a time)."},"ConvFormStepPayload":{"properties":{"embed_key":{"type":"string","title":"Embed Key"},"answers":{"additionalProperties":{"type":"string"},"type":"object","title":"Answers","default":{}}},"type":"object","required":["embed_key"],"title":"ConvFormStepPayload"},"ConversationUpdate":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"assignee_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee Id"}},"type":"object","title":"ConversationUpdate"},"CreateListRequest":{"properties":{"name":{"type":"string","title":"Name"},"prospects":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Prospects","default":[]}},"type":"object","required":["name"],"title":"CreateListRequest"},"CreateVariantPayload":{"properties":{"name":{"type":"string","title":"Name"},"fields":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Fields","default":[]},"ab_traffic_split":{"type":"integer","title":"Ab Traffic Split","default":50}},"type":"object","required":["name"],"title":"CreateVariantPayload"},"CrossChannelReportIn":{"properties":{"name":{"type":"string","title":"Name","default":"Cross-channel performance"},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients","default":[]},"frequency":{"type":"string","title":"Frequency","default":"weekly"},"channels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Channels"},"days":{"type":"integer","title":"Days","default":30},"hour_utc":{"type":"integer","title":"Hour Utc","default":8},"day_of_week":{"type":"integer","title":"Day Of Week","default":1},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","title":"CrossChannelReportIn"},"CustomFieldCreate":{"properties":{"object_type":{"type":"string","title":"Object Type"},"field_name":{"type":"string","title":"Field Name"},"field_label":{"type":"string","title":"Field Label"},"field_type":{"type":"string","title":"Field Type"},"is_required":{"type":"boolean","title":"Is Required","default":false},"options":{"items":{},"type":"array","title":"Options","default":[]},"order_index":{"type":"integer","title":"Order Index","default":0}},"type":"object","required":["object_type","field_name","field_label","field_type"],"title":"CustomFieldCreate"},"CustomFieldResponse":{"properties":{"object_type":{"type":"string","title":"Object Type"},"field_name":{"type":"string","title":"Field Name"},"field_label":{"type":"string","title":"Field Label"},"field_type":{"type":"string","title":"Field Type"},"is_required":{"type":"boolean","title":"Is Required","default":false},"options":{"items":{},"type":"array","title":"Options","default":[]},"order_index":{"type":"integer","title":"Order Index","default":0},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["object_type","field_name","field_label","field_type","id"],"title":"CustomFieldResponse"},"CustomMetricSpec":{"properties":{"source":{"type":"string","title":"Source"},"aggregate":{"type":"string","title":"Aggregate","default":"count"},"column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column","default":"id"},"filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter"}},"type":"object","required":["source"],"title":"CustomMetricSpec"},"CustomReportRequest":{"properties":{"metrics":{"items":{"type":"string"},"type":"array","title":"Metrics"},"date_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"},"date_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group By","default":"day"},"chart_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chart Type","default":"line"},"custom_definitions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Definitions"}},"type":"object","required":["metrics"],"title":"CustomReportRequest"},"DashboardLayoutUpdate":{"properties":{"layout_name":{"type":"string","title":"Layout Name"},"layout_config":{"items":{},"type":"array","title":"Layout Config"}},"type":"object","required":["layout_name","layout_config"],"title":"DashboardLayoutUpdate"},"DashboardMetrics":{"properties":{"total_deals":{"type":"integer","title":"Total Deals"},"total_pipeline_value":{"type":"number","title":"Total Pipeline Value"},"active_contacts":{"type":"integer","title":"Active Contacts"},"total_campaigns_sent":{"type":"integer","title":"Total Campaigns Sent"},"mrr_trend":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Mrr Trend","default":[]},"channel_data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Channel Data","default":[]},"funnel_steps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Funnel Steps","default":[]},"attribution_data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Attribution Data","default":[]},"cohort_data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Cohort Data","default":[]}},"type":"object","required":["total_deals","total_pipeline_value","active_contacts","total_campaigns_sent"],"title":"DashboardMetrics"},"DealCreateSchema":{"properties":{"title":{"type":"string","title":"Title"},"value":{"type":"number","title":"Value","default":0},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"pipeline_id":{"type":"string","title":"Pipeline Id","default":"default"},"probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Probability"},"contact_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Contact Id"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},"type":"object","required":["title"],"title":"DealCreateSchema"},"DealSchema":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"title":{"type":"string","title":"Title"},"value":{"type":"number","title":"Value"},"currency":{"type":"string","title":"Currency"},"stage":{"type":"string","title":"Stage"},"probability":{"type":"integer","title":"Probability"},"close_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Close Reason"},"close_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Close Notes"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id"},"contact_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Contact Id"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Assigned To"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"stage_entered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stage Entered At"},"days_in_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days In Stage"},"rotting":{"type":"boolean","title":"Rotting","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","title","value","currency","stage","probability","created_at"],"title":"DealSchema"},"DealUpdateSchema":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"close_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Close Reason"},"close_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Close Notes"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id"},"probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Probability"}},"type":"object","title":"DealUpdateSchema"},"EmailEvent":{"properties":{"email":{"type":"string","title":"Email"},"event":{"type":"string","title":"Event"},"reason":{"type":"string","title":"Reason"},"sg_message_id":{"type":"string","title":"Sg Message Id"},"timestamp":{"type":"integer","title":"Timestamp"}},"type":"object","required":["email","event"],"title":"EmailEvent"},"EmailSendIn":{"properties":{"to":{"type":"string","format":"email","title":"To"},"subject":{"type":"string","maxLength":300,"minLength":1,"title":"Subject"},"body":{"type":"string","maxLength":50000,"title":"Body","default":""}},"type":"object","required":["to","subject"],"title":"EmailSendIn"},"EmailVerifyRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"EmailVerifyRequest"},"EnhancedPixelPayload":{"properties":{"visitor_id":{"type":"string","title":"Visitor Id"},"page_url":{"type":"string","title":"Page Url"},"page_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Title"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"screen_resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screen Resolution"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"time_on_page_secs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time On Page Secs","default":0},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"}},"type":"object","required":["visitor_id","page_url"],"title":"EnhancedPixelPayload"},"EnrollRequest":{"properties":{"contact_id":{"type":"string","title":"Contact Id"},"allow_concurrent":{"type":"boolean","title":"Allow Concurrent","default":false}},"type":"object","required":["contact_id"],"title":"EnrollRequest"},"FactIn":{"properties":{"text":{"type":"string","maxLength":500,"minLength":3,"title":"Text"},"kind":{"type":"string","title":"Kind","default":"fact"}},"type":"object","required":["text"],"title":"FactIn"},"FactPatch":{"properties":{"text":{"anyOf":[{"type":"string","maxLength":500,"minLength":3},{"type":"null"}],"title":"Text"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"}},"type":"object","title":"FactPatch"},"FieldCreate":{"properties":{"field_label":{"type":"string","title":"Field Label"},"field_key":{"type":"string","title":"Field Key"},"field_type":{"type":"string","title":"Field Type","description":"One of: text, number, date, boolean, select, multi_select, url, email, phone, long_text, file"},"is_required":{"type":"boolean","title":"Is Required","default":false},"is_searchable":{"type":"boolean","title":"Is Searchable","default":true},"options":{"items":{},"type":"array","title":"Options","default":[]},"sort_order":{"type":"integer","title":"Sort Order","default":0},"reference_object_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reference Object Id"}},"type":"object","required":["field_label","field_key","field_type"],"title":"FieldCreate"},"FieldResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"object_id":{"type":"string","format":"uuid","title":"Object Id"},"field_key":{"type":"string","title":"Field Key"},"field_label":{"type":"string","title":"Field Label"},"field_type":{"type":"string","title":"Field Type"},"options":{"items":{},"type":"array","title":"Options","default":[]},"is_required":{"type":"boolean","title":"Is Required"},"is_searchable":{"type":"boolean","title":"Is Searchable"},"sort_order":{"type":"integer","title":"Sort Order"},"reference_object_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reference Object Id"},"created_at":{"title":"Created At"}},"type":"object","required":["id","object_id","field_key","field_label","field_type","is_required","is_searchable","sort_order","created_at"],"title":"FieldResponse"},"FieldSchema":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":false},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"order":{"type":"integer","title":"Order","default":0}},"additionalProperties":true,"type":"object","required":["id","type","label"],"title":"FieldSchema"},"FieldUpdate":{"properties":{"field_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Label"},"field_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Key"},"field_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Type"},"is_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Required"},"is_searchable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Searchable"},"options":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Options"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"FieldUpdate"},"FormCreateSchema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"fields":{"items":{"$ref":"#/components/schemas/FieldSchema"},"type":"array","title":"Fields","default":[]},"settings":{"$ref":"#/components/schemas/FormSettingsSchema","default":{"success_message":"Thank you for submitting!","crm_sync":true}},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["name"],"title":"FormCreateSchema"},"FormGenPayload":{"properties":{"goal":{"type":"string","title":"Goal"},"audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience"},"max_questions":{"type":"integer","title":"Max Questions","default":6},"is_conversational":{"type":"boolean","title":"Is Conversational","default":false}},"type":"object","required":["goal"],"title":"FormGenPayload"},"FormSettingsSchema":{"properties":{"success_message":{"type":"string","title":"Success Message","default":"Thank you for submitting!"},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"},"notify_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notify Email"},"crm_sync":{"type":"boolean","title":"Crm Sync","default":true},"crm_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Tag"}},"additionalProperties":true,"type":"object","title":"FormSettingsSchema"},"FormUpdateSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/FieldSchema"},"type":"array"},{"type":"null"}],"title":"Fields"},"settings":{"anyOf":[{"$ref":"#/components/schemas/FormSettingsSchema"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"FormUpdateSchema"},"GoogleLocationIn":{"properties":{"location_id":{"type":"string","title":"Location Id"},"title":{"type":"string","title":"Title"},"review_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Url"}},"type":"object","required":["location_id","title"],"title":"GoogleLocationIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IdentifyBody":{"properties":{"visitor_token":{"type":"string","maxLength":64,"title":"Visitor Token"},"visitor_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Visitor Name"},"visitor_email":{"type":"string","maxLength":320,"title":"Visitor Email"}},"type":"object","required":["visitor_token","visitor_email"],"title":"IdentifyBody"},"IdentifyPayload":{"properties":{"org_id":{"type":"string","title":"Org Id"},"visitor_id":{"type":"string","title":"Visitor Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"traits":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Traits"}},"type":"object","required":["org_id","visitor_id"],"title":"IdentifyPayload"},"IdentitySecretBody":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"IdentitySecretBody"},"ImportIn":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes","default":[]},"edges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Edges","default":[]}},"type":"object","title":"ImportIn"},"InstallIn":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"template_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Key"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"InstallIn"},"InstantiateTemplateRequest":{"properties":{"template_key":{"type":"string","title":"Template Key"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["template_key"],"title":"InstantiateTemplateRequest"},"InvitationsCreate":{"properties":{"contact_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Contact Ids"},"channel":{"type":"string","title":"Channel","description":"email | sms | manual_link","default":"email"}},"type":"object","required":["contact_ids"],"title":"InvitationsCreate"},"InvoiceIn":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"customer_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Customer Email"},"customer_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Customer Name"},"customer_phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Customer Phone"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"line_items":{"items":{"$ref":"#/components/schemas/LineItem"},"type":"array","maxItems":100,"minItems":1,"title":"Line Items"},"tax_rate_pct":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Tax Rate Pct","default":0},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"deposit_pct":{"anyOf":[{"type":"integer","maximum":99.0,"minimum":1.0},{"type":"null"}],"title":"Deposit Pct"}},"type":"object","required":["title","currency","line_items"],"title":"InvoiceIn"},"InvoiceSettingsIn":{"properties":{"invoice_reminders":{"type":"boolean","title":"Invoice Reminders"}},"type":"object","required":["invoice_reminders"],"title":"InvoiceSettingsIn"},"ItemCreate":{"properties":{"source_id":{"type":"string","format":"uuid","title":"Source Id"},"rating":{"type":"number","maximum":5.0,"minimum":0.0,"title":"Rating"},"body":{"type":"string","title":"Body"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"review_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Url"},"posted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Posted At"}},"type":"object","required":["source_id","rating","body"],"title":"ItemCreate"},"KbArticleUpsert":{"properties":{"title":{"type":"string","maxLength":300,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":100000,"title":"Body","default":""},"category":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Category"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"status":{"type":"string","title":"Status","default":"draft"},"visibility":{"type":"string","title":"Visibility","default":"public"}},"type":"object","required":["title"],"title":"KbArticleUpsert"},"KbSettingsIn":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Title"},"ai_answers":{"type":"boolean","title":"Ai Answers","default":true},"contact_form":{"type":"boolean","title":"Contact Form","default":true}},"type":"object","title":"KbSettingsIn"},"LeadImportPayload":{"properties":{"prospects":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Prospects","default":[]},"leads":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Leads","default":[]},"list_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"List Id"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]}},"type":"object","title":"LeadImportPayload"},"LeadSearchQuery":{"properties":{"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"company_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Size"},"keywords":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Keywords"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"page":{"type":"integer","title":"Page","default":1},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"}},"type":"object","title":"LeadSearchQuery"},"LineItem":{"properties":{"description":{"type":"string","maxLength":250,"minLength":1,"title":"Description"},"quantity":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Quantity","default":1},"unit_amount_cents":{"type":"integer","maximum":10000000000.0,"minimum":0.0,"title":"Unit Amount Cents"}},"type":"object","required":["description","unit_amount_cents"],"title":"LineItem"},"LineItemCreate":{"properties":{"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"quantity":{"type":"number","title":"Quantity","default":1.0},"unit_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unit Price"},"discount_pct":{"type":"number","title":"Discount Pct","default":0.0}},"type":"object","title":"LineItemCreate"},"LinkIn":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"amount_cents":{"type":"integer","maximum":10000000000.0,"exclusiveMinimum":0.0,"title":"Amount Cents"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"interval":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval"}},"type":"object","required":["title","amount_cents","currency"],"title":"LinkIn"},"LinkUpdate":{"properties":{"active":{"type":"boolean","title":"Active"}},"type":"object","required":["active"],"title":"LinkUpdate"},"MacroUpsert":{"properties":{"name":{"type":"string","title":"Name"},"body_template":{"type":"string","title":"Body Template"},"actions":{"additionalProperties":true,"type":"object","title":"Actions"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","body_template"],"title":"MacroUpsert"},"MessageCreate":{"properties":{"body":{"type":"string","title":"Body"},"is_internal":{"type":"boolean","title":"Is Internal","default":false},"attachments":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Attachments"}},"type":"object","required":["body"],"title":"MessageCreate"},"ObjectTypeCreate":{"properties":{"label_singular":{"type":"string","title":"Label Singular"},"label_plural":{"type":"string","title":"Label Plural"},"slug":{"type":"string","title":"Slug"},"icon":{"type":"string","title":"Icon","default":"database"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"primary_field":{"type":"string","title":"Primary Field","default":"name"}},"type":"object","required":["label_singular","label_plural","slug"],"title":"ObjectTypeCreate"},"ObjectTypeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"slug":{"type":"string","title":"Slug"},"label_singular":{"type":"string","title":"Label Singular"},"label_plural":{"type":"string","title":"Label Plural"},"icon":{"type":"string","title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"primary_field":{"type":"string","title":"Primary Field"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"title":"Created At"},"updated_at":{"title":"Updated At"}},"type":"object","required":["id","org_id","slug","label_singular","label_plural","icon","primary_field","is_active","created_at","updated_at"],"title":"ObjectTypeResponse"},"ObjectTypeUpdate":{"properties":{"label_singular":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Singular"},"label_plural":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Plural"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"primary_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Field"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"ObjectTypeUpdate"},"ObjectTypeWithCountsResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"slug":{"type":"string","title":"Slug"},"label_singular":{"type":"string","title":"Label Singular"},"label_plural":{"type":"string","title":"Label Plural"},"icon":{"type":"string","title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"primary_field":{"type":"string","title":"Primary Field"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"title":"Created At"},"updated_at":{"title":"Updated At"},"field_count":{"type":"integer","title":"Field Count","default":0},"record_count":{"type":"integer","title":"Record Count","default":0}},"type":"object","required":["id","org_id","slug","label_singular","label_plural","icon","primary_field","is_active","created_at","updated_at"],"title":"ObjectTypeWithCountsResponse"},"ObjectTypeWithFieldsResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"slug":{"type":"string","title":"Slug"},"label_singular":{"type":"string","title":"Label Singular"},"label_plural":{"type":"string","title":"Label Plural"},"icon":{"type":"string","title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"primary_field":{"type":"string","title":"Primary Field"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"title":"Created At"},"updated_at":{"title":"Updated At"},"fields":{"items":{"$ref":"#/components/schemas/FieldResponse"},"type":"array","title":"Fields","default":[]}},"type":"object","required":["id","org_id","slug","label_singular","label_plural","icon","primary_field","is_active","created_at","updated_at"],"title":"ObjectTypeWithFieldsResponse"},"OnboardIn":{"properties":{"return_url":{"type":"string","title":"Return Url"}},"type":"object","required":["return_url"],"title":"OnboardIn"},"PDFExportRequest":{"properties":{"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id"},"name":{"type":"string","title":"Name","default":"Custom Report"},"widgets":{"items":{},"type":"array","title":"Widgets","default":[]},"date_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Range","default":"last_30_days"}},"type":"object","title":"PDFExportRequest"},"PageIn":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"duration_minutes":{"anyOf":[{"type":"integer","maximum":480.0,"minimum":5.0},{"type":"null"}],"title":"Duration Minutes"},"assignment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignment"},"host_user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Host User Ids"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"windows":{"anyOf":[{"items":{"$ref":"#/components/schemas/Window"},"type":"array"},{"type":"null"}],"title":"Windows"},"buffer_before_minutes":{"anyOf":[{"type":"integer","maximum":240.0,"minimum":0.0},{"type":"null"}],"title":"Buffer Before Minutes"},"buffer_after_minutes":{"anyOf":[{"type":"integer","maximum":240.0,"minimum":0.0},{"type":"null"}],"title":"Buffer After Minutes"},"min_notice_minutes":{"anyOf":[{"type":"integer","maximum":43200.0,"minimum":0.0},{"type":"null"}],"title":"Min Notice Minutes"},"max_days_ahead":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Max Days Ahead"},"reminder_minutes":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Reminder Minutes"},"location_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Type"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"deal_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Stage"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"PageIn"},"PaginatedContactsSchema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ContactSchema"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"limit":{"type":"integer","title":"Limit"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","limit","pages"],"title":"PaginatedContactsSchema"},"PaginatedRecords":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RecordResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"PaginatedRecords"},"PhoneIn":{"properties":{"phone":{"type":"string","maxLength":40,"title":"Phone"},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Note"}},"type":"object","required":["phone"],"title":"PhoneIn"},"PipelineCreateSchema":{"properties":{"name":{"type":"string","title":"Name"},"stages":{"items":{},"type":"array","title":"Stages"}},"type":"object","required":["name","stages"],"title":"PipelineCreateSchema"},"PipelineUpdateSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"stages":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Stages"},"stage_map":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Stage Map"}},"type":"object","title":"PipelineUpdateSchema"},"PixelEventPayload":{"properties":{"url":{"type":"string","title":"Url"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"org_id":{"type":"string","title":"Org Id"}},"type":"object","required":["url","org_id"],"title":"PixelEventPayload"},"PromoteBody":{"properties":{"priority":{"type":"string","title":"Priority","default":"normal"}},"type":"object","title":"PromoteBody"},"RateBody":{"properties":{"visitor_token":{"type":"string","maxLength":64,"title":"Visitor Token"},"rating":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Rating"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["visitor_token","rating"],"title":"RateBody"},"RecordCreate":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"}},"type":"object","required":["data"],"title":"RecordCreate"},"RecordResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"object_id":{"type":"string","format":"uuid","title":"Object Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"deal_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deal Id"},"created_at":{"title":"Created At"},"updated_at":{"title":"Updated At"}},"type":"object","required":["id","org_id","object_id","data","created_at","updated_at"],"title":"RecordResponse"},"RecordUpdate":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"RecordUpdate"},"RemixTemplateBody":{"properties":{"blocks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Blocks"},"target_tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Tone"},"target_cta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Cta"},"target_length":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Length"}},"type":"object","required":["blocks"],"title":"RemixTemplateBody"},"ReplyRequest":{"properties":{"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"}},"type":"object","title":"ReplyRequest"},"RequestCreate":{"properties":{"source_id":{"type":"string","format":"uuid","title":"Source Id"},"contact_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Contact Ids"},"channel":{"type":"string","title":"Channel","description":"email | sms","default":"email"},"custom_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Message"},"send":{"type":"boolean","title":"Send","default":true}},"type":"object","required":["source_id"],"title":"RequestCreate"},"ResendUnopenedBody":{"properties":{"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"}},"type":"object","title":"ResendUnopenedBody"},"ResponseUpdate":{"properties":{"response_text":{"type":"string","title":"Response Text"},"publish":{"type":"boolean","title":"Publish","default":false}},"type":"object","required":["response_text"],"title":"ResponseUpdate"},"RevealPayload":{"properties":{"ids":{"items":{"type":"string"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"RevealPayload"},"ReviewWidgetIn":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"layout":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Layout"},"min_rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Min Rating"},"max_reviews":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Max Reviews"},"source_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Source Ids"},"hidden_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hidden Ids"},"pinned_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Pinned Ids"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"}},"type":"object","title":"ReviewWidgetIn"},"SaveReportRequest":{"properties":{"name":{"type":"string","title":"Name"},"widgets":{"items":{},"type":"array","title":"Widgets"},"date_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Range","default":"last_30_days"},"schedule":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schedule"}},"type":"object","required":["name","widgets"],"title":"SaveReportRequest"},"ScheduleIn":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"frequency":{"type":"string","title":"Frequency","default":"weekly"},"day_of_week":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Day Of Week","default":0},"day_of_month":{"type":"integer","maximum":28.0,"minimum":1.0,"title":"Day Of Month","default":1},"hour_utc":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Hour Utc","default":8},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"recipients":{"items":{"type":"string","format":"email"},"type":"array","maxItems":25,"minItems":1,"title":"Recipients"},"sections":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sections"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","recipients"],"title":"ScheduleIn"},"SendOneShot":{"properties":{"to":{"type":"string","title":"To"},"body":{"type":"string","title":"Body"},"skip_consent_check":{"type":"boolean","title":"Skip Consent Check","description":"Set true ONLY for transactional sends (order confirmations, MFA codes). Marketing must respect opt-out.","default":false},"sender_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Number"}},"type":"object","required":["to","body"],"title":"SendOneShot"},"SequenceCreateSchema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"ab_test_enabled":{"type":"boolean","title":"Ab Test Enabled","default":false},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/StepCreateSchema"},"type":"array"},{"type":"null"}],"title":"Steps"}},"type":"object","required":["name"],"title":"SequenceCreateSchema"},"SequenceSchema":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"ab_test_enabled":{"type":"boolean","title":"Ab Test Enabled"},"total_enrolled":{"type":"integer","title":"Total Enrolled"},"total_sent":{"type":"integer","title":"Total Sent"},"total_opened":{"type":"integer","title":"Total Opened"},"total_clicked":{"type":"integer","title":"Total Clicked"},"total_replied":{"type":"integer","title":"Total Replied"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","status","ab_test_enabled","total_enrolled","total_sent","total_opened","total_clicked","total_replied","created_at"],"title":"SequenceSchema"},"SequenceUpdateSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"ab_test_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ab Test Enabled"},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/StepCreateSchema"},"type":"array"},{"type":"null"}],"title":"Steps"}},"type":"object","title":"SequenceUpdateSchema"},"SlaPolicyIn":{"properties":{"targets":{"additionalProperties":{"additionalProperties":{"type":"integer"},"type":"object"},"type":"object","title":"Targets"},"business_hours":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Business Hours"},"warn_before_minutes":{"type":"integer","title":"Warn Before Minutes","default":30},"holidays":{"items":{},"type":"array","title":"Holidays"},"pause_when_pending":{"type":"boolean","title":"Pause When Pending","default":true},"rules":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rules"}},"type":"object","required":["targets"],"title":"SlaPolicyIn"},"SlaPreviewIn":{"properties":{"policy":{"anyOf":[{"$ref":"#/components/schemas/SlaPolicyIn"},{"type":"null"}]},"priority":{"type":"string","title":"Priority","default":"normal"},"channel":{"type":"string","title":"Channel","default":"email"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"team_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Tag"},"requester_email":{"type":"string","title":"Requester Email","default":"customer@example.com"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","title":"SlaPreviewIn"},"SmsRegistrationIn":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"SmsRegistrationIn"},"SourceCreate":{"properties":{"platform":{"type":"string","title":"Platform"},"external_id":{"type":"string","title":"External Id"},"display_name":{"type":"string","title":"Display Name"},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Url"}},"type":"object","required":["platform","external_id","display_name"],"title":"SourceCreate"},"SourceUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Url"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"SourceUpdate"},"StartBody":{"properties":{"visitor_token":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Visitor Token"},"visitor_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Visitor Name"},"visitor_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Visitor Email"},"user_hash":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"User Hash"},"page_url":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Page Url"},"referrer":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Referrer"},"user_agent":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"User Agent"}},"type":"object","title":"StartBody"},"StatusBody":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"StatusBody"},"StatusChange":{"properties":{"status":{"type":"string","title":"Status","description":"open | pending | solved | closed"}},"type":"object","required":["status"],"title":"StatusChange"},"StepCreateSchema":{"properties":{"step_order":{"type":"integer","title":"Step Order"},"step_type":{"type":"string","title":"Step Type","default":"email"},"subject":{"type":"string","title":"Subject"},"body_html":{"type":"string","title":"Body Html"},"delay_days":{"type":"integer","title":"Delay Days","default":1},"condition_type":{"type":"string","title":"Condition Type","default":"none"},"subject_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject B"},"body_html_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html B"},"ab_split_pct":{"type":"integer","title":"Ab Split Pct","default":50},"step_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Step Config"}},"type":"object","required":["step_order","subject","body_html"],"title":"StepCreateSchema"},"StepRewriteRequest":{"properties":{"instruction":{"type":"string","title":"Instruction"}},"type":"object","required":["instruction"],"title":"StepRewriteRequest"},"StepSchema":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"sequence_id":{"type":"string","format":"uuid4","title":"Sequence Id"},"step_order":{"type":"integer","title":"Step Order"},"step_type":{"type":"string","title":"Step Type","default":"email"},"subject":{"type":"string","title":"Subject"},"body_html":{"type":"string","title":"Body Html"},"delay_days":{"type":"integer","title":"Delay Days"},"condition_type":{"type":"string","title":"Condition Type"},"subject_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject B"},"body_html_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html B"},"ab_split_pct":{"type":"integer","title":"Ab Split Pct"},"step_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Step Config"}},"type":"object","required":["id","sequence_id","step_order","subject","body_html","delay_days","condition_type","ab_split_pct"],"title":"StepSchema"},"SubjectSuggestSchema":{"properties":{"context":{"type":"string","title":"Context"},"count":{"type":"integer","title":"Count","default":3}},"type":"object","required":["context"],"title":"SubjectSuggestSchema"},"SubscriberUpsert":{"properties":{"phone":{"type":"string","title":"Phone"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"opt_in":{"type":"boolean","title":"Opt In","default":true},"source":{"type":"string","title":"Source","description":"form | manual_import | api | sms_keyword","default":"manual_import"}},"type":"object","required":["phone"],"title":"SubscriberUpsert"},"SurveyCreate":{"properties":{"name":{"type":"string","title":"Name"},"survey_type":{"type":"string","title":"Survey Type","description":"nps | csat | ces | custom"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"extra_fields":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Extra Fields"}},"type":"object","required":["name","survey_type"],"title":"SurveyCreate"},"TaskCreateSchema":{"properties":{"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"task_type":{"type":"string","title":"Task Type","default":"task"},"status":{"type":"string","title":"Status","default":"pending"},"priority":{"type":"string","title":"Priority","default":"medium"},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"},"deal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Id"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"reminder_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reminder At"}},"type":"object","required":["title"],"title":"TaskCreateSchema"},"TaskUpdateSchema":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"reminder_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reminder At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","title":"TaskUpdateSchema"},"TextLinkIn":{"properties":{"phone":{"type":"string","maxLength":50,"title":"Phone"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"}},"type":"object","required":["phone"],"title":"TextLinkIn"},"TicketCreate":{"properties":{"subject":{"type":"string","title":"Subject"},"requester_email":{"type":"string","title":"Requester Email"},"requester_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester Name"},"initial_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Message"},"priority":{"type":"string","title":"Priority","description":"urgent | high | normal | low","default":"normal"},"channel":{"type":"string","title":"Channel","description":"email | chat | api | manual | social","default":"manual"},"assignee_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee Id"},"team_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Tag"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["subject","requester_email"],"title":"TicketCreate"},"TicketUpdate":{"properties":{"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"assignee_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee Id"},"team_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Tag"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"TicketUpdate"},"UnsubscribeCreate":{"properties":{"email":{"type":"string","title":"Email"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","default":"unsubscribed"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","default":"manual"}},"type":"object","required":["email"],"title":"UnsubscribeCreate"},"UnsubscribePayload":{"properties":{"email":{"type":"string","title":"Email"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","default":"manual_unsubscribe"}},"type":"object","required":["email"],"title":"UnsubscribePayload"},"UsRulesIn":{"properties":{"quiet_hours":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Quiet Hours"},"state_rules":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"State Rules"},"frequency_caps":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Frequency Caps"},"require_opt_in":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Opt In"},"can_spam_block":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Spam Block"}},"type":"object","title":"UsRulesIn"},"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"},"VariantUpdate":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"body_design_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Body Design Id"},"send_hour_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Send Hour Offset"},"audience_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audience Pct"},"is_holdout":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Holdout"}},"type":"object","title":"VariantUpdate"},"VariantUpsert":{"properties":{"label":{"type":"string","title":"Label"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"body_design_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Body Design Id"},"send_hour_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Send Hour Offset"},"audience_pct":{"type":"integer","title":"Audience Pct","default":10},"is_holdout":{"type":"boolean","title":"Is Holdout","default":false}},"type":"object","required":["label"],"title":"VariantUpsert"},"ViewIn":{"properties":{"session_id":{"type":"string","title":"Session Id"},"started":{"type":"boolean","title":"Started","default":false},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"}},"type":"object","required":["session_id"],"title":"ViewIn"},"VisitorMessage":{"properties":{"visitor_token":{"type":"string","maxLength":64,"title":"Visitor Token"},"body":{"type":"string","maxLength":4000,"minLength":1,"title":"Body"}},"type":"object","required":["visitor_token","body"],"title":"VisitorMessage"},"WebhookEndpointIn":{"properties":{"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":[]}},"type":"object","required":["url"],"title":"WebhookEndpointIn"},"WebhookEndpointPatch":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"WebhookEndpointPatch"},"WidgetUpsert":{"properties":{"name":{"type":"string","title":"Name","default":"Default widget"},"primary_color":{"type":"string","title":"Primary Color","default":"#6C3DE8"},"welcome_message":{"type":"string","title":"Welcome Message","default":"Hi! How can we help?"},"placeholder":{"type":"string","title":"Placeholder","default":"Type a message…"},"bubble_position":{"type":"string","title":"Bubble Position","default":"bottom-right"},"pre_chat_form":{"type":"boolean","title":"Pre Chat Form","default":false},"require_email":{"type":"boolean","title":"Require Email","default":false},"ai_enabled":{"type":"boolean","title":"Ai Enabled","default":true},"ai_handoff_after_messages":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Ai Handoff After Messages","default":3},"business_hours":{"additionalProperties":true,"type":"object","title":"Business Hours"},"allowed_domains":{"items":{"type":"string"},"type":"array","title":"Allowed Domains"},"is_active":{"type":"boolean","title":"Is Active","default":true},"offline_message":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Offline Message"},"rating_enabled":{"type":"boolean","title":"Rating Enabled","default":true}},"type":"object","title":"WidgetUpsert"},"Window":{"properties":{"day":{"type":"integer","title":"Day"},"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"}},"type":"object","required":["day","start","end"],"title":"Window"},"WorkflowIn":{"properties":{"name":{"type":"string","maxLength":150,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","default":"draft"},"nodes":{"items":{},"type":"array","title":"Nodes","default":[]},"edges":{"items":{},"type":"array","title":"Edges","default":[]}},"type":"object","required":["name"],"title":"WorkflowIn"},"WorkflowUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"nodes":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Nodes"},"edges":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Edges"}},"type":"object","title":"WorkflowUpdate"},"app__hubs__analytics__api__growth_report_router__SettingsIn":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"send_weekday":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Send Weekday","default":0},"send_hour":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Send Hour","default":8},"recipient_user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Recipient User Ids"}},"type":"object","required":["enabled"],"title":"SettingsIn"},"app__hubs__automation__api__automation_router__AIGenerateRequest":{"properties":{"description":{"type":"string","title":"Description"}},"type":"object","required":["description"],"title":"AIGenerateRequest"},"app__hubs__automation__api__workflows_router__StartIn":{"properties":{"contact_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":5000,"minItems":1,"title":"Contact Ids"},"test":{"type":"boolean","title":"Test","default":false}},"type":"object","required":["contact_ids"],"title":"StartIn"},"app__hubs__commerce__api__payments_router__SendIn":{"properties":{"channel":{"type":"string","pattern":"^(email|sms)$","title":"Channel","default":"email"}},"type":"object","title":"SendIn"},"app__hubs__crm__api__contact_import_router__StartIn":{"properties":{"mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Mapping"},"dedupe":{"type":"string","pattern":"^(skip|update)$","title":"Dedupe","default":"skip"},"tag":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tag"},"verify_emails":{"type":"boolean","title":"Verify Emails","default":false}},"type":"object","required":["mapping"],"title":"StartIn"},"app__hubs__email__api__sequence_router__AIGenerateRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"goal":{"type":"string","title":"Goal","default":"convert"},"audience":{"type":"string","title":"Audience","default":"B2B"},"tone":{"type":"string","title":"Tone","default":"professional"},"step_count":{"type":"integer","title":"Step Count","default":5},"days_window":{"type":"integer","title":"Days Window","default":14},"save_as_draft":{"type":"boolean","title":"Save As Draft","default":true}},"type":"object","required":["prompt"],"title":"AIGenerateRequest"},"app__hubs__leadgen__api__form_router__PayIn":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"PayIn"},"app__hubs__leadgen__api__lead_gen_router__LookalikePayload":{"properties":{"seed_contact_ids":{"items":{"type":"string"},"type":"array","title":"Seed Contact Ids"},"limit":{"type":"integer","title":"Limit","default":50}},"type":"object","required":["seed_contact_ids"],"title":"LookalikePayload"},"app__hubs__leadgen__api__surveys_router__SendIn":{"properties":{"invitation_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Invitation Ids"}},"type":"object","title":"SendIn"},"app__hubs__messaging__api__inbox_router__ReplyIn":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"}},"type":"object","required":["content"],"title":"ReplyIn"}},"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"om_live_…","description":"Settings → Developer → API keys"}}},"security":[{"ApiKey":[]}]}