{"openapi":"3.1.0","info":{"version":"1.0.0","title":"Invent API"},"servers":[{"url":"https://api.useinvent.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Bearer token authentication using your API key"}},"schemas":{"IconNameSchema":{"type":"string","enum":["StepFormIcon","StepAiIcon","StepNoteIcon","StepBranchIcon","StepCodeIcon","SmsIcon","ConnectionIcon","ConnectionSchedulerIcon","ConnectionFilesIcon","ConnectionHttpIcon","ConnectionHttpCredentialsIcon","ConnectionWorkflowIcon","ConnectionMcpIcon","ConnectionOpenApiIcon","ConnectionAudienceIcon","ConnectionContactsIcon","ConnectionTablesIcon","ConnectionAssistantsIcon","ConnectionAgentsIcon","ConnectionChatsIcon","ConnectionInboxIcon","ConnectionKnowledgeIcon","ConnectionAuditIcon","InternalIntegrationIcon","CustomIntegrationIcon","ToolThinkIcon","ToolWebSearchIcon","ToolWebScrapingIcon","ToolGenerateImageIcon","ToolDisplayFileIcon","ToolCalculatorIcon","ToolGenerateFileIcon","ToolGeneratePdfIcon","ToolRunCodeIcon","ToolDeepResearchIcon","ToolSearchKbIcon","ToolShowOptionsIcon","ToolRequestLocationIcon","ToolSendLocationIcon","ToolSendContactIcon","ToolManageMemoryIcon","ToolUpdateContactIcon","TextIcon","ClockFadingIcon","CalendarIcon","CloudIcon","GlobeAltIcon","LockClosedIcon","NoSymbolIcon","SparklesIcon","AcademicCapIcon","HandRaisedIcon","BoltIcon","WorkflowIcon","FileSpreadsheetIcon","DatabaseIcon","TableIcon","TableRowIcon","TableRowAddIcon","TableRowEditIcon","TableRowDeleteIcon","TableRowsIcon","PageIcon","UserIcon","UsersIcon","EmailIcon","PhoneIcon","CurrencyIcon","FunctionIcon","TableCellsIcon","DocumentTextIcon","QueueListIcon","TagIcon","SettingsIcon","ShoppingCartIcon","ShoppingBagIcon","BuildingStorefrontIcon","MegaphoneIcon","WrenchScrewdriverIcon","MagnifyingGlassIcon","DocumentChartBarIcon","ClipboardDocumentListIcon","ClipboardDocumentCheckIcon","FolderIcon","ArchiveBoxIcon","InboxIcon","BookOpenIcon","BookmarkIcon","NewspaperIcon","RectangleStackIcon","PencilSquareIcon","UserGroupIcon","UserPlusIcon","IdentificationIcon","FaceSmileIcon","HandThumbUpIcon","HeartIcon","StarIcon","CheckBadgeIcon","TrophyIcon","CrownIcon","ChatBubbleLeftIcon","ChatBubbleLeftRightIcon","EnvelopeIcon","EnvelopeOpenIcon","DevicePhoneMobileIcon","BellIcon","PaperAirplaneIcon","AtSymbolIcon","RssIcon","LifebuoyIcon","CreditCardIcon","BanknotesIcon","CurrencyDollarIcon","CurrencyEuroIcon","ReceiptPercentIcon","WalletIcon","CoinsIcon","GiftIcon","TicketIcon","ScaleIcon","TruckIcon","CubeIcon","CalendarDaysIcon","CalendarDateRangeIcon","ClockIcon","FlagIcon","CheckCircleIcon","ListBulletIcon","FunnelIcon","ChartBarIcon","ChartPieIcon","PresentationChartLineIcon","ArrowTrendingUpIcon","BriefcaseIcon","Cog6ToothIcon","KeyIcon","ShieldCheckIcon","LightBulbIcon","BeakerIcon","BugAntIcon","CpuChipIcon","CodeBracketIcon","CommandLineIcon","ServerIcon","LinkIcon","HomeIcon","HomeModernIcon","BuildingOfficeIcon","BuildingOffice2Icon","BuildingLibraryIcon","MapPinIcon","MapIcon","GlobeAmericasIcon","RocketLaunchIcon","PlaneIcon","CarIcon","SunIcon","MoonIcon","FireIcon","CakeIcon","ScissorsIcon","SwatchIcon","PaintBrushIcon","CoffeeIcon","UtensilsIcon","LeafIcon","DumbbellIcon","HeartPulseIcon","PawPrintIcon","StethoscopeIcon","CameraIcon","PhotoIcon","FilmIcon","VideoCameraIcon","MicrophoneIcon","MusicalNoteIcon","SpeakerWaveIcon","PlayCircleIcon","TvIcon","RadioIcon","PuzzlePieceIcon","GamepadIcon","ModelAutoIcon","ModelOpenAIIcon","ModelAnthropicIcon","ModelClaudeIcon","ModelGoogleIcon","ModelGeminiIcon","ModelXAIIcon","ModelGrokIcon","ModelPerplexityIcon","ModelGroqIcon","ModelAzureIcon","ModelElevenLabsIcon","ModelDeepgramIcon","ModelOpenRouterIcon","ModelDeepSeekIcon","ModelMoonshotIcon","ModelQwenIcon","ModelMetaIcon","ModelZhipuIcon"],"description":"The name of the icon to use in the UI"},"PickerIconNameSchema":{"type":"string","enum":["TableCellsIcon","DatabaseIcon","DocumentTextIcon","DocumentChartBarIcon","ClipboardDocumentListIcon","ClipboardDocumentCheckIcon","FolderIcon","ArchiveBoxIcon","InboxIcon","BookOpenIcon","BookmarkIcon","NewspaperIcon","RectangleStackIcon","PencilSquareIcon","UserIcon","UsersIcon","UserGroupIcon","UserPlusIcon","IdentificationIcon","FaceSmileIcon","HandThumbUpIcon","HeartIcon","StarIcon","CheckBadgeIcon","TrophyIcon","CrownIcon","ChatBubbleLeftIcon","ChatBubbleLeftRightIcon","EnvelopeIcon","EnvelopeOpenIcon","PhoneIcon","DevicePhoneMobileIcon","MegaphoneIcon","BellIcon","PaperAirplaneIcon","AtSymbolIcon","RssIcon","LifebuoyIcon","ShoppingCartIcon","ShoppingBagIcon","BuildingStorefrontIcon","CreditCardIcon","BanknotesIcon","CurrencyDollarIcon","CurrencyEuroIcon","ReceiptPercentIcon","WalletIcon","CoinsIcon","GiftIcon","TagIcon","TicketIcon","ScaleIcon","TruckIcon","CubeIcon","CalendarIcon","CalendarDaysIcon","CalendarDateRangeIcon","ClockIcon","FlagIcon","CheckCircleIcon","ListBulletIcon","QueueListIcon","FunnelIcon","ChartBarIcon","ChartPieIcon","PresentationChartLineIcon","ArrowTrendingUpIcon","BriefcaseIcon","WrenchScrewdriverIcon","Cog6ToothIcon","KeyIcon","LockClosedIcon","ShieldCheckIcon","BoltIcon","LightBulbIcon","BeakerIcon","BugAntIcon","CpuChipIcon","CodeBracketIcon","CommandLineIcon","ServerIcon","LinkIcon","HomeIcon","HomeModernIcon","BuildingOfficeIcon","BuildingOffice2Icon","BuildingLibraryIcon","MapPinIcon","MapIcon","GlobeAltIcon","GlobeAmericasIcon","RocketLaunchIcon","PlaneIcon","CarIcon","SunIcon","MoonIcon","FireIcon","SparklesIcon","CakeIcon","AcademicCapIcon","ScissorsIcon","SwatchIcon","PaintBrushIcon","CoffeeIcon","UtensilsIcon","LeafIcon","DumbbellIcon","HeartPulseIcon","PawPrintIcon","StethoscopeIcon","CameraIcon","PhotoIcon","FilmIcon","VideoCameraIcon","MicrophoneIcon","MusicalNoteIcon","SpeakerWaveIcon","PlayCircleIcon","TvIcon","RadioIcon","PuzzlePieceIcon","GamepadIcon"],"description":"The name of a curated icon a user can pick for a table, view, field, or other entity"},"FieldTypeSchema":{"type":"string","enum":["object","id","string","number","boolean","date","datetime","time","enum","file","content","connection","record","contact","user","chat","segment","assistant","agent"],"description":"The type of the field"},"ModelIdSchema":{"type":"string","enum":["auto:auto","openai:gpt-5.6-terra","openai:gpt-5.6-luna","openai:gpt-5.4-2026-03-05","openai:gpt-5.4-mini-2026-03-17","openai:gpt-5.4-nano-2026-03-17","openai:gpt-5.3-chat-latest","openai:gpt-5.2-2025-12-11","openai:gpt-5.2-2025-12-11-reasoning","openai:gpt-5.1-2025-11-13","openai:gpt-5.1-2025-11-13-reasoning","openai:gpt-5-2025-08-07","openai:gpt-5-mini-2025-08-07","openai:gpt-5-nano-2025-08-07","openai:gpt-4.1-2025-04-14","openai:gpt-4.1-nano-2025-04-14","openai:gpt-4.1-mini-2025-04-14","openai:o3-2025-04-16","openai:o3-mini-2025-01-31","openai:o4-mini-2025-04-16","openai:gpt-4o-mini-transcribe","openai:gpt-4o-transcribe","openai:gpt-image-2","openai:text-embedding-3-large","openai:text-embedding-3-small","anthropic:claude-fable-5","anthropic:claude-opus-4-8","anthropic:claude-opus-4-6","anthropic:claude-sonnet-5","anthropic:claude-sonnet-4-6","anthropic:claude-opus-4-5-20251101","anthropic:claude-sonnet-4-5-20250929","anthropic:claude-haiku-4-5-20251001","anthropic:claude-sonnet-4-20250514","anthropic:claude-opus-4-20250514","anthropic:claude-3-7-sonnet-20250219","anthropic:claude-3-5-sonnet-20241022","anthropic:claude-3-5-haiku-20241022","google:gemini-3.8-flash","google:gemini-3.8-flash-reasoning","google:gemini-3.7-flash","google:gemini-3.7-flash-reasoning","google:gemini-3.6-flash","google:gemini-3.6-flash-reasoning","google:gemini-3.5-flash-lite","google:gemini-3.5-flash-lite-reasoning","google:gemini-3.5-flash","google:gemini-3.5-flash-reasoning","google:gemini-3.1-pro-preview","google:gemini-3.1-pro-preview-reasoning","google:gemini-3.1-flash-lite","google:gemini-3.1-flash-lite-reasoning","google:gemini-3.1-flash-lite-preview","google:gemini-3.1-flash-lite-preview-reasoning","google:gemini-3.1-flash-image-preview","google:gemini-3-pro-preview","google:gemini-3-flash-preview","google:gemini-3-flash-preview-reasoning","google:gemini-2.5-pro","google:gemini-2.5-flash","google:gemini-2.5-flash-lite","google:gemini-2.5-flash-preview-05-20","google:gemini-2.5-pro-preview-03-25","meta:muse-spark-1.3","meta:muse-spark-1.1","xai:grok-4.6","xai:grok-4.6-reasoning","xai:grok-4.3","xai:grok-4.3-reasoning","xai:grok-4.20-beta-0309-non-reasoning","xai:grok-4-1-fast-non-reasoning","xai:grok-4-1-fast-reasoning","xai:grok-4-0709","xai:grok-3","xai:grok-3-mini","xai:grok-2-vision-1212","aws:anthropic.claude-opus-4-5-20251101-v1","aws:anthropic.claude-sonnet-4-5-20250929-v1","aws:anthropic.claude-haiku-4-5-20251001-v1","perplexity:sonar-pro","perplexity:sonar","groq:qwen-3-32b","elevenlabs:scribe_v1","elevenlabs:eleven_v3","elevenlabs:eleven_flash_v2_5","elevenlabs:eleven_turbo_v2_5","deepgram:nova-3","openrouter:deepseek-v4-pro","openrouter:deepseek-v4-flash","openrouter:gpt-oss-120b","openrouter:kimi-k2.5","openrouter:qwen-3.5-397b","openrouter:llama-4-maverick","openrouter:glm-5","openrouter:glm-5.2","openrouter:minimax-m3"],"description":"The model ID in the format of provider:model"},"SendChatEventSchema":{"oneOf":[{"$ref":"#/components/schemas/SendChatEventMediaSchema"},{"$ref":"#/components/schemas/SendChatEventSyncSchema"}],"discriminator":{"propertyName":"type","mapping":{"media":"#/components/schemas/SendChatEventMediaSchema","sync":"#/components/schemas/SendChatEventSyncSchema"}}},"SendChatEventMediaSchema":{"type":"object","properties":{"type":{"type":"string","enum":["media"]},"data":{"$ref":"#/components/schemas/ChatMediaEventDataSchema"},"chat_id":{"type":"string"}},"required":["type","data","chat_id"],"description":"Event emitted when a chat message is sent"},"ChatMediaEventDataSchema":{"type":"object","properties":{"audio":{"type":"string"},"format":{"$ref":"#/components/schemas/MediaFormatSchema"},"sampleRate":{"type":"number"},"channels":{"type":"number"}},"required":["audio","format"],"description":"Data for media chat event"},"MediaFormatSchema":{"type":"string","enum":["opus-rtp","opus-raw","opus-ogg","pcm-wav","pcm-raw","mp3","m4a","mulaw"],"description":"The format of the media"},"SendChatEventSyncSchema":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"chat_id":{"type":"string"}},"required":["type","chat_id"],"description":"Request a re-emit of the in-flight run state"},"SetChatMessageReactionSchema":{"type":"object","properties":{"emoji":{"type":"string","format":"emoji"}},"required":["emoji"]},"QueryChatFilesSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search files by filename","example":"document.pdf"},"mimetype":{"type":"string","description":"Filter by MIME type (prefix match)","example":"image/"}},"description":"Query parameters for fetching chat files"},"QueryMetadataSchema":{"type":"object","properties":{"lang":{"type":"string","maxLength":32,"description":"Language code for translated content","example":"en"}}},"StepTypeSchema":{"type":"string","enum":["note","ai","code","form","result","branch","scheduler:on_schedule","workflows:call_workflow","tools:http_request","tools:web_search","tools:web_scraping","files:download_file","files:upload_file","files:create_csv","files:delete_file","files:markdown_to_pdf","files:html_to_pdf","tables:manage_records","tables:create_record","tables:update_record","tables:delete_record","tables:search_records","tables:list_tables","tables:get_table_schema","tables:get_record","tables:list_views","tables:get_view_items","tables:create_table","tables:update_table","tables:delete_table","tables:manage_fields","tables:move_field","tables:delete_field","tables:create_view","tables:update_view","tables:delete_view","tables:duplicate_view","tables:move_view_item","tables:list_view_groups","tables:aggregate_records","tables:reorder_views","pages:list_pages","pages:get_page","pages:create_page","pages:update_page","pages:delete_page","pages:create_block","pages:update_block","pages:move_block","pages:delete_block","knowledge:search","knowledge:get_chunk","knowledge:list_contents","knowledge:get_content","knowledge:get_content_text","knowledge:find_in_content","knowledge:replace_in_content","knowledge:get_stats","knowledge:add_content","knowledge:update_content","knowledge:reindex_content","knowledge:delete_content","assistants:list","assistants:get","assistants:create","assistants:update","assistants:replace","assistants:get_models","assistants:update_settings","assistants:list_knowledge","assistants:link_knowledge","assistants:unlink_knowledge","assistants:list_channels","assistants:create_channel","assistants:update_channel","assistants:delete_channel","assistants:list_actions","assistants:create_action","assistants:update_action","assistants:delete_action","assistants:set_contact_field","assistants:remove_contact_field","agents:list","agents:get","agents:create","agents:update","agents:list_routines","agents:create_routine","agents:cancel_routine","chats:list","chats:get","inbox:list_chats","inbox:get_messages","inbox:reply","inbox:assign","inbox:set_status","inbox:mark_resolved","inbox:reopen","members:list","broadcasts:list","broadcasts:get","broadcasts:create","broadcasts:update","broadcasts:duplicate","broadcasts:delete","broadcasts:set_state","broadcasts:set_channel_template","broadcasts:add_recipients","broadcasts:get_recipient_counts","broadcasts:retry_recipients","broadcasts:remove_recipients","broadcasts:list_fields","broadcasts:set_field","broadcasts:set_field_entries","broadcasts:schedule","broadcasts:cancel","broadcasts:activate","broadcasts:pause","broadcasts:send_test","broadcasts:get_analytics","broadcasts:list_recipients","analytics:org_summary","analytics:assistants_performance","analytics:team_performance","analytics:response_times","analytics:channels_breakdown","analytics:contacts_growth","analytics:contacts_by_channel","analytics:top_segments","analytics:workflows_performance","audit:list","skills:list","skills:get","skills:create","skills:update","skills:replace","contacts:search","contacts:get","contacts:update","contacts:delete","contacts:merge","contacts:update_segments","contacts:list_activities","contacts:list_comments","contacts:add_comment","contacts:list_memories","contacts:list_files","contacts:list_suppressions","contacts:add_suppressions","contacts:remove_suppressions","contacts:import","segments:list","segments:get","segments:create","segments:update","segments:delete","emails:on_email_status_change","emails:send_email","mcp:tool_call","mcp:tools","openapi:operation_call","openapi:tools","google_sheets:on_spreadsheets_new_row","google_sheets:spreadsheets_search","google_sheets:spreadsheets_list","google_sheets:worksheets_list","google_sheets:spreadsheets_append_row","google_sheets:spreadsheets_update_row","google_calendar:on_new_event","google_calendar:calendars_list","google_calendar:freebusy_query","google_calendar:events_search","google_calendar:events_get","google_calendar:events_create","google_calendar:events_update","google_calendar:events_delete","google_calendar:events_quick_add","outlook_calendar:freebusy_query","outlook_calendar:events_search","outlook_calendar:events_get","outlook_calendar:events_create","outlook_calendar:events_update","outlook_calendar:events_delete","google_drive:files_search","google_drive:files_list","google_drive:files_get","google_drive:files_download","google_drive:files_create","google_drive:files_update","google_drive:files_delete","google_drive:folders_create","airtable:bases_list","airtable:tables_list","airtable:records_search","airtable:record_get","airtable:record_create","airtable:record_update","airtable:record_delete","notion:data_sources_list","notion:search","notion:records_search","notion:record_get","notion:record_create","notion:record_update","notion:pages_search","notion:pages_and_records_list","notion:page_get","notion:page_create","notion:page_update","notion:page_content_append","notion:comments_list","notion:comment_create","linear:teams_list","linear:states_list","linear:users_list","linear:labels_list","linear:issues_search","linear:issue_get","linear:issue_create","linear:issue_update","linear:issue_comment_create","trello:boards_list","trello:board_get","trello:lists_list","trello:cards_search","trello:card_get","trello:card_create","trello:card_update","trello:card_move","trello:card_comment","trello:card_delete","trello:members_list","trello:labels_list","hubspot:contacts_search","hubspot:contact_get","hubspot:contact_create","hubspot:contact_update","hubspot:contact_properties_list","hubspot:companies_search","hubspot:company_get","hubspot:company_create","hubspot:company_update","hubspot:company_properties_list","hubspot:deals_search","hubspot:deal_get","hubspot:deal_create","hubspot:deal_update","hubspot:deal_properties_list","hubspot:meetings_search","hubspot:meeting_get","hubspot:meeting_create","hubspot:meeting_update","hubspot:meeting_delete","salesforce:objects_list","salesforce:leads_search","salesforce:lead_get","salesforce:lead_create","salesforce:lead_update","salesforce:lead_delete","salesforce:contacts_search","salesforce:contact_get","salesforce:contact_create","salesforce:contact_update","salesforce:contact_delete","salesforce:accounts_search","salesforce:account_get","salesforce:account_create","salesforce:account_update","salesforce:account_delete","salesforce:opportunities_search","salesforce:opportunity_get","salesforce:opportunity_create","salesforce:opportunity_update","salesforce:opportunity_delete","zoho:modules_list","zoho:records_search","zoho:record_get","zoho:record_create","zoho:record_update","zoho:record_delete","zoho:leads_search","zoho:lead_get","zoho:lead_create","zoho:lead_update","zoho:lead_delete","zoho:lead_convert","zoho:contacts_search","zoho:contact_get","zoho:contact_create","zoho:contact_update","zoho:contact_delete","zoho:contact_tags_add","zoho:contact_tags_remove","zoho:accounts_search","zoho:account_get","zoho:account_create","zoho:account_update","zoho:account_delete","zoho:deals_search","zoho:deal_get","zoho:deal_create","zoho:deal_update","zoho:deal_delete","zoho:calendar_events_list","zoho:calendar_event_create","zoho:calendar_event_update","zoho:calendar_event_delete","zoho:attachments_upload","zoho:attachments_list","zoho:attachments_download","zoho:attachments_delete","zoho_bookings:availability_get","zoho_bookings:appointments_search","zoho_bookings:appointment_get","zoho_bookings:appointment_book","zoho_bookings:appointment_reschedule","zoho_bookings:appointment_update","zoho_bookings:appointment_cancel","zoho_bookings:customer_create","zoho_inventory:items_search","zoho_inventory:item_get","zoho_inventory:item_create","zoho_inventory:item_update","zoho_inventory:item_image_upload","zoho_inventory:item_image_delete","zoho_inventory:contacts_search","zoho_inventory:contact_get","zoho_inventory:contact_create","zoho_inventory:contact_update","zoho_inventory:sales_orders_search","zoho_inventory:sales_order_get","zoho_inventory:sales_order_create","zoho_inventory:sales_order_update","zoho_inventory:invoices_search","zoho_inventory:invoice_get","zoho_inventory:invoice_create","zoho_inventory:invoice_send","zoho_calendar:calendars_list","zoho_calendar:freebusy_get","zoho_calendar:events_search","zoho_calendar:event_get","zoho_calendar:event_create","zoho_calendar:event_update","zoho_calendar:event_delete","gohighlevel:contacts_search","gohighlevel:contact_get","gohighlevel:contact_create","gohighlevel:contact_update","gohighlevel:contact_delete","gohighlevel:contact_tags_add","gohighlevel:contact_tags_remove","gohighlevel:opportunities_search","gohighlevel:opportunity_get","gohighlevel:opportunity_create","gohighlevel:opportunity_update","gohighlevel:opportunity_delete","gohighlevel:calendar_free_slots","gohighlevel:calendar_blocked_slots","gohighlevel:calendar_events_list","gohighlevel:calendar_event_create","gohighlevel:calendar_event_update","gohighlevel:calendar_event_delete","cal:slots_get","cal:bookings_list","cal:booking_get","cal:booking_create","cal:booking_update","cal:booking_cancel","calendly:available_times_get","calendly:events_search","calendly:event_get","calendly:event_create","calendly:event_cancel","calendly:scheduling_link_create","slack:on_mention","slack:on_channel_new_message","slack:search","slack:channels_messages_list","slack:channels_send_message","slack:channels_reply_message","telegram:on_new_message","telegram:send_message","instagram:on_new_message","instagram:send_message","messenger:on_new_message","messenger:send_message","tiktok:on_new_message","tiktok:send_message","whatsapp:on_new_message","whatsapp:on_message_status_change","whatsapp:send_message","whatsapp:send_message_template","whatsapp:send_conversion_event","whatsapp:get_templates","whatsapp:get_template","whatsapp:create_template","whatsapp:get_template_library","whatsapp:create_template_from_library","whatsapp:edit_template","whatsapp:delete_template","gmail:on_new_email","gmail:send_email","gmail:reply_email","gmail:labels_list","japifon:on_new_message","japifon:message_send","smpp:send_message","smpp:on_message_status_change","twilio:on_new_message","twilio:send_message","telnyx:on_new_message","telnyx:send_message","resend:on_new_email","resend:send_email","stripe:customers_search","stripe:customer_get","stripe:customer_create","stripe:customer_update","stripe:checkout_session_create","stripe:checkout_session_get","stripe:billing_portal_session_create","stripe:currencies_list","stripe:prices_list","stripe:payment_link_create","stripe:payment_link_get","stripe:payment_get","stripe:payment_refund","stripe:payments_list","stripe:subscription_create","stripe:subscription_get","stripe:subscription_update","stripe:subscription_cancel","stripe:subscriptions_list","stripe:invoice_create","stripe:invoice_get","stripe:invoice_send","stripe:invoices_list","shopify:products_search","shopify:product_get","shopify:product_variants_search","shopify:orders_search","shopify:order_get","shopify:order_create","shopify:order_update","shopify:customers_search","shopify:customer_get","shopify:customer_create","shopify:customer_update","shopify:inventory_levels_list","zendesk:ticket_search","zendesk:ticket_get","zendesk:ticket_create","zendesk:ticket_update","zendesk:ticket_reply","zendesk:ticket_add_note","zendesk:ticket_comments_list","zendesk:tickets_list","odoo:leads_search","odoo:lead_get","odoo:lead_create","odoo:lead_update","odoo:lead_delete","odoo:lead_convert","odoo:opportunities_search","odoo:opportunity_get","odoo:opportunity_create","odoo:opportunity_update","odoo:opportunity_delete","odoo:contacts_search","odoo:calendar_events_list","odoo:calendar_event_create","odoo:calendar_event_update","odoo:calendar_event_delete","odoo:attachments_upload","odoo:attachments_list","odoo:attachments_download","odoo:attachments_delete","woocommerce:products_search","woocommerce:product_get","woocommerce:product_variations_search","woocommerce:customers_search","woocommerce:customer_get","woocommerce:customer_create","woocommerce:customer_update","woocommerce:orders_search","woocommerce:order_get","woocommerce:order_create","woocommerce:order_update","woocommerce:order_note_create","woocommerce:coupon_get","woocommerce:product_categories_list"],"description":"Step type"},"UpdateWorkflowEventSchema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["workflow-update"]},"data":{"$ref":"#/components/schemas/UpdateWorkflowSchema"}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"data":{"$ref":"#/components/schemas/UpdateWorkflowUserEventSchema"}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["user-state"]},"data":{"$ref":"#/components/schemas/UpdateWorkflowUserEventSchema"}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["interaction"]},"data":{"$ref":"#/components/schemas/WorkflowInteractionEventDataSchema"}},"required":["type","data"]}]},"UpdateWorkflowSchema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":128},"description":{"type":["string","null"],"maxLength":1024},"enabled":{"type":"boolean"},"retention":{"$ref":"#/components/schemas/WorkflowRunDataRetentionConfigSchema"},"from_workflow_id":{"type":"string","maxLength":128},"from_workflow_version_id":{"type":"string","maxLength":128},"from_template_id":{"type":"string","maxLength":128},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepSchema"},"maxItems":100},"partial":{"type":"array","items":{"$ref":"#/components/schemas/PartialWorkflowUpdateSchema"}},"request_resync":{"type":"boolean"}}},"WorkflowRunDataRetentionConfigSchema":{"type":["object","null"],"properties":{"max_age_in_seconds":{"type":"number","minimum":-1,"maximum":315360000,"description":"Maximum time in seconds to retain run data after completion, -1 means no limit (keep indefinitely)"},"preserve_on_failure":{"type":"boolean","description":"Whether to preserve run data beyond the standard retention period if it fails","example":true}},"required":["max_age_in_seconds"],"description":"Data retention policy for the run","example":{"max_age_in_seconds":3600,"preserve_on_failure":true}},"StepSchema":{"type":"object","description":"A workflow step. `type` selects one of the step types in StepTypeSchema; the remaining properties vary by type. Call `GET /metadata/steps` for every type with its input fields, localised via `?lang=`.","properties":{"type":{"$ref":"#/components/schemas/StepTypeSchema"}},"required":["type"],"additionalProperties":true},"StepKeySchema":{"type":"string","minLength":1,"maxLength":128,"description":"Unique identifier for the step, used to connect steps together"},"DynamicFieldsSchema":{"type":"object","properties":{"path":{"type":"string"},"definition":{"$ref":"#/components/schemas/FieldsSchema"}},"required":["path","definition"],"description":"The dynamic fields input definitions"},"FieldsSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldSchema"},"description":"The definition of the field schemas"},"FieldSchema":{"oneOf":[{"$ref":"#/components/schemas/FieldFileSchema"},{"$ref":"#/components/schemas/FieldIdSchema"},{"$ref":"#/components/schemas/FieldNumberSchema"},{"$ref":"#/components/schemas/FieldStringSchema"},{"$ref":"#/components/schemas/FieldBooleanSchema"},{"$ref":"#/components/schemas/FieldDateSchema"},{"$ref":"#/components/schemas/FieldDateTimeSchema"},{"$ref":"#/components/schemas/FieldTimeSchema"},{"$ref":"#/components/schemas/FieldEnumSchema"},{"$ref":"#/components/schemas/FieldContentSchema"},{"$ref":"#/components/schemas/FieldConnectionSchema"},{"$ref":"#/components/schemas/FieldRecordSchema"},{"$ref":"#/components/schemas/FieldContactSchema"},{"$ref":"#/components/schemas/FieldUserSchema"},{"$ref":"#/components/schemas/FieldChatSchema"},{"$ref":"#/components/schemas/FieldSegmentSchema"},{"$ref":"#/components/schemas/FieldAssistantSchema"},{"$ref":"#/components/schemas/FieldAgentSchema"},{"$ref":"#/components/schemas/FieldObjectSchema"}],"discriminator":{"propertyName":"type","mapping":{"file":"#/components/schemas/FieldFileSchema","id":"#/components/schemas/FieldIdSchema","number":"#/components/schemas/FieldNumberSchema","string":"#/components/schemas/FieldStringSchema","boolean":"#/components/schemas/FieldBooleanSchema","date":"#/components/schemas/FieldDateSchema","datetime":"#/components/schemas/FieldDateTimeSchema","time":"#/components/schemas/FieldTimeSchema","enum":"#/components/schemas/FieldEnumSchema","content":"#/components/schemas/FieldContentSchema","connection":"#/components/schemas/FieldConnectionSchema","record":"#/components/schemas/FieldRecordSchema","contact":"#/components/schemas/FieldContactSchema","user":"#/components/schemas/FieldUserSchema","chat":"#/components/schemas/FieldChatSchema","segment":"#/components/schemas/FieldSegmentSchema","assistant":"#/components/schemas/FieldAssistantSchema","agent":"#/components/schemas/FieldAgentSchema","object":"#/components/schemas/FieldObjectSchema"}}},"FieldFileSchema":{"type":"object","properties":{"type":{"type":"string","enum":["file"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldFileDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"allowed_types":{"type":"array","items":{"type":"string"},"description":"Allowed mime types for the file field (e.g. image/*, application/pdf)"},"visibility":{"$ref":"#/components/schemas/FileVisibilitySchema"},"default":{"anyOf":[{"$ref":"#/components/schemas/FileSchema"},{"type":"array","items":{"$ref":"#/components/schemas/FileSchema"}}],"description":"The default value of the file field: the already-attached file(s), pre-filled and replaceable"}},"required":["type"],"description":"The file type allows users to upload files"},"FieldFileDisplaySchema":{"allOf":[{"$ref":"#/components/schemas/FieldDisplaySchema"},{"type":"object","properties":{"render":{"$ref":"#/components/schemas/FieldFileDisplayRenderSchema"}}}],"description":"Display options for the file field"},"FieldLayoutSchema":{"type":"string","enum":["inline","stacked"],"description":"Controls how the label and field are arranged (inline or stacked)"},"FieldContainerSchema":{"type":"string","enum":["grid","full","center"],"description":"Controls how the field container behaves in terms of width and positioning"},"FieldEmptySchema":{"type":"string","enum":["show","hide"],"description":"What to render when an `object` field resolves to no visible sub-fields. Defaults to `hide` when the sub-fields come from a remote sync (`additional_properties.path`) — an empty result has nothing to fill in — and to `show` for every other field. Only honoured on fields marked `optional`: hiding a required field would leave a form that cannot be completed and no visible reason why. Never applies while the sync is loading or errored, nor while `requires` siblings are unfilled — those states keep rendering their own message — and never in the field editor, where the empty container is the drop target."},"FieldFileDisplayRenderSchema":{"type":"string","enum":["button","dropzone"],"description":"The render type of the file field"},"FieldDisplaySchema":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/FieldLayoutSchema"},"container":{"$ref":"#/components/schemas/FieldContainerSchema"},"empty":{"$ref":"#/components/schemas/FieldEmptySchema"}},"description":"Display options for the field"},"FieldSelectorModeSchema":{"type":"string","enum":["all","auto","manual"],"description":"Indicates the mode of the selector, auto will allow AI to determine the value, manual will allow the user to manually input a value"},"FieldConditionSchema":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/FieldKeySchema"},"operator":{"$ref":"#/components/schemas/FieldConditionOperatorSchema"},"value":{}},"required":["field","operator"],"description":"Condition for the field"},"FieldKeySchema":{"type":"string","maxLength":256,"pattern":"^[^.]+$","description":"The key of the field"},"FieldConditionOperatorSchema":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","contains","not_contains","is_empty","is_not_empty"],"description":"The operator for the field condition"},"FieldPickerSchema":{"oneOf":[{"$ref":"#/components/schemas/FieldPickerGoogleDriveSchema"},{"$ref":"#/components/schemas/FieldPickerWhatsappTemplateSchema"},{"$ref":"#/components/schemas/FieldPickerMetaEventsSchema"}],"discriminator":{"propertyName":"type","mapping":{"google_drive":"#/components/schemas/FieldPickerGoogleDriveSchema","whatsapp_template":"#/components/schemas/FieldPickerWhatsappTemplateSchema","meta_events":"#/components/schemas/FieldPickerMetaEventsSchema"}},"description":"Picker configuration, when specified it makes this field a picker"},"FieldPickerGoogleDriveSchema":{"type":"object","properties":{"type":{"type":"string","enum":["google_drive"],"description":"Picker that allows selecting files from Google Drive"},"views":{"type":"array","items":{"$ref":"#/components/schemas/FieldPickerGoogleDriveViewSchema"}},"selectable_mime_types":{"type":"array","items":{"type":"string"},"description":"A comma-separated list of MIME types to restrict the selectable files in the picker"}},"required":["type","views"],"description":"Picker that allows selecting from Google Drive files"},"FieldPickerGoogleDriveViewSchema":{"type":"string","enum":["DOCS","DOCS_IMAGES","DOCS_IMAGES_AND_VIDEOS","DOCS_VIDEOS","DOCUMENTS","DRAWINGS","FOLDERS","FORMS","PDFS","PRESENTATIONS","SPREADSHEETS"],"description":"The views available for the Google Drive picker"},"FieldPickerWhatsappTemplateSchema":{"type":"object","properties":{"type":{"type":"string","enum":["whatsapp_template"],"description":"Picker that allows selecting from WhatsApp templates"}},"required":["type"],"description":"Picker that allows selecting a WhatsApp template"},"FieldPickerMetaEventsSchema":{"type":"object","properties":{"type":{"type":"string","enum":["meta_events"],"description":"Picker that opens Meta Events Manager"}},"required":["type"],"description":"Picker that links out to Meta Events Manager datasets"},"FileVisibilitySchema":{"type":"string","enum":["PUBLIC","PRIVATE"],"description":"Whether the file is private or public, private files URLs are signed with a token and can be accessed temporarily","example":"PRIVATE"},"FileSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the file"},"file_path":{"type":"string","maxLength":2048,"description":"Path to the file in the storage system"},"file_filename":{"type":"string","maxLength":255,"description":"Name of the file","example":"document.pdf"},"file_size":{"type":"number","description":"Size of the file in bytes","example":1024},"file_mimetype":{"type":"string","maxLength":255,"description":"MIME type of the file","example":"application/pdf"},"file_url":{"type":"string","maxLength":2048,"description":"URL to access the file"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the file was created"}},"required":["id","file_path","file_filename","file_size","file_mimetype","file_url","created_at"],"description":"Detailed information about a file"},"FieldIdSchema":{"type":"object","properties":{"type":{"type":"string","enum":["id"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"prefix":{"type":"string","pattern":"^[A-Z][A-Z0-9]{0,15}$","description":"Uppercase alphanumeric prefix rendered before the record number (e.g. `LEAD` → `LEAD-42`). Omit to render the bare number."}},"required":["type"],"description":"Readonly auto-numbered record identifier, rendered from the record number with an optional prefix"},"FieldNumberSchema":{"type":"object","properties":{"type":{"type":"string","enum":["number"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldNumberDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"number"},{"type":"string","enum":["{{auto}}"]}],"description":"The default value of the number field"}},"required":["type"],"description":"The number field allows users to input numbers"},"FieldNumberDisplaySchema":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/FieldLayoutSchema"},"container":{"$ref":"#/components/schemas/FieldContainerSchema"},"empty":{"$ref":"#/components/schemas/FieldEmptySchema"},"format":{"$ref":"#/components/schemas/FieldNumberDisplayFormatSchema"},"notation":{"$ref":"#/components/schemas/FieldNumberDisplayNotationSchema"},"decimals":{"type":"integer","minimum":0,"maximum":8,"description":"Fixed fraction digits (min and max); omit for the locale default"},"currency":{"type":"string","maxLength":3,"description":"ISO 4217 currency code, used when `format` is `currency`; defaults to USD when omitted"},"show_as":{"$ref":"#/components/schemas/FieldNumberShowAsSchema"}},"description":"Display options for the number field"},"FieldNumberDisplayFormatSchema":{"type":"string","enum":["number","percent","currency"],"description":"Numeric style (maps to Intl.NumberFormat `style`); `number` is a plain number. Thousand separators are always applied."},"FieldNumberDisplayNotationSchema":{"type":"string","enum":["standard","compact"],"description":"Number notation (maps to Intl.NumberFormat `notation`); `compact` renders 1.2K (short form)"},"FieldNumberShowAsSchema":{"type":"object","properties":{"kind":{"type":"string","enum":["number","bar","ring"],"description":"How to render the number: a plain value, a progress bar, or a ring"},"color":{"$ref":"#/components/schemas/ColorNameSchema"},"divide_by":{"type":"number","exclusiveMinimum":0,"description":"Denominator for the bar / ring progress (value / divide_by)"},"show_number":{"type":"boolean","description":"Show the numeric value alongside the bar / ring"}},"required":["kind"],"description":"Renders the number as a plain value, a progress bar, or a ring"},"ColorNameSchema":{"type":"string","enum":["red","orange","amber","yellow","lime","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","neutral"],"description":"The name of the color to use in the UI"},"FieldStringSchema":{"type":"object","properties":{"type":{"type":"string","enum":["string"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldStringDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The default value of the string field"},"format":{"type":"string","enum":["url","email","phone"],"description":"The validation type for the field"},"min":{"type":"number","minimum":1,"description":"The minimum length of the string field"},"max":{"type":"number","minimum":1,"description":"The maximum length of the string field"}},"required":["type"],"description":"The string field allows users to input text"},"FieldStringDisplaySchema":{"allOf":[{"$ref":"#/components/schemas/FieldDisplaySchema"},{"type":"object","properties":{"render":{"$ref":"#/components/schemas/FieldStringDisplayRenderSchema"}}}],"description":"Display options for the string field"},"FieldStringDisplayRenderSchema":{"type":"string","enum":["text","textarea","password"],"description":"The render type of the string field, text is a single line input, textarea is a multi-line input"},"FieldBooleanSchema":{"type":"object","properties":{"type":{"type":"string","enum":["boolean"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"type":"boolean","description":"The default value of the boolean field"}},"required":["type"],"description":"The boolean field allows users mark a field as true or false"},"FieldDateSchema":{"type":"object","properties":{"type":{"type":"string","enum":["date"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDateDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"type":["string","null"],"format":"date-time","description":"The default value of the date field, formatted as YYYY-MM-DD"},"range":{"type":"boolean","description":"Turns the field into a range: requires `array: true`, and the value becomes an array of exactly two dates (start, end). A Timeline can draw it as a bar."}},"required":["type"],"description":"The date field allows users to select a date"},"FieldDateDisplaySchema":{"allOf":[{"$ref":"#/components/schemas/FieldDisplaySchema"},{"type":"object","properties":{"date_format":{"$ref":"#/components/schemas/FieldDateFormatSchema"}}}],"description":"Display options for the date field"},"FieldDateFormatSchema":{"type":"string","enum":["full","short","month_day_year","day_month_year","year_month_day","relative"],"description":"The rendered date format for date / datetime fields"},"FieldDateTimeSchema":{"type":"object","properties":{"type":{"type":"string","enum":["datetime"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDateTimeDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"type":["string","null"],"format":"date-time","description":"The default value of the date time field, formatted as YYYY-MM-DDTHH:MM:SS"},"range":{"type":"boolean","description":"Turns the field into a range: requires `array: true`, and the value becomes an array of exactly two dates (start, end). A Timeline can draw it as a bar."},"source":{"$ref":"#/components/schemas/FieldDateTimeSourceSchema"}},"required":["type"],"description":"The date and time field allows users to select a date and time"},"FieldDateTimeDisplaySchema":{"allOf":[{"$ref":"#/components/schemas/FieldDisplaySchema"},{"type":"object","properties":{"date_format":{"$ref":"#/components/schemas/FieldDateFormatSchema"},"time_format":{"$ref":"#/components/schemas/FieldTimeFormatSchema"}}}],"description":"Display options for the datetime field"},"FieldTimeFormatSchema":{"type":"string","enum":["hidden","12h","24h"],"description":"The rendered time format for datetime / time fields. `hidden` collapses a datetime to a date-only render."},"FieldDateTimeSourceSchema":{"type":"string","enum":["created_at","updated_at"],"description":"Record timestamp a sourced datetime field renders. A sourced field is readonly and stores no values. Table fields on custom tables only; immutable after create."},"FieldTimeSchema":{"type":"object","properties":{"type":{"type":"string","enum":["time"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldTimeDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"}},"required":["type"],"description":"The time field allows users to select a time"},"FieldTimeDisplaySchema":{"allOf":[{"$ref":"#/components/schemas/FieldDisplaySchema"},{"type":"object","properties":{"time_format":{"$ref":"#/components/schemas/FieldTimeFormatSchema"}}}],"description":"Display options for the time field"},"FieldEnumSchema":{"type":"object","properties":{"type":{"type":"string","enum":["enum"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldEnumDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The default value of the enum field"},"items":{"type":"array","items":{"$ref":"#/components/schemas/FieldEnumItemSchema"},"description":"The options for the enum field"},"list":{"$ref":"#/components/schemas/FieldListSchema"},"additional_items":{"type":"boolean","description":"Indicates whether additional unlisted items are allowed"},"component":{"$ref":"#/components/schemas/FieldComponentSchema"}},"required":["type","items"],"description":"The select field used to select from a list of items"},"FieldEnumDisplaySchema":{"allOf":[{"$ref":"#/components/schemas/FieldDisplaySchema"},{"type":"object","properties":{"render":{"$ref":"#/components/schemas/FieldEnumDisplayRenderSchema"},"sort":{"$ref":"#/components/schemas/FieldEnumDisplaySortSchema"}}}],"description":"Display options for the enum field"},"FieldEnumDisplayRenderSchema":{"type":"string","enum":["dropdown","inline"],"description":"The render type of the enum field"},"FieldEnumDisplaySortSchema":{"type":"string","enum":["manual","asc","desc"],"description":"Option ordering by label; `manual` keeps the `items[]` order (default), `asc` A→Z, `desc` Z→A"},"FieldEnumItemSchema":{"type":"object","properties":{"label":{"type":"string","description":"Label of the enum item"},"value":{"type":"string","description":"Value of the enum item"},"description":{"type":"string","description":"Description of the enum item"},"color":{"$ref":"#/components/schemas/ColorNameSchema"},"icon":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of the icon to use in the UI","oneOf":[{"$ref":"#/components/schemas/IconNameSchema"}]},"icon_url":{"type":"string"},"metadata":{"$ref":"#/components/schemas/FieldEnumItemMetadataSchema"}},"required":["value"],"description":"The enum item"},"FieldEnumItemMetadataSchema":{"type":"object","properties":{"link":{"type":"string","format":"uri","description":"A link associated with the enum item"},"data":{"description":"Additional data for the enum item"}},"description":"Additional metadata for the enum item"},"FieldListSchema":{"type":"object","properties":{"path":{"type":"string","description":"The connection list action path used to show autocomplete options"},"resource_id":{"type":"string","description":"An optional resource ID to scope the list to a specific resource, only used on dynamic fields"},"sync_on_mount":{"type":"boolean","description":"When true, the selected value is re-fetched on mount to keep cached metadata in sync with the remote source"}},"description":"Configuration for fields that fetch their data from a remote connection list action"},"FieldComponentSchema":{"oneOf":[{"$ref":"#/components/schemas/FieldWhatsappTemplateComponentSchema"},{"$ref":"#/components/schemas/FieldDynamicToolsComponentSchema"}],"discriminator":{"propertyName":"type","mapping":{"whatsapp_template":"#/components/schemas/FieldWhatsappTemplateComponentSchema","dynamic_tools":"#/components/schemas/FieldDynamicToolsComponentSchema"}},"description":"The component field used to display a custom component"},"FieldWhatsappTemplateComponentSchema":{"type":"object","properties":{"type":{"type":"string","enum":["whatsapp_template"]}},"required":["type"],"description":"The component field used to display a WhatsApp template"},"FieldDynamicToolsComponentSchema":{"type":"object","properties":{"type":{"type":"string","enum":["dynamic_tools"]},"path":{"type":"string","description":"The dynamic action whose tool catalog the component lists, e.g. MCP:TOOLS"}},"required":["type","path"],"description":"The component field that lists the tools of a dynamic action and lets the user turn them off"},"FieldContentSchema":{"type":"object","properties":{"type":{"type":"string","enum":["content"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"content":{"type":"string","description":"Any markdown content"},"component":{"$ref":"#/components/schemas/FieldComponentSchema"}},"required":["type"],"description":"The content field used to display markdown content"},"FieldConnectionSchema":{"type":"object","properties":{"type":{"type":"string","enum":["connection"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"connection_type":{"$ref":"#/components/schemas/ConnectionTypeSchema"}},"required":["type","connection_type"],"description":"The connection field used to select a connection"},"ConnectionTypeSchema":{"type":"string","enum":["SCHEDULER","WORKFLOWS","TOOLS","FILES","EMAILS","HTTP_CREDENTIALS","TABLES","PAGES","KNOWLEDGE","SKILLS","CONTACTS","SEGMENTS","ASSISTANTS","AGENTS","CHATS","INBOX","MEMBERS","BROADCASTS","ANALYTICS","AUDIT","PHONE","GMAIL","GOOGLE_SHEETS","GOOGLE_CALENDAR","GOOGLE_DRIVE","OUTLOOK_CALENDAR","AIRTABLE","NOTION","LINEAR","HUBSPOT","GOHIGHLEVEL","CAL","CALENDLY","RESEND","OAUTH","SLACK","TELEGRAM","TRELLO","FACEBOOK","WHATSAPP","INSTAGRAM","MESSENGER","TIKTOK","JAPIFON","SMPP","TWILIO","TELNYX","ZOHO","ZOHO_BOOKINGS","ZOHO_INVENTORY","ZOHO_CALENDAR","SALESFORCE","STRIPE","SHOPIFY","ZENDESK","MCP","OPENAPI","ODOO","WOOCOMMERCE"],"description":"Connection type","example":"SLACK"},"FieldRecordSchema":{"type":"object","properties":{"type":{"type":"string","enum":["record"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The default value of the record field (encoded record id)"},"target_table_id":{"type":"string","description":"The id of the table whose records are referenceable"}},"required":["type"],"description":"A reference to one or more records in another table"},"FieldContactSchema":{"type":"object","properties":{"type":{"type":"string","enum":["contact"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The default value of the contact field (encoded contact id)"}},"required":["type"],"description":"A reference to one or more contacts"},"FieldUserSchema":{"type":"object","properties":{"type":{"type":"string","enum":["user"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The default value of the user field (encoded user id of an org member)"},"source":{"$ref":"#/components/schemas/FieldUserSourceSchema"}},"required":["type"],"description":"A reference to one or more users (org members)"},"FieldUserSourceSchema":{"type":"string","enum":["created_by","updated_by"],"description":"Record actor a sourced user field renders. A sourced field is readonly and stores no values. Table fields on custom tables only; immutable after create."},"FieldChatSchema":{"type":"object","properties":{"type":{"type":"string","enum":["chat"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The default value of the chat field (encoded chat id)"}},"required":["type"],"description":"A reference to one or more chats"},"FieldSegmentSchema":{"type":"object","properties":{"type":{"type":"string","enum":["segment"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The default value of the segment field (encoded segment id)"}},"required":["type"],"description":"A reference to one or more segments"},"FieldAssistantSchema":{"type":"object","properties":{"type":{"type":"string","enum":["assistant"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The default value of the assistant field (encoded assistant id)"}},"required":["type"],"description":"A reference to one or more assistants"},"FieldAgentSchema":{"type":"object","properties":{"type":{"type":"string","enum":["agent"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"default":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The default value of the agent field (encoded agent id)"}},"required":["type"],"description":"A reference to one or more agents"},"FieldObjectSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"],"description":"The type of the field"},"name":{"type":"string","maxLength":1024,"description":"The name of the field"},"description":{"type":"string","maxLength":10240,"description":"The description of the field"},"optional":{"type":"boolean","description":"Indicates whether the field is optional"},"array":{"type":"boolean","description":"Indicates whether the field can contain multiple values"},"placeholder":{"type":"string","maxLength":512,"description":"The placeholder of the field"},"display":{"$ref":"#/components/schemas/FieldDisplaySchema"},"order":{"type":"number","minimum":0,"description":"The order of the field relative to other fields in the form"},"link":{"type":"string","description":"The link to the documentation for the field"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Additional metadata for the field"},"allowed_modes":{"type":"array","items":{"$ref":"#/components/schemas/FieldSelectorModeSchema"}},"broadcast_field":{"type":"boolean","description":"Indicates whether the field is used for broadcast"},"broadcast_exposed":{"type":"boolean","description":"Exposes this input as a first-level content override on the broadcast trigger API (string inputs only)"},"integration_field":{"type":"boolean","description":"Indicates whether the field is common to all integrations"},"display_field":{"type":"boolean","description":"Marks this field as the human-readable identifier for the integration. Its resolved value (enum label or string) is shown on the assistant channel card to disambiguate multiple integrations of the same type."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/FieldConditionSchema"},"description":"Conditions that must be met for the field to be shown"},"hidden":{"type":"boolean","description":"Indicates whether the field is hidden from the UI"},"picker":{"$ref":"#/components/schemas/FieldPickerSchema"},"requires":{"type":"array","items":{"$ref":"#/components/schemas/FieldKeySchema"},"description":"Sibling field keys that must be filled before this field can resolve its data (list options, dynamic fields, or a scoped reference picker)"},"disable_variables":{"type":"boolean","description":"When true, skip template variable replacement ({{variable}}) for this field"},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldSchema"},"description":"A record of fields that can be of various types including object fields"},"format":{"type":"string","enum":["schema"],"description":"The validation type for the object field"},"additional_properties":{"anyOf":[{"$ref":"#/components/schemas/FieldAdditionalPropertiesSchema"},{"$ref":"#/components/schemas/FieldListSchema"},{"type":"boolean"}]},"default":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}],"description":"The default value of the object field"}},"required":["type","properties"],"description":"The object field that can contain other fields, including nested objects"},"FieldAdditionalPropertiesSchema":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/FieldSchema"}},"required":["schema"]},"InputWebhookSchema":{"type":"object","properties":{"method":{"$ref":"#/components/schemas/HttpMethodSchema"},"path":{"type":"string","maxLength":1024,"description":"The path for the webhook, e.g. /some/path"}},"required":["method"],"description":"Webhook configuration for the form step"},"HttpMethodSchema":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method for the request"},"PartialWorkflowUpdateSchema":{"type":"object","properties":{"new_step":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/StepSchema"},"before_step":{"type":"string"}},"required":["data"]},"rename_step":{"type":"object","properties":{"key":{"type":"string"},"new_key":{"type":"string"}},"required":["key","new_key"]},"update_step":{"type":"object","properties":{"key":{"type":"string"},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["key","data"]},"update_step_order":{"type":"object","properties":{"key":{"type":"string"},"before_step":{"type":"string"}},"required":["key"]},"delete_step":{"type":"string"},"delete_paths":{"type":"object","properties":{"key":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["key","paths"]}},"description":"Partial update of a workflow"},"UpdateWorkflowUserEventSchema":{"type":"object","properties":{"cursor":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"description":"Cursor position"},"center":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"description":"Center of the view"},"zoom":{"type":"number","description":"Zoom level"},"caret":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"description":"Caret position"},"step":{"type":"string","maxLength":128,"description":"Selected or hovered step key"},"focus":{"type":"string","maxLength":512,"description":"Focused step path"},"run":{"type":"string","maxLength":128,"description":"Selected run id"},"following":{"type":"string","maxLength":256,"description":"Following client id"}}},"WorkflowInteractionEventDataSchema":{"oneOf":[{"$ref":"#/components/schemas/WorkflowInteractionScrollEventSchema"}],"discriminator":{"propertyName":"type","mapping":{"scroll":"#/components/schemas/WorkflowInteractionScrollEventSchema"}},"description":"Workflow event for interaction actions"},"WorkflowInteractionScrollEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["scroll"]},"step":{"type":"string","maxLength":128},"element":{"type":"string","maxLength":128},"value":{"type":"number"}},"required":["type","step","element","value"]},"WorkflowVersionDraftSchema":{"type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepSchema"},"description":"Steps of the workflow at the time this version was deployed"}},"required":["steps"],"description":"Information about a draft workflow version"},"OrgEventRequestSchema":{"oneOf":[{"$ref":"#/components/schemas/OrgEventRequestChatsUnseenCountSchema"},{"$ref":"#/components/schemas/OrgEventRequestChatsAttentionCountSchema"}],"discriminator":{"propertyName":"type","mapping":{"chats_unseen_count":"#/components/schemas/OrgEventRequestChatsUnseenCountSchema","chats_attention_count":"#/components/schemas/OrgEventRequestChatsAttentionCountSchema"}}},"OrgEventRequestChatsUnseenCountSchema":{"type":"object","properties":{"type":{"type":"string","enum":["chats_unseen_count"]}},"required":["type"],"description":"Request to send unseen count for chats to the organization"},"OrgEventRequestChatsAttentionCountSchema":{"type":"object","properties":{"type":{"type":"string","enum":["chats_attention_count"]}},"required":["type"],"description":"Request to send pending attention counts for chats to the organization"},"OrgModuleFlagSchema":{"type":"string","enum":["enable_org_chats","enable_inbox","enable_analytics","enable_assistants","enable_agents","enable_knowledge_base","enable_broadcasts","enable_channels","enable_workflows","enable_audience","enable_tables","enable_pages","enable_balance_credits"],"description":"Per-module visibility flag identifier"},"QueryAssistantStatsSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"}}},"QueryTeamStatsSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"}}},"QueryChannelStatsSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"}}},"QueryConversationsAnalyticsSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"},"interval":{"$ref":"#/components/schemas/MetricsIntervalSchema"},"timezone":{"$ref":"#/components/schemas/TimezoneValueSchema"},"assistant_id":{"type":"string","maxLength":128},"channel_id":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"member_id":{"type":"string","maxLength":128}},"required":["from_date","to_date"]},"MetricsIntervalSchema":{"type":"string","enum":["hour","day","week","month","year"]},"TimezoneValueSchema":{"type":"string","description":"IANA timezone identifier (e.g. America/New_York)"},"ChannelTypeIdSchema":{"type":"string","enum":["internal","org","agent","custom","whatsapp_bot","messenger_bot","instagram_dm","tiktok_dm","telegram_bot","gmail","slack_bot","twilio","telnyx","email","smpp"],"description":"The channel type"},"QueryContactGrowthSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"},"interval":{"type":"string","enum":["day","week","month"],"default":"day"},"timezone":{"$ref":"#/components/schemas/TimezoneValueSchema"}}},"QueryContactDateRangeSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"}}},"QueryOrgMetricsSchema":{"type":"object","properties":{"metric":{"$ref":"#/components/schemas/OrgMetricIdSchema"},"interval":{"$ref":"#/components/schemas/MetricsIntervalSchema"},"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"},"timezone":{"$ref":"#/components/schemas/TimezoneValueSchema"},"assistant_id":{"type":"string","maxLength":128},"workflow_id":{"type":"string","maxLength":128},"agent_id":{"type":"string","maxLength":128},"routine_id":{"type":"string","maxLength":128}},"required":["metric"]},"OrgMetricIdSchema":{"type":"string","enum":["chats_created","chats_user_messages_sent","chats_ai_messages_sent","chats_assistant_created","chats_assistant_user_messages_sent","chats_assistant_ai_messages_sent","assistant_messages_sent","assistant_chats_closed_by_human","assistant_chats_closed_by_ai","assistant_chats_transferred_to_human","assistant_chats_reopened","assistant_chats_human_replied","assistant_chats_takeover_no_reply","chats_assistant_member_messages_sent","chats_channel_messages","agent_runs_started","routine_runs_started","contacts_blocked_by_ai","contacts_blocked_by_human","chats_created_by_channel","broadcasts_sent","broadcasts_messages_sent","broadcasts_marketing_messages_sent","broadcasts_transactional_messages_sent","broadcasts_messages_by_channel","assistant_csat_score_1","assistant_csat_score_2","assistant_csat_score_3","assistant_csat_score_4","assistant_csat_score_5","workflows_created","runs_created","runs_succeeded","runs_failed","contacts_created","contacts_unsubscribed","contacts_blocked"]},"QueryResponseTimesSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"}}},"QueryInboxChatsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search term to filter chats"},"assistant_id":{"type":"string","maxLength":128},"assistant_channel_id":{"type":"string","maxLength":128},"conversation_id":{"type":"string","maxLength":128},"contact_id":{"type":"string","maxLength":128},"segment_id":{"type":"string","maxLength":128},"assigned_user_id":{"type":"string","maxLength":128},"status":{"$ref":"#/components/schemas/OrgChatsStatusSchema"},"state":{"$ref":"#/components/schemas/OrgChatsStateSchema"},"ai_status":{"$ref":"#/components/schemas/OrgChatsAiStatusSchema"},"filter":{"$ref":"#/components/schemas/OrgChatsFilterSchema"},"referral_type":{"$ref":"#/components/schemas/OrgChatsReferralTypeSchema"},"csat_max":{"$ref":"#/components/schemas/OrgChatsCsatMaxSchema"}},"description":"Query parameters for chats"},"OrgChatsStatusSchema":{"type":"string","enum":["ALL","RUNNING","COMPLETED","FAILED","CANCELED"]},"OrgChatsStateSchema":{"type":"string","enum":["ALL","OPEN","SNOOZED","CLOSED"]},"OrgChatsAiStatusSchema":{"type":"string","enum":["ALL","ENABLED","DISABLED"]},"OrgChatsFilterSchema":{"type":"string","enum":["ALL","UNREAD","WAITING","UNRESOLVED","RESOLVED","ASSIGNED_TO_ME","UNASSIGNED"],"description":"Filter for chats"},"OrgChatsReferralTypeSchema":{"type":"string","enum":["ALL","messenger_ad","messenger_product","messenger_product_template","whatsapp_ad","whatsapp_product","whatsapp_order","instagram_ad","instagram_product","instagram_product_template","instagram_post","instagram_reel","instagram_story","instagram_story_mention","instagram_comment","messenger_post","messenger_reel","messenger_comment","tiktok_ad","tiktok_post_share","tiktok_short_link","web_widget"]},"OrgChatsCsatMaxSchema":{"type":"string","enum":["0","1","2","3","4","5"],"description":"Filter chats with CSAT score less than or equal to this value. 0 means no filter."},"QueryDomainsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search domains by domain string"}},"description":"Query parameters for fetching domains"},"QueryVectorContentsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search query"},"type":{"$ref":"#/components/schemas/QueryVectorContentTypeSchema"},"status":{"$ref":"#/components/schemas/QueryVectorContentStatusSchema"}},"description":"Query parameters for vector contents"},"QueryVectorContentTypeSchema":{"type":"string","enum":["ALL","TEXT","FILE","URL"]},"QueryVectorContentStatusSchema":{"type":"string","enum":["ALL","PENDING","PROCESSING","PROCESSED","FAILED"]},"QueryVectorChunksSchema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/QueryVectorChunkStatusSchema"}},"description":"Query parameters for vector chunks"},"QueryVectorChunkStatusSchema":{"type":"string","enum":["ALL","PENDING","PROCESSING","PROCESSED","FAILED"]},"QueryAssistantsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search assistants by name."}},"description":"Query parameters for fetching assistants"},"QuerySkillsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search skills by name."}},"description":"Query parameters for fetching skills"},"OrgWebhookEventSchema":{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Unique id of this event. Stable across retries — use it to deduplicate."},"org_id":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time","description":"When the event occurred (not when it was delivered)"}},"required":["id","org_id","created_at"]},{"oneOf":[{"$ref":"#/components/schemas/OrgWebhookPingEventSchema"},{"$ref":"#/components/schemas/OrgWebhookChatAssignedEventSchema"},{"$ref":"#/components/schemas/OrgWebhookContactBlockedEventSchema"},{"$ref":"#/components/schemas/OrgWebhookContactUnsubscribedEventSchema"},{"$ref":"#/components/schemas/OrgWebhookBroadcastFailedEventSchema"},{"$ref":"#/components/schemas/OrgWebhookBroadcastBouncedEventSchema"},{"$ref":"#/components/schemas/OrgWebhookBroadcastComplainedEventSchema"},{"$ref":"#/components/schemas/OrgWebhookBroadcastSuppressedEventSchema"}],"discriminator":{"propertyName":"type","mapping":{"ping":"#/components/schemas/OrgWebhookPingEventSchema","chat.assigned":"#/components/schemas/OrgWebhookChatAssignedEventSchema","contact.blocked":"#/components/schemas/OrgWebhookContactBlockedEventSchema","contact.unsubscribed":"#/components/schemas/OrgWebhookContactUnsubscribedEventSchema","broadcast.failed":"#/components/schemas/OrgWebhookBroadcastFailedEventSchema","broadcast.bounced":"#/components/schemas/OrgWebhookBroadcastBouncedEventSchema","broadcast.complained":"#/components/schemas/OrgWebhookBroadcastComplainedEventSchema","broadcast.suppressed":"#/components/schemas/OrgWebhookBroadcastSuppressedEventSchema"}}}],"description":"The body POSTed to a webhook endpoint"},"OrgWebhookPingEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["ping"]},"data":{"$ref":"#/components/schemas/OrgWebhookPingEventDataSchema"}},"required":["type","data"],"description":"Sent by the test endpoint to verify an endpoint is wired up"},"OrgWebhookPingEventDataSchema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"description":"The message from the ping event"},"OrgWebhookChatAssignedEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["chat.assigned"]},"data":{"$ref":"#/components/schemas/ChatSchema"}},"required":["type","data"],"description":"A conversation changed hands and someone has to pick it up. `state.assigned_user` is who it landed on; absent means it was unassigned."},"ChatSchema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"],"description":"The title of the chat"},"model":{"type":"string","description":"The model used for the chat"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ModelToolSchema"},"description":"The tools available in the chat"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/SkillLimitedSchema"},"description":"The skills enabled in the chat"},"features":{"$ref":"#/components/schemas/ChatFeaturesSchema"},"org_id":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ChatMemberSchema"},"description":"The members of the chat"},"temporary":{"type":"boolean","description":"Whether the chat is temporary and would be deleted after 24 hours of last activity"},"visibility":{"type":"string","enum":["PRIVATE","PUBLIC_READ","PUBLIC_WRITE"],"description":"The visibility of the chat"},"pinned":{"type":"boolean","description":"Whether the chat is pinned in the user interface"},"status":{"type":"string","enum":["RUNNING","COMPLETED","FAILED","CANCELED"],"description":"The status of the chat"},"agent":{"allOf":[{"$ref":"#/components/schemas/AgentLimitedSchema"},{"description":"The agent whose run this chat is"}]},"routine":{"$ref":"#/components/schemas/RoutineLimitedSchema"},"state":{"$ref":"#/components/schemas/ChatStateSchema"},"link":{"type":"string","description":"The link to the chat in the integration"},"shared_url":{"type":["string","null"],"description":"The shared URL of the chat, if it is shared"},"last_message":{"$ref":"#/components/schemas/ChatMessageSchema"},"referral":{"$ref":"#/components/schemas/ChatReferralSchema"},"reminders":{"type":"array","items":{"$ref":"#/components/schemas/ChatReminderSchema"},"description":"The active reminders scheduled on this chat"},"attentions":{"type":"array","items":{"$ref":"#/components/schemas/ChatAttentionItemSchema"},"description":"The pending approvals and questions waiting on this chat"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","title","model","members","temporary","visibility","pinned","status","shared_url","created_at","updated_at"]},"ModelToolSchema":{"type":"object","properties":{"name":{"type":"string","maxLength":256,"description":"Name of the tool to called, can be a step key or custom tool"},"display_name":{"type":"string","maxLength":256,"description":"Display name of the tool, can be used in UI"},"action_name":{"type":"string","maxLength":256,"description":"The original name of the action this tool is based on, used for connection-based tools"},"description":{"type":"string","maxLength":2048,"description":"Description of the tool"},"icon":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of the icon to use in the UI","oneOf":[{"$ref":"#/components/schemas/IconNameSchema"}]},"icon_url":{"type":"string","description":"URL of the icon to use in the UI"},"connection_id":{"type":"string","maxLength":256,"description":"For connection-bound tools (action runners), the id of the connection this tool executes against"},"parameters":{"allOf":[{"$ref":"#/components/schemas/FieldsSchema"},{"description":"Parameters for the tool call using an input schema definition"}]},"input":{"$ref":"#/components/schemas/InputValuesSchema"},"definitions":{"type":"array","items":{"$ref":"#/components/schemas/DynamicFieldsSchema"},"description":"For connection-bound tools, dynamic field schemas loaded for the selected resource, merged into the parameters at build time"},"enabled":{"type":"boolean","description":"For tools that are enabled by default, set to false to opt out and disable them for this chat"},"callback":{"type":"string"},"validation":{"type":"string"}},"required":["name"]},"InputValuesSchema":{"type":"object","additionalProperties":{},"description":"For connection-bound tools, locked input values (e.g. a selected resource) that drive dynamic fields and are injected at execution"},"SkillLimitedSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"Compact skill reference for embedding in other resources (e.g. the skills enabled in a chat)"},"ChatFeaturesSchema":{"type":"object","properties":{"reasoning":{"$ref":"#/components/schemas/ModelFeatureReasoningSchema"},"mode":{"$ref":"#/components/schemas/ConnectionActionApprovalModeSchema"},"auto_discover":{"type":"boolean"},"web":{"type":"boolean"},"image_generation":{"type":"boolean"},"workbench":{"$ref":"#/components/schemas/ChatWorkbenchFeatureSchema"}},"description":"Per-chat features and run settings: model features plus approval mode, auto-discover, and org-chat tool toggles."},"ModelFeatureReasoningSchema":{"type":"object","properties":{"effort":{"$ref":"#/components/schemas/ModelFeatureReasoningEffortSchema"}},"required":["effort"],"description":"The reasoning capability of the model."},"ModelFeatureReasoningEffortSchema":{"type":"string","enum":["low","medium","high"],"description":"The effort level of the reasoning capability."},"ConnectionActionApprovalModeSchema":{"type":"string","enum":["auto","ask","never"],"description":"When the assistant must ask before running the action"},"ChatWorkbenchFeatureSchema":{"type":"object","properties":{"enabled":{"type":"boolean"},"network":{"$ref":"#/components/schemas/ChatWorkbenchNetworkSchema"}},"description":"Workbench: run code and tools in a sandbox."},"ChatWorkbenchNetworkSchema":{"type":"string","enum":["full","limited","none"],"description":"Workbench outbound network: full (open), limited (package registries only), or none (offline)."},"ChatMemberSchema":{"type":"object","properties":{"id":{"type":"string"},"role":{"$ref":"#/components/schemas/ChatMemberRoleSchema"},"user":{"$ref":"#/components/schemas/UserPublicSchema"},"session":{"$ref":"#/components/schemas/PublicSessionSchema"},"contact_channel":{"$ref":"#/components/schemas/PublicContactChannelSchema"},"agent":{"$ref":"#/components/schemas/AgentLimitedSchema"},"seen_at":{"type":["string","null"],"format":"date-time"}},"required":["id","role"],"description":"The member of the chat"},"ChatMemberRoleSchema":{"type":"string","enum":["ADMIN","MEMBER"],"description":"The role of the member in the chat"},"UserPublicSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"avatar":{"type":["string","null"]}},"required":["id","name","avatar"]},"PublicSessionSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"description":"Data that is publicly accessible for a session"},"PublicContactChannelSchema":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"user_id":{"type":"string","description":"The unique identifier for the contact channel, e.g Phone Number or User ID"},"avatar":{"type":["string","null"],"description":"The avatar for the contact channel, e.g X Avatar URL"},"name":{"type":["string","null"],"description":"The name for the contact channel, e.g Full Name"},"username":{"type":["string","null"],"description":"The username for the contact channel, e.g Username"},"email":{"type":["string","null"],"format":"email","description":"The email for the contact channel, e.g Email"},"phone":{"type":["string","null"],"description":"The phone number for the contact channel, e.g Phone Number"},"country":{"type":["string","null"],"description":"The country code associated with the contact channel, e.g US for United States"},"agent":{"type":["string","null"],"description":"The user agent associated with the contact channel"},"ip":{"type":["string","null"],"description":"The IP address associated with the contact channel"},"language":{"type":["string","null"],"description":"The language code associated with the contact channel, e.g en for English"},"link":{"type":"string","description":"A link to the contact channel, e.g a link to the social media profile"},"contact":{"$ref":"#/components/schemas/PublicContactSchema"}},"required":["id","type","user_id","avatar","name","username","email","phone","country","agent","ip","language","contact"],"description":"Schema for the public contact channel"},"PublicContactSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"blocked":{"type":"boolean"},"unsubscribed":{"type":"boolean"},"ai_replies":{"type":"boolean"},"is_admin":{"type":"boolean"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/SegmentLimitedSchema"}}},"required":["id","name","blocked","unsubscribed","ai_replies","is_admin"],"description":"Schema for the contact"},"SegmentLimitedSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"$ref":"#/components/schemas/ColorNameSchema"},"contacts_count":{"type":"number"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","color","contacts_count","created_at","updated_at"],"description":"Schema for the segment"},"AgentLimitedSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}],"description":"A picked icon or emoji. Null = the generated face, unless a custom image is set."},"color":{"allOf":[{"$ref":"#/components/schemas/ColorNameSchema"},{"description":"The identity color, reused by every surface that carries the agent"}]},"shape":{"anyOf":[{"$ref":"#/components/schemas/AgentShapeSchema"},{"type":"null"}],"description":"The silhouette of the generated face. Null when an icon or a custom image is set."},"avatar_url":{"type":["string","null"],"description":"The agent as an image, either the custom picture or the PNG snapshot of its face or icon"}},"required":["id","name","icon","color","shape","avatar_url"],"description":"A reduced agent reference"},"PickerIconEmojiSchema":{"type":"string","format":"emoji","description":"The emoji of a curated icon a user can pick for a table, view, field, or other entity"},"AgentShapeSchema":{"type":"string","enum":["square","round","pebble","slate","beam","bloom","arch","clave"],"description":"The silhouette of a generated agent face"},"RoutineLimitedSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/RoutineTypeSchema"}},"required":["id","name","type"],"description":"The routine whose fire started this chat"},"RoutineTypeSchema":{"type":"string","enum":["SCHEDULED","AUTOPILOT","WEBHOOK"],"description":"How the routine fires: SCHEDULED = cron · AUTOPILOT = the run schedules itself · WEBHOOK = fired by its URL"},"ChatStateSchema":{"type":"object","properties":{"id":{"type":"string"},"state":{"$ref":"#/components/schemas/ChatStateStatusSchema"},"channel_type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"integration_id":{"allOf":[{"$ref":"#/components/schemas/ChannelTypeIdSchema"},{"description":"Use channel_type instead","deprecated":true}]},"assistant":{"$ref":"#/components/schemas/PublicAssistantSchema"},"assistant_id":{"type":["string","null"],"description":"Use assistant.id instead","deprecated":true},"assistant_channel":{"$ref":"#/components/schemas/PublicAssistantChannelSchema"},"assistant_integration":{"allOf":[{"$ref":"#/components/schemas/PublicAssistantChannelSchema"},{"description":"Use assistant_channel instead","deprecated":true}]},"assistant_channel_id":{"type":["string","null"],"description":"Use assistant_channel.id instead","deprecated":true},"assistant_integration_id":{"type":["string","null"],"description":"Use assistant_channel.id instead","deprecated":true},"conversation_id":{"type":"string","description":"The ID of the conversation associated with the chat"},"assigned_user":{"$ref":"#/components/schemas/UserLimitedSchema"},"assigned_at":{"type":["string","null"],"format":"date-time"},"assistant_config":{"$ref":"#/components/schemas/AssistantConfigSchema"},"ai_enabled":{"type":"boolean","description":"Whether AI is enabled for the chat"},"admin_unseen_count":{"type":"number","description":"The number of unseen messages in the chat"},"user_unseen_count":{"type":"number","description":"The number of unseen messages in the chat"},"follow_up_at":{"type":["string","null"],"format":"date-time","description":"Scheduled follow-up datetime"},"muted_until":{"type":["string","null"],"format":"date-time","description":"Mute expiry datetime (null = not muted)"},"free_window_expires_at":{"type":["string","null"],"format":"date-time","description":"When the free entry point window closes: templates sent before it are not charged. It never extends the reply window (null = no free window)"},"csat_score":{"type":["integer","null"],"minimum":1,"maximum":5,"description":"Customer satisfaction score (1-5)"},"last_contact_message_at":{"type":["string","null"],"format":"date-time"}},"required":["id","state","channel_type","integration_id","assistant_id","assistant_channel_id","assistant_integration_id","conversation_id","ai_enabled","admin_unseen_count","user_unseen_count"],"description":"Schema for the chat state"},"ChatStateStatusSchema":{"type":"string","enum":["OPEN","SNOOZED","CLOSED"],"description":"The state status of the chat"},"PublicAssistantSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"avatar_url":{"type":["string","null"]},"deleted":{"type":"boolean"},"config":{"$ref":"#/components/schemas/PublicAssistantConfigSchema"}},"required":["id","name","enabled","avatar_url","deleted","config"],"description":"Schema for a public assistant"},"PublicAssistantConfigSchema":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/PublicAssistantConversationConfigSchema"},"widget":{"$ref":"#/components/schemas/PublicAssistantWidgetConfigSchema"}},"required":["conversation","widget"],"description":"Schema for a public assistant configuration"},"PublicAssistantConversationConfigSchema":{"type":"object","properties":{"thread_mode":{"$ref":"#/components/schemas/AssistantThreadModeSchema"},"welcome_banner":{"type":"string","maxLength":256,"description":"Static greeting text displayed in the UI when users start a new conversation"},"suggested_messages":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":5,"description":"Suggested messages displayed to users when they start a new conversation"},"auto_intro_message":{"type":"string","maxLength":256,"description":"First message automatically sent by the assistant only when a conversation begins via API call"},"enable_auto_csat":{"type":"boolean","description":"Whether the assistant should automatically score customer satisfaction (CSAT) when closing conversations"},"enable_ai_replies":{"type":"boolean","description":"Whether the AI generates replies. When false the assistant is human-only: incoming messages are still received and stored but the AI never responds, so a human answers."}},"required":["thread_mode"],"description":"Schema for a public assistant conversation configuration"},"AssistantThreadModeSchema":{"type":"string","enum":["new","continue"],"description":"The thread mode of the assistant, either \"new\" for new threads or \"continue\" for continuing existing threads"},"PublicAssistantWidgetConfigSchema":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/AssistantWidgetModeSchema"},"appearance":{"$ref":"#/components/schemas/AssistantWidgetAppearanceSchema"},"position":{"$ref":"#/components/schemas/AssistantWidgetPositionSchema"},"omnibar_minimize_desktop":{"type":"boolean","description":"Fold the omnibar into its compact centered button while visitors scroll on desktop too. On mobile viewports it always folds."},"hide_powered_by":{"type":"boolean"},"enable_dictation":{"type":"boolean"},"enable_file_uploads":{"type":"boolean"},"colors":{"$ref":"#/components/schemas/AssistantWidgetColorsConfigSchema"},"teaser":{"$ref":"#/components/schemas/AssistantWidgetTeaserConfigSchema"},"channels":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PublicAssistantWidgetChannelSchema"}},"label":{"type":"string"},"chat_button_label":{"type":"string"}},"required":["items"]}},"required":["channels"],"description":"Widget configuration with channel references resolved to links"},"AssistantWidgetModeSchema":{"type":"string","enum":["button","omnibar","auto"],"default":"button","description":"Default shape of the embedded widget: corner bubble button, centered omnibar, or auto (omnibar until the visitor has a conversation). A mode attribute on the embed element overrides it, and a visitor’s own header-toggle pick outranks both on desktop; mobile has no toggle and always follows the attribute or this setting."},"AssistantWidgetAppearanceSchema":{"type":"string","enum":["auto","light","dark"],"default":"auto","description":"Theme of the widget: follow the visitor system or force one"},"AssistantWidgetPositionSchema":{"type":"string","enum":["right","left"],"default":"right","description":"Corner where the bubble launcher is anchored (the omnibar is always centered). A position attribute on the embed element overrides it."},"AssistantWidgetColorsConfigSchema":{"type":"object","properties":{"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$/i","description":"Accent color used inside the chat (buttons, visitor messages, links)"},"launcher_background":{"type":"string","pattern":"^#[0-9a-f]{6}$/i","description":"Background color of the widget button; the icon color adapts automatically"}},"default":{},"description":"Color overrides for the widget"},"AssistantWidgetTeaserConfigSchema":{"type":"object","properties":{"enabled":{"type":"boolean"},"message":{"type":"string","maxLength":140,"description":"Short invitation shown next to the closed widget button"},"modes":{"type":"string","enum":["all","button","omnibar"],"default":"all","description":"Which widget modes show the teaser: both, only the bubble button, or only the omnibar"},"suggestions":{"type":"string","enum":["all","button","omnibar","none"],"default":"button","description":"Which widget modes show the suggested replies with the teaser, or none. Defaults to the bubble button; the omnibar already shows them when focused, independent of this setting."},"delay_seconds":{"type":"integer","minimum":0,"maximum":120,"default":3,"description":"Seconds to wait before showing the teaser"},"frequency":{"$ref":"#/components/schemas/AssistantWidgetTeaserFrequencySchema"},"devices":{"$ref":"#/components/schemas/AssistantWidgetTeaserDevicesSchema"},"version":{"type":"integer","minimum":1,"default":1,"description":"Bump to show the teaser again to visitors who already dismissed it"}},"default":{},"description":"Proactive teaser configuration for the widget. The suggested replies shown with the teaser come from conversation.suggested_messages."},"AssistantWidgetTeaserFrequencySchema":{"type":"string","enum":["once_per_visitor","once_per_session","every_visit"],"default":"once_per_visitor","description":"How often the teaser can show again to the same visitor"},"AssistantWidgetTeaserDevicesSchema":{"type":"string","enum":["all","desktop","mobile"],"default":"desktop","description":"Devices where the teaser shows"},"PublicAssistantWidgetChannelSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/AssistantWidgetChannelTypeSchema"},"label":{"type":"string"},"url":{"type":"string"}},"required":["type","url"],"description":"A resolved widget channel link"},"AssistantWidgetChannelTypeSchema":{"type":"string","enum":["whatsapp","messenger","instagram","telegram","email","phone","link"],"description":"Type of a widget channel link"},"PublicAssistantChannelSchema":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"has_connection":{"type":"boolean"},"identity":{"type":["string","null"],"description":"The channel identity messages are exchanged through, e.g the WhatsApp phone number"}},"required":["id","enabled","has_connection","identity"],"description":"Schema for a public assistant channel"},"UserLimitedSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string","format":"email"},"avatar":{"type":["string","null"]},"seen_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","email","avatar","seen_at"],"description":"The assigned user for the conversation"},"AssistantConfigSchema":{"type":"object","properties":{"instructions":{"type":"string","maxLength":30000,"description":"The instructions for the assistant"},"language":{"$ref":"#/components/schemas/ModelLanguageSchema"},"model":{"type":"string","minLength":1,"maxLength":128,"description":"The model to use for the assistant"},"stt":{"$ref":"#/components/schemas/AssistantSttConfigSchema"},"tts":{"$ref":"#/components/schemas/AssistantTtsConfigSchema"},"conversation":{"$ref":"#/components/schemas/AssistantConversationConfigSchema"},"widget":{"$ref":"#/components/schemas/AssistantWidgetConfigSchema"},"knowledge_scope":{"$ref":"#/components/schemas/KnowledgeModeSchema"},"timezone":{"allOf":[{"$ref":"#/components/schemas/TimezoneValueSchema"},{"description":"IANA timezone for the assistant (e.g. \"America/New_York\")"}]}},"required":["language","model","stt","tts","conversation","knowledge_scope","timezone"],"description":"Schema for the configuration of an assistant"},"ModelLanguageSchema":{"type":"string","enum":["auto","en","es"],"description":"List of supported languages for the model in ISO 639-1 format or \"auto\""},"AssistantSttConfigSchema":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":128}},"required":["model"],"description":"Schema for the STT configuration of an assistant"},"AssistantTtsConfigSchema":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":128},"voice_id":{"type":"string","minLength":1,"maxLength":128}},"required":["model","voice_id"],"description":"Schema for the TTS configuration of an assistant"},"AssistantConversationConfigSchema":{"type":"object","properties":{"thread_mode":{"$ref":"#/components/schemas/AssistantThreadModeSchema"},"welcome_banner":{"type":"string","maxLength":256,"description":"Static greeting text displayed in the UI when users start a new conversation"},"suggested_messages":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":5,"description":"Suggested messages displayed to users when they start a new conversation"},"auto_intro_message":{"type":"string","maxLength":256,"description":"First message automatically sent by the assistant only when a conversation begins via API call"},"enable_memories":{"type":"boolean","description":"Whether to enable the \"Manage Memories\" tool for the assistant"},"enable_end_conversation_tool":{"type":"boolean","description":"Whether to enable the \"Close Conversation\" tool for the assistant"},"enable_transfer_to_human_tool":{"type":"boolean","description":"Whether to enable the \"Transfer to Human\" tool for the assistant"},"routing_instructions":{"type":"string","maxLength":30000,"description":"Business instructions that steer how this assistant routes transfers to a human (which member or team to prefer, when to escalate). Appended to the transfer tool guidance."},"enable_block_contact_tool":{"type":"boolean","description":"Whether to enable the \"Block Contact\" tool for the assistant"},"enable_ai_replies":{"type":"boolean","description":"Whether the AI generates replies. When false the assistant is human-only: incoming messages are still received and stored but the AI never responds, so a human answers."},"enable_auto_resolve":{"type":"boolean","description":"Whether inactive conversations should automatically resolve after a period of inactivity"},"enable_auto_follow_ups":{"type":"boolean","description":"Whether the assistant can automatically follow up on conversations"},"follow_up_instructions":{"type":"string","maxLength":30000,"description":"Business instructions that steer follow-up behavior (cadence, hours, stop rules, tone). Override the default follow-up guidance."},"enable_auto_csat":{"type":"boolean","description":"Whether the assistant should automatically score customer satisfaction (CSAT) when closing conversations"},"enable_private_chats":{"type":"boolean","description":"Whether to enable private chats that do not appear in the inbox"},"enable_update_contact_tool":{"type":"boolean","description":"Whether to enable the assistant to collect and update contact information (name, email, phone)"}},"required":["thread_mode","enable_memories","enable_transfer_to_human_tool"],"description":"Configuration options for the conversation thread of the assistant"},"AssistantWidgetConfigSchema":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/AssistantWidgetModeSchema"},"appearance":{"$ref":"#/components/schemas/AssistantWidgetAppearanceSchema"},"position":{"$ref":"#/components/schemas/AssistantWidgetPositionSchema"},"omnibar_minimize_desktop":{"type":"boolean","description":"Fold the omnibar into its compact centered button while visitors scroll on desktop too. On mobile viewports it always folds."},"hide_powered_by":{"type":"boolean"},"enable_dictation":{"type":"boolean"},"enable_file_uploads":{"type":"boolean"},"colors":{"$ref":"#/components/schemas/AssistantWidgetColorsConfigSchema"},"teaser":{"$ref":"#/components/schemas/AssistantWidgetTeaserConfigSchema"},"channels":{"$ref":"#/components/schemas/AssistantWidgetChannelsConfigSchema"}},"default":{},"description":"Configuration of the embeddable web chat widget"},"AssistantWidgetChannelsConfigSchema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AssistantWidgetChannelItemSchema"},"maxItems":20,"default":[]},"label":{"type":"string","maxLength":48,"description":"Heading above the channels menu; defaults to \"Talk to us on\""},"chat_button_label":{"type":"string","maxLength":48,"description":"Label of the launcher chat action; defaults to \"Chat with us\""}},"default":{},"description":"Alternative channels offered in the widget launcher menu when any are configured"},"AssistantWidgetChannelItemSchema":{"type":"object","properties":{"integration_id":{"type":"string","maxLength":128,"description":"Connected assistant integration to link to; the URL is generated from the connection and ignored when the integration no longer exists"},"enabled":{"type":"boolean","description":"Connected channels are included by default; set to false to hide one from the widget"},"type":{"allOf":[{"$ref":"#/components/schemas/AssistantWidgetChannelTypeSchema"},{"description":"Type of a custom channel link"}]},"label":{"type":"string","maxLength":48},"url":{"type":"string","maxLength":2048,"format":"uri","description":"Destination of a custom link channel"},"email":{"type":"string","maxLength":320,"format":"email","description":"Address of a custom email channel"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","description":"E.164 number of a custom phone channel"}},"description":"A widget channel link: either a connected integration reference or a custom entry"},"KnowledgeModeSchema":{"type":"string","enum":["all","restricted"],"description":"The knowledge scope of the assistant"},"ChatMessageSchema":{"type":"object","properties":{"id":{"type":"string"},"role":{"$ref":"#/components/schemas/ModelMessageRoleSchema"},"model":{"type":"string","description":"The model used for the message"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ModelMessageSchema"},"description":"The message content"},"member":{"$ref":"#/components/schemas/ChatMemberSchema"},"status":{"$ref":"#/components/schemas/ChatStatusSchema"},"error":{"type":"string","description":"Error message if the message failed"},"broadcast_id":{"type":"string","description":"ID of the broadcast this message originates from"},"is_broadcast_message":{"type":"boolean","description":"Whether this message was sent via a broadcast template"},"usage":{"$ref":"#/components/schemas/ModelUsageSchema"},"delivered_at":{"type":["string","null"],"format":"date-time","description":"When the message was delivered to the recipient"},"reactions":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageReactionSchema"},"description":"Emoji reactions on the message"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","role","model","status","created_at","updated_at"],"description":"The chat message schema"},"ModelMessageRoleSchema":{"type":"string","enum":["user","assistant","system","tool","event","note"],"description":"The role of the message"},"ModelMessageSchema":{"oneOf":[{"$ref":"#/components/schemas/ModelSystemMessageSchema"},{"$ref":"#/components/schemas/ModelAssistantMessageSchema"},{"$ref":"#/components/schemas/ModelUserMessageSchema"},{"$ref":"#/components/schemas/ModelToolMessageSchema"},{"$ref":"#/components/schemas/ModelEventMessageSchema"},{"$ref":"#/components/schemas/ModelNoteMessageSchema"}],"discriminator":{"propertyName":"role","mapping":{"system":"#/components/schemas/ModelSystemMessageSchema","assistant":"#/components/schemas/ModelAssistantMessageSchema","user":"#/components/schemas/ModelUserMessageSchema","tool":"#/components/schemas/ModelToolMessageSchema","event":"#/components/schemas/ModelEventMessageSchema","note":"#/components/schemas/ModelNoteMessageSchema"}}},"ModelSystemMessageSchema":{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"parts":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/ModelTextPartSchema"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/ModelTextPartSchema"}}}}},"required":["role","parts"],"description":"System message"},"ModelTextPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"audio":{"$ref":"#/components/schemas/FileSchema"},"html":{"type":"boolean","description":"When true, text holds the raw original inbound email HTML, stored verbatim. Clients sanitize and render it; the model receives markdown derived at read time."},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","text"]},"ModelAssistantMessageSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the assistant message"},"role":{"type":"string","enum":["assistant"]},"parts":{"type":"array","items":{"$ref":"#/components/schemas/ModelAssistantMessagePartsSchema"}},"reactions":{"type":"string","maxLength":1024,"description":"Prerendered emoji reactions on the message, injected at prompt build time"}},"required":["role","parts"],"description":"Assistant message"},"ModelAssistantMessagePartsSchema":{"oneOf":[{"$ref":"#/components/schemas/ModelTextPartSchema"},{"$ref":"#/components/schemas/ModelFilePartSchema"},{"$ref":"#/components/schemas/ModelToolCallPartSchema"},{"$ref":"#/components/schemas/ModelMessageReasoningSchema"},{"$ref":"#/components/schemas/ModelSourcePartSchema"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/ModelTextPartSchema","file":"#/components/schemas/ModelFilePartSchema","tool_call":"#/components/schemas/ModelToolCallPartSchema","reasoning":"#/components/schemas/ModelMessageReasoningSchema","source":"#/components/schemas/ModelSourcePartSchema"}},"description":"Parts of the assistant message"},"ModelFilePartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"url":{"type":"string"},"kind":{"$ref":"#/components/schemas/ModelFileKindSchema"},"file":{"$ref":"#/components/schemas/FileSchema"},"auto_consume":{"type":"boolean","description":"Whether this file should be automatically consumed and processed by the model"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","url"]},"ModelFileKindSchema":{"type":"string","enum":["voice","sticker"],"description":"Marks communication-only files (voice notes, stickers) from integrations so they can be excluded from the contact files tab."},"ModelToolCallPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"]},"id":{"type":"string","description":"Unique identifier for the tool call"},"name":{"type":"string","description":"The name of the tool to call"},"display_name":{"type":"string"},"action_name":{"type":"string"},"description":{"type":"string","description":"Model-authored, present-tense summary of what this call is doing (lifted from the injected _description param when the tool sets describe). Shown as the action title in the UI."},"args":{"$ref":"#/components/schemas/ModelToolCallArgumentsSchema"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Metadata associated with the tool call, can include signature information"},"approval":{"$ref":"#/components/schemas/ConnectionActionApprovalSchema"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id","name"]},"ModelToolCallArgumentsSchema":{"description":"Arguments for the tool call"},"ConnectionActionApprovalSchema":{"type":"object","properties":{"title":{"type":"string","maxLength":140,"description":"The approval as one yes/no question ending in \"?\", in the conversation language"},"accept_button":{"type":"string","maxLength":32,"description":"Label for the accept button, in the conversation language"},"reject_button":{"type":"string","maxLength":32,"description":"Label for the reject button, in the conversation language"},"decision":{"$ref":"#/components/schemas/ConnectionActionApprovalDecisionSchema"},"decided_at":{"type":"number","description":"Decision timestamp in milliseconds since epoch"},"decided_by_member_id":{"type":"string","description":"Encoded chat member id of the decider"},"reason":{"type":"string","maxLength":512,"description":"Optional reason supplied with the decision"}},"required":["title","accept_button","reject_button"],"description":"Approval prompt and decision state when the action requires confirmation before running"},"ConnectionActionApprovalDecisionSchema":{"type":"string","enum":["accepted","rejected"],"description":"How a pending approval was resolved"},"ModelMessageReasoningSchema":{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string","description":"Unique identifier for the message part"},"text":{"type":"string"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id","text"]},"ModelSourcePartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["source"]},"id":{"type":"string","description":"Unique identifier for the source, typically a link identifier"},"url":{"type":"string"},"title":{"type":"string","description":"Title of the source, typically a document or webpage title"},"description":{"type":"string","description":"Description of the source, can be a summary or excerpt from the content"},"favicon":{"type":"string","description":"Favicon URL for the source, can be used in UI"},"metadata":{"type":"object","properties":{},"additionalProperties":{},"description":"Metadata associated with the source, can include additional information like author, date, etc."},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id","url"],"description":"Source URL for the message, typically used for annotations"},"ModelUserMessageSchema":{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"parts":{"type":"array","items":{"$ref":"#/components/schemas/ModelUserPartsSchema"}},"name":{"type":"string","maxLength":512,"description":"Name of the user, used to give context on multiplayer chats"},"member_role":{"$ref":"#/components/schemas/ModelUserMessageMemberRoleSchema"},"timestamp":{"type":"string","maxLength":64,"description":"Formatted timestamp for the message, used for time-awareness in conversations"},"reactions":{"type":"string","maxLength":1024,"description":"Prerendered emoji reactions on the message, injected at prompt build time"},"message_id":{"type":"string","maxLength":16,"description":"Short reference to the stored message (first uuid segment), injected at prompt build time so tools can target the message"}},"required":["role","parts"],"description":"User message"},"ModelUserPartsSchema":{"oneOf":[{"$ref":"#/components/schemas/ModelTextPartSchema"},{"$ref":"#/components/schemas/ModelFilePartSchema"},{"$ref":"#/components/schemas/ModelImagePartSchema"},{"$ref":"#/components/schemas/ModelOptionSelectedPartSchema"},{"$ref":"#/components/schemas/ModelContactPartSchema"},{"$ref":"#/components/schemas/ModelLocationPartSchema"},{"$ref":"#/components/schemas/ModelReferencePartSchema"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/ModelTextPartSchema","file":"#/components/schemas/ModelFilePartSchema","image":"#/components/schemas/ModelImagePartSchema","option_selected":"#/components/schemas/ModelOptionSelectedPartSchema","contact":"#/components/schemas/ModelContactPartSchema","location":"#/components/schemas/ModelLocationPartSchema","reference":"#/components/schemas/ModelReferencePartSchema"}},"description":"User message parts"},"ModelImagePartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"url":{"type":"string"},"kind":{"$ref":"#/components/schemas/ModelFileKindSchema"},"file":{"$ref":"#/components/schemas/FileSchema"},"auto_consume":{"type":"boolean","description":"Whether this file should be automatically consumed and processed by the model"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","url"]},"ModelOptionSelectedPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["option_selected"]},"call_id":{"type":"string","description":"The ID of the tool call that generated the options"},"label":{"type":"string","description":"Label for the option selected"},"value":{"type":"string","description":"Value for the option selected"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","label","value"],"description":"Option selected by the user, typically used in multiple choice scenarios"},"ModelContactPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["contact"]},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type"]},"ModelLocationPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"latitude":{"type":"number"},"longitude":{"type":"number"},"name":{"type":"string"},"address":{"type":"string"},"url":{"type":"string"},"google_place_id":{"type":"string"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type"]},"ModelReferencePartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["reference"]},"kind":{"$ref":"#/components/schemas/ModelReferenceKindSchema"},"id":{"type":"string","description":"Public id of the referenced entity"},"name":{"type":"string","description":"Display name, snapshotted when the message was sent"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","kind","id","name"],"description":"An entity the user tagged in the message. Validated and enriched server-side on send; org chats only."},"ModelReferenceKindSchema":{"type":"string","enum":["agent","routine","contact","user","skill"],"description":"The kind of entity a reference points at"},"ModelUserMessageMemberRoleSchema":{"type":"string","enum":["customer","staff","user"],"description":"Role of the message sender: customer/staff for assistant chats, user for regular chats"},"ModelToolMessageSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the assistant message"},"role":{"type":"string","enum":["tool"]},"parts":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/ModelToolResultPartSchema"}],"discriminator":{"propertyName":"type","mapping":{"tool_result":"#/components/schemas/ModelToolResultPartSchema"}}}}},"required":["role","parts"],"description":"Tool message"},"ModelToolResultPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"id":{"type":"string","description":"Unique identifier for the tool call"},"name":{"type":"string","description":"The name of the tool called"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/ModelResultPartResultPartsSchema"},"description":"Parts of the tool call result"},"result":{"description":"The result of the tool call, can be any type based on the tool schema"},"refresh_tools":{"type":"boolean","description":"Runtime-only signal: when true, the agent loop rebuilds its tool set before the next step (e.g. after enable_tools / disable_tools). Stripped before the result is persisted."},"stop":{"type":"boolean","description":"Runtime-only signal: when true, the agent loop ends after this step instead of spawning the next turn (e.g. close_conversation with stop: true). Stripped before the result is persisted."},"is_error":{"type":"boolean","description":"Indicates if the tool call resulted in an error"},"timestamp":{"type":"number","description":"Timestamp of the tool call in milliseconds"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id","name"]},"ModelResultPartResultPartsSchema":{"oneOf":[{"$ref":"#/components/schemas/ModelTextPartSchema"},{"$ref":"#/components/schemas/ModelImagePartSchema"},{"$ref":"#/components/schemas/ModelFilePartSchema"},{"$ref":"#/components/schemas/ModelContactPartSchema"},{"$ref":"#/components/schemas/ModelLocationPartSchema"},{"$ref":"#/components/schemas/ModelSourcePartSchema"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/ModelTextPartSchema","image":"#/components/schemas/ModelImagePartSchema","file":"#/components/schemas/ModelFilePartSchema","contact":"#/components/schemas/ModelContactPartSchema","location":"#/components/schemas/ModelLocationPartSchema","source":"#/components/schemas/ModelSourcePartSchema"}},"description":"Parts of the tool call result"},"ModelEventMessageSchema":{"type":"object","properties":{"role":{"type":"string","enum":["event"]},"parts":{"type":"array","items":{"$ref":"#/components/schemas/ModelEventMessagePartsSchema"}},"name":{"type":"string"},"member_role":{"$ref":"#/components/schemas/ModelUserMessageMemberRoleSchema"},"timestamp":{"type":"string","maxLength":64}},"required":["role","parts"]},"ModelEventMessagePartsSchema":{"oneOf":[{"$ref":"#/components/schemas/ModelEventAssignmentPartSchema"},{"$ref":"#/components/schemas/ModelEventStatusChangePartSchema"},{"$ref":"#/components/schemas/ModelEventAiStatusPartSchema"},{"$ref":"#/components/schemas/ModelEventMuteChangePartSchema"},{"$ref":"#/components/schemas/ModelEventFollowUpPartSchema"},{"$ref":"#/components/schemas/ModelEventPaymentPartSchema"},{"$ref":"#/components/schemas/ModelEventAnalysisPartSchema"},{"$ref":"#/components/schemas/ModelEventReferralPartSchema"},{"$ref":"#/components/schemas/ModelEventApprovalDecisionPartSchema"},{"$ref":"#/components/schemas/ModelEventQuestionsAnsweredPartSchema"},{"$ref":"#/components/schemas/ModelEventLocationSharedPartSchema"},{"$ref":"#/components/schemas/ModelEventContactUpdatePartSchema"},{"$ref":"#/components/schemas/ModelEventConnectionConnectedPartSchema"},{"$ref":"#/components/schemas/ModelEventAgentRunStartedPartSchema"},{"$ref":"#/components/schemas/ModelEventAgentRunFinishedPartSchema"},{"$ref":"#/components/schemas/ModelEventReminderPartSchema"}],"discriminator":{"propertyName":"type","mapping":{"event_assignment":"#/components/schemas/ModelEventAssignmentPartSchema","event_status_change":"#/components/schemas/ModelEventStatusChangePartSchema","event_ai_status":"#/components/schemas/ModelEventAiStatusPartSchema","event_mute_change":"#/components/schemas/ModelEventMuteChangePartSchema","event_follow_up":"#/components/schemas/ModelEventFollowUpPartSchema","event_payment":"#/components/schemas/ModelEventPaymentPartSchema","event_analysis":"#/components/schemas/ModelEventAnalysisPartSchema","event_referral":"#/components/schemas/ModelEventReferralPartSchema","event_approval_decision":"#/components/schemas/ModelEventApprovalDecisionPartSchema","event_questions_answered":"#/components/schemas/ModelEventQuestionsAnsweredPartSchema","event_location_shared":"#/components/schemas/ModelEventLocationSharedPartSchema","event_contact_update":"#/components/schemas/ModelEventContactUpdatePartSchema","event_connection_connected":"#/components/schemas/ModelEventConnectionConnectedPartSchema","event_agent_run_started":"#/components/schemas/ModelEventAgentRunStartedPartSchema","event_agent_run_finished":"#/components/schemas/ModelEventAgentRunFinishedPartSchema","event_reminder":"#/components/schemas/ModelEventReminderPartSchema"}},"description":"Parts of the event message"},"ModelEventAssignmentPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_assignment"]},"assigned_user_id":{"type":["string","null"]},"source":{"$ref":"#/components/schemas/ModelEventSourceSchema"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","assigned_user_id","source"],"description":"Assignment event part - text generated from locales"},"ModelEventSourceSchema":{"type":"string","enum":["user","member","ai"],"description":"Who the event came from. 'user' is the contact, 'member' is a human agent on the business side, 'ai' is an assistant."},"ModelEventStatusChangePartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_status_change"]},"old_status":{"type":"string","enum":["OPEN","SNOOZED","CLOSED"]},"new_status":{"type":"string","enum":["OPEN","SNOOZED","CLOSED"]},"source":{"$ref":"#/components/schemas/ModelEventSourceSchema"},"follow_up_at":{"type":"string","format":"date-time","description":"Scheduled follow-up date (ISO 8601)"},"reason":{"type":"string","maxLength":512,"description":"AI analysis reason for the decision"},"csat_score":{"type":"integer","minimum":1,"maximum":5,"description":"AI-assigned customer satisfaction score (1-5)"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","old_status","new_status","source"],"description":"Status change event part (user-visible) - text generated from locales"},"ModelEventAiStatusPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_ai_status"]},"status":{"type":"boolean"},"source":{"$ref":"#/components/schemas/ModelEventSourceSchema"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","status","source"],"description":"AI toggle event part - text generated from locales"},"ModelEventMuteChangePartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_mute_change"]},"muted_until":{"type":["string","null"],"format":"date-time","description":"New mute expiry datetime (null = un-muted)"},"source":{"$ref":"#/components/schemas/ModelEventMuteSourceSchema"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","muted_until","source"],"description":"Mute change event part"},"ModelEventMuteSourceSchema":{"type":"string","enum":["member","system"],"description":"Source of the mute event: a human agent or the system."},"ModelEventFollowUpPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_follow_up"]},"old_status":{"type":"string","enum":["OPEN","SNOOZED","CLOSED"]},"new_status":{"type":"string","enum":["OPEN","SNOOZED","CLOSED"]},"reason":{"type":"string","maxLength":512,"description":"AI analysis reason for the follow-up"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type"],"description":"Follow-up event — AI re-engaging an inactive conversation"},"ModelEventPaymentPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_payment"]},"provider":{"type":"string","enum":["stripe"]},"status":{"type":"string","enum":["paid"]},"amount_total":{"type":"integer","description":"Amount paid in the smallest currency unit (e.g. cents)"},"currency":{"type":"string","maxLength":8},"reference":{"type":"string","maxLength":256,"description":"Provider reference, e.g. the Stripe checkout session ID"},"link":{"type":"string","maxLength":2048,"description":"Link to the payment in the provider dashboard"},"paid_at":{"type":["string","null"],"format":"date-time","description":"When the payment was made"},"method":{"type":"object","properties":{"brand":{"type":"string","maxLength":32},"last4":{"type":"string","maxLength":4},"name":{"type":"string","maxLength":256}}},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"quantity":{"type":"integer"},"amount_total":{"type":"integer","description":"Line total in the smallest currency unit"}},"required":["name","quantity"]}},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","provider","status","amount_total","currency","reference"],"description":"Payment event — a checkout the customer completed"},"ModelEventAnalysisPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_analysis"]},"csat_score":{"type":"integer","minimum":1,"maximum":5,"description":"AI-assigned customer satisfaction score (1-5)"},"reason":{"type":"string","maxLength":512,"description":"Brief reason for the analysis result"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type"],"description":"Analysis event — AI post-conversation analysis (CSAT, etc.)"},"ModelEventReferralPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_referral"]},"referral":{"$ref":"#/components/schemas/ChatReferralSchema"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","referral"],"description":"Referral event — conversation initiated or resumed from an ad, post, or story"},"ChatReferralSchema":{"oneOf":[{"$ref":"#/components/schemas/ChatMessengerAdSchema"},{"$ref":"#/components/schemas/ChatMessengerProductSchema"},{"$ref":"#/components/schemas/ChatMessengerProductTemplateSchema"},{"$ref":"#/components/schemas/ChatWhatsAppAdSchema"},{"$ref":"#/components/schemas/ChatWhatsAppProductSchema"},{"$ref":"#/components/schemas/ChatWhatsAppOrderSchema"},{"$ref":"#/components/schemas/ChatInstagramAdSchema"},{"$ref":"#/components/schemas/ChatInstagramProductSchema"},{"$ref":"#/components/schemas/ChatInstagramProductTemplateSchema"},{"$ref":"#/components/schemas/ChatInstagramPostSchema"},{"$ref":"#/components/schemas/ChatInstagramReelSchema"},{"$ref":"#/components/schemas/ChatInstagramStorySchema"},{"$ref":"#/components/schemas/ChatInstagramStoryMentionSchema"},{"$ref":"#/components/schemas/ChatInstagramCommentSchema"},{"$ref":"#/components/schemas/ChatMessengerPostSchema"},{"$ref":"#/components/schemas/ChatMessengerReelSchema"},{"$ref":"#/components/schemas/ChatMessengerCommentSchema"},{"$ref":"#/components/schemas/ChatTikTokAdSchema"},{"$ref":"#/components/schemas/ChatTikTokPostShareSchema"},{"$ref":"#/components/schemas/ChatTikTokShortLinkSchema"},{"$ref":"#/components/schemas/ChatWebWidgetReferralSchema"}],"discriminator":{"propertyName":"type","mapping":{"messenger_ad":"#/components/schemas/ChatMessengerAdSchema","messenger_product":"#/components/schemas/ChatMessengerProductSchema","messenger_product_template":"#/components/schemas/ChatMessengerProductTemplateSchema","whatsapp_ad":"#/components/schemas/ChatWhatsAppAdSchema","whatsapp_product":"#/components/schemas/ChatWhatsAppProductSchema","whatsapp_order":"#/components/schemas/ChatWhatsAppOrderSchema","instagram_ad":"#/components/schemas/ChatInstagramAdSchema","instagram_product":"#/components/schemas/ChatInstagramProductSchema","instagram_product_template":"#/components/schemas/ChatInstagramProductTemplateSchema","instagram_post":"#/components/schemas/ChatInstagramPostSchema","instagram_reel":"#/components/schemas/ChatInstagramReelSchema","instagram_story":"#/components/schemas/ChatInstagramStorySchema","instagram_story_mention":"#/components/schemas/ChatInstagramStoryMentionSchema","instagram_comment":"#/components/schemas/ChatInstagramCommentSchema","messenger_post":"#/components/schemas/ChatMessengerPostSchema","messenger_reel":"#/components/schemas/ChatMessengerReelSchema","messenger_comment":"#/components/schemas/ChatMessengerCommentSchema","tiktok_ad":"#/components/schemas/ChatTikTokAdSchema","tiktok_post_share":"#/components/schemas/ChatTikTokPostShareSchema","tiktok_short_link":"#/components/schemas/ChatTikTokShortLinkSchema","web_widget":"#/components/schemas/ChatWebWidgetReferralSchema"}},"description":"Referral/commerce event data from Meta platforms — ads, products, orders."},"ChatMessengerAdSchema":{"type":"object","properties":{"type":{"type":"string","enum":["messenger_ad"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"ref":{"type":"string"},"ad_id":{"type":"string"},"source":{"type":"string"},"referer_uri":{"type":"string"},"ads_context_data":{"type":"object","properties":{"ad_title":{"type":"string"},"photo_url":{"type":"string"},"video_url":{"type":"string"},"post_id":{"type":"string"},"product_id":{"type":"string"}}}},"required":["type"]},"ChatMessageReferralPartsSchema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/ModelFilePartSchema"},{"$ref":"#/components/schemas/ModelImagePartSchema"}],"discriminator":{"propertyName":"type","mapping":{"file":"#/components/schemas/ModelFilePartSchema","image":"#/components/schemas/ModelImagePartSchema"}}}},"ChatMessengerProductSchema":{"type":"object","properties":{"type":{"type":"string","enum":["messenger_product"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"image_url":{"type":"string"},"price":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"}},"required":["id"]}},"required":["type","product"]},"ChatMessengerProductTemplateSchema":{"type":"object","properties":{"type":{"type":"string","enum":["messenger_product_template"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"retailer_id":{"type":"string"},"image_url":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"}},"required":["id"]}}},"required":["type","products"]},"ChatWhatsAppAdSchema":{"type":"object","properties":{"type":{"type":"string","enum":["whatsapp_ad"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"source_url":{"type":"string"},"source_id":{"type":"string"},"source_type":{"type":"string"},"headline":{"type":"string"},"body":{"type":"string"},"media_type":{"type":"string"},"image_url":{"type":"string"},"video_url":{"type":"string"},"thumbnail_url":{"type":"string"},"ctwa_clid":{"type":"string"}},"required":["type"]},"ChatWhatsAppProductSchema":{"type":"object","properties":{"type":{"type":"string","enum":["whatsapp_product"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"catalog_id":{"type":"string"},"product_retailer_id":{"type":"string"},"name":{"type":"string"},"image_url":{"type":"string"},"price":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"retailer_id":{"type":"string"}},"required":["type","catalog_id","product_retailer_id"]},"ChatWhatsAppOrderSchema":{"type":"object","properties":{"type":{"type":"string","enum":["whatsapp_order"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"catalog_id":{"type":"string"},"product_items":{"type":"array","items":{"type":"object","properties":{"product_retailer_id":{"type":"string"},"quantity":{"type":"number"},"item_price":{"type":"number"},"currency":{"type":"string"},"name":{"type":"string"},"image_url":{"type":"string"},"price":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"retailer_id":{"type":"string"}},"required":["product_retailer_id","quantity","item_price","currency"]}},"text":{"type":"string"}},"required":["type","catalog_id","product_items"]},"ChatInstagramAdSchema":{"type":"object","properties":{"type":{"type":"string","enum":["instagram_ad"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"ref":{"type":"string"},"ad_id":{"type":"string"},"source":{"type":"string"},"ads_context_data":{"type":"object","properties":{"ad_title":{"type":"string"},"photo_url":{"type":"string"},"video_url":{"type":"string"}}}},"required":["type"]},"ChatInstagramProductSchema":{"type":"object","properties":{"type":{"type":"string","enum":["instagram_product"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"image_url":{"type":"string"},"price":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"}},"required":["id"]}},"required":["type","product"]},"ChatInstagramProductTemplateSchema":{"type":"object","properties":{"type":{"type":"string","enum":["instagram_product_template"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"retailer_id":{"type":"string"},"image_url":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"}},"required":["id"]}}},"required":["type","products"]},"ChatInstagramPostSchema":{"type":"object","properties":{"type":{"type":"string","enum":["instagram_post"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"post_id":{"type":"string"},"post_media_id":{"type":"string"},"title":{"type":"string"},"media_url":{"type":"string"},"username":{"type":"string"},"permalink":{"type":"string"}},"required":["type"]},"ChatInstagramReelSchema":{"type":"object","properties":{"type":{"type":"string","enum":["instagram_reel"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"reel_video_id":{"type":"string"},"title":{"type":"string"},"media_url":{"type":"string"},"username":{"type":"string"},"permalink":{"type":"string"}},"required":["type"]},"ChatInstagramStorySchema":{"type":"object","properties":{"type":{"type":"string","enum":["instagram_story"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"story_media_id":{"type":"string"},"media_url":{"type":"string"},"username":{"type":"string"},"permalink":{"type":"string"}},"required":["type"]},"ChatInstagramStoryMentionSchema":{"type":"object","properties":{"type":{"type":"string","enum":["instagram_story_mention"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"media_url":{"type":"string"},"username":{"type":"string"},"permalink":{"type":"string"}},"required":["type"]},"ChatInstagramCommentSchema":{"type":"object","properties":{"type":{"type":"string","enum":["instagram_comment"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"comment_id":{"type":"string"},"media_id":{"type":"string"},"permalink":{"type":"string"},"text":{"type":"string"},"private_reply":{"type":"boolean","enum":[true]}},"required":["type","comment_id","private_reply"]},"ChatMessengerPostSchema":{"type":"object","properties":{"type":{"type":"string","enum":["messenger_post"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"post_id":{"type":"string"},"title":{"type":"string"},"permalink":{"type":"string"},"media_url":{"type":"string"}},"required":["type"]},"ChatMessengerReelSchema":{"type":"object","properties":{"type":{"type":"string","enum":["messenger_reel"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"reel_video_id":{"type":"string"},"title":{"type":"string"},"permalink":{"type":"string"},"media_url":{"type":"string"}},"required":["type"]},"ChatMessengerCommentSchema":{"type":"object","properties":{"type":{"type":"string","enum":["messenger_comment"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"comment_id":{"type":"string"},"post_id":{"type":"string"},"permalink":{"type":"string"},"text":{"type":"string"},"private_reply":{"type":"boolean","enum":[true]}},"required":["type","comment_id","private_reply"]},"ChatTikTokAdSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tiktok_ad"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"advertiser_id":{"type":"string"},"ad_id":{"type":"string"},"ad_name":{"type":"string"},"embed_url":{"type":"string"},"message_material_id":{"type":"string"},"timestamp":{"type":"number"}},"required":["type"]},"ChatTikTokPostShareSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tiktok_post_share"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"video_id":{"type":"string"},"embed_url":{"type":"string"}},"required":["type"]},"ChatTikTokShortLinkSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tiktok_short_link"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"ref":{"type":"string"},"prefilled_message":{"type":"string"},"prefilled_message_audit_status":{"type":"string","enum":["PASS","REJECT"]}},"required":["type"]},"ChatWebWidgetReferralSchema":{"type":"object","properties":{"type":{"type":"string","enum":["web_widget"]},"parts":{"$ref":"#/components/schemas/ChatMessageReferralPartsSchema"},"utm_source":{"type":"string"},"utm_medium":{"type":"string"},"utm_campaign":{"type":"string"},"utm_term":{"type":"string"},"utm_content":{"type":"string"},"utm_ad":{"type":"string"},"utm_match":{"type":"string"},"utm_referrer":{"type":"string"},"gclid":{"type":"string"},"fbclid":{"type":"string"},"msclkid":{"type":"string"},"ttclid":{"type":"string"},"li_fat_id":{"type":"string"},"rdt_cid":{"type":"string"},"referrer":{"type":"string"},"page_url":{"type":"string"}},"required":["type"]},"ModelEventApprovalDecisionPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_approval_decision"]},"tool_call_id":{"type":"string","description":"Tool call id the decision was made on"},"action_id":{"type":"string","description":"Canonical id of the gated action (the tool name, e.g. TOOLS:HTTP_REQUEST)"},"action_name":{"type":"string","description":"User-facing display name of the action at decision time, when available"},"decision":{"type":"string","enum":["accepted","rejected"]},"reason":{"type":"string","maxLength":512,"description":"Optional reason supplied with the decision"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","tool_call_id","action_id","decision"],"description":"Approval decision event — a pending action was accepted or rejected by a chat member. The decider is the owner of the parent ChatMessage."},"ModelEventQuestionsAnsweredPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_questions_answered"]},"tool_call_id":{"type":"string","description":"Tool call id of the ask_questions call that was answered"},"answered_count":{"type":"number","description":"How many questions received an answer"},"skipped_count":{"type":"number","description":"How many questions were skipped (no response)"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","tool_call_id","answered_count","skipped_count"],"description":"Questions answered event — a pending ask_questions call was answered by a chat member. The answerer is the owner of the parent ChatMessage."},"ModelEventLocationSharedPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_location_shared"]},"tool_call_id":{"type":"string","description":"Tool call id of the request_location call that was answered"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","tool_call_id"],"description":"Location shared event — a pending request_location call was answered by a chat member. The sharer is the owner of the parent ChatMessage."},"ModelEventContactUpdatePartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_contact_update"]},"changes":{"type":"array","items":{"$ref":"#/components/schemas/ModelContactFieldChangeSchema"},"minItems":1},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","changes"],"description":"AI updated one or more contact properties. Emitted from the update_contact tool callback or the post-conversation analysis pass."},"ModelContactFieldChangeSchema":{"type":"object","properties":{"field":{"type":"string","description":"Contact field key."},"before":{},"after":{}},"required":["field"],"description":"A single contact-property change. FE looks up the rest (id, name, type) by key against the assistant's contact-field whitelist."},"ModelEventConnectionConnectedPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_connection_connected"]},"tool_call_id":{"type":"string","description":"Tool call id this connection answers (the request_connection call)"},"connection_id":{"type":"string","description":"The connected connection id (con_...)"},"connection_type":{"type":"string","description":"Connection app type, e.g. GOOGLE_SHEETS"},"connection_name":{"type":"string","description":"The name of the connection, e.g. \"Google Sheets\""},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","tool_call_id","connection_id"],"description":"Connection-connected event: the user connected an app in response to request_connection."},"ModelEventAgentRunStartedPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_agent_run_started"]},"routine_id":{"type":"string","description":"Routine that fired this run (rtn_...); absent for manual runs"},"origin":{"$ref":"#/components/schemas/ModelEventAgentRunOriginSchema"},"note":{"type":"string","description":"Note the previous run left for this one"},"agent_id":{"type":"string","description":"Agent whose chat dispatched this run (agt_...); only for origin 'agent'"},"agent_name":{"type":"string","description":"Name of the agent whose chat dispatched this run; only for origin 'agent'"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","origin"],"description":"Run started — the first message of every run chat, recording what fired it."},"ModelEventAgentRunOriginSchema":{"type":"string","enum":["scheduled","manual","webhook","agent"],"description":"Origin of the agent run"},"ModelEventAgentRunFinishedPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_agent_run_finished"]},"chat_id":{"type":"string","description":"The run chat that finished (chat_...)"},"agent_id":{"type":"string","description":"The agent that ran (agt_...); absent for agentless runs"},"agent_name":{"type":"string","description":"Name of the agent that ran; absent for agentless runs"},"status":{"type":"string","enum":["RUNNING","COMPLETED","FAILED","CANCELED"],"description":"How the run ended"},"tool_call_id":{"type":"string","description":"The run_agent call that dispatched it — its tool result carries the outcome"},"summary":{"type":"string","description":"The run's closing assistant message (older events only — the outcome now lives on the dispatching tool result)"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","chat_id","status"],"description":"Sub-agent run finished — posted to the chat that dispatched it, so the conversation can pick the result up."},"ModelEventReminderPartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["event_reminder"]},"reminder_id":{"type":"string","description":"The reminder that fired (rem_...)"},"note":{"type":"string","description":"The note the AI left itself when scheduling the reminder"},"occurrence":{"type":"number","description":"How many times this reminder has fired, including this one"},"recurring":{"type":"boolean","description":"Whether the reminder fires again after this one"},"next_fire_at":{"type":"string","description":"Next fire time (ISO), when the reminder recurs"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","reminder_id","note","occurrence","recurring"],"description":"Reminder fired — a wake-up the AI scheduled on this chat came due."},"ModelNoteMessageSchema":{"type":"object","properties":{"role":{"type":"string","enum":["note"]},"parts":{"type":"array","items":{"$ref":"#/components/schemas/ModelUserPartsSchema"}},"name":{"type":"string","maxLength":512,"description":"Name of the staff member who wrote the note"},"member_role":{"$ref":"#/components/schemas/ModelUserMessageMemberRoleSchema"},"timestamp":{"type":"string","maxLength":64,"description":"Formatted timestamp for the note, used for time-awareness in conversations"}},"required":["role","parts"]},"ChatStatusSchema":{"type":"string","enum":["RUNNING","COMPLETED","FAILED","CANCELED"],"description":"The chat status"},"ModelUsageSchema":{"type":"object","properties":{"input_tokens":{"type":"number","description":"Number of input tokens used by the model"},"output_tokens":{"type":"number","description":"Number of output tokens generated by the model"},"total_tokens":{"type":"number","description":"Total number of tokens used by the model"},"reasoning_tokens":{"type":"number","description":"Number of reasoning tokens used by the model"},"input_tokens_cache_read":{"type":"number","description":"Number of input tokens cached read by the model"},"input_tokens_cache_write":{"type":"number","description":"Number of input tokens cached written by the model"},"turns":{"type":"array","items":{"$ref":"#/components/schemas/ModelUsageTurnSchema"}}},"description":"The usage information for the message"},"ModelUsageTurnSchema":{"type":"object","properties":{"input_tokens":{"type":"number","description":"Number of input tokens used by the model"},"output_tokens":{"type":"number","description":"Number of output tokens generated by the model"},"total_tokens":{"type":"number","description":"Total number of tokens used by the model"},"reasoning_tokens":{"type":"number","description":"Number of reasoning tokens used by the model"},"input_tokens_cache_read":{"type":"number","description":"Number of input tokens cached read by the model"},"input_tokens_cache_write":{"type":"number","description":"Number of input tokens cached written by the model"}},"description":"The usage of a turn"},"ChatMessageReactionSchema":{"type":"object","properties":{"emoji":{"type":"string"},"member_id":{"type":"string","description":"Reacting member; absent when the AI reacted"}},"required":["emoji"],"description":"An emoji reaction on a chat message"},"ChatReminderSchema":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":"string"},"schedule":{"type":["string","null"]},"timezone":{"allOf":[{"$ref":"#/components/schemas/TimezoneValueSchema"},{"type":["string","null"]}]},"next_run_at":{"type":["string","null"],"format":"date-time"},"occurrences":{"type":"number"},"max_occurrences":{"type":["number","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","note","schedule","timezone","next_run_at","occurrences","max_occurrences","created_at"]},"ChatAttentionItemSchema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"$ref":"#/components/schemas/ChatAttentionKindSchema"},"message_id":{"type":"string"},"tool_call_id":{"type":"string"},"action_name":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","kind","message_id","tool_call_id","action_name","created_at"]},"ChatAttentionKindSchema":{"type":"string","enum":["approval","question","ask","connection"]},"OrgWebhookContactBlockedEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["contact.blocked"]},"data":{"$ref":"#/components/schemas/ContactSchema"}},"required":["type","data"],"description":"A contact was blocked and will no longer be messaged"},"ContactSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"blocked":{"type":"boolean"},"blocked_at":{"type":"string","format":"date-time"},"unsubscribed":{"type":"boolean"},"unsubscribed_at":{"type":"string","format":"date-time"},"unsubscribe_reason":{"type":"string"},"unsubscribe_feedback":{"type":"string"},"ai_replies":{"type":"boolean"},"ai_replies_at":{"type":"string","format":"date-time"},"is_admin":{"type":"boolean"},"channels":{"type":"array","items":{"$ref":"#/components/schemas/ContactChannelSchema"}},"segments":{"type":"array","items":{"$ref":"#/components/schemas/SegmentLimitedSchema"}},"properties":{"type":"object","additionalProperties":{}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","blocked","unsubscribed","ai_replies","is_admin","channels","segments","properties","created_at","updated_at"],"description":"Schema for the contact"},"ContactChannelSchema":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"user_id":{"type":"string","description":"The unique identifier for the contact channel, e.g Phone Number or User ID"},"avatar":{"type":["string","null"],"description":"The avatar for the contact channel, e.g X Avatar URL"},"name":{"type":["string","null"],"description":"The name for the contact channel, e.g Full Name"},"username":{"type":["string","null"],"description":"The username for the contact channel, e.g Username"},"email":{"type":["string","null"],"description":"The email for the contact channel, e.g Email"},"phone":{"type":["string","null"],"description":"The phone number for the contact channel, e.g Phone Number"},"country":{"type":["string","null"],"description":"The country code associated with the contact channel, e.g US for United States"},"agent":{"type":["string","null"],"description":"The user agent associated with the contact channel"},"ip":{"type":["string","null"],"description":"The IP address associated with the contact channel"},"language":{"type":["string","null"],"description":"The language code associated with the contact channel, e.g en for English"},"link":{"type":"string","description":"A link to the contact channel, e.g a link to the social media profile"},"platform_data":{"$ref":"#/components/schemas/ContactChannelPlatformDataSchema"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","type","user_id","avatar","name","username","email","phone","country","agent","ip","language","platform_data","created_at","updated_at"],"description":"Schema for the contact channel"},"ContactChannelPlatformDataSchema":{"type":"object","properties":{},"description":"Schema for the platform-specific data of a contact channel"},"OrgWebhookContactUnsubscribedEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["contact.unsubscribed"]},"data":{"$ref":"#/components/schemas/ContactSchema"}},"required":["type","data"],"description":"A contact opted out. `unsubscribe_reason` carries why (`manual`, `bounce`, `complaint`, ...)"},"OrgWebhookBroadcastFailedEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["broadcast.failed"]},"data":{"$ref":"#/components/schemas/BroadcastSchema"}},"required":["type","data"],"description":"A broadcast failed"},"BroadcastSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/BroadcastTypeSchema"},"status":{"$ref":"#/components/schemas/BroadcastStatusSchema"},"show_in_inbox":{"type":"boolean"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"pace_minutes":{"type":["number","null"]},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"recipients_count":{"type":"number"},"queued_count":{"type":"number"},"sending_count":{"type":"number"},"skipped_count":{"type":"number"},"sent_count":{"type":"number"},"failed_count":{"type":"number"},"bounced_count":{"type":"number"},"delivered_count":{"type":"number"},"opened_count":{"type":"number"},"played_count":{"type":"number"},"click_count":{"type":"number"},"complained_count":{"type":"number"},"unsubscribed_count":{"type":"number"},"error_message":{"type":["string","null"]},"send_cooldown":{"$ref":"#/components/schemas/BroadcastSendCooldownSchema"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/SegmentLimitedSchema"}},"fields":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastFieldSchema"}},"send_to_all":{"type":"boolean"},"templates":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastTemplateSchema"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","type","status","show_in_inbox","scheduled_at","pace_minutes","started_at","completed_at","recipients_count","queued_count","sending_count","skipped_count","sent_count","failed_count","bounced_count","delivered_count","opened_count","played_count","click_count","complained_count","unsubscribed_count","error_message","send_cooldown","segments","fields","send_to_all","templates","created_at","updated_at"],"description":"Schema for a broadcast"},"BroadcastTypeSchema":{"type":"string","enum":["MARKETING","TRANSACTIONAL"],"description":"The mode of the broadcast: MARKETING (bulk to many people) or TRANSACTIONAL (single-recipient trigger across channels)"},"BroadcastStatusSchema":{"type":"string","enum":["DRAFT","SCHEDULED","SENDING","SENT","CANCELLED","FAILED","ACTIVE","PAUSED"],"description":"The status of the broadcast"},"BroadcastSendCooldownSchema":{"type":["object","null"],"properties":{"resumes_at":{"type":"string"}},"required":["resumes_at"],"description":"Provider-wide send pause on this broadcast — sending resumes automatically"},"BroadcastFieldSchema":{"type":"object","properties":{"id":{"type":"string"},"broadcast_id":{"type":"string"},"key":{"type":"string"},"default_value":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","broadcast_id","key","default_value","created_at"],"description":"A broadcast field"},"BroadcastTemplateSchema":{"type":"object","properties":{"id":{"type":"string"},"broadcast_id":{"type":"string"},"connection_id":{"type":["string","null"]},"channel_type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"recipients_count":{"type":"number"},"config":{"$ref":"#/components/schemas/BroadcastTemplateConfigSchema"},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","broadcast_id","connection_id","channel_type","recipients_count","config","error","created_at","updated_at"],"description":"Schema for a broadcast template"},"BroadcastTemplateConfigSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InputValuesWithDefinitionsSchema"},"description":"Configuration object for the broadcast template"},"InputValuesWithDefinitionsSchema":{"type":"object","properties":{"input":{"allOf":[{"$ref":"#/components/schemas/InputValuesSchema"},{"description":"Values of the fields"}]},"definitions":{"type":"array","items":{"$ref":"#/components/schemas/DynamicFieldsSchema"}}},"required":["input"],"description":"The input values with their dynamic field definitions"},"OrgWebhookBroadcastBouncedEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["broadcast.bounced"]},"data":{"$ref":"#/components/schemas/OrgWebhookBroadcastRecipientFailureSchema"}},"required":["type","data"],"description":"A broadcast email hard-bounced — the address is unreachable"},"OrgWebhookBroadcastRecipientFailureSchema":{"type":"object","properties":{"broadcast_id":{"type":["string","null"]},"contact_id":{"type":["string","null"]},"email":{"type":"string"},"message_id":{"type":"string"},"reason":{"type":["string","null"],"description":"Provider diagnostic — bounce diagnostic code or complaint feedback type"}},"required":["broadcast_id","contact_id","email","message_id","reason"]},"OrgWebhookBroadcastComplainedEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["broadcast.complained"]},"data":{"$ref":"#/components/schemas/OrgWebhookBroadcastRecipientFailureSchema"}},"required":["type","data"],"description":"A recipient marked a broadcast email as spam"},"OrgWebhookBroadcastSuppressedEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["broadcast.suppressed"]},"data":{"$ref":"#/components/schemas/OrgWebhookBroadcastRecipientFailureSchema"}},"required":["type","data"],"description":"A broadcast email was not sent because the address is on the suppression list"},"QueryOrgWebhookDeliveriesSchema":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","DELIVERED","FAILED","SKIPPED"]},"event":{"$ref":"#/components/schemas/OrgWebhookEventIdSchema"}}},"OrgWebhookEventIdSchema":{"type":"string","enum":["ping","chat.assigned","contact.blocked","contact.unsubscribed","broadcast.failed","broadcast.bounced","broadcast.complained","broadcast.suppressed"],"description":"An event a delivery can carry"},"QueryAuditLogsSchema":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/AuditLogActionFilterSchema"},"from":{"type":["string","null"],"format":"date-time","description":"Filter logs from this date (inclusive), YYYY-MM-DD"},"to":{"type":["string","null"],"format":"date-time","description":"Filter logs until this date (inclusive), YYYY-MM-DD"},"user_id":{"type":"string","maxLength":128,"description":"Filter by user who performed the action"},"assistant_id":{"type":"string","maxLength":128,"description":"Filter by affected assistant"},"agent_id":{"type":"string","maxLength":128,"description":"Filter by affected agent"},"workflow_id":{"type":"string","maxLength":128,"description":"Filter by affected workflow"},"connection_id":{"type":"string","maxLength":128,"description":"Filter by affected connection"}}},"AuditLogActionFilterSchema":{"type":"string","enum":["ALL","org.updated","org.deleted","org.disabled","org.enabled","org.restored","org.transferred","org.transferred_to","org.detached","org.detached_from","org.sub_org_created","org.sub_org_updated","org.sub_org_member_joined","org.sub_org_member_role_changed","member.invited","member.joined","member.removed","member.left","member.role_changed","role.created","role.updated","role.deleted","role.assigned","role.unassigned","assistant.created","assistant.updated","assistant.deleted","assistant.restored","assistant.duplicated","assistant.duplicated_from","agent.created","agent.updated","agent.deleted","agent.duplicated","action.created","action.deleted","action.enabled","action.disabled","channel.created","channel.deleted","channel.updated","channel.enabled","channel.disabled","broadcast.created","broadcast.deleted","broadcast.activated","broadcast.paused","domain.created","domain.deleted","email.domain.created","email.domain.deleted","sso.profile.created","sso.profile.updated","sso.profile.deleted","sso.profile.sessions.revoked","sso.domain.create_code_requested","sso.domain.delete_code_requested","sso.domain.created","sso.domain.updated","sso.domain.deleted","email.identity.created","email.identity.deleted","chat.deleted","workflow.created","workflow.deleted","workflow.restored","connection.created","connection.updated","connection.deleted","api_key.created","api_key.deleted","api_key.rotated","webhook.created","webhook.updated","webhook.deleted","webhook.secret_rotated"],"description":"Filter by action type"},"QuerySubOrgsUsageSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time","description":"Start date for the usage period"},"to_date":{"type":["string","null"],"format":"date-time","description":"End date for the usage period"},"interval":{"$ref":"#/components/schemas/MeterIntervalSchema"},"type":{"$ref":"#/components/schemas/MeterEventIdSchema"}},"required":["from_date","to_date","interval"],"description":"Query parameters for consolidated sub-organizations usage"},"MeterIntervalSchema":{"type":"string","enum":["hour","day","week","month","year"],"description":"Meter interval for the usage chart"},"MeterEventIdSchema":{"type":"string","enum":["run","ai_tokens","ai_sst","ai_tts","ai_embeddings","ai_memory_reconcile","ai_memory_summarize","ai_analysis","ai_follow_up_analysis","broadcast_whatsapp","broadcast_email","broadcast_sms","broadcast_marketing_whatsapp","broadcast_marketing_email","broadcast_marketing_sms","broadcast_transactional_whatsapp","broadcast_transactional_email","broadcast_transactional_sms"],"description":"Meter ID for the organization"},"RunEventSchema":{"oneOf":[{"$ref":"#/components/schemas/RunEventRunInitSchema"},{"$ref":"#/components/schemas/RunEventRunUpdateSchema"},{"$ref":"#/components/schemas/RunEventRunRunnerSchema"}],"discriminator":{"propertyName":"type","mapping":{"run-init":"#/components/schemas/RunEventRunInitSchema","run-update":"#/components/schemas/RunEventRunUpdateSchema","run-runner":"#/components/schemas/RunEventRunRunnerSchema"}},"description":"Schema for events emitted during a workflow run"},"RunEventRunInitSchema":{"type":"object","properties":{"type":{"type":"string","enum":["run-init"]},"data":{"type":"object","properties":{"run_id":{"type":"string"},"run":{"$ref":"#/components/schemas/RunSchema"},"replay_step_key":{"type":"string"},"from_step_key":{"type":"string"},"identifier":{"type":"string"}},"required":["run_id","run"]}},"required":["type","data"],"description":"Event emitted when a run is initialized"},"RunSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the run"},"result":{"$ref":"#/components/schemas/RunResultSchema"},"outputs":{"$ref":"#/components/schemas/RunOutputsSchema"},"status":{"$ref":"#/components/schemas/RunStatusSchema"},"origin":{"type":"string","enum":["WORKFLOW","TRIGGER","WEBHOOK"],"description":"Origin of the run","example":"WORKFLOW"},"error":{"type":"string","description":"Error message if the run failed"},"started_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of when the run started"},"ended_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of when the run ended"},"org_id":{"type":"string","description":"ID of the associated org where the run was triggered from"},"workflow_org_id":{"type":"string","description":"ID of the associated org where the workflow belongs to"},"workflow_id":{"type":"string","description":"ID of the associated workflow"},"workflow_version_draft":{"type":["object","null"],"properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepSchema"},"description":"Steps of the workflow at the time this version was deployed"}},"required":["steps"],"description":"Draft version of the workflow"},"workflow_version":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier for the workflow version"},"workflow_id":{"type":"string","description":"Workflow id where the version belongs to"},"description":{"type":["string","null"],"description":"Description of the workflow at the time this version was deployed"},"version":{"type":"number","description":"Version number"},"rollback_version":{"type":"number","description":"Version number from which this version was rolled back"},"notes":{"type":["string","null"],"description":"Release notes"},"created_by":{"allOf":[{"$ref":"#/components/schemas/UserPublicSchema"},{"description":"User who deployed the version"}]},"created_at":{"type":["string","null"],"format":"date-time","description":"Date when the version was deployed"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepSchema"},"description":"Steps of the workflow at the time this version was deployed"}},"required":["id","workflow_id","description","version","notes","created_at","steps"],"description":"Details of the workflow version used for the run"},"version":{"type":"number","description":"Version number of the workflow"},"usage":{"$ref":"#/components/schemas/CreditsRunUsageSchema"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of when the run was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of when the run was last updated"}},"required":["id","status","origin","started_at","ended_at","org_id","workflow_org_id","workflow_id","workflow_version_draft","workflow_version","created_at","updated_at"]},"RunResultSchema":{"description":"Result of the run"},"RunOutputsSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/StepOutputSchema"},"description":"Outputs of all steps in the run"},"StepOutputSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the output"},"type":{"$ref":"#/components/schemas/StepTypeSchema"},"key":{"$ref":"#/components/schemas/StepKeySchema"},"status":{"$ref":"#/components/schemas/StepStatusSchema"},"output":{"description":"Output of the step"},"index":{"type":"number","description":"Index of the step if part of a loop"},"start":{"type":"number","description":"Timestamp of when the step started"},"end":{"type":"number","description":"Timestamp of when the step ended"},"error":{"type":"string","description":"Error message if the step failed"},"logs":{"$ref":"#/components/schemas/StepLogsSchema"},"calls":{"type":"array","items":{"description":"Sub-calls made by the step","nullable":false,"oneOf":[{"$ref":"#/components/schemas/StepOutputSchema"}]}}},"required":["type","key","status","start"],"description":"Output of the step, including outputs, status and logs"},"StepStatusSchema":{"type":"string","enum":["RUNNING","COMPLETED","FAILED","SKIPPED","CANCELED"],"description":"Status of the step","example":"RUNNING"},"StepLogsSchema":{"type":"array","items":{},"description":"Logs generated during the step execution"},"RunStatusSchema":{"type":"string","enum":["PENDING","RUNNING","CANCELED","COMPLETED","SKIPPED","FAILED"],"description":"Status of the run","example":"RUNNING"},"CreditsRunUsageSchema":{"allOf":[{"$ref":"#/components/schemas/CreditsUsageSchema"},{"type":"object","properties":{"steps":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CreditsUsageSchema"}}},"required":["steps"]}],"description":"Credits usage of the run"},"CreditsCallUsageSchema":{"type":"object","properties":{"id":{"type":"string"},"total":{"type":"number"},"ai_total":{"type":"number"},"calls":{"type":"array","items":{"type":"null","nullable":false,"oneOf":[{"$ref":"#/components/schemas/CreditsUsageSchema"}]}}},"required":["id","total","ai_total"]},"CreditsUsageSchema":{"type":"object","properties":{"total":{"type":"number"},"ai_total":{"type":"number"},"calls":{"type":"array","items":{"$ref":"#/components/schemas/CreditsCallUsageSchema"}}},"required":["total","ai_total"]},"RunEventRunUpdateSchema":{"type":"object","properties":{"type":{"type":"string","enum":["run-update"]},"data":{"type":"object","properties":{"run_id":{"type":"string"},"run":{"$ref":"#/components/schemas/RunSchema"}},"required":["run_id","run"]}},"required":["type","data"],"description":"Event emitted when a run is updated"},"RunEventRunRunnerSchema":{"type":"object","properties":{"type":{"type":"string","enum":["run-runner"]},"data":{"type":"object","properties":{"run_id":{"type":"string"},"event":{"$ref":"#/components/schemas/RunnerEventsList"}},"required":["run_id","event"]}},"required":["type","data"],"description":"Event emitted when a run runner event occurs"},"RunnerEventsList":{"oneOf":[{"$ref":"#/components/schemas/RunnerUpdateEventSchema"},{"$ref":"#/components/schemas/RunnerStepEventSchema"},{"$ref":"#/components/schemas/RunnerStepCallEventSchema"},{"$ref":"#/components/schemas/RunnerMessagePartEventSchema"}],"discriminator":{"propertyName":"type","mapping":{"run-update":"#/components/schemas/RunnerUpdateEventSchema","step":"#/components/schemas/RunnerStepEventSchema","step-call":"#/components/schemas/RunnerStepCallEventSchema","message-part":"#/components/schemas/RunnerMessagePartEventSchema"}},"description":"List of events emitted by the runner"},"RunnerUpdateEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["run-update"]},"data":{"$ref":"#/components/schemas/UpdateRunnerSchema"}},"required":["type","data"],"description":"Event emitted when the runner state is updated"},"UpdateRunnerSchema":{"type":"object","properties":{"outputs":{"$ref":"#/components/schemas/RunOutputsSchema"},"status":{"$ref":"#/components/schemas/RunStatusSchema"},"error":{"type":["string","null"],"description":"Error message if the run failed"},"started_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of when the run started"},"ended_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of when the run ended"}},"description":"Schema for updating the runner state"},"RunnerStepEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["step"]},"data":{"$ref":"#/components/schemas/StepOutputSchema"}},"required":["type","data"],"description":"Event emitted for a step output"},"RunnerStepCallEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["step-call"]},"parent_step_key":{"type":"string"},"data":{"$ref":"#/components/schemas/StepOutputSchema"}},"required":["type","parent_step_key","data"],"description":"Event emitted for a step call output"},"RunnerMessagePartEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["message-part"]},"step_key":{"type":"string"},"data":{"$ref":"#/components/schemas/ModelMessagePartSchema"}},"required":["type","step_key","data"],"description":"Event emitted for a message part in a step"},"ModelMessagePartSchema":{"type":"object","properties":{"id":{"type":"string"},"role":{"$ref":"#/components/schemas/ModelMessageRoleSchema"},"part":{"$ref":"#/components/schemas/ModelMessagePartsSchema"}},"required":["id","role","part"]},"ModelMessagePartsSchema":{"oneOf":[{"$ref":"#/components/schemas/ModelTextPartSchema"},{"$ref":"#/components/schemas/ModelFilePartSchema"},{"$ref":"#/components/schemas/ModelImagePartSchema"},{"$ref":"#/components/schemas/ModelOptionSelectedPartSchema"},{"$ref":"#/components/schemas/ModelContactPartSchema"},{"$ref":"#/components/schemas/ModelLocationPartSchema"},{"$ref":"#/components/schemas/ModelReferencePartSchema"},{"$ref":"#/components/schemas/ModelToolResultPartSchema"},{"$ref":"#/components/schemas/ModelToolCallPartSchema"},{"$ref":"#/components/schemas/ModelSourcePartSchema"},{"$ref":"#/components/schemas/ModelMessageReasoningSchema"},{"$ref":"#/components/schemas/ModelMessageReasoningStartSchema"},{"$ref":"#/components/schemas/ModelMessageReasoningDeltaSchema"},{"$ref":"#/components/schemas/ModelMessageReasoningEndSchema"},{"$ref":"#/components/schemas/ModelToolCallPartStartSchema"},{"$ref":"#/components/schemas/ModelToolCallPartDeltaSchema"},{"$ref":"#/components/schemas/ModelToolCallPartEndSchema"},{"$ref":"#/components/schemas/ModelTextPartDeltaSchema"},{"$ref":"#/components/schemas/ModelEventAssignmentPartSchema"},{"$ref":"#/components/schemas/ModelEventStatusChangePartSchema"},{"$ref":"#/components/schemas/ModelEventAiStatusPartSchema"},{"$ref":"#/components/schemas/ModelEventMuteChangePartSchema"},{"$ref":"#/components/schemas/ModelEventFollowUpPartSchema"},{"$ref":"#/components/schemas/ModelEventPaymentPartSchema"},{"$ref":"#/components/schemas/ModelEventAnalysisPartSchema"},{"$ref":"#/components/schemas/ModelEventReferralPartSchema"},{"$ref":"#/components/schemas/ModelEventApprovalDecisionPartSchema"},{"$ref":"#/components/schemas/ModelEventQuestionsAnsweredPartSchema"},{"$ref":"#/components/schemas/ModelEventLocationSharedPartSchema"},{"$ref":"#/components/schemas/ModelEventContactUpdatePartSchema"},{"$ref":"#/components/schemas/ModelEventConnectionConnectedPartSchema"},{"$ref":"#/components/schemas/ModelEventAgentRunStartedPartSchema"},{"$ref":"#/components/schemas/ModelEventAgentRunFinishedPartSchema"},{"$ref":"#/components/schemas/ModelEventReminderPartSchema"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/ModelTextPartSchema","file":"#/components/schemas/ModelFilePartSchema","image":"#/components/schemas/ModelImagePartSchema","option_selected":"#/components/schemas/ModelOptionSelectedPartSchema","contact":"#/components/schemas/ModelContactPartSchema","location":"#/components/schemas/ModelLocationPartSchema","reference":"#/components/schemas/ModelReferencePartSchema","tool_result":"#/components/schemas/ModelToolResultPartSchema","tool_call":"#/components/schemas/ModelToolCallPartSchema","source":"#/components/schemas/ModelSourcePartSchema","reasoning":"#/components/schemas/ModelMessageReasoningSchema","reasoning_start":"#/components/schemas/ModelMessageReasoningStartSchema","reasoning_delta":"#/components/schemas/ModelMessageReasoningDeltaSchema","reasoning_end":"#/components/schemas/ModelMessageReasoningEndSchema","tool_call_start":"#/components/schemas/ModelToolCallPartStartSchema","tool_call_delta":"#/components/schemas/ModelToolCallPartDeltaSchema","tool_call_end":"#/components/schemas/ModelToolCallPartEndSchema","text_delta":"#/components/schemas/ModelTextPartDeltaSchema","event_assignment":"#/components/schemas/ModelEventAssignmentPartSchema","event_status_change":"#/components/schemas/ModelEventStatusChangePartSchema","event_ai_status":"#/components/schemas/ModelEventAiStatusPartSchema","event_mute_change":"#/components/schemas/ModelEventMuteChangePartSchema","event_follow_up":"#/components/schemas/ModelEventFollowUpPartSchema","event_payment":"#/components/schemas/ModelEventPaymentPartSchema","event_analysis":"#/components/schemas/ModelEventAnalysisPartSchema","event_referral":"#/components/schemas/ModelEventReferralPartSchema","event_approval_decision":"#/components/schemas/ModelEventApprovalDecisionPartSchema","event_questions_answered":"#/components/schemas/ModelEventQuestionsAnsweredPartSchema","event_location_shared":"#/components/schemas/ModelEventLocationSharedPartSchema","event_contact_update":"#/components/schemas/ModelEventContactUpdatePartSchema","event_connection_connected":"#/components/schemas/ModelEventConnectionConnectedPartSchema","event_agent_run_started":"#/components/schemas/ModelEventAgentRunStartedPartSchema","event_agent_run_finished":"#/components/schemas/ModelEventAgentRunFinishedPartSchema","event_reminder":"#/components/schemas/ModelEventReminderPartSchema"}}},"ModelMessageReasoningStartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["reasoning_start"]},"id":{"type":"string","description":"Unique identifier for the message part"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id"]},"ModelMessageReasoningDeltaSchema":{"type":"object","properties":{"type":{"type":"string","enum":["reasoning_delta"]},"id":{"type":"string","description":"Unique identifier for the message part"},"text":{"type":"string"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id","text"]},"ModelMessageReasoningEndSchema":{"type":"object","properties":{"type":{"type":"string","enum":["reasoning_end"]},"id":{"type":"string","description":"Unique identifier for the message part"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id"]},"ModelToolCallPartStartSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tool_call_start"]},"id":{"type":"string","description":"Unique identifier for the tool call"},"name":{"type":"string","description":"The name of the tool to call"},"display_name":{"type":"string","description":"Display name of the tool, can be used in UI"},"action_name":{"type":"string","description":"The original name of the action this tool is based on, used for connection-based tools"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id","name"]},"ModelToolCallPartDeltaSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tool_call_delta"]},"id":{"type":"string","description":"Unique identifier for the tool call"},"name":{"type":"string","description":"The name of the tool called"},"args":{"type":"string"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id","name"]},"ModelToolCallPartEndSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tool_call_end"]},"id":{"type":"string","description":"Unique identifier for the tool call"},"name":{"type":"string","description":"The name of the tool called"},"args":{"type":"string"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","id","name"]},"ModelTextPartDeltaSchema":{"type":"object","properties":{"type":{"type":"string","enum":["text_delta"]},"text":{"type":"string"},"start_timestamp":{"type":"number","description":"Timestamp when the message part started processing, in milliseconds"},"end_timestamp":{"type":"number","description":"Timestamp when the message part finished processing, in milliseconds"}},"required":["type","text"]},"QueryRunSchema":{"type":"object","properties":{"expand":{"type":"boolean"},"origin":{"$ref":"#/components/schemas/QueryRunOriginSchema"},"status":{"$ref":"#/components/schemas/QueryRunStatusSchema"}}},"QueryRunOriginSchema":{"type":"string","enum":["ALL","WORKFLOW","TRIGGER","WEBHOOK"],"description":"Origin of the run"},"QueryRunStatusSchema":{"type":"string","enum":["ALL","PENDING","RUNNING","CANCELED","COMPLETED","SKIPPED","FAILED"],"description":"Status of the run"},"IncludeRunSchema":{"type":"object","properties":{"expand":{"type":"boolean"}}},"QuerySegmentsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search segments by name"}},"description":"Query parameters for fetching segments"},"QuerySuppressionsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search suppressions by identifier"},"channel":{"$ref":"#/components/schemas/SuppressionChannelSchema"},"reason":{"$ref":"#/components/schemas/SuppressionReasonSchema"},"source":{"$ref":"#/components/schemas/SuppressionSourceSchema"}},"description":"Query parameters for fetching suppressions"},"SuppressionChannelSchema":{"type":"string","enum":["EMAIL","PHONE"],"description":"The channel an identifier is suppressed on"},"SuppressionReasonSchema":{"type":"string","enum":["BOUNCE","COMPLAINT","UNSUBSCRIBE","MANUAL","LEGAL"],"description":"Why the identifier is suppressed"},"SuppressionSourceSchema":{"type":"string","enum":["WEBHOOK","UNSUBSCRIBE_LINK","ADMIN","IMPORT","API"],"description":"What put the identifier on the list"},"QueryActivitiesSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ActivityTypeSchema"},"contact_id":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this contact."},"table_id":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this table."},"record_id":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this table record."},"actor_id":{"type":"string","maxLength":128,"description":"Filter to activities performed by this user."},"assistant_id":{"type":"string","maxLength":128,"description":"Filter to activities performed by this assistant."},"segment_id":{"type":"string","maxLength":128,"description":"Filter to activities involving this segment."}},"description":"Query parameters for fetching activities"},"ActivityTypeSchema":{"type":"string","enum":["comment_created","file_uploaded","segment_added","segment_removed","contact_blocked","contact_unblocked","contact_unsubscribed","contact_resubscribed","contact_ai_replies_disabled","contact_ai_replies_enabled","contact_updated"],"description":"Schema for the type of an activity event"},"QueryContactsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search contacts by name"},"unsubscribed":{"type":"boolean","description":"Whether the contact is unsubscribed"},"user_id":{"type":"string","maxLength":128,"description":"Search contacts by user ID match"},"name":{"type":"string","maxLength":256,"description":"Search contacts by name match"},"username":{"type":"string","maxLength":256,"description":"Search contacts by username match"},"email":{"type":"string","maxLength":256,"format":"email","description":"Search contacts by email match"},"segment_id":{"type":"string","maxLength":128,"description":"Search contacts by segment ID match"},"exclude_admins":{"type":"boolean","description":"Exclude admin contacts"},"status":{"$ref":"#/components/schemas/ContactStatusSchema"}},"description":"Query parameters for fetching contacts"},"ContactStatusSchema":{"type":"string","enum":["ALL","SUBSCRIBED","UNSUBSCRIBED","BLOCKED","AI_REPLIES_OFF"],"description":"Filter contacts by subscription status"},"QueryContactFilesSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search files by filename","example":"document.pdf"},"mimetype":{"type":"string","maxLength":1024,"description":"Filter by MIME type (prefix match)","example":"image/"}},"description":"Query parameters for fetching contact files"},"QueryTablesSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/TableTypeSchema"},"search":{"type":"string","maxLength":256,"description":"Search tables by name."},"status":{"$ref":"#/components/schemas/TableStatusSchema"}}},"TableTypeSchema":{"type":"string","enum":["custom","contacts","chats","users"]},"TableStatusSchema":{"type":"string","enum":["ACTIVE","ARCHIVED","ALL"],"description":"Filter by visibility. `ACTIVE` excludes archived (default), `ARCHIVED` returns only archived, `ALL` returns both."},"DeleteTableSchema":{"type":"object","properties":{"force":{"type":"boolean","description":"Delete even when Record fields on other tables link to this one. Those fields are deleted with it."}}},"ExportTableRecordsQuerySchema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/TableStatusSchema"},"search":{"type":"string","maxLength":256,"description":"Restrict the export to records matching this search."},"format":{"type":"string","enum":["csv"],"description":"Export format. Only `csv` is currently supported."}}},"QueryTableRecordsSchema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/TableStatusSchema"},"search":{"type":"string","maxLength":256,"description":"Search records by display-field value."}}},"ListOrgViewsQuerySchema":{"type":"object","properties":{"table_type":{"$ref":"#/components/schemas/TableTypeSchema"}}},"QueryTableViewItemsSchema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/TableStatusSchema"},"search":{"type":"string","maxLength":256,"description":"Search query"},"group":{"type":"string","maxLength":1024,"description":"Board only — the group key whose records to return. Use a key from `GET /views/:view_id/groups` (an enum option value, or `'__unmatched__'` for the unmatched group). Omit to get the whole view ungrouped."},"date_from":{"type":["string","null"],"format":"date-time","description":"Calendar / Timeline — visible window start. Records whose date axis falls before this are excluded. ISO 8601."},"date_to":{"type":["string","null"],"format":"date-time","description":"Calendar / Timeline — visible window end. Records whose date axis falls after this are excluded. ISO 8601."},"date_missing":{"type":"boolean","description":"Timeline only. Return just the records whose start-date axis is empty (the \"No date\" bucket). Takes precedence over `date_from` / `date_to`."}}},"QueryPagesSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search pages by title or slug."},"status":{"$ref":"#/components/schemas/PageStatusSchema"}}},"PageStatusSchema":{"type":"string","enum":["ACTIVE","ARCHIVED","ALL"],"description":"Filter by visibility. `ACTIVE` excludes archived (default), `ARCHIVED` returns only archived, `ALL` returns both."},"QueryBroadcastsSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/BroadcastsTypeSchema"},"status":{"$ref":"#/components/schemas/BroadcastsStatusSchema"},"search":{"type":"string","maxLength":256,"description":"Search query"}},"description":"Query parameters for fetching broadcasts"},"BroadcastsTypeSchema":{"type":"string","enum":["ALL","MARKETING","TRANSACTIONAL"],"description":"The type of the broadcasts"},"BroadcastsStatusSchema":{"type":"string","enum":["ALL","DRAFT","SCHEDULED","SENDING","SENT","CANCELLED","FAILED","ACTIVE","PAUSED"],"description":"The status of the broadcasts"},"QueryBroadcastRecipientsSchema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BroadcastRecipientsStatusSchema"},"is_skipped":{"type":"boolean"},"is_failed":{"type":"boolean"},"is_bounced":{"type":"boolean"},"is_sent":{"type":"boolean"},"is_delivered":{"type":"boolean"},"is_complained":{"type":"boolean"},"is_unsubscribed":{"type":"boolean"},"is_opened":{"type":"boolean"},"is_played":{"type":"boolean"},"is_clicked":{"type":"boolean"},"clicked_link":{"type":"string"},"error_reason":{"type":"string"},"channel_type":{"type":"string"},"contact_id":{"type":"string"},"user_id":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"},"search":{"type":"string"},"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"},"sort_field":{"$ref":"#/components/schemas/QueryBroadcastRecipientsSortFieldSchema"},"sort_direction":{"$ref":"#/components/schemas/QueryBroadcastRecipientsSortDirectionSchema"}},"description":"Query parameters for fetching broadcast recipients"},"BroadcastRecipientsStatusSchema":{"type":"string","enum":["ALL","QUEUED","SENDING","PROCESSED","SENT","FAILED","SKIPPED"],"description":"The status of the broadcast recipients"},"QueryBroadcastRecipientsSortFieldSchema":{"type":"string","enum":["created_at","updated_at"],"description":"Field to sort broadcast recipients by"},"QueryBroadcastRecipientsSortDirectionSchema":{"type":"string","enum":["asc","desc"],"description":"Direction to sort broadcast recipients by"},"QueryBroadcastsInteractionsSchema":{"type":"object","properties":{"broadcast_id":{"type":"string","maxLength":128},"contact_id":{"type":"string","maxLength":128},"type":{"$ref":"#/components/schemas/BroadcastRecipientInteractionTypeSchema"},"value":{"type":"string"}},"description":"Query parameters for fetching broadcast interactions"},"BroadcastRecipientInteractionTypeSchema":{"type":"string","enum":["CLICK"],"description":"The type of the broadcast recipient interaction"},"QueryImportedBroadcastContactsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search imported contacts by name, email or phone"}}},"QueryBroadcastAnalyticsSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"}}},"QueryBroadcastsOverviewSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"},"interval":{"$ref":"#/components/schemas/MetricsIntervalSchema"},"timezone":{"$ref":"#/components/schemas/TimezoneValueSchema"}},"required":["from_date","to_date"]},"QueryBroadcastDetailAnalyticsSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"},"interval":{"$ref":"#/components/schemas/MetricsIntervalSchema"},"timezone":{"$ref":"#/components/schemas/TimezoneValueSchema"}},"required":["from_date","to_date"]},"QueryWorkflowAnalyticsSchema":{"type":"object","properties":{"from_date":{"type":["string","null"],"format":"date-time"},"to_date":{"type":["string","null"],"format":"date-time"}}},"QueryEmailIdentitiesSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search identities by email or name"}},"description":"Query parameters for fetching email identities"},"QueryEmailDomainsSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":256,"description":"Search domains by name"}},"description":"Query parameters for fetching email domains"},"ConnectionActionIdSchema":{"type":"string","enum":["SCHEDULER:ON_SCHEDULE","SCHEDULER:TIMEZONES_LIST","WORKFLOWS:WORKFLOWS_LIST","WORKFLOWS:WORKFLOW_ACTIONS","WORKFLOWS:CALL_WORKFLOW","TOOLS:HTTP_REQUEST","TOOLS:WEB_SEARCH","TOOLS:WEB_SCRAPING","FILES:DOWNLOAD_FILE","FILES:UPLOAD_FILE","FILES:CREATE_CSV","FILES:DELETE_FILE","FILES:MARKDOWN_TO_PDF","FILES:HTML_TO_PDF","TABLES:MANAGE_RECORDS","TABLES:CREATE_RECORD","TABLES:UPDATE_RECORD","TABLES:DELETE_RECORD","TABLES:SEARCH_RECORDS","TABLES:LIST_TABLES","TABLES:GET_TABLE_SCHEMA","TABLES:GET_RECORD","TABLES:LIST_VIEWS","TABLES:GET_VIEW_ITEMS","TABLES:CREATE_TABLE","TABLES:UPDATE_TABLE","TABLES:DELETE_TABLE","TABLES:MANAGE_FIELDS","TABLES:MOVE_FIELD","TABLES:DELETE_FIELD","TABLES:CREATE_VIEW","TABLES:UPDATE_VIEW","TABLES:DELETE_VIEW","TABLES:DUPLICATE_VIEW","TABLES:MOVE_VIEW_ITEM","TABLES:LIST_VIEW_GROUPS","TABLES:AGGREGATE_RECORDS","TABLES:REORDER_VIEWS","TABLES:TABLES_LIST","TABLES:FIELDS_LIST","TABLES:RECORD_SCHEMA","PAGES:LIST_PAGES","PAGES:GET_PAGE","PAGES:CREATE_PAGE","PAGES:UPDATE_PAGE","PAGES:DELETE_PAGE","PAGES:CREATE_BLOCK","PAGES:UPDATE_BLOCK","PAGES:MOVE_BLOCK","PAGES:DELETE_BLOCK","PAGES:PAGES_LIST","KNOWLEDGE:SEARCH","KNOWLEDGE:GET_CHUNK","KNOWLEDGE:LIST_CONTENTS","KNOWLEDGE:GET_CONTENT","KNOWLEDGE:GET_CONTENT_TEXT","KNOWLEDGE:FIND_IN_CONTENT","KNOWLEDGE:REPLACE_IN_CONTENT","KNOWLEDGE:GET_STATS","KNOWLEDGE:ADD_CONTENT","KNOWLEDGE:UPDATE_CONTENT","KNOWLEDGE:REINDEX_CONTENT","KNOWLEDGE:DELETE_CONTENT","ASSISTANTS:LIST","ASSISTANTS:GET","ASSISTANTS:CREATE","ASSISTANTS:UPDATE","ASSISTANTS:REPLACE","ASSISTANTS:GET_MODELS","ASSISTANTS:UPDATE_SETTINGS","ASSISTANTS:LIST_KNOWLEDGE","ASSISTANTS:LINK_KNOWLEDGE","ASSISTANTS:UNLINK_KNOWLEDGE","ASSISTANTS:LIST_CHANNELS","ASSISTANTS:CREATE_CHANNEL","ASSISTANTS:UPDATE_CHANNEL","ASSISTANTS:DELETE_CHANNEL","ASSISTANTS:LIST_ACTIONS","ASSISTANTS:CREATE_ACTION","ASSISTANTS:UPDATE_ACTION","ASSISTANTS:DELETE_ACTION","ASSISTANTS:SET_CONTACT_FIELD","ASSISTANTS:REMOVE_CONTACT_FIELD","AGENTS:LIST","AGENTS:GET","AGENTS:CREATE","AGENTS:UPDATE","AGENTS:LIST_ROUTINES","AGENTS:CREATE_ROUTINE","AGENTS:CANCEL_ROUTINE","CHATS:LIST","CHATS:GET","INBOX:LIST_CHATS","INBOX:GET_MESSAGES","INBOX:REPLY","INBOX:ASSIGN","INBOX:SET_STATUS","INBOX:MARK_RESOLVED","INBOX:REOPEN","MEMBERS:LIST","BROADCASTS:LIST","BROADCASTS:GET","BROADCASTS:CREATE","BROADCASTS:UPDATE","BROADCASTS:DUPLICATE","BROADCASTS:DELETE","BROADCASTS:SET_STATE","BROADCASTS:SET_CHANNEL_TEMPLATE","BROADCASTS:ADD_RECIPIENTS","BROADCASTS:GET_RECIPIENT_COUNTS","BROADCASTS:RETRY_RECIPIENTS","BROADCASTS:REMOVE_RECIPIENTS","BROADCASTS:LIST_FIELDS","BROADCASTS:SET_FIELD","BROADCASTS:SET_FIELD_ENTRIES","BROADCASTS:SCHEDULE","BROADCASTS:CANCEL","BROADCASTS:ACTIVATE","BROADCASTS:PAUSE","BROADCASTS:SEND_TEST","BROADCASTS:GET_ANALYTICS","BROADCASTS:LIST_RECIPIENTS","ANALYTICS:ORG_SUMMARY","ANALYTICS:ASSISTANTS_PERFORMANCE","ANALYTICS:TEAM_PERFORMANCE","ANALYTICS:RESPONSE_TIMES","ANALYTICS:CHANNELS_BREAKDOWN","ANALYTICS:CONTACTS_GROWTH","ANALYTICS:CONTACTS_BY_CHANNEL","ANALYTICS:TOP_SEGMENTS","ANALYTICS:WORKFLOWS_PERFORMANCE","AUDIT:LIST","SKILLS:LIST","SKILLS:GET","SKILLS:CREATE","SKILLS:UPDATE","SKILLS:REPLACE","CONTACTS:SEARCH","CONTACTS:GET","CONTACTS:UPDATE","CONTACTS:DELETE","CONTACTS:MERGE","CONTACTS:UPDATE_SEGMENTS","CONTACTS:LIST_ACTIVITIES","CONTACTS:LIST_COMMENTS","CONTACTS:ADD_COMMENT","CONTACTS:LIST_MEMORIES","CONTACTS:LIST_FILES","CONTACTS:LIST_SUPPRESSIONS","CONTACTS:ADD_SUPPRESSIONS","CONTACTS:REMOVE_SUPPRESSIONS","CONTACTS:IMPORT","SEGMENTS:LIST","SEGMENTS:GET","SEGMENTS:CREATE","SEGMENTS:UPDATE","SEGMENTS:DELETE","EMAILS:ON_EMAIL_STATUS_CHANGE","EMAILS:SEND_EMAIL","EMAILS:LIST_SENDERS","MCP:TOOLS_LIST","MCP:TOOL_SCHEMA","MCP:TOOL_CALL","MCP:TOOLS","OPENAPI:OPERATIONS_LIST","OPENAPI:OPERATION_SCHEMA","OPENAPI:OPERATION_CALL","OPENAPI:TOOLS","GOOGLE_SHEETS:ON_SPREADSHEETS_NEW_ROW","GOOGLE_SHEETS:SPREADSHEETS_SEARCH","GOOGLE_SHEETS:SPREADSHEETS_LIST","GOOGLE_SHEETS:SPREADSHEETS_FILES_LIST","GOOGLE_SHEETS:WORKSHEETS_LIST","GOOGLE_SHEETS:SPREADSHEETS_APPEND_ROW","GOOGLE_SHEETS:SPREADSHEETS_UPDATE_ROW","GOOGLE_CALENDAR:ON_NEW_EVENT","GOOGLE_CALENDAR:CALENDARS_LIST","GOOGLE_CALENDAR:FREEBUSY_QUERY","GOOGLE_CALENDAR:EVENTS_SEARCH","GOOGLE_CALENDAR:EVENTS_GET","GOOGLE_CALENDAR:EVENTS_CREATE","GOOGLE_CALENDAR:EVENTS_UPDATE","GOOGLE_CALENDAR:EVENTS_DELETE","GOOGLE_CALENDAR:EVENTS_QUICK_ADD","OUTLOOK_CALENDAR:CALENDARS_LIST","OUTLOOK_CALENDAR:EVENTS_LIST","OUTLOOK_CALENDAR:FREEBUSY_QUERY","OUTLOOK_CALENDAR:EVENTS_SEARCH","OUTLOOK_CALENDAR:EVENTS_GET","OUTLOOK_CALENDAR:EVENTS_CREATE","OUTLOOK_CALENDAR:EVENTS_UPDATE","OUTLOOK_CALENDAR:EVENTS_DELETE","GOOGLE_DRIVE:FILES_SEARCH","GOOGLE_DRIVE:FILES_LIST","GOOGLE_DRIVE:FILES_GET","GOOGLE_DRIVE:FILES_DOWNLOAD","GOOGLE_DRIVE:FILES_CREATE","GOOGLE_DRIVE:FILES_UPDATE","GOOGLE_DRIVE:FILES_DELETE","GOOGLE_DRIVE:FOLDERS_CREATE","AIRTABLE:BASES_LIST","AIRTABLE:TABLES_LIST","AIRTABLE:TABLE_SCHEMA","AIRTABLE:RECORDS_SEARCH","AIRTABLE:RECORD_GET","AIRTABLE:RECORD_CREATE","AIRTABLE:RECORD_UPDATE","AIRTABLE:RECORD_DELETE","AIRTABLE:COLLABORATORS_LIST","NOTION:DATA_SOURCES_LIST","NOTION:DATA_SOURCE_SCHEMA","NOTION:USERS_LIST","NOTION:SEARCH","NOTION:RECORDS_SEARCH","NOTION:RECORD_GET","NOTION:RECORD_CREATE","NOTION:RECORD_UPDATE","NOTION:PAGES_SEARCH","NOTION:PAGES_AND_RECORDS_LIST","NOTION:PAGE_GET","NOTION:PAGE_CREATE","NOTION:PAGE_UPDATE","NOTION:PAGE_CONTENT_APPEND","NOTION:COMMENTS_LIST","NOTION:COMMENT_CREATE","LINEAR:TEAMS_LIST","LINEAR:STATES_LIST","LINEAR:USERS_LIST","LINEAR:LABELS_LIST","LINEAR:ISSUES_SEARCH","LINEAR:ISSUE_GET","LINEAR:ISSUE_CREATE","LINEAR:ISSUE_UPDATE","LINEAR:ISSUE_COMMENT_CREATE","TRELLO:BOARDS_LIST","TRELLO:BOARD_GET","TRELLO:LISTS_LIST","TRELLO:CARDS_SEARCH","TRELLO:CARD_GET","TRELLO:CARD_CREATE","TRELLO:CARD_UPDATE","TRELLO:CARD_MOVE","TRELLO:CARD_COMMENT","TRELLO:CARD_DELETE","TRELLO:MEMBERS_LIST","TRELLO:LABELS_LIST","HUBSPOT:CONTACTS_SEARCH","HUBSPOT:CONTACT_GET","HUBSPOT:CONTACT_CREATE","HUBSPOT:CONTACT_UPDATE","HUBSPOT:CONTACT_PROPERTIES_LIST","HUBSPOT:COMPANIES_SEARCH","HUBSPOT:COMPANY_GET","HUBSPOT:COMPANY_CREATE","HUBSPOT:COMPANY_UPDATE","HUBSPOT:COMPANY_PROPERTIES_LIST","HUBSPOT:DEALS_SEARCH","HUBSPOT:DEAL_GET","HUBSPOT:DEAL_CREATE","HUBSPOT:DEAL_UPDATE","HUBSPOT:DEAL_PROPERTIES_LIST","HUBSPOT:DEAL_PIPELINES_LIST","HUBSPOT:DEAL_STAGES_LIST","HUBSPOT:MEETINGS_SEARCH","HUBSPOT:MEETING_GET","HUBSPOT:MEETING_CREATE","HUBSPOT:MEETING_UPDATE","HUBSPOT:MEETING_DELETE","SALESFORCE:OBJECTS_LIST","SALESFORCE:LEADS_SEARCH","SALESFORCE:LEAD_GET","SALESFORCE:LEAD_CREATE","SALESFORCE:LEAD_UPDATE","SALESFORCE:LEAD_DELETE","SALESFORCE:CONTACTS_SEARCH","SALESFORCE:CONTACT_GET","SALESFORCE:CONTACT_CREATE","SALESFORCE:CONTACT_UPDATE","SALESFORCE:CONTACT_DELETE","SALESFORCE:ACCOUNTS_SEARCH","SALESFORCE:ACCOUNT_GET","SALESFORCE:ACCOUNT_CREATE","SALESFORCE:ACCOUNT_UPDATE","SALESFORCE:ACCOUNT_DELETE","SALESFORCE:OPPORTUNITIES_SEARCH","SALESFORCE:OPPORTUNITY_GET","SALESFORCE:OPPORTUNITY_CREATE","SALESFORCE:OPPORTUNITY_UPDATE","SALESFORCE:OPPORTUNITY_DELETE","ZOHO:MODULES_LIST","ZOHO:MODULE_FIELDS","ZOHO:RECORDS_SEARCH","ZOHO:RECORD_GET","ZOHO:RECORD_CREATE","ZOHO:RECORD_UPDATE","ZOHO:RECORD_DELETE","ZOHO:USERS_LIST","ZOHO:TAGS_LIST","ZOHO:PIPELINES_LIST","ZOHO:DEAL_STAGES_LIST","ZOHO:LEADS_SEARCH","ZOHO:LEAD_GET","ZOHO:LEAD_CREATE","ZOHO:LEAD_UPDATE","ZOHO:LEAD_DELETE","ZOHO:LEAD_CONVERT","ZOHO:CONTACTS_SEARCH","ZOHO:CONTACT_GET","ZOHO:CONTACT_CREATE","ZOHO:CONTACT_UPDATE","ZOHO:CONTACT_DELETE","ZOHO:CONTACT_TAGS_ADD","ZOHO:CONTACT_TAGS_REMOVE","ZOHO:ACCOUNTS_SEARCH","ZOHO:ACCOUNT_GET","ZOHO:ACCOUNT_CREATE","ZOHO:ACCOUNT_UPDATE","ZOHO:ACCOUNT_DELETE","ZOHO:DEALS_SEARCH","ZOHO:DEAL_GET","ZOHO:DEAL_CREATE","ZOHO:DEAL_UPDATE","ZOHO:DEAL_DELETE","ZOHO:CALENDAR_EVENTS_LIST","ZOHO:CALENDAR_EVENT_CREATE","ZOHO:CALENDAR_EVENT_UPDATE","ZOHO:CALENDAR_EVENT_DELETE","ZOHO:ATTACHMENTS_UPLOAD","ZOHO:ATTACHMENTS_LIST","ZOHO:ATTACHMENTS_DOWNLOAD","ZOHO:ATTACHMENTS_DELETE","ZOHO_BOOKINGS:WORKSPACES_LIST","ZOHO_BOOKINGS:SERVICES_LIST","ZOHO_BOOKINGS:STAFF_LIST","ZOHO_BOOKINGS:RESOURCES_LIST","ZOHO_BOOKINGS:AVAILABILITY_GET","ZOHO_BOOKINGS:APPOINTMENTS_SEARCH","ZOHO_BOOKINGS:APPOINTMENT_GET","ZOHO_BOOKINGS:APPOINTMENT_BOOK","ZOHO_BOOKINGS:APPOINTMENT_RESCHEDULE","ZOHO_BOOKINGS:APPOINTMENT_UPDATE","ZOHO_BOOKINGS:APPOINTMENT_CANCEL","ZOHO_BOOKINGS:CUSTOMER_CREATE","ZOHO_INVENTORY:ITEMS_SEARCH","ZOHO_INVENTORY:ITEM_GET","ZOHO_INVENTORY:ITEM_CREATE","ZOHO_INVENTORY:ITEM_UPDATE","ZOHO_INVENTORY:ITEM_IMAGE_UPLOAD","ZOHO_INVENTORY:ITEM_IMAGE_DELETE","ZOHO_INVENTORY:CONTACTS_SEARCH","ZOHO_INVENTORY:CONTACT_GET","ZOHO_INVENTORY:CONTACT_CREATE","ZOHO_INVENTORY:CONTACT_UPDATE","ZOHO_INVENTORY:SALES_ORDERS_SEARCH","ZOHO_INVENTORY:SALES_ORDER_GET","ZOHO_INVENTORY:SALES_ORDER_CREATE","ZOHO_INVENTORY:SALES_ORDER_UPDATE","ZOHO_INVENTORY:INVOICES_SEARCH","ZOHO_INVENTORY:INVOICE_GET","ZOHO_INVENTORY:INVOICE_CREATE","ZOHO_INVENTORY:INVOICE_SEND","ZOHO_CALENDAR:CALENDARS_LIST","ZOHO_CALENDAR:FREEBUSY_GET","ZOHO_CALENDAR:EVENTS_SEARCH","ZOHO_CALENDAR:EVENT_GET","ZOHO_CALENDAR:EVENT_CREATE","ZOHO_CALENDAR:EVENT_UPDATE","ZOHO_CALENDAR:EVENT_DELETE","GOHIGHLEVEL:CONTACTS_SEARCH","GOHIGHLEVEL:CONTACT_GET","GOHIGHLEVEL:CONTACT_CREATE","GOHIGHLEVEL:CONTACT_UPDATE","GOHIGHLEVEL:CONTACT_DELETE","GOHIGHLEVEL:CONTACT_TAGS_ADD","GOHIGHLEVEL:CONTACT_TAGS_REMOVE","GOHIGHLEVEL:OPPORTUNITIES_SEARCH","GOHIGHLEVEL:OPPORTUNITY_GET","GOHIGHLEVEL:OPPORTUNITY_CREATE","GOHIGHLEVEL:OPPORTUNITY_UPDATE","GOHIGHLEVEL:OPPORTUNITY_DELETE","GOHIGHLEVEL:PIPELINES_LIST","GOHIGHLEVEL:PIPELINE_STAGES_LIST","GOHIGHLEVEL:CALENDARS_LIST","GOHIGHLEVEL:CALENDAR_FREE_SLOTS","GOHIGHLEVEL:CALENDAR_BLOCKED_SLOTS","GOHIGHLEVEL:CALENDAR_EVENTS_LIST","GOHIGHLEVEL:CALENDAR_EVENT_CREATE","GOHIGHLEVEL:CALENDAR_EVENT_UPDATE","GOHIGHLEVEL:CALENDAR_EVENT_DELETE","GOHIGHLEVEL:CAMPAIGNS_LIST","GOHIGHLEVEL:CUSTOM_FIELDS","GOHIGHLEVEL:TAGS_LIST","GOHIGHLEVEL:COUNTRIES_LIST","GOHIGHLEVEL:USERS_LIST","CAL:SLOTS_GET","CAL:BOOKINGS_LIST","CAL:BOOKING_GET","CAL:BOOKING_CREATE","CAL:BOOKING_UPDATE","CAL:BOOKING_CANCEL","CAL:EVENTS_LIST","CALENDLY:AVAILABLE_TIMES_GET","CALENDLY:EVENTS_SEARCH","CALENDLY:EVENT_GET","CALENDLY:EVENT_CREATE","CALENDLY:EVENT_CANCEL","CALENDLY:SCHEDULING_LINK_CREATE","CALENDLY:EVENT_TYPES_LIST","CALENDLY:USERS_LIST","SLACK:ON_MENTION","SLACK:ON_CHANNEL_NEW_MESSAGE","SLACK:SEARCH","SLACK:CHANNELS_LIST","SLACK:CHANNELS_LIST_WITH_ANY","SLACK:CHANNELS_MESSAGES_LIST","SLACK:CHANNELS_SEND_MESSAGE","SLACK:CHANNELS_REPLY_MESSAGE","TELEGRAM:ON_NEW_MESSAGE","TELEGRAM:SEND_MESSAGE","INSTAGRAM:ON_NEW_MESSAGE","INSTAGRAM:SEND_MESSAGE","MESSENGER:ON_NEW_MESSAGE","MESSENGER:SEND_MESSAGE","MESSENGER:PAGES_LIST","TIKTOK:ON_NEW_MESSAGE","TIKTOK:SEND_MESSAGE","WHATSAPP:ON_NEW_MESSAGE","WHATSAPP:ON_MESSAGE_STATUS_CHANGE","WHATSAPP:SEND_MESSAGE","WHATSAPP:SEND_MESSAGE_TEMPLATE","WHATSAPP:SEND_CONVERSION_EVENT","WHATSAPP:PHONE_NUMBERS_LIST","WHATSAPP:TEMPLATES_LIST","WHATSAPP:GET_TEMPLATES","WHATSAPP:GET_TEMPLATE","WHATSAPP:CREATE_TEMPLATE","WHATSAPP:GET_TEMPLATE_LIBRARY","WHATSAPP:CREATE_TEMPLATE_FROM_LIBRARY","WHATSAPP:EDIT_TEMPLATE","WHATSAPP:DELETE_TEMPLATE","WHATSAPP:DATASETS_LIST","GMAIL:ON_NEW_EMAIL","GMAIL:SEND_EMAIL","GMAIL:REPLY_EMAIL","GMAIL:FROM_EMAIL_LIST","GMAIL:LABELS_LIST","JAPIFON:ON_NEW_MESSAGE","JAPIFON:MESSAGE_SEND","SMPP:SEND_MESSAGE","SMPP:ON_MESSAGE_STATUS_CHANGE","TWILIO:ON_NEW_MESSAGE","TWILIO:SEND_MESSAGE","TWILIO:PHONE_NUMBERS_LIST","TELNYX:ON_NEW_MESSAGE","TELNYX:SEND_MESSAGE","TELNYX:PHONE_NUMBERS_LIST","RESEND:ON_NEW_EMAIL","RESEND:SEND_EMAIL","STRIPE:CUSTOMERS_SEARCH","STRIPE:CUSTOMER_GET","STRIPE:CUSTOMER_CREATE","STRIPE:CUSTOMER_UPDATE","STRIPE:CHECKOUT_SESSION_CREATE","STRIPE:CHECKOUT_SESSION_GET","STRIPE:BILLING_PORTAL_SESSION_CREATE","STRIPE:CURRENCIES_LIST","STRIPE:PRICES_LIST","STRIPE:PAYMENT_LINK_CREATE","STRIPE:PAYMENT_LINK_GET","STRIPE:PAYMENT_GET","STRIPE:PAYMENT_REFUND","STRIPE:PAYMENTS_LIST","STRIPE:SUBSCRIPTION_CREATE","STRIPE:SUBSCRIPTION_GET","STRIPE:SUBSCRIPTION_UPDATE","STRIPE:SUBSCRIPTION_CANCEL","STRIPE:SUBSCRIPTIONS_LIST","STRIPE:INVOICE_CREATE","STRIPE:INVOICE_GET","STRIPE:INVOICE_SEND","STRIPE:INVOICES_LIST","SHOPIFY:PRODUCTS_SEARCH","SHOPIFY:PRODUCT_GET","SHOPIFY:PRODUCT_VARIANTS_SEARCH","SHOPIFY:ORDERS_SEARCH","SHOPIFY:ORDER_GET","SHOPIFY:ORDER_CREATE","SHOPIFY:ORDER_UPDATE","SHOPIFY:CUSTOMERS_SEARCH","SHOPIFY:CUSTOMER_GET","SHOPIFY:CUSTOMER_CREATE","SHOPIFY:CUSTOMER_UPDATE","SHOPIFY:INVENTORY_LEVELS_LIST","ZENDESK:TICKET_SEARCH","ZENDESK:TICKET_GET","ZENDESK:TICKET_CREATE","ZENDESK:TICKET_UPDATE","ZENDESK:TICKET_REPLY","ZENDESK:TICKET_ADD_NOTE","ZENDESK:TICKET_COMMENTS_LIST","ZENDESK:TICKETS_LIST","ODOO:LEADS_SEARCH","ODOO:LEAD_GET","ODOO:LEAD_CREATE","ODOO:LEAD_UPDATE","ODOO:LEAD_DELETE","ODOO:LEAD_CONVERT","ODOO:OPPORTUNITIES_SEARCH","ODOO:OPPORTUNITY_GET","ODOO:OPPORTUNITY_CREATE","ODOO:OPPORTUNITY_UPDATE","ODOO:OPPORTUNITY_DELETE","ODOO:CONTACTS_SEARCH","ODOO:STAGES_LIST","ODOO:TAGS_LIST","ODOO:CALENDARS_LIST","ODOO:CALENDAR_EVENTS_LIST","ODOO:CALENDAR_EVENT_CREATE","ODOO:CALENDAR_EVENT_UPDATE","ODOO:CALENDAR_EVENT_DELETE","ODOO:RECORDS_SEARCH","ODOO:ATTACHMENTS_UPLOAD","ODOO:ATTACHMENTS_LIST","ODOO:ATTACHMENTS_DOWNLOAD","ODOO:ATTACHMENTS_DELETE","WOOCOMMERCE:PRODUCTS_SEARCH","WOOCOMMERCE:PRODUCT_GET","WOOCOMMERCE:PRODUCT_VARIATIONS_SEARCH","WOOCOMMERCE:CUSTOMERS_SEARCH","WOOCOMMERCE:CUSTOMER_GET","WOOCOMMERCE:CUSTOMER_CREATE","WOOCOMMERCE:CUSTOMER_UPDATE","WOOCOMMERCE:ORDERS_SEARCH","WOOCOMMERCE:ORDER_GET","WOOCOMMERCE:ORDER_CREATE","WOOCOMMERCE:ORDER_UPDATE","WOOCOMMERCE:ORDER_NOTE_CREATE","WOOCOMMERCE:COUPON_GET","WOOCOMMERCE:PRODUCT_CATEGORIES_LIST"]},"ConnectionActionInterfaceSchema":{"type":"object","properties":{"action_id":{"type":"string","maxLength":256},"connection_id":{"type":"string","maxLength":128},"input":{"allOf":[{"$ref":"#/components/schemas/InputValuesSchema"},{"description":"Values of the fields"}]},"resource_id":{"type":"string","maxLength":4096},"definitions":{"type":"array","items":{"$ref":"#/components/schemas/DynamicFieldsSchema"},"maxItems":50}},"required":["action_id"],"description":"The interface of a connection action"},"QueryConnectionActionOptionsSchemaSchema":{"type":"object","properties":{"search":{"type":"string","maxLength":4096,"description":"Search query"},"value":{"type":"string","maxLength":4096,"description":"Filter by a single value"},"values":{"type":"array","items":{"type":"string","maxLength":4096},"maxItems":50,"description":"Filter by multiple values"},"lang":{"type":"string","maxLength":16,"description":"Language code for translated labels","example":"en"}},"description":"Query connection action"},"QueryConnectionActionFieldsSchema":{"type":"object","properties":{"lang":{"type":"string","maxLength":16,"description":"Language code for translated labels","example":"en"}},"description":"Query connection action fields"},"ConnectionConfigSchema":{"anyOf":[{"$ref":"#/components/schemas/ConnectionPhoneManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionEmailsManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionOauthManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionOauthOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionMcpManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionOpenapiManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionHttpCredentialsManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionGoogleSheetsOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionGoogleCalendarOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionOutlookCalendarOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionGoogleDriveOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionAirtableOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionNotionOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionLinearOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionTrelloOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionHubspotOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionSalesforceOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZohoOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZohoBookingsOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZohoInventoryOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZohoCalendarOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionGohighlevelOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionCalOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionCalendlyOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionSlackOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionTelegramManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionInstagramOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionMessengerOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionTiktokOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionWhatsappOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionGmailOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionJapifonManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionSmppManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionTwilioManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionTelnyxManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionResendManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionStripeOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionShopifyOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZendeskOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionOdooManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionWoocommerceManualConfigSchema"}],"description":"Configuration of a connection"},"ConnectionPhoneManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["PHONE"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"phone":{"type":"string","description":"The phone number to send the verification code to","title":"Phone Number"},"code":{"type":"number","description":"The validation code","title":"Expires In"}},"required":["type","auth_method","phone"],"description":"Configuration of an Phone connection"},"ConnectionEmailsManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["EMAILS"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"}},"required":["type","auth_method"],"description":"Configuration of an Emails connection"},"ConnectionOauthManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["OAUTH"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method","access_token"],"description":"Configuration of an OAuth connection"},"ConnectionOauthOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["OAUTH"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an OAuth connection"},"ConnectionMcpManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["MCP"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"url":{"type":"string","description":"The URL of the MCP server","title":"URL"},"auth_type":{"type":"string","description":"How to authenticate against the server","title":"Authentication","enum":["none","bearer","basic","custom_header","oauth"]},"token":{"type":"string","description":"The bearer token for authentication","title":"Bearer Token"},"username":{"type":"string","description":"Username for Basic authentication","title":"Username"},"password":{"type":"string","description":"Password for Basic authentication","title":"Password"},"header_name":{"type":"string","description":"The name of the custom header","title":"Header Name"},"header_value":{"type":"string","description":"The value for the custom header","title":"Header Value"},"oauth_grant":{"type":"string","description":"Sign in opens the service in a window and keeps the session fresh. Client credentials use a server key pair.","title":"Method","enum":["authorization_code","client_credentials"]},"authorization_url":{"type":"string","description":"Where the sign-in happens. Leave empty to discover it from the server.","title":"Authorization URL"},"token_url":{"type":"string","description":"Endpoint that issues access tokens. Leave empty to discover it when signing in.","title":"Token URL"},"client_id":{"type":"string","description":"Leave empty when the service registers apps on its own.","title":"Client ID"},"client_secret":{"type":"string"},"scope":{"type":"string","description":"Space-separated list of scopes to request.","title":"Scope"},"access_token":{"type":"string","description":"The cached access token","title":"Access Token"},"refresh_token":{"type":"string","description":"The cached refresh token (if returned by the token endpoint)","title":"Refresh Token"},"next_refresh_at":{"type":"number","description":"Unix seconds when the cached token must be refreshed","title":"Next Refresh At"},"client_auth":{"type":"string","description":"How the client secret reaches the token endpoint, as chosen at sign-in","title":"Client Authentication"},"resource":{"type":"string","description":"The resource indicator (RFC 8707) sent with token requests","title":"Resource"},"headers":{"type":"string","description":"Additional headers as JSON key-value pairs","title":"Headers"}},"required":["type","auth_method","url","auth_type"],"description":"Configuration of an MCP connection"},"ConnectionOpenapiManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["OPENAPI"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"spec_url":{"type":"string","description":"URL of the OpenAPI 3.x or Swagger 2.0 spec (JSON or YAML)","title":"Spec URL"},"server_url":{"type":"string","description":"Overrides the spec's own server URL","title":"Server URL"},"auth_type":{"type":"string","description":"How to authenticate against the server","title":"Authentication","enum":["none","bearer","basic","custom_header","oauth"]},"token":{"type":"string","description":"The bearer token for authentication","title":"Bearer Token"},"username":{"type":"string","description":"Username for Basic authentication","title":"Username"},"password":{"type":"string","description":"Password for Basic authentication","title":"Password"},"header_name":{"type":"string","description":"The name of the custom header","title":"Header Name"},"header_value":{"type":"string","description":"The value for the custom header","title":"Header Value"},"oauth_grant":{"type":"string","description":"Sign in opens the service in a window and keeps the session fresh. Client credentials use a server key pair.","title":"Method","enum":["authorization_code","client_credentials"]},"authorization_url":{"type":"string","description":"Where the sign-in happens. Leave empty to discover it from the server.","title":"Authorization URL"},"token_url":{"type":"string","description":"Endpoint that issues access tokens. Leave empty to discover it when signing in.","title":"Token URL"},"client_id":{"type":"string","description":"Leave empty when the service registers apps on its own.","title":"Client ID"},"client_secret":{"type":"string"},"scope":{"type":"string","description":"Space-separated list of scopes to request.","title":"Scope"},"access_token":{"type":"string","description":"The cached access token","title":"Access Token"},"refresh_token":{"type":"string","description":"The cached refresh token (if returned by the token endpoint)","title":"Refresh Token"},"next_refresh_at":{"type":"number","description":"Unix seconds when the cached token must be refreshed","title":"Next Refresh At"},"client_auth":{"type":"string","description":"How the client secret reaches the token endpoint, as chosen at sign-in","title":"Client Authentication"},"resource":{"type":"string","description":"The resource indicator (RFC 8707) sent with token requests","title":"Resource"},"headers":{"type":"string","description":"Extra headers as JSON key-value pairs, sent with every call","title":"Headers"}},"required":["type","auth_method","spec_url","auth_type"],"description":"Configuration of an OpenAPI connection"},"ConnectionHttpCredentialsManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["HTTP_CREDENTIALS"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"auth_type":{"type":"string","description":"The type of HTTP authentication to use","title":"Authentication Type","enum":["bearer","basic","custom_header","oauth"]},"token":{"type":"string","description":"The bearer token for authentication","title":"Bearer Token"},"username":{"type":"string","description":"Username for Basic authentication","title":"Username"},"password":{"type":"string","description":"Password for Basic authentication","title":"Password"},"header_name":{"type":"string","description":"The name of the custom header","title":"Header Name"},"header_value":{"type":"string","description":"The value for the custom header","title":"Header Value"},"oauth_grant":{"type":"string","description":"Sign in opens the service in a window and keeps the session fresh. Client credentials use a server key pair.","title":"Method","enum":["authorization_code","client_credentials"]},"authorization_url":{"type":"string","description":"Where the sign-in happens. Leave empty to discover it from the server.","title":"Authorization URL"},"token_url":{"type":"string","description":"Endpoint that issues access tokens. Leave empty to discover it when signing in.","title":"Token URL"},"client_id":{"type":"string","description":"Leave empty when the service registers apps on its own.","title":"Client ID"},"client_secret":{"type":"string"},"scope":{"type":"string","description":"Space-separated list of scopes to request.","title":"Scope"},"access_token":{"type":"string","description":"The cached access token","title":"Access Token"},"refresh_token":{"type":"string","description":"The cached refresh token (if returned by the token endpoint)","title":"Refresh Token"},"next_refresh_at":{"type":"number","description":"Unix seconds when the cached token must be refreshed","title":"Next Refresh At"},"client_auth":{"type":"string","description":"How the client secret reaches the token endpoint, as chosen at sign-in","title":"Client Authentication"},"resource":{"type":"string","description":"The resource indicator (RFC 8707) sent with token requests","title":"Resource"}},"required":["type","auth_method","auth_type"],"description":"Configuration of an HTTP Credentials connection"},"ConnectionGoogleSheetsOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["GOOGLE_SHEETS"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Google Sheets connection"},"ConnectionGoogleCalendarOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["GOOGLE_CALENDAR"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Google Calendar connection"},"ConnectionOutlookCalendarOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["OUTLOOK_CALENDAR"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Outlook Calendar connection"},"ConnectionGoogleDriveOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["GOOGLE_DRIVE"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Google Drive connection"},"ConnectionAirtableOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["AIRTABLE"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Airtable connection"},"ConnectionNotionOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["NOTION"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Notion connection"},"ConnectionLinearOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["LINEAR"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Linear connection"},"ConnectionTrelloOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["TRELLO"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Trello connection"},"ConnectionHubspotOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["HUBSPOT"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an HubSpot connection"},"ConnectionSalesforceOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["SALESFORCE"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Salesforce connection"},"ConnectionZohoOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["ZOHO"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Zoho CRM connection"},"ConnectionZohoBookingsOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["ZOHO_BOOKINGS"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Zoho Bookings connection"},"ConnectionZohoInventoryOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["ZOHO_INVENTORY"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Zoho Inventory connection"},"ConnectionZohoCalendarOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["ZOHO_CALENDAR"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Zoho Calendar connection"},"ConnectionGohighlevelOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["GOHIGHLEVEL"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an GoHighLevel connection"},"ConnectionCalOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["CAL"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Cal.com connection"},"ConnectionCalendlyOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["CALENDLY"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Calendly connection"},"ConnectionSlackOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["SLACK"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Slack connection"},"ConnectionTelegramManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["TELEGRAM"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"api_key":{"type":"string","description":"The bot token from @BotFather","title":"Telegram Bot Token"}},"required":["type","auth_method","api_key"],"description":"Configuration of an Telegram connection"},"ConnectionInstagramOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["INSTAGRAM"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Instagram connection"},"ConnectionMessengerOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["MESSENGER"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Messenger connection"},"ConnectionTiktokOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["TIKTOK"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an TikTok connection"},"ConnectionWhatsappOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["WHATSAPP"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an WhatsApp connection"},"ConnectionGmailOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["GMAIL"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Gmail connection"},"ConnectionJapifonManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["JAPIFON"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"api_key":{"type":"string","description":"Your Japifon API Key","title":"API Key"}},"required":["type","auth_method","api_key"],"description":"Configuration of an Japifon connection"},"ConnectionSmppManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["SMPP"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"host":{"type":"string","description":"SMSC hostname or IP address","title":"Host"},"port":{"type":"number","description":"SMPP port (2775 plain, commonly 2776 for TLS)","title":"Port"},"tls":{"type":"boolean","description":"Connect over TLS","title":"TLS"},"version":{"type":"string","description":"Protocol version negotiated on bind","title":"SMPP Version","enum":["3.4"]},"system_id":{"type":"string","description":"SMPP system_id issued by the carrier","title":"System ID"},"password":{"type":"string","description":"SMPP password issued by the carrier","title":"Password"},"system_type":{"type":"string","description":"SMPP system_type, when the carrier requires one","title":"System Type"},"sender":{"type":"string","description":"Default source address for outbound messages (the carrier may overwrite it on long-code routes)","title":"Default Sender"},"encoding":{"type":"string","description":"How accents travel to the carrier. Unicode always arrives intact. Latin-1 fits twice as many characters per segment, but a carrier that ignores data_coding 3 accepts the message and then silently drops the accents — only pick it once the carrier confirms it supports it. Transliterate rewrites the accents GSM lacks (código to codigo) to keep every message on the cheapest encoding.","title":"Text Encoding","enum":["unicode","latin1","transliterate"]},"traffic_type":{"type":"string","description":"Traffic profile of this bind. Carriers audit this: marketing must never be sent through a transactional (OTP) bind. Use Both only when the carrier issued a single system_id for all traffic.","title":"Traffic Type","enum":["transactional","marketing","both"]}},"required":["type","auth_method","host","port","system_id","password","encoding","traffic_type"],"description":"Configuration of an SMPP connection"},"ConnectionTwilioManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["TWILIO"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"account_sid":{"type":"string","description":"Your Twilio Account SID from the console","title":"Account SID"},"auth_token":{"type":"string","description":"Your Twilio Auth Token (keep this secret)","title":"Auth Token"}},"required":["type","auth_method","account_sid","auth_token"],"description":"Configuration of an Twilio connection"},"ConnectionTelnyxManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["TELNYX"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"api_key":{"type":"string","description":"Your Telnyx API Key (API v2)","title":"API Key"}},"required":["type","auth_method","api_key"],"description":"Configuration of an Telnyx connection"},"ConnectionResendManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["RESEND"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"api_key":{"type":"string","description":"The API key for Resend","title":"API Key"}},"required":["type","auth_method","api_key"],"description":"Configuration of an Resend connection"},"ConnectionStripeOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["STRIPE"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Stripe connection"},"ConnectionShopifyOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["SHOPIFY"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Shopify connection"},"ConnectionZendeskOauthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["ZENDESK"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["OAUTH"],"description":"The authentication method to use"},"access_token":{"type":"string","description":"The access token for OAuth authentication","title":"Access Token"},"refresh_token":{"type":"string","description":"The refresh token for OAuth authentication","title":"Refresh Token"},"expires_in":{"type":"number","description":"The expiration time of the access token","title":"Expires In"},"next_refresh_at":{"type":"number","description":"The timestamp when the access token will be refreshed","title":"Next Refresh At"},"scope":{"type":"string","description":"The scope of the access token","title":"Scope"},"api_url":{"type":"string"},"profile_url":{"type":"string"},"subdomain":{"type":"string"}},"required":["type","auth_method"],"description":"Configuration of an Zendesk connection"},"ConnectionOdooManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["ODOO"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"url":{"type":"string","description":"Your Odoo instance URL","title":"Odoo URL"},"database":{"type":"string","description":"The name of your Odoo database","title":"Database Name"},"username":{"type":"string","description":"Your Odoo username or email","title":"Username / Email"},"api_key":{"type":"string","description":"API key from Odoo (Settings > Users > API Keys)","title":"API Key"}},"required":["type","auth_method","url","database","username","api_key"],"description":"Configuration of an Odoo CRM connection"},"ConnectionWoocommerceManualConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["WOOCOMMERCE"],"description":"The type of the connection"},"auth_method":{"type":"string","enum":["MANUAL"],"description":"The authentication method to use"},"store_url":{"type":"string","description":"Your WooCommerce store URL (must use HTTPS)","title":"Store URL"},"consumer_key":{"type":"string","description":"Generate from WooCommerce > Settings > Advanced > REST API (Read/Write)","title":"Consumer Key"},"consumer_secret":{"type":"string","description":"The Consumer Secret paired with your Consumer Key","title":"Consumer Secret"}},"required":["type","auth_method","store_url","consumer_key","consumer_secret"],"description":"Configuration of an WooCommerce connection"},"ConnectionConfigPartialSchema":{"anyOf":[{"$ref":"#/components/schemas/ConnectionPhoneManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionEmailsManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionOauthManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionOauthOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionMcpManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionOpenapiManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionHttpCredentialsManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionGoogleSheetsOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionGoogleCalendarOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionOutlookCalendarOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionGoogleDriveOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionAirtableOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionNotionOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionLinearOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionTrelloOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionHubspotOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionSalesforceOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZohoOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZohoBookingsOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZohoInventoryOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZohoCalendarOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionGohighlevelOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionCalOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionCalendlyOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionSlackOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionTelegramManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionInstagramOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionMessengerOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionTiktokOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionWhatsappOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionGmailOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionJapifonManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionSmppManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionTwilioManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionTelnyxManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionResendManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionStripeOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionShopifyOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionZendeskOauthConfigSchema"},{"$ref":"#/components/schemas/ConnectionOdooManualConfigSchema"},{"$ref":"#/components/schemas/ConnectionWoocommerceManualConfigSchema"}],"description":"Configuration of a connection"},"QueryConnectionsSchema":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/ConnectionTypeSchema"},{"description":"Filter connections by type"}]}},"description":"Query parameters for fetching connections"},"QueryWhatsAppTemplatesSchema":{"type":"object","properties":{"waba_id":{"type":"string","maxLength":128},"phone_number_id":{"type":"string","maxLength":128},"status":{"$ref":"#/components/schemas/WhatsAppTemplateStatusSchema"},"search":{"type":"string","maxLength":256,"description":"Search query"}}},"WhatsAppTemplateStatusSchema":{"type":"string","enum":["APPROVED","IN_APPEAL","PENDING","REJECTED","PENDING_DELETION","DELETED","DISABLED","PAUSED","LIMIT_EXCEEDED"]},"QueryWhatsAppTemplateLibrarySchema":{"type":"object","properties":{"language":{"type":"string","maxLength":32},"category":{"type":"string"},"topic":{"type":"string"},"usecase":{"type":"string"},"industry":{"type":"string"},"search":{"type":"string","maxLength":256,"description":"Search query"}},"required":["language"]},"DeleteWhatsAppTemplateSchema":{"type":"object","properties":{"name":{"type":"string"},"language":{"type":"string","maxLength":32},"waba_id":{"type":"string","maxLength":128}},"required":["name","language"]},"QueryWhatsAppFlowsSchema":{"type":"object","properties":{"waba_id":{"type":"string","maxLength":128},"phone_number_id":{"type":"string","maxLength":128}}},"QueryWhatsAppCatalogsSchema":{"type":"object","properties":{"waba_id":{"type":"string","maxLength":128},"phone_number_id":{"type":"string","maxLength":128}}},"QueryWhatsAppBusinessProfileSchema":{"type":"object","properties":{"phone_number_id":{"type":"string","minLength":1,"maxLength":128}},"required":["phone_number_id"]},"QueryWhatsAppAccountSchema":{"type":"object","properties":{"waba_id":{"type":"string","maxLength":128}}},"UpdateChatSchema":{"type":"object","properties":{"title":{"type":["string","null"],"maxLength":256,"description":"The title of the chat"},"model":{"type":"string","maxLength":128,"description":"The model used for the chat"},"visibility":{"type":"string","enum":["PRIVATE","PUBLIC_READ","PUBLIC_WRITE"],"description":"The visibility of the chat"},"pinned":{"type":"boolean","description":"Whether the chat is pinned in the user interface"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ModelToolSchema"},"maxItems":100,"description":"The tools available in the chat"},"features":{"$ref":"#/components/schemas/ChatFeaturesSchema"}},"description":"The chat update schema"},"ForkChatSchema":{"type":"object","properties":{"message_id":{"type":"string","maxLength":256,"description":"The message to fork from (inclusive). The new chat copies the conversation up to and including this message."},"title":{"type":["string","null"],"maxLength":256,"description":"Optional title for the forked chat. Defaults to the source chat title."}},"required":["message_id"],"description":"Fork a chat from a given message into a new chat."},"UpdateChatSkillsSchema":{"type":"object","properties":{"skill_ids":{"type":"array","items":{"type":"string","maxLength":128},"description":"The full set of skill IDs to enable in the chat"}},"required":["skill_ids"],"description":"Replaces the set of skills enabled in a chat"},"UpdateChatStateSchema":{"type":"object","properties":{"state":{"$ref":"#/components/schemas/ChatStateStatusSchema"},"ai_enabled":{"type":"boolean","description":"Whether AI is enabled for the chat"},"assistant_config":{"$ref":"#/components/schemas/AssistantConfigSchema"},"follow_up_at":{"type":["string","null"],"format":"date-time","description":"Scheduled follow-up datetime (set null to cancel)"},"muted_until":{"type":["string","null"],"format":"date-time","description":"Mute the chat until this datetime (set null to clear). Max 1 year in the future."},"csat_score":{"type":["integer","null"],"minimum":1,"maximum":5,"description":"Customer satisfaction score (1-5)"}},"description":"Schema for updating chat state"},"ChatStateInfoSchema":{"type":"object","properties":{"newest_chat_id":{"type":["string","null"]}},"required":["newest_chat_id"],"description":"Information about the chat linked in case another chat exists for this conversation"},"AssignConversationSchema":{"type":"object","properties":{"member_id":{"type":["string","null"],"maxLength":128,"description":"Member ID to assign. Set to null to unassign."}},"required":["member_id"],"description":"Schema for assigning or unassigning a conversation to/from a team member"},"MarkChatSeenSchema":{"type":"object","properties":{"message_id":{"type":"string","maxLength":128}}},"ChatStateUnseenCountSchema":{"type":"object","properties":{"chat_id":{"type":"string"},"assigned_user_id":{"type":["string","null"]},"admin_unseen_count":{"type":"number"},"user_unseen_count":{"type":"number"},"muted_until":{"type":["string","null"],"format":"date-time"}},"required":["chat_id","assigned_user_id","admin_unseen_count","user_unseen_count","muted_until"],"description":"Unseen count for a chat"},"MessageDecideApprovalsSchema":{"type":"object","properties":{"decisions":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalDecisionItemSchema"},"minItems":1,"maxItems":32,"description":"One decision per pending tool call."},"background":{"type":"boolean","description":"When true, decisions are recorded immediately and any execution runs in the background. Defaults to false, which blocks until the step finishes when these were the last pending approvals."}},"required":["decisions"],"description":"Accept or reject pending approvals in one request. The assistant resumes only when the message has no pending approvals left, and exactly once."},"ApprovalDecisionItemSchema":{"type":"object","properties":{"tool_call_id":{"type":"string","description":"The ID of the pending tool call this decision applies to."},"decision":{"$ref":"#/components/schemas/ConnectionActionApprovalDecisionSchema"},"reason":{"type":"string","maxLength":512,"description":"Optional explanation for the decision. When rejecting, this is surfaced back to the assistant."}},"required":["tool_call_id","decision"]},"CreateChatMessageSchema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ChatMessageUserPartsSchema"},"context":{"$ref":"#/components/schemas/ChatMessageContextSchema"}},"required":["message"],"description":"The user message"},"ChatMessageUserPartsSchema":{"type":"array","items":{"$ref":"#/components/schemas/ModelUserPartsSchema"},"minItems":1,"description":"The user message to open the chat with"},"ChatMessageContextSchema":{"type":"object","properties":{"page_url":{"type":"string","maxLength":2048,"format":"uri","description":"The full URL of the page the user is on"},"page_title":{"type":"string","maxLength":256,"description":"The title of the page the user is on"}},"description":"Ephemeral context about where the user is when sending the message. Injected into the prompt on the fly, never stored."},"UpdateChatMessageSchema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ChatMessageUserPartsSchema"}},"required":["message"],"description":"Edit the content of a message"},"CreateChatTemplateMessageSchema":{"type":"object","properties":{"input":{"allOf":[{"$ref":"#/components/schemas/InputValuesSchema"},{"description":"Values of the fields"}]}},"required":["input"],"description":"Input for the channel's template send action (template, variables, ...)"},"RespondChatToolSchema":{"oneOf":[{"$ref":"#/components/schemas/RespondChatToolConnectionSchema"},{"$ref":"#/components/schemas/RespondChatToolApprovalSchema"},{"$ref":"#/components/schemas/RespondChatToolQuestionsSchema"},{"$ref":"#/components/schemas/RespondChatToolAskSchema"},{"$ref":"#/components/schemas/RespondChatToolLocationSchema"}],"discriminator":{"propertyName":"type","mapping":{"connection":"#/components/schemas/RespondChatToolConnectionSchema","approval":"#/components/schemas/RespondChatToolApprovalSchema","questions":"#/components/schemas/RespondChatToolQuestionsSchema","ask":"#/components/schemas/RespondChatToolAskSchema","location":"#/components/schemas/RespondChatToolLocationSchema"}},"description":"A user response to an interactive tool, discriminated by response type."},"RespondChatToolConnectionSchema":{"type":"object","properties":{"type":{"type":"string","enum":["connection"]},"connection_id":{"type":"string","description":"The connected connection id (con_...). Omit when declining an app."},"declined_type":{"allOf":[{"$ref":"#/components/schemas/ConnectionTypeSchema"},{"description":"The app the person will not connect; its request resolves without a connection."}]}},"required":["type"]},"RespondChatToolApprovalSchema":{"type":"object","properties":{"type":{"type":"string","enum":["approval"]},"decision":{"$ref":"#/components/schemas/ConnectionActionApprovalDecisionSchema"},"reason":{"type":"string","maxLength":512,"description":"Optional explanation for the decision. When rejecting, this is surfaced back to the assistant."},"background":{"type":"boolean","description":"When true, the decision is recorded immediately and the approved tool runs in the background — the response returns the \"running\" state. Defaults to false, which blocks until the tool finishes executing and returns the final message."}},"required":["type","decision"]},"RespondChatToolQuestionsSchema":{"type":"object","properties":{"type":{"type":"string","enum":["questions"]},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionAnswerItemSchema"},"minItems":1,"maxItems":8,"description":"One entry per question, in the order they were asked."}},"required":["type","answers"]},"QuestionAnswerItemSchema":{"type":"object","properties":{"question":{"type":"string","description":"The question as it was asked"},"selected":{"type":"array","items":{"type":"string","maxLength":512},"description":"The chosen answers: option values or free text. Empty means the question was skipped (no response)."}},"required":["question","selected"]},"RespondChatToolAskSchema":{"type":"object","properties":{"type":{"type":"string","enum":["ask"]},"decision":{"allOf":[{"$ref":"#/components/schemas/ConnectionActionApprovalDecisionSchema"},{"description":"accepted sends \"Yes\" and rejected sends \"No\" to the agent as your reply; write your own message to answer otherwise."}]}},"required":["type","decision"]},"RespondChatToolLocationSchema":{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["type","latitude","longitude"]},"ConversationMemorySchema":{"type":"object","properties":{"id":{"type":"string"},"chat_id":{"type":"string"},"summary":{"type":"string"},"key_points":{"type":"array","items":{"type":"string"}},"message_count":{"type":"number"},"summarized_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","chat_id","summary","key_points","message_count","summarized_at","created_at"],"description":"A conversation memory is a summary of a chat conversation, created automatically every 10 messages."},"ConnectionActionsSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ConnectionActionSchema"},"description":"Connection actions"},"ConnectionActionSchema":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/ConnectionActionTypeSchema"},"name":{"type":"string"},"description":{"type":"string"},"input":{"$ref":"#/components/schemas/FieldsSchema"},"output":{"$ref":"#/components/schemas/FieldSchema"},"icon":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of the icon to use in the UI","oneOf":[{"$ref":"#/components/schemas/IconNameSchema"}]},"icon_url":{"type":"string"},"system":{"type":"boolean","description":"Whether this action is a system action"},"disabled":{"type":"boolean","description":"Whether this action is disabled"},"assistant_action":{"type":"boolean","description":"Whether this action can be used with assistants"},"org_action":{"type":"boolean","description":"Whether this action is exposed in the Org Chat copilot"},"connection":{"$ref":"#/components/schemas/ConnectionActionConnectionSchema"},"required_features":{"type":"array","items":{"$ref":"#/components/schemas/OrgFeatureSchema"},"maxItems":50},"write":{"type":"boolean","description":"Whether this action is a write action"},"forced_write":{"type":"boolean","description":"Org-chat only: always asks for approval, even on auto-approve chats"},"dynamic_tools":{"type":"boolean","description":"Whether a row of this action exposes a live catalog of tools instead of one tool"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/OrgPermissionSchema"},"maxItems":50,"description":"Org-chat only: one-of org permissions required to use the action"}},"required":["id","type","name"],"description":"Connection action"},"ConnectionActionTypeSchema":{"type":"string","enum":["action","trigger","none"],"description":"Type of the action"},"ConnectionActionConnectionSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ConnectionTypeSchema"},"optional":{"type":"boolean"}},"required":["type"],"description":"Connection action connection"},"OrgFeatureSchema":{"type":"string","enum":["enterprise","allow_overdraft","workflows","enable_japifon","enable_smpp","tables","slack_access","emails","templates","org_chats","agents"],"description":"Org gate-keeping feature type"},"OrgPermissionSchema":{"type":"string","enum":["org:write","admin:write","members:read","members:invite","members:write","members.roles.system:write","inbox:read","inbox:write","analytics:read","contacts:read","contacts:write","segments:write","broadcasts:read","broadcasts:write","assistants:read","assistants:write","assistants.members:write","agents:read","agents:write","knowledge:read","knowledge:write","skills:read","skills:write","workflows:write","connections:write","keys:write","webhooks:write","tables:read","tables:write","tables.records:write","tables.views:write","pages:read","pages:write","audit_logs:read","sso:write","domains:write","emails:write","billing:write","variables:write","templates:write","orgs:write"],"description":"An org permission (`resource:action`)."},"ConnectionOAuthUrlSchema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"description":"OAuth provider authentication URL"},"CreateConnectionSignInUrlSchema":{"allOf":[{"$ref":"#/components/schemas/CreateConnectionOAuthUrlSchema"},{"type":"object","properties":{"name":{"type":"string","maxLength":256,"description":"Name for the connection a sign-in creates"},"config":{"type":"object","properties":{},"additionalProperties":{},"description":"The manual configuration to sign in with, for a connection whose authentication is OAuth 2.0 sign-in","oneOf":[{"$ref":"#/components/schemas/ConnectionConfigPartialSchema"}]}}}],"description":"Create OAuth provider URL, signing in with a configuration"},"WhatsAppSignupSchema":{"type":"object","properties":{"flow":{"$ref":"#/components/schemas/WhatsAppSignupFlowSchema"},"name":{"type":"string","maxLength":128,"description":"Business name Embedded Signup opens prefilled with, instead of the workspace name"},"email":{"type":"string","maxLength":128,"format":"email","description":"Business email Embedded Signup opens prefilled with, instead of the workspace or user email"}},"description":"WhatsApp signup options; without a flow Embedded Signup opens on its own screens"},"WhatsAppSignupFlowSchema":{"type":"string","enum":["BUSINESS_APP","NEW_NUMBER","MIGRATE_NUMBER"],"description":"The path the user picked before Embedded Signup opens"},"CreateConnectionOAuthUrlSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ConnectionTypeSchema"},"connection_id":{"type":"string","maxLength":128},"subdomain":{"type":"string","pattern":"^[a-z0-9-]+$","description":"The subdomain of the OAuth provider"},"whatsapp":{"$ref":"#/components/schemas/WhatsAppSignupSchema"},"external_redirect_url":{"type":"string","maxLength":2048}},"required":["type"],"description":"Create OAuth provider URL"},"ConnectionOAuthValidatedSchema":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/ConnectionOAuthConfigSchema"},"user":{"$ref":"#/components/schemas/ConnectionOAuthUserSchema"}},"required":["config","user"],"description":"OAuth provider validated connection"},"ConnectionOAuthConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["OAUTH"],"description":"The type of the connection"},"access_token":{"type":"string","maxLength":8192,"description":"The access token for OAuth authentication"},"refresh_token":{"type":"string","maxLength":8192,"description":"The refresh token for OAuth authentication"},"expires_in":{"type":"number","minimum":0,"description":"The expiration time of the access token"},"next_refresh_at":{"type":"number","description":"The date when the access token will be refreshed"},"scope":{"type":"string","maxLength":2048,"description":"The scope of the access token"},"api_url":{"type":"string","maxLength":2048,"format":"uri","description":"The base URL for the API of the OAuth provider"},"subdomain":{"type":"string","maxLength":255,"description":"The subdomain for providers that use subdomain-based URLs"}},"required":["type","access_token"],"description":"Configuration of an OAuth connection"},"ConnectionOAuthUserSchema":{"type":"object","properties":{"external_id":{"type":"string"},"external_name":{"type":["string","null"]}},"required":["external_id","external_name"],"description":"OAuth provider user"},"ValidateConnectionOAuthSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ConnectionTypeSchema"},"subdomain":{"type":"string","pattern":"^[a-z0-9-]+$","description":"The subdomain of the OAuth provider"},"validation_url":{"type":"string","maxLength":10000,"format":"uri","description":"The validation URL of the OAuth provider"}},"required":["type","validation_url"],"description":"OAuth provider authentication request"},"ConnectionSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the connection"},"type":{"$ref":"#/components/schemas/ConnectionTypeSchema"},"name":{"type":["string","null"],"description":"Optional name for the connection","example":"My Encompass Connection"},"external_name":{"type":["string","null"],"description":"Optional external name for the connection"},"external_id":{"type":["string","null"],"description":"Optional external identifier for the connection"},"status":{"$ref":"#/components/schemas/ConnectionStatusSchema"},"status_error":{"type":["string","null"],"description":"Optional error message if the connection is in error state"},"config":{"type":"object","properties":{},"additionalProperties":{},"description":"Configuration of a connection","oneOf":[{"$ref":"#/components/schemas/ConnectionConfigSchema"}]},"email_identity":{"$ref":"#/components/schemas/EmailIdentitySchema"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of when the connection was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of when the connection was last updated"}},"required":["id","type","name","external_name","external_id","status","status_error","config","created_at","updated_at"],"description":"Detailed information about a connection"},"ConnectionStatusSchema":{"type":"string","enum":["ACTIVE","INACTIVE"]},"EmailIdentitySchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the email identity"},"email":{"type":"string","description":"Email address of the identity"},"name":{"type":["string","null"],"description":"Display name for the identity"},"status":{"$ref":"#/components/schemas/EmailIdentityStatusSchema"},"domain":{"$ref":"#/components/schemas/EmailDomainSchema"},"is_default":{"type":"boolean","description":"Whether this is the default identity for the org"},"click_tracking":{"type":"boolean","description":"Whether click tracking is enabled for this identity"},"open_tracking":{"type":"boolean","description":"Whether open tracking is enabled for this identity"},"verified_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the identity was verified"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the identity was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the identity was last updated"}},"required":["id","email","name","status","domain","is_default","click_tracking","open_tracking","verified_at","created_at","updated_at"],"description":"An email identity"},"EmailIdentityStatusSchema":{"type":"string","enum":["PENDING","VERIFIED","FAILED"],"description":"Verification status of an email identity"},"EmailDomainSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the email domain"},"domain":{"type":"string","description":"The domain name"},"dkim_status":{"$ref":"#/components/schemas/EmailDomainDkimStatusSchema"},"dkim_tokens":{"type":["array","null"],"items":{"$ref":"#/components/schemas/EmailDomainDkimTokenSchema"},"description":"DKIM CNAME records to add to DNS"},"verified_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the domain was verified"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the domain was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the domain was last updated"}},"required":["id","domain","dkim_status","dkim_tokens","verified_at","created_at","updated_at"],"description":"Linked email domain"},"EmailDomainDkimStatusSchema":{"type":"string","enum":["PENDING","VERIFIED","FAILED"],"description":"DKIM verification status of an email domain"},"EmailDomainDkimTokenSchema":{"type":"object","properties":{"name":{"type":"string","description":"CNAME record name"},"value":{"type":"string","description":"CNAME record value"}},"required":["name","value"],"description":"A DKIM CNAME record for domain verification"},"ConnectConnectionOAuthSchema":{"allOf":[{"$ref":"#/components/schemas/ValidateConnectionOAuthSchema"},{"type":"object","properties":{"connection_id":{"type":"string","maxLength":128,"description":"Existing connection to re-authenticate"}}}],"description":"OAuth provider connect request"},"OrgDashboardAnalyticsSchema":{"type":"object","properties":{"total_contacts":{"type":"number"},"total_messages":{"type":"number"},"total_closed_conversations":{"type":"number"},"total_ongoing_conversations":{"type":"number"},"average_csat":{"type":["number","null"]},"total_csat_conversations":{"type":"number"}},"required":["total_contacts","total_messages","total_closed_conversations","total_ongoing_conversations","average_csat","total_csat_conversations"],"description":"Dashboard statistics for the organization"},"AssistantStatsItemSchema":{"type":"object","properties":{"assistant_id":{"type":"string"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"total_conversations":{"type":"number"},"closed_by_ai":{"type":"number"},"closed_by_human":{"type":"number"},"transferred_to_human":{"type":"number"}},"required":["assistant_id","name","avatar_url","total_conversations","closed_by_ai","closed_by_human","transferred_to_human"]},"MemberStatsItemSchema":{"type":"object","properties":{"user":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"Schema for a limited user"}]},"closed_by_ai":{"type":"number"},"closed_by_human":{"type":"number"},"transferred_to_human":{"type":"number"}},"required":["user","closed_by_ai","closed_by_human","transferred_to_human"],"description":"Team member stats item"},"ChannelStatsItemSchema":{"type":"object","properties":{"channel_type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"integration_id":{"allOf":[{"$ref":"#/components/schemas/ChannelTypeIdSchema"},{"description":"Use channel_type instead","deprecated":true}]},"count":{"type":"number"}},"required":["channel_type","integration_id","count"]},"ConversationsAnalyticsSchema":{"type":"object","properties":{"kpis":{"$ref":"#/components/schemas/ConversationsKpisSchema"},"flow":{"$ref":"#/components/schemas/ConversationsFlowSchema"},"conversations_by_channel":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date-time"},"amount":{"type":"number"}},"required":["date","amount"]}}},"required":["key","points"]}},"messages":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date-time"},"amount":{"type":"number"}},"required":["date","amount"]}}},"required":["key","points"]}},"messages_by_channel":{"type":"array","items":{"$ref":"#/components/schemas/ConversationsMessagesByChannelItemSchema"}},"messages_by_channel_series":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date-time"},"amount":{"type":"number"}},"required":["date","amount"]}}},"required":["key","points"]}},"resolution":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date-time"},"amount":{"type":"number"}},"required":["date","amount"]}}},"required":["key","points"]}},"handoff":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date-time"},"amount":{"type":"number"}},"required":["date","amount"]}}},"required":["key","points"]}},"csat":{"type":"array","items":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date-time"},"amount":{"type":"number"}},"required":["date","amount"]}},"csat_distribution":{"type":"array","items":{"$ref":"#/components/schemas/ConversationsCsatBucketSchema"}},"takeover_distribution":{"type":"array","items":{"$ref":"#/components/schemas/ConversationsDurationBucketSchema"}},"resolution_distribution":{"type":"array","items":{"$ref":"#/components/schemas/ConversationsDurationBucketSchema"}},"team":{"type":"array","items":{"$ref":"#/components/schemas/ConversationsTeamMemberSchema"}}},"required":["kpis","flow","conversations_by_channel","messages","messages_by_channel","messages_by_channel_series","resolution","handoff","csat","csat_distribution","takeover_distribution","resolution_distribution","team"],"description":"Everything the Conversations analytics view renders, in one payload."},"ConversationsKpisSchema":{"type":"object","properties":{"conversations":{"type":"number"},"conversations_previous":{"type":"number"},"ai_resolution_rate":{"type":["number","null"]},"handoff_rate":{"type":["number","null"]},"median_takeover_seconds":{"type":["number","null"]},"p90_takeover_seconds":{"type":["number","null"]},"median_resolution_seconds":{"type":["number","null"]},"p90_resolution_seconds":{"type":["number","null"]},"csat_average":{"type":["number","null"]},"csat_responses":{"type":"number"}},"required":["conversations","conversations_previous","ai_resolution_rate","handoff_rate","median_takeover_seconds","p90_takeover_seconds","median_resolution_seconds","p90_resolution_seconds","csat_average","csat_responses"]},"ConversationsFlowSchema":{"type":"object","properties":{"created":{"type":"number"},"resolved_by_ai":{"type":"number"},"resolved_by_team":{"type":"number"},"handed_off":{"type":"number"},"human_replied":{"type":"number"},"unanswered":{"type":"number"},"awaiting_team":{"type":"number"},"still_open":{"type":"number"}},"required":["created","resolved_by_ai","resolved_by_team","handed_off","human_replied","unanswered","awaiting_team","still_open"],"description":"Where conversations created in the period ended up. Unanswered handoffs are reported, never dropped."},"ConversationsMessagesByChannelItemSchema":{"type":"object","properties":{"channel_type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"integration_id":{"allOf":[{"$ref":"#/components/schemas/ChannelTypeIdSchema"},{"description":"Use channel_type instead","deprecated":true}]},"received":{"type":"number"},"ai":{"type":"number"},"agent":{"type":"number"}},"required":["channel_type","integration_id","received","ai","agent"]},"ConversationsCsatBucketSchema":{"type":"object","properties":{"score":{"type":"number"},"count":{"type":"number"}},"required":["score","count"]},"ConversationsDurationBucketSchema":{"type":"object","properties":{"lt_seconds":{"type":["number","null"]},"count":{"type":"number"}},"required":["lt_seconds","count"]},"ConversationsTeamMemberSchema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["assistant","member","unassigned"]},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"conversations":{"type":"number"},"resolved":{"type":"number"}},"required":["id","kind","name","avatar_url","conversations","resolved"]},"ContactGrowthItemSchema":{"type":"object","properties":{"date":{"type":"string"},"new":{"type":"number"},"unsubscribed":{"type":"number"},"blocked":{"type":"number"},"total":{"type":"number"}},"required":["date","new","unsubscribed","blocked","total"]},"ContactsByChannelItemSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"count":{"type":"number"}},"required":["type","count"]},"ContactSegmentStatsItemSchema":{"type":"object","properties":{"segment_id":{"type":"string"},"name":{"type":"string"},"color":{"$ref":"#/components/schemas/ColorNameSchema"},"count":{"type":"number"}},"required":["segment_id","name","count"]},"OrgMetricSchema":{"allOf":[{"$ref":"#/components/schemas/MetricSchema"},{"type":"object","properties":{"id":{"$ref":"#/components/schemas/OrgMetricIdSchema"}}}]},"MetricSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"intervals":{"type":"array","items":{"$ref":"#/components/schemas/MetricsIntervalSchema"}}},"required":["id","name"]},"MetricItemSchema":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date-time"},"amount":{"type":"number"}},"required":["date","amount"]},"OrgMetricTotalSchema":{"type":"object","properties":{"total":{"type":"number"}},"required":["total"]},"ResponseTimesSchema":{"type":"object","properties":{"avg_resolution_seconds":{"type":["number","null"]},"median_resolution_seconds":{"type":["number","null"]},"p90_resolution_seconds":{"type":["number","null"]},"total_resolved":{"type":"number"},"avg_human_response_seconds":{"type":["number","null"]},"median_human_response_seconds":{"type":["number","null"]},"p90_human_response_seconds":{"type":["number","null"]},"total_transfers":{"type":"number"},"unanswered_transfers":{"type":"number"}},"required":["avg_resolution_seconds","median_resolution_seconds","p90_resolution_seconds","total_resolved","avg_human_response_seconds","median_human_response_seconds","p90_human_response_seconds","total_transfers","unanswered_transfers"],"description":"Resolution time and human response time analytics, computed from recorded lifecycle timestamps (closed_at, first_transferred_at, member first replies)"},"ChatEventSchema":{"oneOf":[{"$ref":"#/components/schemas/ChatCreateEventSchema"},{"$ref":"#/components/schemas/ChatUpdateEventSchema"},{"$ref":"#/components/schemas/ChatTypingEventSchema"},{"$ref":"#/components/schemas/ChatMediaEventSchema"},{"$ref":"#/components/schemas/ChatMediaClearEventSchema"},{"$ref":"#/components/schemas/ChatDeleteEventSchema"},{"$ref":"#/components/schemas/ChatMessageEventSchema"},{"$ref":"#/components/schemas/ChatDeleteMessageEventSchema"},{"$ref":"#/components/schemas/ChatMessageReactionEventSchema"},{"$ref":"#/components/schemas/ChatMessagePartEventSchema"},{"$ref":"#/components/schemas/ChatTierLimitsEventSchema"},{"$ref":"#/components/schemas/ChatToolLimitsEventSchema"},{"$ref":"#/components/schemas/ChatConversationMemoryUpdateEventSchema"},{"$ref":"#/components/schemas/ChatConversationMemoryDeleteEventSchema"}],"discriminator":{"propertyName":"type","mapping":{"create":"#/components/schemas/ChatCreateEventSchema","update":"#/components/schemas/ChatUpdateEventSchema","typing":"#/components/schemas/ChatTypingEventSchema","media":"#/components/schemas/ChatMediaEventSchema","media-clear":"#/components/schemas/ChatMediaClearEventSchema","delete":"#/components/schemas/ChatDeleteEventSchema","message":"#/components/schemas/ChatMessageEventSchema","delete-message":"#/components/schemas/ChatDeleteMessageEventSchema","message-reaction":"#/components/schemas/ChatMessageReactionEventSchema","message-part":"#/components/schemas/ChatMessagePartEventSchema","tier-limits":"#/components/schemas/ChatTierLimitsEventSchema","tool-limits":"#/components/schemas/ChatToolLimitsEventSchema","conversation-memory-update":"#/components/schemas/ChatConversationMemoryUpdateEventSchema","conversation-memory-delete":"#/components/schemas/ChatConversationMemoryDeleteEventSchema"}}},"ChatCreateEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["create"]},"data":{"$ref":"#/components/schemas/ChatSchema"},"identifier":{"type":["string","null"]}},"required":["type","data","identifier"],"description":"Event emitted when a chat is created"},"ChatUpdateEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["update"]},"data":{"$ref":"#/components/schemas/ChatSchema"}},"required":["type","data"],"description":"Event emitted when a chat is updated"},"ChatTypingEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["typing"]},"chat_id":{"type":"string"},"member_id":{"type":"string"}},"required":["type","chat_id","member_id"],"description":"Event emitted when a user is typing in a chat"},"ChatMediaEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["media"]},"chat_id":{"type":"string"},"member_id":{"type":"string"},"listener_id":{"type":"string"},"data":{"$ref":"#/components/schemas/ChatMediaEventDataSchema"}},"required":["type","chat_id","listener_id","data"],"description":"Event emitted when a chat media is processed"},"ChatMediaClearEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["media-clear"]},"chat_id":{"type":"string"},"listener_id":{"type":"string"}},"required":["type","chat_id","listener_id"],"description":"Event emitted when a chat media is cleared"},"ChatDeleteEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["delete"]},"chat_id":{"type":"string"}},"required":["type","chat_id"],"description":"Event emitted when a chat is deleted"},"ChatMessageEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"chat_id":{"type":"string"},"data":{"$ref":"#/components/schemas/ChatMessageSchema"}},"required":["type","chat_id","data"],"description":"Event emitted when a message is sent in a chat"},"ChatDeleteMessageEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["delete-message"]},"chat_id":{"type":"string"},"message_id":{"type":"string"}},"required":["type","chat_id","message_id"],"description":"Event emitted when a message is deleted in a chat"},"ChatMessageReactionEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["message-reaction"]},"chat_id":{"type":"string"},"message_id":{"type":"string"},"member_id":{"type":"string","description":"Reacting member; absent when the AI reacted"},"emoji":{"type":"string"},"action":{"$ref":"#/components/schemas/ChatMessageReactionActionSchema"}},"required":["type","chat_id","message_id","emoji","action"],"description":"Event emitted when a reaction is added to or removed from a message"},"ChatMessageReactionActionSchema":{"type":"string","enum":["react","unreact"],"description":"The action that was performed on the reaction"},"ChatMessagePartEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["message-part"]},"chat_id":{"type":"string"},"message_id":{"type":"string"},"data":{"$ref":"#/components/schemas/ModelMessagePartSchema"}},"required":["type","chat_id","message_id","data"],"description":"Event emitted when a message part is sent in a chat"},"ChatTierLimitsEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tier-limits"]},"tier":{"$ref":"#/components/schemas/ModelTierSchema"},"data":{"$ref":"#/components/schemas/ChatLimitSchema"}},"required":["type","tier","data"],"description":"Event emitted when tier limits are updated for a chat"},"ModelTierSchema":{"type":"string","enum":["low","medium","high","max"]},"ChatLimitSchema":{"type":"object","properties":{"remaining":{"type":"number"},"next_reset_at":{"type":["string","null"],"format":"date-time"}},"required":["remaining","next_reset_at"],"description":"Schema for chat model limits"},"ChatToolLimitsEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["tool-limits"]},"tool":{"type":"string"},"data":{"$ref":"#/components/schemas/ChatLimitSchema"}},"required":["type","tool","data"],"description":"Event emitted when tool limits are updated for a chat"},"ChatConversationMemoryUpdateEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["conversation-memory-update"]},"chat_id":{"type":"string"},"data":{"$ref":"#/components/schemas/ConversationMemorySchema"}},"required":["type","chat_id","data"],"description":"Event emitted when a conversation memory (summary) is created or updated"},"ChatConversationMemoryDeleteEventSchema":{"type":"object","properties":{"type":{"type":"string","enum":["conversation-memory-delete"]},"chat_id":{"type":"string"},"memory_id":{"type":"string"}},"required":["type","chat_id","memory_id"],"description":"Event emitted when a conversation memory (summary) is deleted"},"DomainSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the domain"},"hostname":{"type":"string","description":"The hostname string (e.g., example.com)"},"org_id":{"type":"string","description":"Identifier of the org that owns this domain"},"verified":{"type":"boolean","description":"Whether the domain is verified"},"verified_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the domain was verified"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the domain was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the domain was last updated"}},"required":["id","hostname","org_id","verified","verified_at","created_at","updated_at"],"description":"Detailed information about an org domain"},"CreateDomainSchema":{"type":"object","properties":{"hostname":{"type":"string","minLength":1,"maxLength":1024,"description":"The domain string (e.g., example.com)"}},"required":["hostname"],"description":"Schema for creating a new domain"},"DomainStatusSchema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/CloudflareCustomHostnameStatusSchema"},"verification_errors":{"type":"array","items":{"type":"string"}}},"required":["status","verification_errors"],"description":"Status information about an org domain"},"CloudflareCustomHostnameStatusSchema":{"type":"string","enum":["active","pending","active_redeploying","moved","pending_deletion","deleted","pending_blocked","pending_migration","pending_provisioned","test_pending","test_active","test_active_apex","test_blocked","test_failed","provisioned","blocked"]},"DnsProviderSchema":{"type":"object","properties":{"provider":{"type":["string","null"],"description":"Provider identifier (e.g. \"cloudflare\", \"godaddy\")"},"name":{"type":["string","null"],"description":"Display name of the DNS provider"},"logo_url":{"type":["string","null"],"description":"URL to the provider logo icon"},"dns_settings_url":{"type":["string","null"],"description":"Deep link to the DNS settings page for this domain"},"auto_config_url":{"type":["string","null"],"description":"Domain Connect URL for one-click auto-configuration (when supported)"}},"required":["provider","name","logo_url","dns_settings_url","auto_config_url"],"description":"Detected DNS provider information for a domain"},"VectorIndexInfoSchema":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"contents":{"type":"array","items":{"$ref":"#/components/schemas/VectorContentInfoSchema"}},"pending_count":{"type":"number","description":"Number of pending vectors"},"failed_count":{"type":"number","description":"Number of failed vectors"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","model","contents","pending_count","failed_count","created_at"],"description":"Vector index schema"},"VectorContentInfoSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/VectorTypeSchema"},"contents_count":{"type":"number","description":"Total number of contents"},"chunks_count":{"type":"number"},"chunks_processed":{"type":"number"},"size_bytes":{"type":"number","description":"Total size in bytes"}},"required":["type","contents_count","chunks_count","chunks_processed","size_bytes"],"description":"Vector storage items info"},"VectorTypeSchema":{"type":"string","enum":["TEXT","FILE","URL"],"description":"Type of the vector content"},"VectorContentLimitedSchema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","description":"Title of the vector"},"type":{"$ref":"#/components/schemas/VectorTypeSchema"},"content":{"$ref":"#/components/schemas/VectorContentConfigSchema"},"parent_content_id":{"type":"string","description":"Parent content ID"},"size":{"type":"number","description":"Size of the vector in bytes"},"chunks_processed":{"type":"number","description":"Number of chunks processed for the vector"},"chunks_count":{"type":"number","description":"Number of chunks in the vector"},"children":{"type":"array","items":{"$ref":"#/components/schemas/VectorContentChildSchema"},"description":"Children (for URL crawl parents)"},"error":{"type":["string","null"],"description":"Error message if vector processing failed"},"status":{"$ref":"#/components/schemas/VectorStatusSchema"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","title","type","content","size","chunks_processed","chunks_count","error","status","created_at","updated_at"],"description":"Schema for vector content"},"VectorContentConfigSchema":{"oneOf":[{"$ref":"#/components/schemas/VectorContentTextConfigSchema"},{"$ref":"#/components/schemas/VectorContentFileConfigSchema"},{"$ref":"#/components/schemas/VectorContentUrlConfigSchema"}],"discriminator":{"propertyName":"type","mapping":{"TEXT":"#/components/schemas/VectorContentTextConfigSchema","FILE":"#/components/schemas/VectorContentFileConfigSchema","URL":"#/components/schemas/VectorContentUrlConfigSchema"}},"description":"Content configuration schema for different vector input types"},"VectorContentTextConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"]},"text":{"type":"string","minLength":1,"maxLength":2097152}},"required":["type"]},"VectorContentFileConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["FILE"]},"file":{"$ref":"#/components/schemas/FileSchema"}},"required":["type","file"]},"VectorContentUrlConfigSchema":{"type":"object","properties":{"type":{"type":"string","enum":["URL"]},"mode":{"$ref":"#/components/schemas/VectorContentUrlModeSchema"},"url":{"type":"string","maxLength":2048},"include_path_patterns":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":256,"description":"Include paths patterns","example":["/docs/*","/api/*"]},"exclude_path_patterns":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":256,"description":"Exclude paths patterns","example":["/admin/*","/private/*"]}},"required":["type","mode","url"]},"VectorContentUrlModeSchema":{"type":"string","enum":["CRAWL","SINGLE_URL"],"description":"Mode of URL content processing"},"VectorContentChildSchema":{"type":"object","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/VectorStatusSchema"},"title":{"type":"string","description":"Title of the child content"},"content":{"$ref":"#/components/schemas/VectorContentConfigSchema"},"parent_content_id":{"type":"string","description":"Parent content ID"},"size":{"type":"number","description":"Size of the vector in bytes"},"chunks_processed":{"type":"number","description":"Number of chunks processed for the vector"},"chunks_count":{"type":"number","description":"Number of chunks in the vector"},"error":{"type":["string","null"],"description":"Error message if vector processing failed"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","status","title","content","size","chunks_processed","chunks_count","error","created_at","updated_at"],"description":"Child content reference"},"VectorStatusSchema":{"type":"string","enum":["PENDING","PROCESSING","PROCESSED","FAILED"],"description":"Status of vector processing"},"VectorContentSchema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","description":"Title of the vector"},"type":{"$ref":"#/components/schemas/VectorTypeSchema"},"content":{"$ref":"#/components/schemas/VectorContentConfigSchema"},"parent_content_id":{"type":"string","description":"Parent content ID"},"text":{"type":["string","null"],"description":"Text content of the vector"},"text_truncated":{"type":"boolean","description":"Present when the text was truncated for the response; the stored document is complete"},"size":{"type":"number","description":"Size of the vector in bytes"},"chunks_processed":{"type":"number","description":"Number of chunks processed for the vector"},"chunks_count":{"type":"number","description":"Number of chunks in the vector"},"children":{"type":"array","items":{"$ref":"#/components/schemas/VectorContentChildSchema"},"description":"Children (for URL crawl parents)"},"error":{"type":["string","null"],"description":"Error message if vector processing failed"},"status":{"$ref":"#/components/schemas/VectorStatusSchema"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","title","type","content","text","size","chunks_processed","chunks_count","error","status","created_at","updated_at"],"description":"Schema for vector content"},"CreateVectorContentSchema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"content":{"$ref":"#/components/schemas/VectorContentConfigSchema"}},"required":["content"],"description":"Schema for creating a vector"},"UpdateVectorContentSchema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"text":{"type":"string","minLength":1,"maxLength":2097152}},"description":"Schema for updating a vector"},"UpdateVectorContentUrlSchema":{"type":"object","properties":{"exclude_path_patterns":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":256,"description":"Exclude paths patterns","example":["/admin/*","/private/*"]},"include_path_patterns":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":256,"description":"Include paths patterns","example":["/docs/*","/api/*"]},"mode":{"$ref":"#/components/schemas/VectorContentUrlModeSchema"}},"description":"Schema for updating a vector"},"VectorChunkSchema":{"type":"object","properties":{"id":{"type":"string"},"content_id":{"type":"string"},"char_start":{"type":"number"},"char_end":{"type":"number"},"chunk_index":{"type":"number"},"status":{"$ref":"#/components/schemas/VectorChunkStatusSchema"},"error":{"type":["string","null"],"description":"Error message if vector chunk processing failed"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","content_id","char_start","char_end","chunk_index","status","error","created_at","updated_at"],"description":"Vector chunk schema"},"VectorChunkStatusSchema":{"type":"string","enum":["PENDING","PROCESSING","PROCESSED","FAILED"],"description":"Status of vector chunk processing"},"AssistantSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The name of the assistant"},"enabled":{"type":"boolean","description":"Whether the assistant is enabled"},"deleted":{"type":"boolean","description":"Whether the assistant has been soft-deleted"},"secret_key":{"type":["string","null"],"description":"The secret key to create session hashes"},"avatar_url":{"type":["string","null"],"description":"The URL of the avatar photo"},"config":{"$ref":"#/components/schemas/AssistantConfigSchema"},"channels":{"type":"array","items":{"$ref":"#/components/schemas/AssistantChannelSchema"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/AssistantChannelSchema"},"description":"Use channels instead","deprecated":true},"actions":{"type":"array","items":{"$ref":"#/components/schemas/AssistantActionSchema"}},"contact_fields":{"type":"array","items":{"$ref":"#/components/schemas/AssistantContactFieldSchema"}},"members":{"type":"array","items":{"$ref":"#/components/schemas/OrgMemberSchema"},"description":"Bounded preview of assigned members (list reads only) for the collage"},"members_count":{"type":"number","description":"Total number of assigned members (list reads only)"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","enabled","deleted","secret_key","avatar_url","config","channels","integrations","actions","contact_fields","created_at","updated_at"],"description":"Schema for an assistant"},"AssistantChannelSchema":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"channel_type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"integration_id":{"allOf":[{"$ref":"#/components/schemas/ChannelTypeIdSchema"},{"description":"Use channel_type instead","deprecated":true}]},"assistant_id":{"type":"string"},"connection_id":{"type":["string","null"]},"config":{"$ref":"#/components/schemas/AssistantChannelConfigSchema"},"error":{"type":["string","null"]},"platform_url":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","enabled","channel_type","integration_id","assistant_id","connection_id","config","error","platform_url","created_at","updated_at"],"description":"Schema for an assistant channel"},"AssistantChannelConfigSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InputValuesWithDefinitionsSchema"},"description":"Configuration object for the assistant integration"},"AssistantActionSchema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the action"},"enabled":{"type":"boolean","description":"Whether the action is enabled"},"name":{"type":["string","null"],"description":"The name of the action"},"instructions":{"type":["string","null"],"description":"The instructions for the action"},"action_id":{"type":"string","description":"The ID of the action, e.g. \"TOOLS:HTTP_REQUEST\"","examples":["TOOLS:HTTP_REQUEST","TOOLS:WEB_SEARCH","TOOLS:WEB_SCRAPING"]},"assistant_id":{"type":"string","description":"The ID of the assistant","examples":["ast_XXX"]},"connection_id":{"type":["string","null"],"description":"The ID of the connection to use for the action if required","examples":["con_XXX"]},"config":{"$ref":"#/components/schemas/InputValuesWithDefinitionsSchema"},"approval_mode":{"$ref":"#/components/schemas/ConnectionActionApprovalModeSchema"},"position":{"type":"integer","description":"The position of the action within its group. Bucketed in multiples of 100, e.g. 100, 101, 102 for the first group, 200, 201, 202 for the second"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","enabled","name","instructions","action_id","assistant_id","connection_id","config","approval_mode","position","created_at","updated_at"],"description":"Schema for an assistant action"},"AssistantContactFieldSchema":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/AssistantContactFieldModeSchema"},"field":{"$ref":"#/components/schemas/TableFieldSchema"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["mode","field","created_at"],"description":"A contact-property field this assistant is allowed to see or update. Embeds the full TableField so callers do not have to remap individual props."},"AssistantContactFieldModeSchema":{"type":"string","enum":["none","read","write"],"description":"read: AI sees the property in its context but cannot update it. write: AI sees AND can update via the update_contact tool."},"TableFieldSchema":{"oneOf":[{"$ref":"#/components/schemas/TableSystemFieldSchema"},{"$ref":"#/components/schemas/TableCustomFieldSchema"}],"discriminator":{"propertyName":"kind","mapping":{"system":"#/components/schemas/TableSystemFieldSchema","custom":"#/components/schemas/TableCustomFieldSchema"}}},"TableSystemFieldSchema":{"type":"object","properties":{"id":{"type":"string"},"table_id":{"type":"string"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/TableFieldTypeSchema"},"schema":{"$ref":"#/components/schemas/FieldSchema"},"readonly":{"type":"boolean"},"sortable":{"type":"boolean","description":"Whether views can sort their records by this field."},"groupable_in":{"type":"array","items":{"type":"string","enum":["table","board","calendar","timeline","list","gallery"]},"description":"View kinds that accept this field as their grouping axis."},"kind":{"type":"string","enum":["system"]}},"required":["id","table_id","key","type","schema","readonly","sortable","groupable_in","kind"]},"TableFieldTypeSchema":{"type":"string","enum":["id","string","number","boolean","date","datetime","enum","file","record","contact","user","chat","segment","assistant","agent"]},"TableCustomFieldSchema":{"type":"object","properties":{"id":{"type":"string"},"table_id":{"type":"string"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/TableFieldTypeSchema"},"schema":{"$ref":"#/components/schemas/FieldSchema"},"readonly":{"type":"boolean"},"sortable":{"type":"boolean","description":"Whether views can sort their records by this field."},"groupable_in":{"type":"array","items":{"type":"string","enum":["table","board","calendar","timeline","list","gallery"]},"description":"View kinds that accept this field as their grouping axis."},"kind":{"type":"string","enum":["custom"]},"config":{"$ref":"#/components/schemas/TableFieldConfigSchema"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}]},"color":{"anyOf":[{"$ref":"#/components/schemas/ColorNameSchema"},{"type":"null"}]},"connection_id":{"type":["string","null"]},"unique":{"type":"boolean"},"ai_mode":{"$ref":"#/components/schemas/TableFieldAiModeSchema"},"on_target_delete":{"$ref":"#/components/schemas/TableFieldOnTargetDeleteSchema"},"archived":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","table_id","key","type","schema","readonly","sortable","groupable_in","kind","config","icon","color","connection_id","unique","ai_mode","on_target_delete","archived","created_at","updated_at"]},"TableFieldConfigSchema":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/InputValuesWithDefinitionsSchema"},"description":"Per-feature config map keyed by feature name (e.g. `button`, `auto_fill`, `sync`). Each value carries `input` + optional `definitions`."},"TableFieldAiModeSchema":{"type":"string","enum":["none","auto_fill"]},"TableFieldOnTargetDeleteSchema":{"type":"string","enum":["restrict","clear","cascade"],"description":"What happens when the referenced target is deleted (ref-typed fields only). `restrict` forbids deleting the target while any cell still points to it. `clear` allows the delete and drops those field values on remaining rows. `cascade` also deletes table rows that reference the target via this field."},"OrgMemberSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the org member"},"name":{"type":["string","null"],"description":"Name of the org member"},"email":{"type":"string","format":"email","description":"Email address of the org member"},"avatar":{"type":["string","null"],"description":"Avatar URL of the org member"},"role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"},"status":{"$ref":"#/components/schemas/OrgMemberStatusSchema"},"description":{"type":["string","null"],"description":"What this member handles — visible to the AI when routing conversations"},"org_id":{"type":"string","description":"Identifier of the org to which the member belongs"},"user_id":{"type":"string","description":"Identifier of the user associated with the org member"},"preferences":{"$ref":"#/components/schemas/OrgMemberPreferencesSchema"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CustomRoleSchema"},"description":"Custom roles assigned to the member"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the org member was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the org member was last updated"},"seen_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the user was last seen"}},"required":["id","name","email","avatar","role","status","description","org_id","user_id","preferences","roles","created_at","updated_at","seen_at"],"description":"Detailed information about an org member"},"OrgMemberRoleSchema":{"type":"string","enum":["ADMIN","DEVELOPER","MANAGER","STAFF"],"description":"Role of the org member within the org"},"OrgMemberStatusSchema":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"Status of the org member"},"OrgMemberPreferencesSchema":{"type":"object","properties":{"notifications":{"$ref":"#/components/schemas/OrgMemberNotificationsSchema"}},"required":["notifications"],"description":"Preferences of the org member"},"OrgMemberNotificationsSchema":{"type":"object","properties":{"assigned_to_me":{"$ref":"#/components/schemas/OrgMemberNotificationSchema"},"billing":{"$ref":"#/components/schemas/OrgMemberNotificationSchema"},"agent_attention":{"$ref":"#/components/schemas/OrgMemberNotificationSchema"}},"required":["assigned_to_me","billing","agent_attention"],"description":"Notifications of the org member"},"OrgMemberNotificationSchema":{"type":"object","properties":{"email":{"type":"boolean"},"push":{"type":"boolean"},"notified_at":{"type":["string","null"],"format":"date-time"}},"required":["email","push"],"description":"Notification of the org member, one flag per channel"},"CustomRoleSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"color":{"$ref":"#/components/schemas/ColorNameSchema"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/OrgPermissionSchema"}}},"required":["id","name","description","color","permissions"],"description":"A user-created org role and its permissions"},"CreateAssistantSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":1024,"description":"The name of the assistant"},"enabled":{"type":"boolean","description":"Whether the assistant is enabled"},"avatar_id":{"type":["string","null"],"maxLength":128,"description":"The ID of the avatar file id"},"generate_secret_key":{"type":"boolean","description":"When true, generates a secret key immediately (same as POST …/rotate-secret-key). When omitted or false, no secret key is stored until you rotate."},"config":{"$ref":"#/components/schemas/CreateAssistantConfigSchema"},"contact_fields":{"type":"array","items":{"$ref":"#/components/schemas/UpdateAssistantContactFieldEntrySchema"},"maxItems":32}},"required":["name"],"description":"Schema for creating a new assistant"},"CreateAssistantConfigSchema":{"type":"object","properties":{"instructions":{"type":"string","maxLength":30000,"description":"The instructions for the assistant"},"language":{"$ref":"#/components/schemas/ModelLanguageSchema"},"model":{"type":"string","minLength":1,"maxLength":128,"description":"The model to use for the assistant"},"stt":{"$ref":"#/components/schemas/AssistantSttConfigSchema"},"tts":{"$ref":"#/components/schemas/AssistantTtsConfigSchema"},"conversation":{"$ref":"#/components/schemas/PartialAssistantConversationConfigSchema"},"widget":{"$ref":"#/components/schemas/PartialAssistantWidgetConfigSchema"},"knowledge_scope":{"$ref":"#/components/schemas/KnowledgeModeSchema"},"timezone":{"allOf":[{"$ref":"#/components/schemas/TimezoneValueSchema"},{"description":"IANA timezone for the assistant (e.g. \"America/New_York\")"}]}},"description":"Schema for creating or updating the configuration of an assistant"},"PartialAssistantConversationConfigSchema":{"type":"object","properties":{"thread_mode":{"$ref":"#/components/schemas/AssistantThreadModeSchema"},"welcome_banner":{"type":"string","maxLength":256,"description":"Static greeting text displayed in the UI when users start a new conversation"},"suggested_messages":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":5,"description":"Suggested messages displayed to users when they start a new conversation"},"auto_intro_message":{"type":"string","maxLength":256,"description":"First message automatically sent by the assistant only when a conversation begins via API call"},"enable_memories":{"type":"boolean","description":"Whether to enable the \"Manage Memories\" tool for the assistant"},"enable_end_conversation_tool":{"type":"boolean","description":"Whether to enable the \"Close Conversation\" tool for the assistant"},"enable_transfer_to_human_tool":{"type":"boolean","description":"Whether to enable the \"Transfer to Human\" tool for the assistant"},"routing_instructions":{"type":"string","maxLength":30000,"description":"Business instructions that steer how this assistant routes transfers to a human (which member or team to prefer, when to escalate). Appended to the transfer tool guidance."},"enable_block_contact_tool":{"type":"boolean","description":"Whether to enable the \"Block Contact\" tool for the assistant"},"enable_ai_replies":{"type":"boolean","description":"Whether the AI generates replies. When false the assistant is human-only: incoming messages are still received and stored but the AI never responds, so a human answers."},"enable_auto_resolve":{"type":"boolean","description":"Whether inactive conversations should automatically resolve after a period of inactivity"},"enable_auto_follow_ups":{"type":"boolean","description":"Whether the assistant can automatically follow up on conversations"},"follow_up_instructions":{"type":"string","maxLength":30000,"description":"Business instructions that steer follow-up behavior (cadence, hours, stop rules, tone). Override the default follow-up guidance."},"enable_auto_csat":{"type":"boolean","description":"Whether the assistant should automatically score customer satisfaction (CSAT) when closing conversations"},"enable_private_chats":{"type":"boolean","description":"Whether to enable private chats that do not appear in the inbox"},"enable_update_contact_tool":{"type":"boolean","description":"Whether to enable the assistant to collect and update contact information (name, email, phone)"}},"description":"Partial conversation configuration for create/update payloads; omitted keys keep their stored values"},"PartialAssistantWidgetConfigSchema":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/AssistantWidgetModeSchema"},"appearance":{"$ref":"#/components/schemas/AssistantWidgetAppearanceSchema"},"position":{"$ref":"#/components/schemas/AssistantWidgetPositionSchema"},"omnibar_minimize_desktop":{"type":"boolean"},"hide_powered_by":{"type":"boolean"},"enable_dictation":{"type":"boolean"},"enable_file_uploads":{"type":"boolean"},"colors":{"type":"object","properties":{"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$/i","description":"Accent color used inside the chat (buttons, visitor messages, links)"},"launcher_background":{"type":"string","pattern":"^#[0-9a-f]{6}$/i","description":"Background color of the widget button; the icon color adapts automatically"}}},"teaser":{"type":"object","properties":{"enabled":{"type":"boolean"},"message":{"type":"string","maxLength":140,"description":"Short invitation shown next to the closed widget button"},"modes":{"type":"string","enum":["all","button","omnibar"]},"suggestions":{"type":"string","enum":["all","button","omnibar","none"]},"delay_seconds":{"type":"integer","minimum":0,"maximum":120},"frequency":{"$ref":"#/components/schemas/AssistantWidgetTeaserFrequencySchema"},"devices":{"$ref":"#/components/schemas/AssistantWidgetTeaserDevicesSchema"},"version":{"type":"integer","minimum":1}}},"channels":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AssistantWidgetChannelItemSchema"},"maxItems":20},"label":{"type":"string","maxLength":48,"description":"Heading above the channels menu; defaults to \"Talk to us on\""},"chat_button_label":{"type":"string","maxLength":48,"description":"Label of the launcher chat action; defaults to \"Chat with us\""}}}},"description":"Partial widget configuration for create/update payloads; omitted keys keep their stored values"},"UpdateAssistantContactFieldEntrySchema":{"type":"object","properties":{"field_id":{"type":"string"},"mode":{"$ref":"#/components/schemas/AssistantContactFieldModeSchema"}},"required":["field_id","mode"],"description":"Single entry for the contact-properties whitelist sync."},"UpdateAssistantSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":1024,"description":"The name of the assistant"},"enabled":{"type":"boolean","description":"Whether the assistant is enabled"},"avatar_id":{"type":["string","null"],"maxLength":128,"description":"The ID of the avatar file id"},"contact_fields":{"type":"array","items":{"$ref":"#/components/schemas/UpdateAssistantContactFieldEntrySchema"},"maxItems":32},"config":{"$ref":"#/components/schemas/UpdateAssistantConfigSchema"}},"description":"Schema for updating an existing assistant"},"UpdateAssistantConfigSchema":{"type":"object","properties":{"instructions":{"type":"string","maxLength":30000,"description":"The instructions for the assistant"},"language":{"$ref":"#/components/schemas/ModelLanguageSchema"},"model":{"type":"string","minLength":1,"maxLength":128,"description":"The model to use for the assistant"},"stt":{"$ref":"#/components/schemas/AssistantSttConfigSchema"},"tts":{"$ref":"#/components/schemas/AssistantTtsConfigSchema"},"conversation":{"$ref":"#/components/schemas/PartialAssistantConversationConfigSchema"},"widget":{"$ref":"#/components/schemas/PartialAssistantWidgetConfigSchema"},"knowledge_scope":{"$ref":"#/components/schemas/KnowledgeModeSchema"},"timezone":{"allOf":[{"$ref":"#/components/schemas/TimezoneValueSchema"},{"description":"IANA timezone for the assistant (e.g. \"America/New_York\")"}]}},"description":"Schema for updating the configuration of an assistant"},"DuplicateAssistantSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"target_org_id":{"type":"string","maxLength":128},"include_actions":{"type":"boolean"},"include_channels":{"type":"boolean"},"include_members":{"type":"boolean"},"include_knowledge":{"type":"boolean"}},"description":"Schema for duplicating an assistant"},"CreateAssistantChannelSchema":{"type":"object","properties":{"enabled":{"type":"boolean"},"channel_type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"connection_id":{"type":"string","maxLength":128},"config":{"$ref":"#/components/schemas/AssistantChannelConfigSchema"}},"required":["enabled","channel_type","connection_id","config"],"description":"Schema for creating a new assistant channel"},"UpdateAssistantChannelSchema":{"type":"object","properties":{"enabled":{"type":"boolean"},"connection_id":{"type":"string","maxLength":128},"config":{"$ref":"#/components/schemas/AssistantChannelConfigSchema"}},"description":"Schema for updating an existing assistant channel"},"CreateAssistantActionSchema":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":["string","null"],"maxLength":64,"description":"The name of the action, e.g. \"Send email\""},"instructions":{"type":["string","null"],"maxLength":2048,"description":"Extra instructions for the action"},"action_id":{"$ref":"#/components/schemas/ConnectionActionSelectorSchema"},"connection_id":{"type":["string","null"],"description":"The ID of the connection to use for the action if required, e.g. \"con_XXX\"","examples":["con_XXX"]},"config":{"$ref":"#/components/schemas/InputValuesWithDefinitionsSchema"},"approval_mode":{"allOf":[{"$ref":"#/components/schemas/ConnectionActionApprovalModeSchema"},{"description":"When the assistant must ask for approval in the chat before running the action. Always use \"never\" (run without asking)."}]}},"required":["enabled","action_id","config"],"description":"Schema for creating a new assistant action"},"ConnectionActionSelectorSchema":{"type":"string","enum":["SCHEDULER:*","SCHEDULER:ON_SCHEDULE","SCHEDULER:TIMEZONES_LIST","WORKFLOWS:*","WORKFLOWS:WORKFLOWS_LIST","WORKFLOWS:WORKFLOW_ACTIONS","WORKFLOWS:CALL_WORKFLOW","TOOLS:*","TOOLS:HTTP_REQUEST","TOOLS:WEB_SEARCH","TOOLS:WEB_SCRAPING","FILES:*","FILES:DOWNLOAD_FILE","FILES:UPLOAD_FILE","FILES:CREATE_CSV","FILES:DELETE_FILE","FILES:MARKDOWN_TO_PDF","FILES:HTML_TO_PDF","TABLES:*","TABLES:MANAGE_RECORDS","TABLES:CREATE_RECORD","TABLES:UPDATE_RECORD","TABLES:DELETE_RECORD","TABLES:SEARCH_RECORDS","TABLES:LIST_TABLES","TABLES:GET_TABLE_SCHEMA","TABLES:GET_RECORD","TABLES:LIST_VIEWS","TABLES:GET_VIEW_ITEMS","TABLES:CREATE_TABLE","TABLES:UPDATE_TABLE","TABLES:DELETE_TABLE","TABLES:MANAGE_FIELDS","TABLES:MOVE_FIELD","TABLES:DELETE_FIELD","TABLES:CREATE_VIEW","TABLES:UPDATE_VIEW","TABLES:DELETE_VIEW","TABLES:DUPLICATE_VIEW","TABLES:MOVE_VIEW_ITEM","TABLES:LIST_VIEW_GROUPS","TABLES:AGGREGATE_RECORDS","TABLES:REORDER_VIEWS","TABLES:TABLES_LIST","TABLES:FIELDS_LIST","TABLES:RECORD_SCHEMA","PAGES:*","PAGES:LIST_PAGES","PAGES:GET_PAGE","PAGES:CREATE_PAGE","PAGES:UPDATE_PAGE","PAGES:DELETE_PAGE","PAGES:CREATE_BLOCK","PAGES:UPDATE_BLOCK","PAGES:MOVE_BLOCK","PAGES:DELETE_BLOCK","PAGES:PAGES_LIST","KNOWLEDGE:*","KNOWLEDGE:SEARCH","KNOWLEDGE:GET_CHUNK","KNOWLEDGE:LIST_CONTENTS","KNOWLEDGE:GET_CONTENT","KNOWLEDGE:GET_CONTENT_TEXT","KNOWLEDGE:FIND_IN_CONTENT","KNOWLEDGE:REPLACE_IN_CONTENT","KNOWLEDGE:GET_STATS","KNOWLEDGE:ADD_CONTENT","KNOWLEDGE:UPDATE_CONTENT","KNOWLEDGE:REINDEX_CONTENT","KNOWLEDGE:DELETE_CONTENT","ASSISTANTS:*","ASSISTANTS:LIST","ASSISTANTS:GET","ASSISTANTS:CREATE","ASSISTANTS:UPDATE","ASSISTANTS:REPLACE","ASSISTANTS:GET_MODELS","ASSISTANTS:UPDATE_SETTINGS","ASSISTANTS:LIST_KNOWLEDGE","ASSISTANTS:LINK_KNOWLEDGE","ASSISTANTS:UNLINK_KNOWLEDGE","ASSISTANTS:LIST_CHANNELS","ASSISTANTS:CREATE_CHANNEL","ASSISTANTS:UPDATE_CHANNEL","ASSISTANTS:DELETE_CHANNEL","ASSISTANTS:LIST_ACTIONS","ASSISTANTS:CREATE_ACTION","ASSISTANTS:UPDATE_ACTION","ASSISTANTS:DELETE_ACTION","ASSISTANTS:SET_CONTACT_FIELD","ASSISTANTS:REMOVE_CONTACT_FIELD","AGENTS:*","AGENTS:LIST","AGENTS:GET","AGENTS:CREATE","AGENTS:UPDATE","AGENTS:LIST_ROUTINES","AGENTS:CREATE_ROUTINE","AGENTS:CANCEL_ROUTINE","CHATS:*","CHATS:LIST","CHATS:GET","INBOX:*","INBOX:LIST_CHATS","INBOX:GET_MESSAGES","INBOX:REPLY","INBOX:ASSIGN","INBOX:SET_STATUS","INBOX:MARK_RESOLVED","INBOX:REOPEN","MEMBERS:*","MEMBERS:LIST","BROADCASTS:*","BROADCASTS:LIST","BROADCASTS:GET","BROADCASTS:CREATE","BROADCASTS:UPDATE","BROADCASTS:DUPLICATE","BROADCASTS:DELETE","BROADCASTS:SET_STATE","BROADCASTS:SET_CHANNEL_TEMPLATE","BROADCASTS:ADD_RECIPIENTS","BROADCASTS:GET_RECIPIENT_COUNTS","BROADCASTS:RETRY_RECIPIENTS","BROADCASTS:REMOVE_RECIPIENTS","BROADCASTS:LIST_FIELDS","BROADCASTS:SET_FIELD","BROADCASTS:SET_FIELD_ENTRIES","BROADCASTS:SCHEDULE","BROADCASTS:CANCEL","BROADCASTS:ACTIVATE","BROADCASTS:PAUSE","BROADCASTS:SEND_TEST","BROADCASTS:GET_ANALYTICS","BROADCASTS:LIST_RECIPIENTS","ANALYTICS:*","ANALYTICS:ORG_SUMMARY","ANALYTICS:ASSISTANTS_PERFORMANCE","ANALYTICS:TEAM_PERFORMANCE","ANALYTICS:RESPONSE_TIMES","ANALYTICS:CHANNELS_BREAKDOWN","ANALYTICS:CONTACTS_GROWTH","ANALYTICS:CONTACTS_BY_CHANNEL","ANALYTICS:TOP_SEGMENTS","ANALYTICS:WORKFLOWS_PERFORMANCE","AUDIT:*","AUDIT:LIST","SKILLS:*","SKILLS:LIST","SKILLS:GET","SKILLS:CREATE","SKILLS:UPDATE","SKILLS:REPLACE","CONTACTS:*","CONTACTS:SEARCH","CONTACTS:GET","CONTACTS:UPDATE","CONTACTS:DELETE","CONTACTS:MERGE","CONTACTS:UPDATE_SEGMENTS","CONTACTS:LIST_ACTIVITIES","CONTACTS:LIST_COMMENTS","CONTACTS:ADD_COMMENT","CONTACTS:LIST_MEMORIES","CONTACTS:LIST_FILES","CONTACTS:LIST_SUPPRESSIONS","CONTACTS:ADD_SUPPRESSIONS","CONTACTS:REMOVE_SUPPRESSIONS","CONTACTS:IMPORT","SEGMENTS:*","SEGMENTS:LIST","SEGMENTS:GET","SEGMENTS:CREATE","SEGMENTS:UPDATE","SEGMENTS:DELETE","EMAILS:*","EMAILS:ON_EMAIL_STATUS_CHANGE","EMAILS:SEND_EMAIL","EMAILS:LIST_SENDERS","MCP:*","MCP:TOOLS_LIST","MCP:TOOL_SCHEMA","MCP:TOOL_CALL","MCP:TOOLS","OPENAPI:*","OPENAPI:OPERATIONS_LIST","OPENAPI:OPERATION_SCHEMA","OPENAPI:OPERATION_CALL","OPENAPI:TOOLS","GOOGLE_SHEETS:*","GOOGLE_SHEETS:ON_SPREADSHEETS_NEW_ROW","GOOGLE_SHEETS:SPREADSHEETS_SEARCH","GOOGLE_SHEETS:SPREADSHEETS_LIST","GOOGLE_SHEETS:SPREADSHEETS_FILES_LIST","GOOGLE_SHEETS:WORKSHEETS_LIST","GOOGLE_SHEETS:SPREADSHEETS_APPEND_ROW","GOOGLE_SHEETS:SPREADSHEETS_UPDATE_ROW","GOOGLE_CALENDAR:*","GOOGLE_CALENDAR:ON_NEW_EVENT","GOOGLE_CALENDAR:CALENDARS_LIST","GOOGLE_CALENDAR:FREEBUSY_QUERY","GOOGLE_CALENDAR:EVENTS_SEARCH","GOOGLE_CALENDAR:EVENTS_GET","GOOGLE_CALENDAR:EVENTS_CREATE","GOOGLE_CALENDAR:EVENTS_UPDATE","GOOGLE_CALENDAR:EVENTS_DELETE","GOOGLE_CALENDAR:EVENTS_QUICK_ADD","OUTLOOK_CALENDAR:*","OUTLOOK_CALENDAR:CALENDARS_LIST","OUTLOOK_CALENDAR:EVENTS_LIST","OUTLOOK_CALENDAR:FREEBUSY_QUERY","OUTLOOK_CALENDAR:EVENTS_SEARCH","OUTLOOK_CALENDAR:EVENTS_GET","OUTLOOK_CALENDAR:EVENTS_CREATE","OUTLOOK_CALENDAR:EVENTS_UPDATE","OUTLOOK_CALENDAR:EVENTS_DELETE","GOOGLE_DRIVE:*","GOOGLE_DRIVE:FILES_SEARCH","GOOGLE_DRIVE:FILES_LIST","GOOGLE_DRIVE:FILES_GET","GOOGLE_DRIVE:FILES_DOWNLOAD","GOOGLE_DRIVE:FILES_CREATE","GOOGLE_DRIVE:FILES_UPDATE","GOOGLE_DRIVE:FILES_DELETE","GOOGLE_DRIVE:FOLDERS_CREATE","AIRTABLE:*","AIRTABLE:BASES_LIST","AIRTABLE:TABLES_LIST","AIRTABLE:TABLE_SCHEMA","AIRTABLE:RECORDS_SEARCH","AIRTABLE:RECORD_GET","AIRTABLE:RECORD_CREATE","AIRTABLE:RECORD_UPDATE","AIRTABLE:RECORD_DELETE","AIRTABLE:COLLABORATORS_LIST","NOTION:*","NOTION:DATA_SOURCES_LIST","NOTION:DATA_SOURCE_SCHEMA","NOTION:USERS_LIST","NOTION:SEARCH","NOTION:RECORDS_SEARCH","NOTION:RECORD_GET","NOTION:RECORD_CREATE","NOTION:RECORD_UPDATE","NOTION:PAGES_SEARCH","NOTION:PAGES_AND_RECORDS_LIST","NOTION:PAGE_GET","NOTION:PAGE_CREATE","NOTION:PAGE_UPDATE","NOTION:PAGE_CONTENT_APPEND","NOTION:COMMENTS_LIST","NOTION:COMMENT_CREATE","LINEAR:*","LINEAR:TEAMS_LIST","LINEAR:STATES_LIST","LINEAR:USERS_LIST","LINEAR:LABELS_LIST","LINEAR:ISSUES_SEARCH","LINEAR:ISSUE_GET","LINEAR:ISSUE_CREATE","LINEAR:ISSUE_UPDATE","LINEAR:ISSUE_COMMENT_CREATE","TRELLO:*","TRELLO:BOARDS_LIST","TRELLO:BOARD_GET","TRELLO:LISTS_LIST","TRELLO:CARDS_SEARCH","TRELLO:CARD_GET","TRELLO:CARD_CREATE","TRELLO:CARD_UPDATE","TRELLO:CARD_MOVE","TRELLO:CARD_COMMENT","TRELLO:CARD_DELETE","TRELLO:MEMBERS_LIST","TRELLO:LABELS_LIST","HUBSPOT:*","HUBSPOT:CONTACTS_SEARCH","HUBSPOT:CONTACT_GET","HUBSPOT:CONTACT_CREATE","HUBSPOT:CONTACT_UPDATE","HUBSPOT:CONTACT_PROPERTIES_LIST","HUBSPOT:COMPANIES_SEARCH","HUBSPOT:COMPANY_GET","HUBSPOT:COMPANY_CREATE","HUBSPOT:COMPANY_UPDATE","HUBSPOT:COMPANY_PROPERTIES_LIST","HUBSPOT:DEALS_SEARCH","HUBSPOT:DEAL_GET","HUBSPOT:DEAL_CREATE","HUBSPOT:DEAL_UPDATE","HUBSPOT:DEAL_PROPERTIES_LIST","HUBSPOT:DEAL_PIPELINES_LIST","HUBSPOT:DEAL_STAGES_LIST","HUBSPOT:MEETINGS_SEARCH","HUBSPOT:MEETING_GET","HUBSPOT:MEETING_CREATE","HUBSPOT:MEETING_UPDATE","HUBSPOT:MEETING_DELETE","SALESFORCE:*","SALESFORCE:OBJECTS_LIST","SALESFORCE:LEADS_SEARCH","SALESFORCE:LEAD_GET","SALESFORCE:LEAD_CREATE","SALESFORCE:LEAD_UPDATE","SALESFORCE:LEAD_DELETE","SALESFORCE:CONTACTS_SEARCH","SALESFORCE:CONTACT_GET","SALESFORCE:CONTACT_CREATE","SALESFORCE:CONTACT_UPDATE","SALESFORCE:CONTACT_DELETE","SALESFORCE:ACCOUNTS_SEARCH","SALESFORCE:ACCOUNT_GET","SALESFORCE:ACCOUNT_CREATE","SALESFORCE:ACCOUNT_UPDATE","SALESFORCE:ACCOUNT_DELETE","SALESFORCE:OPPORTUNITIES_SEARCH","SALESFORCE:OPPORTUNITY_GET","SALESFORCE:OPPORTUNITY_CREATE","SALESFORCE:OPPORTUNITY_UPDATE","SALESFORCE:OPPORTUNITY_DELETE","ZOHO:*","ZOHO:MODULES_LIST","ZOHO:MODULE_FIELDS","ZOHO:RECORDS_SEARCH","ZOHO:RECORD_GET","ZOHO:RECORD_CREATE","ZOHO:RECORD_UPDATE","ZOHO:RECORD_DELETE","ZOHO:USERS_LIST","ZOHO:TAGS_LIST","ZOHO:PIPELINES_LIST","ZOHO:DEAL_STAGES_LIST","ZOHO:LEADS_SEARCH","ZOHO:LEAD_GET","ZOHO:LEAD_CREATE","ZOHO:LEAD_UPDATE","ZOHO:LEAD_DELETE","ZOHO:LEAD_CONVERT","ZOHO:CONTACTS_SEARCH","ZOHO:CONTACT_GET","ZOHO:CONTACT_CREATE","ZOHO:CONTACT_UPDATE","ZOHO:CONTACT_DELETE","ZOHO:CONTACT_TAGS_ADD","ZOHO:CONTACT_TAGS_REMOVE","ZOHO:ACCOUNTS_SEARCH","ZOHO:ACCOUNT_GET","ZOHO:ACCOUNT_CREATE","ZOHO:ACCOUNT_UPDATE","ZOHO:ACCOUNT_DELETE","ZOHO:DEALS_SEARCH","ZOHO:DEAL_GET","ZOHO:DEAL_CREATE","ZOHO:DEAL_UPDATE","ZOHO:DEAL_DELETE","ZOHO:CALENDAR_EVENTS_LIST","ZOHO:CALENDAR_EVENT_CREATE","ZOHO:CALENDAR_EVENT_UPDATE","ZOHO:CALENDAR_EVENT_DELETE","ZOHO:ATTACHMENTS_UPLOAD","ZOHO:ATTACHMENTS_LIST","ZOHO:ATTACHMENTS_DOWNLOAD","ZOHO:ATTACHMENTS_DELETE","ZOHO_BOOKINGS:*","ZOHO_BOOKINGS:WORKSPACES_LIST","ZOHO_BOOKINGS:SERVICES_LIST","ZOHO_BOOKINGS:STAFF_LIST","ZOHO_BOOKINGS:RESOURCES_LIST","ZOHO_BOOKINGS:AVAILABILITY_GET","ZOHO_BOOKINGS:APPOINTMENTS_SEARCH","ZOHO_BOOKINGS:APPOINTMENT_GET","ZOHO_BOOKINGS:APPOINTMENT_BOOK","ZOHO_BOOKINGS:APPOINTMENT_RESCHEDULE","ZOHO_BOOKINGS:APPOINTMENT_UPDATE","ZOHO_BOOKINGS:APPOINTMENT_CANCEL","ZOHO_BOOKINGS:CUSTOMER_CREATE","ZOHO_INVENTORY:*","ZOHO_INVENTORY:ITEMS_SEARCH","ZOHO_INVENTORY:ITEM_GET","ZOHO_INVENTORY:ITEM_CREATE","ZOHO_INVENTORY:ITEM_UPDATE","ZOHO_INVENTORY:ITEM_IMAGE_UPLOAD","ZOHO_INVENTORY:ITEM_IMAGE_DELETE","ZOHO_INVENTORY:CONTACTS_SEARCH","ZOHO_INVENTORY:CONTACT_GET","ZOHO_INVENTORY:CONTACT_CREATE","ZOHO_INVENTORY:CONTACT_UPDATE","ZOHO_INVENTORY:SALES_ORDERS_SEARCH","ZOHO_INVENTORY:SALES_ORDER_GET","ZOHO_INVENTORY:SALES_ORDER_CREATE","ZOHO_INVENTORY:SALES_ORDER_UPDATE","ZOHO_INVENTORY:INVOICES_SEARCH","ZOHO_INVENTORY:INVOICE_GET","ZOHO_INVENTORY:INVOICE_CREATE","ZOHO_INVENTORY:INVOICE_SEND","ZOHO_CALENDAR:*","ZOHO_CALENDAR:CALENDARS_LIST","ZOHO_CALENDAR:FREEBUSY_GET","ZOHO_CALENDAR:EVENTS_SEARCH","ZOHO_CALENDAR:EVENT_GET","ZOHO_CALENDAR:EVENT_CREATE","ZOHO_CALENDAR:EVENT_UPDATE","ZOHO_CALENDAR:EVENT_DELETE","GOHIGHLEVEL:*","GOHIGHLEVEL:CONTACTS_SEARCH","GOHIGHLEVEL:CONTACT_GET","GOHIGHLEVEL:CONTACT_CREATE","GOHIGHLEVEL:CONTACT_UPDATE","GOHIGHLEVEL:CONTACT_DELETE","GOHIGHLEVEL:CONTACT_TAGS_ADD","GOHIGHLEVEL:CONTACT_TAGS_REMOVE","GOHIGHLEVEL:OPPORTUNITIES_SEARCH","GOHIGHLEVEL:OPPORTUNITY_GET","GOHIGHLEVEL:OPPORTUNITY_CREATE","GOHIGHLEVEL:OPPORTUNITY_UPDATE","GOHIGHLEVEL:OPPORTUNITY_DELETE","GOHIGHLEVEL:PIPELINES_LIST","GOHIGHLEVEL:PIPELINE_STAGES_LIST","GOHIGHLEVEL:CALENDARS_LIST","GOHIGHLEVEL:CALENDAR_FREE_SLOTS","GOHIGHLEVEL:CALENDAR_BLOCKED_SLOTS","GOHIGHLEVEL:CALENDAR_EVENTS_LIST","GOHIGHLEVEL:CALENDAR_EVENT_CREATE","GOHIGHLEVEL:CALENDAR_EVENT_UPDATE","GOHIGHLEVEL:CALENDAR_EVENT_DELETE","GOHIGHLEVEL:CAMPAIGNS_LIST","GOHIGHLEVEL:CUSTOM_FIELDS","GOHIGHLEVEL:TAGS_LIST","GOHIGHLEVEL:COUNTRIES_LIST","GOHIGHLEVEL:USERS_LIST","CAL:*","CAL:SLOTS_GET","CAL:BOOKINGS_LIST","CAL:BOOKING_GET","CAL:BOOKING_CREATE","CAL:BOOKING_UPDATE","CAL:BOOKING_CANCEL","CAL:EVENTS_LIST","CALENDLY:*","CALENDLY:AVAILABLE_TIMES_GET","CALENDLY:EVENTS_SEARCH","CALENDLY:EVENT_GET","CALENDLY:EVENT_CREATE","CALENDLY:EVENT_CANCEL","CALENDLY:SCHEDULING_LINK_CREATE","CALENDLY:EVENT_TYPES_LIST","CALENDLY:USERS_LIST","SLACK:*","SLACK:ON_MENTION","SLACK:ON_CHANNEL_NEW_MESSAGE","SLACK:SEARCH","SLACK:CHANNELS_LIST","SLACK:CHANNELS_LIST_WITH_ANY","SLACK:CHANNELS_MESSAGES_LIST","SLACK:CHANNELS_SEND_MESSAGE","SLACK:CHANNELS_REPLY_MESSAGE","TELEGRAM:*","TELEGRAM:ON_NEW_MESSAGE","TELEGRAM:SEND_MESSAGE","INSTAGRAM:*","INSTAGRAM:ON_NEW_MESSAGE","INSTAGRAM:SEND_MESSAGE","MESSENGER:*","MESSENGER:ON_NEW_MESSAGE","MESSENGER:SEND_MESSAGE","MESSENGER:PAGES_LIST","TIKTOK:*","TIKTOK:ON_NEW_MESSAGE","TIKTOK:SEND_MESSAGE","WHATSAPP:*","WHATSAPP:ON_NEW_MESSAGE","WHATSAPP:ON_MESSAGE_STATUS_CHANGE","WHATSAPP:SEND_MESSAGE","WHATSAPP:SEND_MESSAGE_TEMPLATE","WHATSAPP:SEND_CONVERSION_EVENT","WHATSAPP:PHONE_NUMBERS_LIST","WHATSAPP:TEMPLATES_LIST","WHATSAPP:GET_TEMPLATES","WHATSAPP:GET_TEMPLATE","WHATSAPP:CREATE_TEMPLATE","WHATSAPP:GET_TEMPLATE_LIBRARY","WHATSAPP:CREATE_TEMPLATE_FROM_LIBRARY","WHATSAPP:EDIT_TEMPLATE","WHATSAPP:DELETE_TEMPLATE","WHATSAPP:DATASETS_LIST","GMAIL:*","GMAIL:ON_NEW_EMAIL","GMAIL:SEND_EMAIL","GMAIL:REPLY_EMAIL","GMAIL:FROM_EMAIL_LIST","GMAIL:LABELS_LIST","JAPIFON:*","JAPIFON:ON_NEW_MESSAGE","JAPIFON:MESSAGE_SEND","SMPP:*","SMPP:SEND_MESSAGE","SMPP:ON_MESSAGE_STATUS_CHANGE","TWILIO:*","TWILIO:ON_NEW_MESSAGE","TWILIO:SEND_MESSAGE","TWILIO:PHONE_NUMBERS_LIST","TELNYX:*","TELNYX:ON_NEW_MESSAGE","TELNYX:SEND_MESSAGE","TELNYX:PHONE_NUMBERS_LIST","RESEND:*","RESEND:ON_NEW_EMAIL","RESEND:SEND_EMAIL","STRIPE:*","STRIPE:CUSTOMERS_SEARCH","STRIPE:CUSTOMER_GET","STRIPE:CUSTOMER_CREATE","STRIPE:CUSTOMER_UPDATE","STRIPE:CHECKOUT_SESSION_CREATE","STRIPE:CHECKOUT_SESSION_GET","STRIPE:BILLING_PORTAL_SESSION_CREATE","STRIPE:CURRENCIES_LIST","STRIPE:PRICES_LIST","STRIPE:PAYMENT_LINK_CREATE","STRIPE:PAYMENT_LINK_GET","STRIPE:PAYMENT_GET","STRIPE:PAYMENT_REFUND","STRIPE:PAYMENTS_LIST","STRIPE:SUBSCRIPTION_CREATE","STRIPE:SUBSCRIPTION_GET","STRIPE:SUBSCRIPTION_UPDATE","STRIPE:SUBSCRIPTION_CANCEL","STRIPE:SUBSCRIPTIONS_LIST","STRIPE:INVOICE_CREATE","STRIPE:INVOICE_GET","STRIPE:INVOICE_SEND","STRIPE:INVOICES_LIST","SHOPIFY:*","SHOPIFY:PRODUCTS_SEARCH","SHOPIFY:PRODUCT_GET","SHOPIFY:PRODUCT_VARIANTS_SEARCH","SHOPIFY:ORDERS_SEARCH","SHOPIFY:ORDER_GET","SHOPIFY:ORDER_CREATE","SHOPIFY:ORDER_UPDATE","SHOPIFY:CUSTOMERS_SEARCH","SHOPIFY:CUSTOMER_GET","SHOPIFY:CUSTOMER_CREATE","SHOPIFY:CUSTOMER_UPDATE","SHOPIFY:INVENTORY_LEVELS_LIST","ZENDESK:*","ZENDESK:TICKET_SEARCH","ZENDESK:TICKET_GET","ZENDESK:TICKET_CREATE","ZENDESK:TICKET_UPDATE","ZENDESK:TICKET_REPLY","ZENDESK:TICKET_ADD_NOTE","ZENDESK:TICKET_COMMENTS_LIST","ZENDESK:TICKETS_LIST","ODOO:*","ODOO:LEADS_SEARCH","ODOO:LEAD_GET","ODOO:LEAD_CREATE","ODOO:LEAD_UPDATE","ODOO:LEAD_DELETE","ODOO:LEAD_CONVERT","ODOO:OPPORTUNITIES_SEARCH","ODOO:OPPORTUNITY_GET","ODOO:OPPORTUNITY_CREATE","ODOO:OPPORTUNITY_UPDATE","ODOO:OPPORTUNITY_DELETE","ODOO:CONTACTS_SEARCH","ODOO:STAGES_LIST","ODOO:TAGS_LIST","ODOO:CALENDARS_LIST","ODOO:CALENDAR_EVENTS_LIST","ODOO:CALENDAR_EVENT_CREATE","ODOO:CALENDAR_EVENT_UPDATE","ODOO:CALENDAR_EVENT_DELETE","ODOO:RECORDS_SEARCH","ODOO:ATTACHMENTS_UPLOAD","ODOO:ATTACHMENTS_LIST","ODOO:ATTACHMENTS_DOWNLOAD","ODOO:ATTACHMENTS_DELETE","WOOCOMMERCE:*","WOOCOMMERCE:PRODUCTS_SEARCH","WOOCOMMERCE:PRODUCT_GET","WOOCOMMERCE:PRODUCT_VARIATIONS_SEARCH","WOOCOMMERCE:CUSTOMERS_SEARCH","WOOCOMMERCE:CUSTOMER_GET","WOOCOMMERCE:CUSTOMER_CREATE","WOOCOMMERCE:CUSTOMER_UPDATE","WOOCOMMERCE:ORDERS_SEARCH","WOOCOMMERCE:ORDER_GET","WOOCOMMERCE:ORDER_CREATE","WOOCOMMERCE:ORDER_UPDATE","WOOCOMMERCE:ORDER_NOTE_CREATE","WOOCOMMERCE:COUPON_GET","WOOCOMMERCE:PRODUCT_CATEGORIES_LIST"],"description":"Type of the connection action"},"BulkAssistantActionsSchema":{"type":"object","properties":{"create":{"type":"array","items":{"$ref":"#/components/schemas/CreateAssistantActionSchema"},"maxItems":64,"description":"Actions to create"},"delete":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"IDs of actions to delete"}},"description":"Schema for creating and deleting assistant actions in bulk"},"ReorderAssistantActionsSchema":{"type":"object","properties":{"positions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"position":{"type":"integer","minimum":0}},"required":["id","position"]},"maxItems":64,"description":"New explicit position for each action being reordered"}},"required":["positions"],"description":"Schema for reordering assistant actions"},"UpdateAssistantActionSchema":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":["string","null"],"maxLength":64,"description":"The name of the action, e.g. \"Send email\""},"instructions":{"type":["string","null"],"maxLength":2048,"description":"Extra instructions for the action"},"connection_id":{"type":["string","null"],"description":"The ID of the connection to use for the action if required, e.g. \"con_XXX\"","examples":["con_XXX"]},"config":{"$ref":"#/components/schemas/InputValuesWithDefinitionsSchema"},"approval_mode":{"allOf":[{"$ref":"#/components/schemas/ConnectionActionApprovalModeSchema"},{"description":"When the assistant must ask for approval in the chat before running the action. Always use \"never\" (run without asking)."}]}},"description":"Schema for updating an existing assistant action"},"AssistantAvailableVectorContentSchema":{"allOf":[{"$ref":"#/components/schemas/VectorContentLimitedSchema"},{"type":"object","properties":{"linked":{"type":"boolean"}},"required":["linked"]}],"description":"Schema for vector content"},"AgentActionSchema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the action"},"enabled":{"type":"boolean","description":"Whether the action is enabled"},"name":{"type":["string","null"],"description":"The name of the action"},"instructions":{"type":["string","null"],"description":"The instructions for the action"},"action_id":{"type":"string","description":"The ID of the action, e.g. \"TOOLS:HTTP_REQUEST\", or a \"TYPE:*\" wildcard covering every action of the app","examples":["TOOLS:HTTP_REQUEST","GOOGLE_SPREADSHEETS:*"]},"agent_id":{"type":"string","description":"The ID of the agent","examples":["agt_XXX"]},"connection_id":{"type":["string","null"],"description":"The ID of the connection to use for the action if required","examples":["con_XXX"]},"config":{"$ref":"#/components/schemas/InputValuesWithDefinitionsSchema"},"approval_mode":{"allOf":[{"$ref":"#/components/schemas/ConnectionActionApprovalModeSchema"},{"type":["string","null"],"description":"When the agent must ask for approval before running the action. Null inherits the run default."}]},"position":{"type":"integer","description":"The position of the action within its group. Bucketed in multiples of 100, e.g. 100, 101, 102 for the first group, 200, 201, 202 for the second"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","enabled","name","instructions","action_id","agent_id","connection_id","config","approval_mode","position","created_at","updated_at"],"description":"Schema for an agent action"},"CreateAgentActionSchema":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":["string","null"],"maxLength":64,"description":"The name of the action, e.g. \"Send email\""},"instructions":{"type":["string","null"],"maxLength":2048,"description":"Extra instructions for the action"},"action_id":{"$ref":"#/components/schemas/ConnectionActionSelectorSchema"},"connection_id":{"type":["string","null"],"description":"The ID of the connection to use for the action if required, e.g. \"con_XXX\"","examples":["con_XXX"]},"config":{"$ref":"#/components/schemas/InputValuesWithDefinitionsSchema"},"approval_mode":{"type":["string","null"],"enum":["auto","ask","never",null],"description":"When the agent must ask for approval before running the action. Omit or null to inherit the run default."}},"required":["enabled","action_id","config"],"description":"Schema for creating a new agent action"},"BulkAgentActionsSchema":{"type":"object","properties":{"create":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentActionSchema"},"maxItems":64,"description":"Actions to create"},"delete":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"IDs of actions to delete"}},"description":"Schema for creating and deleting agent actions in bulk"},"ReorderAgentActionsSchema":{"type":"object","properties":{"positions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"position":{"type":"integer","minimum":0}},"required":["id","position"]},"maxItems":64,"description":"New explicit position for each action being reordered"}},"required":["positions"],"description":"Schema for reordering agent actions"},"UpdateAgentActionSchema":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":["string","null"],"maxLength":64,"description":"The name of the action, e.g. \"Send email\""},"instructions":{"type":["string","null"],"maxLength":2048,"description":"Extra instructions for the action"},"connection_id":{"type":["string","null"],"description":"The ID of the connection to use for the action if required, e.g. \"con_XXX\"","examples":["con_XXX"]},"config":{"$ref":"#/components/schemas/InputValuesWithDefinitionsSchema"},"approval_mode":{"type":["string","null"],"enum":["auto","ask","never",null],"description":"When the agent must ask for approval before running the action. Omit or null to inherit the run default."}},"description":"Schema for updating an existing agent action"},"SkillSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The name of the skill"},"instructions":{"type":"string","description":"The instruction pack the AI follows when the skill is on"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","instructions","created_at","updated_at"],"description":"Schema for a skill"},"CreateSkillSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"The name of the skill"},"instructions":{"type":"string","minLength":1,"maxLength":51200,"description":"The instruction pack the AI follows when the skill is on"}},"required":["name","instructions"],"description":"Schema for creating a new skill"},"UpdateSkillSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"The name of the skill"},"instructions":{"type":"string","minLength":1,"maxLength":51200,"description":"The instruction pack the AI follows when the skill is on"}},"description":"Schema for updating an existing skill"},"OrgVariableSchema":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z_][a-zA-Z_0-9]*$","description":"The key of the org variable"},"value":{"type":"string","maxLength":2048,"description":"The value of the org variable"},"secret":{"type":"boolean","description":"Indicates if the variable is a secret","example":true}},"required":["key"],"description":"Detailed information about a variable in your org"},"CreateOrgVariableSchema":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z_][a-zA-Z_0-9]*$","description":"The key of the org variable"},"value":{"type":"string","maxLength":2048,"description":"The value of the org variable"},"secret":{"type":"boolean","description":"Indicates if the variable is a secret","example":true}},"required":["key"],"description":"Detailed information about a variable in your org"},"UpdateOrgVariableSchema":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z_][a-zA-Z_0-9]*$","description":"The key of the org variable"},"value":{"type":"string","maxLength":2048,"description":"The value of the org variable"},"secret":{"type":"boolean","description":"Indicates if the variable is a secret","example":true}},"description":"Detailed information about a variable in your org"},"OrgWebhookSubscribableEventIdSchema":{"type":"string","enum":["chat.assigned","contact.blocked","contact.unsubscribed","broadcast.failed","broadcast.bounced","broadcast.complained","broadcast.suppressed"],"description":"An event an endpoint can subscribe to"},"OrgWebhookSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"$ref":"#/components/schemas/OrgWebhookSubscribableEventIdSchema"}},"enabled":{"type":"boolean"},"secret":{"type":["string","null"],"description":"Signing secret. Returned in full on create and rotate only; masked afterwards."},"disabled_reason":{"type":["string","null"],"description":"Why the endpoint was disabled automatically, if it was"},"consecutive_failures":{"type":"number"},"last_delivery_at":{"type":["string","null"],"format":"date-time"},"last_success_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","url","events","enabled","secret","disabled_reason","consecutive_failures","last_delivery_at","last_success_at","created_at","updated_at"],"description":"A webhook endpoint"},"CreateOrgWebhookSchema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"HTTPS endpoint that receives the events"},"events":{"type":"array","items":{"$ref":"#/components/schemas/OrgWebhookSubscribableEventIdSchema"},"minItems":1,"description":"Events to subscribe to"},"name":{"type":"string","minLength":1,"maxLength":64},"enabled":{"type":"boolean"}},"required":["url","events","name"]},"UpdateOrgWebhookSchema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"HTTPS endpoint that receives the events"},"events":{"type":"array","items":{"$ref":"#/components/schemas/OrgWebhookSubscribableEventIdSchema"},"minItems":1,"description":"Events to subscribe to"},"name":{"type":"string","minLength":1,"maxLength":64},"enabled":{"type":"boolean"}}},"OrgWebhookDeliverySchema":{"type":"object","properties":{"id":{"type":"string"},"webhook_id":{"type":"string"},"event":{"$ref":"#/components/schemas/OrgWebhookEventIdSchema"},"event_id":{"type":"string"},"status":{"type":"string","enum":["PENDING","DELIVERED","FAILED","SKIPPED"]},"attempt":{"type":"number"},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"response_status":{"type":["number","null"]},"response_body":{"type":["string","null"]},"error":{"type":["string","null"]},"duration_ms":{"type":["number","null"]},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","webhook_id","event","event_id","status","attempt","next_attempt_at","response_status","response_body","error","duration_ms","delivered_at","created_at"],"description":"One attempt series of one event against one endpoint"},"AuditLogSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique audit log entry ID"},"action":{"$ref":"#/components/schemas/AuditLogActionSchema"},"actor":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"The user who performed the action"}]},"user":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"The user who performed the action"}]},"assistant":{"allOf":[{"$ref":"#/components/schemas/PublicAssistantSchema"},{"description":"Affected assistant ID"}]},"agent":{"allOf":[{"$ref":"#/components/schemas/AgentLimitedSchema"},{"description":"Affected agent"}]},"workflow":{"$ref":"#/components/schemas/WorkflowPublicSchema"},"connection":{"$ref":"#/components/schemas/ConnectionPublicSchema"},"broadcast":{"$ref":"#/components/schemas/BroadcastPublicSchema"},"member":{"$ref":"#/components/schemas/OrgMemberWithLimitedUserSchema"},"org":{"$ref":"#/components/schemas/OrgPublicSchema"},"metadata":{"$ref":"#/components/schemas/AuditLogMetadataSchema"},"source":{"$ref":"#/components/schemas/AuditLogSourceSchema"},"ip":{"type":["string","null"],"description":"IP address of the actor"},"country":{"type":["string","null"],"description":"Country code of the actor"},"user_agent":{"type":["string","null"],"description":"Browser user-agent string"},"created_at":{"type":"string","format":"date-time","description":"When the action was performed"}},"required":["id","action","source","ip","country","user_agent","created_at"]},"AuditLogActionSchema":{"type":"string","enum":["org.updated","org.deleted","org.disabled","org.enabled","org.restored","org.transferred","org.transferred_to","org.detached","org.detached_from","org.sub_org_created","org.sub_org_updated","org.sub_org_member_joined","org.sub_org_member_role_changed","member.invited","member.joined","member.removed","member.left","member.role_changed","role.created","role.updated","role.deleted","role.assigned","role.unassigned","assistant.created","assistant.updated","assistant.deleted","assistant.restored","assistant.duplicated","assistant.duplicated_from","agent.created","agent.updated","agent.deleted","agent.duplicated","action.created","action.deleted","action.enabled","action.disabled","channel.created","channel.deleted","channel.updated","channel.enabled","channel.disabled","broadcast.created","broadcast.deleted","broadcast.activated","broadcast.paused","domain.created","domain.deleted","email.domain.created","email.domain.deleted","sso.profile.created","sso.profile.updated","sso.profile.deleted","sso.profile.sessions.revoked","sso.domain.create_code_requested","sso.domain.delete_code_requested","sso.domain.created","sso.domain.updated","sso.domain.deleted","email.identity.created","email.identity.deleted","chat.deleted","workflow.created","workflow.deleted","workflow.restored","connection.created","connection.updated","connection.deleted","api_key.created","api_key.deleted","api_key.rotated","webhook.created","webhook.updated","webhook.deleted","webhook.secret_rotated"],"description":"The action that was performed"},"WorkflowPublicSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the workflow"},"name":{"type":"string","description":"Name of the workflow"},"access":{"$ref":"#/components/schemas/WorkflowAccessTypeSchema"},"org_id":{"type":"string","description":"Organization ID associated with the workflow"}},"required":["id","name","access","org_id"],"description":"Affected workflow ID"},"WorkflowAccessTypeSchema":{"type":"string","enum":["PRIVATE","PUBLIC_WRITE","PUBLIC_READ"],"description":"Access level of the workflow"},"ConnectionPublicSchema":{"type":"object","properties":{"id":{"type":"string","description":"Connection ID"},"type":{"$ref":"#/components/schemas/ConnectionTypeSchema"},"name":{"type":["string","null"],"description":"Connection name"}},"required":["id","type","name"],"description":"Affected connection"},"BroadcastPublicSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the broadcast"},"name":{"type":"string","description":"Name of the broadcast"}},"required":["id","name"],"description":"Affected broadcast"},"OrgMemberWithLimitedUserSchema":{"type":"object","properties":{"id":{"type":"string","description":"Member ID"},"role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"},"user":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"Schema for a limited user"}]}},"required":["id","role","user"],"description":"Affected member"},"OrgPublicSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the org"},"name":{"type":"string","description":"Name of the org"},"verified":{"type":"boolean","description":"Verification status of the org"},"logo_url":{"type":["string","null"],"description":"URL of the organization logo"},"plan":{"$ref":"#/components/schemas/OrgSubscriptionPlanSchema"},"config":{"$ref":"#/components/schemas/OrgConfigSchema"},"features":{"$ref":"#/components/schemas/OrgFeaturesConfigSchema"},"subscription_available":{"type":"boolean","description":"Whether the org may still use paid features: it is subscribed, or its subscription ended inside the grace window. False once that window has passed."},"parent_org_id":{"type":"string","description":"ID of the parent organization if this is a sub-org"}},"required":["id","name","verified","logo_url"],"description":"Public information about an org (organization)"},"OrgSubscriptionPlanSchema":{"type":"string","enum":["free","business"],"description":"Type of subscription plan"},"OrgConfigSchema":{"type":"object","properties":{"email":{"type":["string","null"],"maxLength":128,"format":"email","description":"Organization contact email; pass null to clear"},"address":{"type":"string","maxLength":128,"description":"Physical address"},"terms_url":{"type":["string","null"],"maxLength":1024,"format":"uri","description":"Terms of service URL; pass null to clear"},"privacy_url":{"type":["string","null"],"maxLength":1024,"format":"uri","description":"Privacy policy URL; pass null to clear"},"access":{"$ref":"#/components/schemas/OrgAccessConfigSchema"},"modules":{"$ref":"#/components/schemas/OrgModulesConfigSchema"}},"description":"Organization configuration settings"},"OrgAccessConfigSchema":{"type":"object","properties":{"session_ttl_seconds":{"anyOf":[{"type":"number","enum":[0]},{"type":"integer","minimum":60,"maximum":315360000}],"description":"Session lifetime in seconds for SSO logins. Use 0 to disable expiration (session never expires). Any non-zero value must be at least 60 seconds. Defaults to 0 (disabled)."},"allow_google":{"type":"boolean","description":"Whether Google sign-in is allowed for users whose email matches an SSO domain on this org (verified, with or without IdP). Defaults to true when unset."},"allow_microsoft":{"type":"boolean","description":"Whether Microsoft sign-in is allowed for users whose email matches an SSO domain on this org (verified, with or without IdP). Defaults to true when unset."},"allow_apple":{"type":"boolean","description":"Whether Apple sign-in is allowed for users whose email matches an SSO domain on this org (verified, with or without IdP). Defaults to true when unset."},"allow_email_code":{"type":"boolean","description":"Whether email code sign-in is allowed for users whose email matches an SSO domain on this org (verified, with or without IdP). Defaults to true when unset."},"allow_invites":{"type":"boolean","description":"Whether org admins can manually invite new members. Org-wide toggle, does not require a verified domain. Defaults to true when unset."}},"description":"Org-wide access policy. Governs how users authenticate and join the org. Only applies when at least one verified SSO is enabled."},"OrgModulesConfigSchema":{"type":"object","properties":{"enable_org_chats":{"type":"boolean"},"enable_inbox":{"type":"boolean"},"enable_analytics":{"type":"boolean"},"enable_assistants":{"type":"boolean"},"enable_agents":{"type":"boolean"},"enable_knowledge_base":{"type":"boolean"},"enable_broadcasts":{"type":"boolean"},"enable_channels":{"type":"boolean"},"enable_workflows":{"type":"boolean"},"enable_audience":{"type":"boolean"},"enable_tables":{"type":"boolean"},"enable_pages":{"type":"boolean"},"enable_balance_credits":{"type":"boolean"}},"description":"Per-module visibility toggles. Missing keys default to enabled on the client."},"OrgFeaturesConfigSchema":{"type":"object","properties":{"enterprise":{"type":"boolean"},"allow_overdraft":{"type":"boolean"},"workflows":{"type":"boolean"},"enable_japifon":{"type":"boolean"},"enable_smpp":{"type":"boolean"},"tables":{"type":"boolean"},"slack_access":{"type":"boolean"},"emails":{"type":"boolean"},"templates":{"type":"boolean"},"org_chats":{"type":"boolean"},"agents":{"type":"boolean"}},"description":"Org gate-keeping features configuration"},"AuditLogMetadataSchema":{"oneOf":[{"$ref":"#/components/schemas/AuditLogOrgActionMemberInviteSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionMemberJoinSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionMemberRemoveSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionMemberLeftSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionMemberRoleChangeSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionRoleSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionRoleUpdatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionRoleAssignmentSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionConnectionSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionConnectionUpdatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionAssistantSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionAssistantUpdatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionAssistantRestoreSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionAssistantDuplicatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionAssistantDuplicatedFromSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionAgentSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionAgentUpdatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionAgentDuplicatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionWorkflowSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionApiKeySchema"},{"$ref":"#/components/schemas/AuditLogOrgActionWebhookSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionActionSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionChannelSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionChannelUpdatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionBroadcastSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionDomainSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionEmailDomainSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionEmailIdentitySchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSsoProfileSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSsoProfileUpdatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSsoProfileSessionsRevokedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSsoDomainSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSsoDomainUpdatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSsoDomainCreateCodeRequestedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSsoDomainDeleteCodeRequestedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionChatSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionOrgUpdateSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionOrgDeleteSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionOrgDisableSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionOrgEnableSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionOrgRestoreSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionOrgTransferSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionOrgTransferredToSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionOrgDetachSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionOrgDetachedFromSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSubOrgCreatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSubOrgUpdatedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSubOrgMemberJoinedSchema"},{"$ref":"#/components/schemas/AuditLogOrgActionSubOrgMemberRoleChangedSchema"}],"discriminator":{"propertyName":"action","mapping":{"member.invited":"#/components/schemas/AuditLogOrgActionMemberInviteSchema","member.joined":"#/components/schemas/AuditLogOrgActionMemberJoinSchema","member.removed":"#/components/schemas/AuditLogOrgActionMemberRemoveSchema","member.left":"#/components/schemas/AuditLogOrgActionMemberLeftSchema","member.role_changed":"#/components/schemas/AuditLogOrgActionMemberRoleChangeSchema","role.created":"#/components/schemas/AuditLogOrgActionRoleSchema","role.deleted":"#/components/schemas/AuditLogOrgActionRoleSchema","role.updated":"#/components/schemas/AuditLogOrgActionRoleUpdatedSchema","role.assigned":"#/components/schemas/AuditLogOrgActionRoleAssignmentSchema","role.unassigned":"#/components/schemas/AuditLogOrgActionRoleAssignmentSchema","connection.created":"#/components/schemas/AuditLogOrgActionConnectionSchema","connection.deleted":"#/components/schemas/AuditLogOrgActionConnectionSchema","connection.updated":"#/components/schemas/AuditLogOrgActionConnectionUpdatedSchema","assistant.created":"#/components/schemas/AuditLogOrgActionAssistantSchema","assistant.deleted":"#/components/schemas/AuditLogOrgActionAssistantSchema","assistant.updated":"#/components/schemas/AuditLogOrgActionAssistantUpdatedSchema","assistant.restored":"#/components/schemas/AuditLogOrgActionAssistantRestoreSchema","assistant.duplicated":"#/components/schemas/AuditLogOrgActionAssistantDuplicatedSchema","assistant.duplicated_from":"#/components/schemas/AuditLogOrgActionAssistantDuplicatedFromSchema","agent.created":"#/components/schemas/AuditLogOrgActionAgentSchema","agent.deleted":"#/components/schemas/AuditLogOrgActionAgentSchema","agent.updated":"#/components/schemas/AuditLogOrgActionAgentUpdatedSchema","agent.duplicated":"#/components/schemas/AuditLogOrgActionAgentDuplicatedSchema","workflow.created":"#/components/schemas/AuditLogOrgActionWorkflowSchema","workflow.deleted":"#/components/schemas/AuditLogOrgActionWorkflowSchema","workflow.restored":"#/components/schemas/AuditLogOrgActionWorkflowSchema","api_key.created":"#/components/schemas/AuditLogOrgActionApiKeySchema","api_key.deleted":"#/components/schemas/AuditLogOrgActionApiKeySchema","api_key.rotated":"#/components/schemas/AuditLogOrgActionApiKeySchema","webhook.created":"#/components/schemas/AuditLogOrgActionWebhookSchema","webhook.updated":"#/components/schemas/AuditLogOrgActionWebhookSchema","webhook.deleted":"#/components/schemas/AuditLogOrgActionWebhookSchema","webhook.secret_rotated":"#/components/schemas/AuditLogOrgActionWebhookSchema","action.created":"#/components/schemas/AuditLogOrgActionActionSchema","action.deleted":"#/components/schemas/AuditLogOrgActionActionSchema","action.enabled":"#/components/schemas/AuditLogOrgActionActionSchema","action.disabled":"#/components/schemas/AuditLogOrgActionActionSchema","channel.created":"#/components/schemas/AuditLogOrgActionChannelSchema","channel.deleted":"#/components/schemas/AuditLogOrgActionChannelSchema","channel.enabled":"#/components/schemas/AuditLogOrgActionChannelSchema","channel.disabled":"#/components/schemas/AuditLogOrgActionChannelSchema","channel.updated":"#/components/schemas/AuditLogOrgActionChannelUpdatedSchema","broadcast.created":"#/components/schemas/AuditLogOrgActionBroadcastSchema","broadcast.deleted":"#/components/schemas/AuditLogOrgActionBroadcastSchema","broadcast.activated":"#/components/schemas/AuditLogOrgActionBroadcastSchema","broadcast.paused":"#/components/schemas/AuditLogOrgActionBroadcastSchema","domain.created":"#/components/schemas/AuditLogOrgActionDomainSchema","domain.deleted":"#/components/schemas/AuditLogOrgActionDomainSchema","email.domain.created":"#/components/schemas/AuditLogOrgActionEmailDomainSchema","email.domain.deleted":"#/components/schemas/AuditLogOrgActionEmailDomainSchema","email.identity.created":"#/components/schemas/AuditLogOrgActionEmailIdentitySchema","email.identity.deleted":"#/components/schemas/AuditLogOrgActionEmailIdentitySchema","sso.profile.created":"#/components/schemas/AuditLogOrgActionSsoProfileSchema","sso.profile.deleted":"#/components/schemas/AuditLogOrgActionSsoProfileSchema","sso.profile.updated":"#/components/schemas/AuditLogOrgActionSsoProfileUpdatedSchema","sso.profile.sessions.revoked":"#/components/schemas/AuditLogOrgActionSsoProfileSessionsRevokedSchema","sso.domain.created":"#/components/schemas/AuditLogOrgActionSsoDomainSchema","sso.domain.deleted":"#/components/schemas/AuditLogOrgActionSsoDomainSchema","sso.domain.updated":"#/components/schemas/AuditLogOrgActionSsoDomainUpdatedSchema","sso.domain.create_code_requested":"#/components/schemas/AuditLogOrgActionSsoDomainCreateCodeRequestedSchema","sso.domain.delete_code_requested":"#/components/schemas/AuditLogOrgActionSsoDomainDeleteCodeRequestedSchema","chat.deleted":"#/components/schemas/AuditLogOrgActionChatSchema","org.updated":"#/components/schemas/AuditLogOrgActionOrgUpdateSchema","org.deleted":"#/components/schemas/AuditLogOrgActionOrgDeleteSchema","org.disabled":"#/components/schemas/AuditLogOrgActionOrgDisableSchema","org.enabled":"#/components/schemas/AuditLogOrgActionOrgEnableSchema","org.restored":"#/components/schemas/AuditLogOrgActionOrgRestoreSchema","org.transferred":"#/components/schemas/AuditLogOrgActionOrgTransferSchema","org.transferred_to":"#/components/schemas/AuditLogOrgActionOrgTransferredToSchema","org.detached":"#/components/schemas/AuditLogOrgActionOrgDetachSchema","org.detached_from":"#/components/schemas/AuditLogOrgActionOrgDetachedFromSchema","org.sub_org_created":"#/components/schemas/AuditLogOrgActionSubOrgCreatedSchema","org.sub_org_updated":"#/components/schemas/AuditLogOrgActionSubOrgUpdatedSchema","org.sub_org_member_joined":"#/components/schemas/AuditLogOrgActionSubOrgMemberJoinedSchema","org.sub_org_member_role_changed":"#/components/schemas/AuditLogOrgActionSubOrgMemberRoleChangedSchema"}},"description":"Action-specific metadata"},"AuditLogOrgActionMemberInviteSchema":{"type":"object","properties":{"action":{"type":"string","enum":["member.invited"]},"email":{"type":"string","description":"Email address of the invited user"},"name":{"type":"string","description":"Name of the invited user"},"role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"}},"required":["action","email","role"]},"AuditLogOrgActionMemberJoinSchema":{"type":"object","properties":{"action":{"type":"string","enum":["member.joined"]},"member_id":{"type":"string","description":"ID of the member who joined"},"user_id":{"type":"string","description":"ID of the user who joined"},"email":{"type":"string","description":"Email address of the user who joined"},"name":{"type":"string","description":"Name of the user who joined"},"role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"}},"required":["action","member_id","user_id","email","role"]},"AuditLogOrgActionMemberRemoveSchema":{"type":"object","properties":{"action":{"type":"string","enum":["member.removed"]},"member_id":{"type":"string","description":"ID of the member who was removed"},"user_id":{"type":"string","description":"ID of the user who was removed"},"email":{"type":"string","description":"Email address of the removed member"},"name":{"type":"string","description":"Name of the removed member"},"role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"}},"required":["action","member_id","user_id","role"]},"AuditLogOrgActionMemberLeftSchema":{"type":"object","properties":{"action":{"type":"string","enum":["member.left"]},"email":{"type":"string","description":"Email of the member who left"},"name":{"type":"string","description":"Name of the member who left"},"role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"},"member_id":{"type":"string","description":"ID of the member who left"},"user_id":{"type":"string","description":"ID of the user who left"}},"required":["action","email","role","member_id","user_id"]},"AuditLogOrgActionMemberRoleChangeSchema":{"type":"object","properties":{"action":{"type":"string","enum":["member.role_changed"]},"member_id":{"type":"string","description":"ID of the member who had their role changed"},"user_id":{"type":"string","description":"ID of the user who had their role changed"},"email":{"type":"string","description":"Email of the member whose role changed"},"name":{"type":"string","description":"Name of the member whose role changed"},"from_role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"},"to_role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"}},"required":["action","member_id","user_id","email","from_role","to_role"]},"AuditLogOrgActionRoleSchema":{"type":"object","properties":{"action":{"type":"string","enum":["role.created","role.deleted"]},"role_id":{"type":"string","description":"ID of the custom role"},"role_name":{"type":"string","description":"Name of the custom role"}},"required":["action","role_id","role_name"]},"AuditLogOrgActionRoleUpdatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["role.updated"]},"role_id":{"type":"string","description":"ID of the custom role"},"role_name":{"type":"string","description":"Name of the custom role"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogChangeSchema"},"description":"Field-level diff of the role update"}},"required":["action","role_id","role_name","changes"]},"AuditLogChangeSchema":{"type":"object","properties":{"field":{"type":"string","description":"Dot-path name of the changed field (e.g. \"enabled\" or \"config.issuer_url\")."},"old_value":{},"new_value":{},"truncated":{"type":"boolean","description":"True if either value was truncated. Preview-only — not suitable for exact comparison."}},"required":["field"]},"AuditLogOrgActionRoleAssignmentSchema":{"type":"object","properties":{"action":{"type":"string","enum":["role.assigned","role.unassigned"]},"role_id":{"type":"string","description":"ID of the custom role"},"role_name":{"type":"string","description":"Name of the custom role"}},"required":["action","role_id","role_name"]},"AuditLogOrgActionConnectionSchema":{"type":"object","properties":{"action":{"type":"string","enum":["connection.created","connection.deleted"]},"connection_type":{"allOf":[{"$ref":"#/components/schemas/ConnectionTypeSchema"},{"description":"Type of the connection (e.g. whatsapp, slack)"}]},"connection_name":{"type":"string","description":"Display name of the connection"},"connection_id":{"type":"string","description":"ID of the connection"},"external_name":{"type":"string","description":"External name of the connection"},"external_id":{"type":"string","description":"External ID of the connection"}},"required":["action","connection_type","connection_id"]},"AuditLogOrgActionConnectionUpdatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["connection.updated"]},"connection_type":{"allOf":[{"$ref":"#/components/schemas/ConnectionTypeSchema"},{"description":"Type of the connection (e.g. whatsapp, slack)"}]},"connection_name":{"type":"string","description":"Display name of the connection"},"connection_id":{"type":"string","description":"ID of the connection"},"external_name":{"type":"string","description":"External name of the connection"},"external_id":{"type":"string","description":"External ID of the connection"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogChangeSchema"},"description":"Field-level diff of the connection update"}},"required":["action","connection_type","connection_id","changes"]},"AuditLogOrgActionAssistantSchema":{"type":"object","properties":{"action":{"type":"string","enum":["assistant.created","assistant.deleted"]},"assistant_name":{"type":"string","description":"Name of the assistant"},"assistant_id":{"type":"string","description":"ID of the assistant"}},"required":["action","assistant_id"]},"AuditLogOrgActionAssistantUpdatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["assistant.updated"]},"assistant_name":{"type":"string","description":"Name of the assistant"},"assistant_id":{"type":"string","description":"ID of the assistant"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogChangeSchema"},"description":"Field-level diff of the assistant update"}},"required":["action","assistant_id","changes"]},"AuditLogOrgActionAssistantRestoreSchema":{"type":"object","properties":{"action":{"type":"string","enum":["assistant.restored"]},"assistant_name":{"type":"string","description":"Name of the restored assistant"},"assistant_id":{"type":"string","description":"ID of the restored assistant"}},"required":["action","assistant_name","assistant_id"]},"AuditLogOrgActionAssistantDuplicatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["assistant.duplicated"]},"assistant_id":{"type":"string","description":"ID of the source assistant"},"assistant_name":{"type":"string","description":"Name of the source assistant"},"new_assistant_id":{"type":"string","description":"ID of the duplicated assistant"},"new_assistant_name":{"type":"string","description":"Name of the duplicated assistant"},"target_org_id":{"type":"string","description":"ID of the target org (only for cross-org)"},"target_org_name":{"type":"string","description":"Name of the target org (only for cross-org)"}},"required":["action","assistant_id","new_assistant_id"]},"AuditLogOrgActionAssistantDuplicatedFromSchema":{"type":"object","properties":{"action":{"type":"string","enum":["assistant.duplicated_from"]},"assistant_id":{"type":"string","description":"ID of the new duplicated assistant"},"assistant_name":{"type":"string","description":"Name of the new duplicated assistant"},"new_assistant_id":{"type":"string","description":"ID of the new duplicated assistant"},"new_assistant_name":{"type":"string","description":"Name of the new duplicated assistant"},"source_org_id":{"type":"string","description":"ID of the source org"},"source_org_name":{"type":"string","description":"Name of the source org"}},"required":["action","assistant_id","new_assistant_id"]},"AuditLogOrgActionAgentSchema":{"type":"object","properties":{"action":{"type":"string","enum":["agent.created","agent.deleted"]},"agent_name":{"type":"string","description":"Name of the agent"},"agent_id":{"type":"string","description":"ID of the agent"}},"required":["action","agent_id"]},"AuditLogOrgActionAgentUpdatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["agent.updated"]},"agent_name":{"type":"string","description":"Name of the agent"},"agent_id":{"type":"string","description":"ID of the agent"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogChangeSchema"},"description":"Field-level diff of the agent update"}},"required":["action","agent_id","changes"]},"AuditLogOrgActionAgentDuplicatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["agent.duplicated"]},"agent_id":{"type":"string","description":"ID of the source agent"},"agent_name":{"type":"string","description":"Name of the source agent"},"new_agent_id":{"type":"string","description":"ID of the duplicated agent"},"new_agent_name":{"type":"string","description":"Name of the duplicated agent"}},"required":["action","agent_id","new_agent_id"]},"AuditLogOrgActionWorkflowSchema":{"type":"object","properties":{"action":{"type":"string","enum":["workflow.created","workflow.deleted","workflow.restored"]},"workflow_name":{"type":"string","description":"Name of the workflow"},"workflow_id":{"type":"string","description":"ID of the workflow"}},"required":["action","workflow_id"]},"AuditLogOrgActionApiKeySchema":{"type":"object","properties":{"action":{"type":"string","enum":["api_key.created","api_key.deleted","api_key.rotated"]},"key_name":{"type":"string","description":"Name of the API key"},"api_key_id":{"type":"string","description":"ID of the API key"}},"required":["action","api_key_id"]},"AuditLogOrgActionWebhookSchema":{"type":"object","properties":{"action":{"type":"string","enum":["webhook.created","webhook.updated","webhook.deleted","webhook.secret_rotated"]},"webhook_id":{"type":"string","description":"ID of the webhook endpoint"},"url":{"type":"string","description":"URL of the webhook endpoint"}},"required":["action","webhook_id"]},"AuditLogOrgActionActionSchema":{"type":"object","properties":{"action":{"type":"string","enum":["action.created","action.deleted","action.enabled","action.disabled"]},"action_name":{"type":"string","description":"Name of the action"},"action_id":{"type":"string","description":"ID of the assistant or agent action"},"action_type":{"$ref":"#/components/schemas/ConnectionActionSelectorSchema"},"assistant_name":{"type":"string","description":"Name of the assistant"},"assistant_id":{"type":"string","description":"ID of the assistant"},"agent_name":{"type":"string","description":"Name of the agent"},"agent_id":{"type":"string","description":"ID of the agent"},"connection_id":{"type":"string","description":"ID of the connection"},"connection_type":{"allOf":[{"$ref":"#/components/schemas/ConnectionTypeSchema"},{"description":"Type of the connection"}]},"connection_name":{"type":"string","description":"Display name of the connection"},"external_id":{"type":"string","description":"External ID of the connection"},"external_name":{"type":"string","description":"External name of the connection"}},"required":["action","action_id","action_type"]},"AuditLogOrgActionChannelSchema":{"type":"object","properties":{"action":{"type":"string","enum":["channel.created","channel.deleted","channel.enabled","channel.disabled"]},"channel_id":{"type":"string","description":"ID of the channel"},"channel_type":{"type":"string","description":"Type of the channel, as recorded when the action happened"},"assistant_name":{"type":"string","description":"Name of the assistant"},"assistant_id":{"type":"string","description":"ID of the assistant"},"agent_name":{"type":"string","description":"Name of the agent"},"agent_id":{"type":"string","description":"ID of the agent"},"connection_id":{"type":"string","description":"ID of the connection"},"connection_type":{"allOf":[{"$ref":"#/components/schemas/ConnectionTypeSchema"},{"description":"Type of the connection"}]},"connection_name":{"type":"string","description":"Display name of the connection"},"external_id":{"type":"string","description":"External ID of the connection"},"external_name":{"type":"string","description":"External name of the connection"}},"required":["action","channel_id","channel_type"]},"AuditLogOrgActionChannelUpdatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["channel.updated"]},"channel_id":{"type":"string","description":"ID of the channel"},"channel_type":{"type":"string","description":"Type of the channel, as recorded when the action happened"},"assistant_name":{"type":"string","description":"Name of the assistant"},"assistant_id":{"type":"string","description":"ID of the assistant"},"agent_name":{"type":"string","description":"Name of the agent"},"agent_id":{"type":"string","description":"ID of the agent"},"connection_id":{"type":"string","description":"ID of the connection"},"connection_type":{"allOf":[{"$ref":"#/components/schemas/ConnectionTypeSchema"},{"description":"Type of the connection"}]},"connection_name":{"type":"string","description":"Display name of the connection"},"external_id":{"type":"string","description":"External ID of the connection"},"external_name":{"type":"string","description":"External name of the connection"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogChangeSchema"},"description":"Field-level diff of the channel update"}},"required":["action","channel_id","channel_type","changes"]},"AuditLogOrgActionBroadcastSchema":{"type":"object","properties":{"action":{"type":"string","enum":["broadcast.created","broadcast.deleted","broadcast.activated","broadcast.paused"]},"broadcast_name":{"type":"string","description":"Name of the broadcast"},"broadcast_id":{"type":"string","description":"ID of the broadcast"}},"required":["action","broadcast_id"]},"AuditLogOrgActionDomainSchema":{"type":"object","properties":{"action":{"type":"string","enum":["domain.created","domain.deleted"]},"domain_id":{"type":"string","description":"ID of the org domain"},"hostname":{"type":"string","description":"Domain hostname"}},"required":["action","domain_id","hostname"]},"AuditLogOrgActionEmailDomainSchema":{"type":"object","properties":{"action":{"type":"string","enum":["email.domain.created","email.domain.deleted"]},"domain_id":{"type":"string","description":"ID of the email domain"},"domain_name":{"type":"string","description":"Domain name"}},"required":["action","domain_id","domain_name"]},"AuditLogOrgActionEmailIdentitySchema":{"type":"object","properties":{"action":{"type":"string","enum":["email.identity.created","email.identity.deleted"]},"email_id":{"type":"string","description":"ID of the email identity"},"email_address":{"type":"string","description":"Email address"}},"required":["action","email_id","email_address"]},"AuditLogOrgActionSsoProfileSchema":{"type":"object","properties":{"action":{"type":"string","enum":["sso.profile.created","sso.profile.deleted"]},"sso_profile_id":{"type":"string","description":"ID of the SSO profile"},"provider":{"$ref":"#/components/schemas/SsoProviderSchema"},"name":{"type":"string","description":"Human-readable name of the SSO profile"}},"required":["action","sso_profile_id","provider"]},"SsoProviderSchema":{"type":"string","enum":["SAML","OIDC"],"description":"Identity provider protocol"},"AuditLogOrgActionSsoProfileUpdatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["sso.profile.updated"]},"sso_profile_id":{"type":"string","description":"ID of the SSO profile"},"provider":{"$ref":"#/components/schemas/SsoProviderSchema"},"name":{"type":"string","description":"Human-readable name of the SSO profile"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogChangeSchema"},"description":"Field-level diff of the SSO profile update"}},"required":["action","sso_profile_id","provider","changes"]},"AuditLogOrgActionSsoProfileSessionsRevokedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["sso.profile.sessions.revoked"]},"sso_profile_id":{"type":"string","description":"ID of the SSO profile"},"revoked":{"type":"integer","description":"Number of sessions revoked"}},"required":["action","sso_profile_id","revoked"]},"AuditLogOrgActionSsoDomainSchema":{"type":"object","properties":{"action":{"type":"string","enum":["sso.domain.created","sso.domain.deleted"]},"domain_id":{"type":"string","description":"ID of the SSO domain"},"domain":{"type":"string","description":"Email domain name"}},"required":["action","domain_id","domain"]},"AuditLogOrgActionSsoDomainUpdatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["sso.domain.updated"]},"domain_id":{"type":"string","description":"ID of the SSO domain"},"domain":{"type":"string","description":"Email domain name"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogChangeSchema"},"description":"Field-level diff of the SSO domain update"}},"required":["action","domain_id","domain","changes"]},"AuditLogOrgActionSsoDomainCreateCodeRequestedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["sso.domain.create_code_requested"]},"domain":{"type":"string","description":"Email domain the admin attempted to claim"}},"required":["action","domain"]},"AuditLogOrgActionSsoDomainDeleteCodeRequestedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["sso.domain.delete_code_requested"]},"domain_id":{"type":"string","description":"ID of the SSO domain being removed"},"domain":{"type":"string","description":"Email domain being removed"}},"required":["action","domain_id","domain"]},"AuditLogOrgActionChatSchema":{"type":"object","properties":{"action":{"type":"string","enum":["chat.deleted"]},"chat_id":{"type":"string","description":"ID of the deleted chat"}},"required":["action","chat_id"]},"AuditLogOrgActionOrgUpdateSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.updated"]},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogChangeSchema"},"description":"Field-level diff of the org update"}},"required":["action","changes"]},"AuditLogOrgActionOrgDeleteSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.deleted"]}},"required":["action"]},"AuditLogOrgActionOrgDisableSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.disabled"]}},"required":["action"]},"AuditLogOrgActionOrgEnableSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.enabled"]}},"required":["action"]},"AuditLogOrgActionOrgRestoreSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.restored"]}},"required":["action"]},"AuditLogOrgActionOrgTransferSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.transferred"]},"sub_org_name":{"type":"string","description":"Name of the org that was attached"},"sub_org_id":{"type":"string","description":"ID of the org that was attached"}},"required":["action","sub_org_name","sub_org_id"]},"AuditLogOrgActionOrgTransferredToSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.transferred_to"]},"parent_org_name":{"type":"string","description":"Name of the parent org we were attached to"},"parent_org_id":{"type":"string","description":"ID of the parent org we were attached to"}},"required":["action","parent_org_name","parent_org_id"]},"AuditLogOrgActionOrgDetachSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.detached"]},"sub_org_name":{"type":"string","description":"Name of the org that was detached"},"sub_org_id":{"type":"string","description":"ID of the org that was detached"}},"required":["action","sub_org_name","sub_org_id"]},"AuditLogOrgActionOrgDetachedFromSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.detached_from"]},"parent_org_name":{"type":"string","description":"Name of the parent org we were detached from"},"parent_org_id":{"type":"string","description":"ID of the parent org we were detached from"}},"required":["action","parent_org_name","parent_org_id"]},"AuditLogOrgActionSubOrgCreatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.sub_org_created"]},"sub_org_name":{"type":"string","description":"Name of the created sub-organization"},"sub_org_id":{"type":"string","description":"ID of the created sub-organization"}},"required":["action","sub_org_name","sub_org_id"]},"AuditLogOrgActionSubOrgUpdatedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.sub_org_updated"]},"sub_org_name":{"type":"string","description":"Name of the updated sub-organization"},"sub_org_id":{"type":"string","description":"ID of the updated sub-organization"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogChangeSchema"},"description":"Field-level diff of the sub-org update"}},"required":["action","sub_org_name","sub_org_id","changes"]},"AuditLogOrgActionSubOrgMemberJoinedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.sub_org_member_joined"]},"sub_org_name":{"type":"string","description":"Name of the sub-organization"},"sub_org_id":{"type":"string","description":"ID of the sub-organization"},"email":{"type":"string","description":"Email of the member who joined"},"name":{"type":"string","description":"Name of the member who joined"},"user_id":{"type":"string","description":"ID of the user who joined"},"role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"}},"required":["action","sub_org_name","sub_org_id","email","user_id","role"]},"AuditLogOrgActionSubOrgMemberRoleChangedSchema":{"type":"object","properties":{"action":{"type":"string","enum":["org.sub_org_member_role_changed"]},"sub_org_name":{"type":"string","description":"Name of the sub-organization"},"sub_org_id":{"type":"string","description":"ID of the sub-organization"},"email":{"type":"string","description":"Email of the member whose role changed"},"name":{"type":"string","description":"Name of the member whose role changed"},"user_id":{"type":"string","description":"ID of the user whose role changed"},"from_role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"},"to_role":{"$ref":"#/components/schemas/OrgMemberRoleSchema"}},"required":["action","sub_org_name","sub_org_id","email","user_id","from_role","to_role"]},"AuditLogSourceSchema":{"type":"string","enum":["app","admin","api","system","ai"],"description":"Where the action originated from (app, admin, api, system, ai)"},"FileDataSchema":{"type":"object","properties":{"data":{"type":"string","description":"URL, Raw or Base64 encoded file data.","example":"SGVsbG8sIHdvcmxkIQ=="},"type":{"type":"string","maxLength":128,"description":"Mime type of the file, if not provided it will be inferred.","example":"application/pdf"},"name":{"type":"string","minLength":1,"description":"Name of the file.","example":"document.pdf"},"encoding":{"type":"string","enum":["base64","raw"],"description":"Encoding of the file data when it's a direct input, by default base64 is expected.","example":"base64"}},"required":["data"],"description":"Data payload for creating a file"},"FileAllowedTypesSchema":{"type":"array","items":{"type":"string","maxLength":255},"maxItems":255,"default":["*/*"],"description":"The allowed mime types for the file field (e.g. image/*, application/pdf)"},"CreateFileSchema":{"type":"object","properties":{"file":{"anyOf":[{"type":"string","format":"binary"},{"$ref":"#/components/schemas/FileDataSchema"},{"type":"string"}],"description":"File to be uploaded. It can be a file object, a base64 encoded string, or a file data object containing base64 data, name, and type."},"file_url":{"type":"string","description":"URL of the file to be uploaded","example":"https://example.com/files/document.pdf"},"allowed_types":{"$ref":"#/components/schemas/FileAllowedTypesSchema"}}},"SubOrgUsageItemSchema":{"type":"object","properties":{"org_id":{"type":"string","description":"Unique identifier of the sub-organization"},"org_name":{"type":"string","description":"Name of the sub-organization"},"event_name":{"$ref":"#/components/schemas/MeterEventIdSchema"},"amount_credits":{"type":"number","description":"Total credits consumed in the time bucket"},"amount_monetary":{"type":"number","description":"Total monetary amount in the time bucket"},"date":{"type":["string","null"],"format":"date-time","description":"Start of the time bucket"}},"required":["org_id","org_name","event_name","amount_credits","amount_monetary","date"],"description":"Usage data for a single sub-organization in a time bucket"},"SubOrgSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the sub-organization"},"name":{"type":"string","description":"Name of the sub-organization"},"logo_url":{"type":["string","null"],"description":"URL of the sub-organization logo"},"plan":{"$ref":"#/components/schemas/OrgSubscriptionPlanSchema"},"balance":{"type":"number","description":"Current credit balance"},"promo_balance":{"type":"number","description":"Current promotional credit balance"},"billing":{"$ref":"#/components/schemas/BillingConfigSchema"},"members":{"type":"array","items":{"$ref":"#/components/schemas/OrgMemberSchema"},"description":"Members of the sub-organization"},"features":{"$ref":"#/components/schemas/OrgFeaturesConfigSchema"},"config":{"$ref":"#/components/schemas/OrgConfigSchema"},"spending_cap_used":{"type":"number","description":"Amount spent in the current month"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the sub-organization was created"}},"required":["id","name","logo_url","plan","balance","promo_balance","billing","members","spending_cap_used","created_at"],"description":"Summary information about a sub-organization"},"BillingConfigSchema":{"type":"object","properties":{"auto_recharge":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Flag to enable/disable auto reload"},"recharge_threshold":{"type":"number","minimum":5,"maximum":500,"description":"Threshold to auto reload credits at"},"recharge_amount":{"type":"number","minimum":5,"maximum":500,"description":"Amount to auto reload credits by"}},"required":["enabled","recharge_threshold","recharge_amount"]},"use_parent_balance":{"type":"boolean","description":"Use the parent balance when it's a sub-org"},"spending_cap":{"$ref":"#/components/schemas/SpendingCapConfigSchema"},"payment_method":{"$ref":"#/components/schemas/PaymentMethodSchema"},"last_low_balance_notification_at":{"type":["string","null"],"format":"date-time"},"last_out_of_balance_notification_at":{"type":["string","null"],"format":"date-time"},"last_spending_cap_notification_at":{"type":["string","null"],"format":"date-time"},"last_cancellation_notification_at":{"type":["string","null"],"format":"date-time"}},"required":["auto_recharge"],"description":"Schema for updating payment configuration"},"SpendingCapConfigSchema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Flag to enable/disable the monthly spending cap"},"amount":{"type":"number","minimum":0,"maximum":100000,"description":"Monthly spending limit in USD"},"reset_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of last accumulator reset"}},"required":["enabled","amount"],"description":"Schema for spending cap configuration"},"PaymentMethodSchema":{"type":"object","properties":{"type":{"type":"string"},"payment_method_id":{"type":"string"},"brand":{"type":"string"},"last4":{"type":"string"},"email":{"type":"string"},"inactive":{"type":"boolean"},"off_session_unsupported":{"type":"boolean"},"failed_at":{"type":"string","format":"date-time"},"failed_message":{"type":"string"}},"required":["type","payment_method_id"],"description":"Schema for a payment method"},"CreateSubOrgSchema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":64},"referral_code":{"type":"string","maxLength":128},"logo_id":{"type":["string","null"],"maxLength":128},"features":{"$ref":"#/components/schemas/OrgDelegatableFeaturesConfigSchema"},"billing":{"type":"object","properties":{"auto_recharge":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Flag to enable/disable auto reload"},"recharge_threshold":{"type":"number","minimum":5,"maximum":500,"description":"Threshold to auto reload credits at"},"recharge_amount":{"type":"number","minimum":5,"maximum":500,"description":"Amount to auto reload credits by"}},"required":["enabled","recharge_threshold","recharge_amount"]},"use_parent_balance":{"type":"boolean","description":"Use the parent balance when it's a sub-org"},"spending_cap":{"$ref":"#/components/schemas/SpendingCapConfigSchema"},"payment_method":{"$ref":"#/components/schemas/PaymentMethodSchema"},"last_low_balance_notification_at":{"type":["string","null"],"format":"date-time"},"last_out_of_balance_notification_at":{"type":["string","null"],"format":"date-time"},"last_spending_cap_notification_at":{"type":["string","null"],"format":"date-time"},"last_cancellation_notification_at":{"type":["string","null"],"format":"date-time"}}}},"required":["name"],"description":"Schema for creating a sub-organization"},"OrgDelegatableFeaturesConfigSchema":{"type":"object","properties":{"allow_overdraft":{"type":"boolean"},"workflows":{"type":"boolean"},"enable_japifon":{"type":"boolean"}},"description":"Delegatable features configuration for sub-orgs"},"UpdateSubOrgSchema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":64},"logo_id":{"type":["string","null"],"maxLength":128,"description":"Logo file id; pass null to clear"},"config":{"$ref":"#/components/schemas/OrgConfigSchema"},"features":{"allOf":[{"$ref":"#/components/schemas/OrgDelegatableFeaturesConfigSchema"},{"description":"[Deprecated] Legacy feature-delegation field. Ignored by the server; kept for backward compatibility. Feature flags are now managed exclusively by platform admins."}]}},"description":"Schema for updating a sub-organization from the parent. Accepts an optional `name`, a partial `config` (deep-merged on the server), an optional `logo_id`, and a deprecated `features` field that is ignored."},"TransferSubOrgSchema":{"type":"object","properties":{"features":{"$ref":"#/components/schemas/OrgDelegatableFeaturesConfigSchema"}},"description":"Schema for transferring an org to become a sub-organization"},"JoinSubOrgSchema":{"type":"object","properties":{"role":{"allOf":[{"$ref":"#/components/schemas/OrgMemberRoleSchema"},{"description":"Role to assign when joining the sub-organization"}]}},"required":["role"],"description":"Schema for joining a sub-organization with a chosen role"},"OrgSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the org"},"name":{"type":"string","description":"Name of the org"},"verified":{"type":"boolean","description":"Verification status of the org"},"role":{"$ref":"#/components/schemas/OrgSystemRoleSchema"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/OrgResolvedPermissionSchema"},"description":"Effective permissions of the current user within the organization (`*` = full admin access)"},"is_member":{"type":"boolean","description":"Whether the current user has their own member row in this organization. `false` means they only reach it as an admin of its parent org — `role` is inherited in that case."},"disabled":{"type":"boolean","description":"Whether the org is disabled by the system"},"type":{"$ref":"#/components/schemas/OrgTypeSchema"},"plan":{"$ref":"#/components/schemas/OrgSubscriptionPlanSchema"},"balance":{"type":"number","description":"Current balance of the org"},"promo_balance":{"type":"number","description":"Current promotional balance of the org"},"promo_balance_reset_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the promotional balance was last reset"},"billing":{"$ref":"#/components/schemas/BillingConfigSchema"},"logo_url":{"type":["string","null"],"description":"URL of the organization logo"},"deleted":{"type":"boolean","description":"Deletion status of the org"},"features":{"$ref":"#/components/schemas/OrgFeaturesConfigSchema"},"config":{"$ref":"#/components/schemas/OrgConfigSchema"},"parent_org":{"$ref":"#/components/schemas/OrgPublicSchema"},"spending_cap_used":{"type":"number","description":"Amount spent in the current month against the spending cap"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the org was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the org was last updated"}},"required":["id","name","verified","disabled","type","plan","balance","promo_balance","promo_balance_reset_at","billing","logo_url","deleted","spending_cap_used","created_at","updated_at"],"description":"Detailed information about an org (organization)"},"OrgSystemRoleSchema":{"type":"string","enum":["ADMIN","DEVELOPER","MANAGER","STAFF"],"description":"A system role"},"OrgResolvedPermissionSchema":{"type":"string","enum":["org:write","admin:write","members:read","members:invite","members:write","members.roles.system:write","inbox:read","inbox:write","analytics:read","contacts:read","contacts:write","segments:write","broadcasts:read","broadcasts:write","assistants:read","assistants:write","assistants.members:write","agents:read","agents:write","knowledge:read","knowledge:write","skills:read","skills:write","workflows:write","connections:write","keys:write","webhooks:write","tables:read","tables:write","tables.records:write","tables.views:write","pages:read","pages:write","audit_logs:read","sso:write","domains:write","emails:write","billing:write","variables:write","templates:write","orgs:write","*"],"description":"A member's effective org permission: a `resource:action`, or `*` for full (admin) access."},"OrgTypeSchema":{"type":"string","enum":["PERSONAL","TEAM"],"description":"Type of the organization"},"UpdateBillingConfigSchema":{"type":"object","properties":{"auto_recharge":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Flag to enable/disable auto reload"},"recharge_threshold":{"type":"number","minimum":5,"maximum":500,"description":"Threshold to auto reload credits at"},"recharge_amount":{"type":"number","minimum":5,"maximum":500,"description":"Amount to auto reload credits by"}},"required":["enabled","recharge_threshold","recharge_amount"]},"use_parent_balance":{"type":"boolean","description":"Use the parent balance when it's a sub-org"},"spending_cap":{"$ref":"#/components/schemas/SpendingCapConfigSchema"}},"required":["auto_recharge"],"description":"Schema for updating payment configuration"},"CreateRunSchema":{"type":"object","properties":{"input":{"allOf":[{"$ref":"#/components/schemas/InputValuesSchema"},{"description":"Values of the fields"}]},"stream":{"type":"boolean","description":"Indicates if the run should stream output to the client as it becomes available via SSE (Server-Sent Events)"},"background":{"type":"boolean","description":"Indicates if the run should be executed in the background and return the run information immediately"},"workflow_version_id":{"$ref":"#/components/schemas/WorkflowVersionIdSchema"},"from_step_key":{"type":"string","maxLength":128,"description":"Step key to start the run from"},"identifier":{"type":"string","maxLength":256,"description":"Temporary WebSocket identifier used to track run status before creation completes"}},"description":"Data to create a new run"},"WorkflowVersionIdSchema":{"anyOf":[{"type":"string","enum":["draft","latest"]},{"type":"string"},{"type":"number"}],"description":"ID of the workflow version. Use \"latest\", \"draft\" or \"version number\" for a specific version","example":"latest"},"ReplayRunSchema":{"type":"object","properties":{"from_step_key":{"type":"string","maxLength":128,"description":"Key of the workflow step to replay"},"input":{"allOf":[{"$ref":"#/components/schemas/InputValuesSchema"},{"description":"Values of the fields"}]},"stream":{"type":"boolean","description":"Indicates if the step should stream output to the client as it becomes available via SSE (Server-Sent Events)"},"background":{"type":"boolean","description":"Indicates if the step should be executed in the background and return the run information immediately"},"identifier":{"type":"string","maxLength":256,"description":"Temporary WebSocket identifier used to track replay status before creation completes"}},"required":["from_step_key"],"description":"Data to replay a workflow step"},"SegmentSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"$ref":"#/components/schemas/ColorNameSchema"},"contacts_count":{"type":"number"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","color","contacts_count","created_at","updated_at"],"description":"Schema for the segment"},"CreateSegmentSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Name of the segment"},"color":{"$ref":"#/components/schemas/ColorNameSchema"}},"required":["name"],"description":"Schema for creating a segment"},"UpdateSegmentSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Name of the segment"},"color":{"$ref":"#/components/schemas/ColorNameSchema"}},"description":"Schema for updating a segment"},"SuppressionSchema":{"type":"object","properties":{"id":{"type":"string"},"channel":{"$ref":"#/components/schemas/SuppressionChannelSchema"},"identifier":{"type":"string"},"reason":{"$ref":"#/components/schemas/SuppressionReasonSchema"},"source":{"$ref":"#/components/schemas/SuppressionSourceSchema"},"note":{"type":["string","null"]},"metadata":{"$ref":"#/components/schemas/SuppressionMetadataSchema"},"created_by":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"type":["object","null"],"description":"Who added the entry. Null when it landed automatically (bounce, complaint, unsubscribe link)."}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","channel","identifier","reason","source","note","metadata","created_by","created_at","updated_at"],"description":"Schema for the suppression"},"SuppressionMetadataSchema":{"type":["object","null"],"properties":{"diagnostic_code":{"type":"string","maxLength":1024},"complaint_type":{"type":"string","maxLength":128},"feedback":{"type":"string","maxLength":1024},"broadcast_id":{"type":"string"},"import_batch_id":{"type":"string"}},"description":"Diagnostic context kept alongside a suppression"},"CreateSuppressionSchema":{"allOf":[{"$ref":"#/components/schemas/SuppressionOptionSchema"},{"type":"object","properties":{"reason":{"allOf":[{"$ref":"#/components/schemas/SuppressionReasonSchema"},{"description":"Defaults to MANUAL"}]},"note":{"type":["string","null"],"maxLength":500}}}],"description":"Schema for suppressing a single identifier"},"SuppressionOptionSchema":{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/SuppressionChannelSchema"},"identifier":{"type":"string","maxLength":320,"description":"The email or phone number to suppress"}},"required":["channel","identifier"],"description":"A single identifier to suppress"},"SuppressionsImportedSchema":{"type":"object","properties":{"created":{"type":"number"},"skipped":{"type":"number"},"invalid":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionInvalidSchema"}}},"required":["created","skipped","invalid"],"description":"Result of a bulk suppression import"},"SuppressionInvalidSchema":{"type":"object","properties":{"index":{"type":"number","description":"Position of the identifier in the submitted array"},"identifier":{"$ref":"#/components/schemas/SuppressionOptionSchema"},"reason":{"$ref":"#/components/schemas/SuppressionInvalidReasonSchema"}},"required":["index","identifier","reason"],"description":"A rejected identifier with the reason it failed validation"},"SuppressionInvalidReasonSchema":{"type":"string","enum":["INVALID_EMAIL","INVALID_PHONE","MISSING_IDENTIFIER"],"description":"Why an imported identifier was rejected"},"CreateSuppressionsSchema":{"type":"object","properties":{"reason":{"allOf":[{"$ref":"#/components/schemas/SuppressionReasonSchema"},{"description":"Applied to every row. Defaults to MANUAL."}]},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionOptionSchema"},"maxItems":50000}},"required":["identifiers"],"description":"Schema for suppressing many identifiers at once"},"SuppressionsImportedDryRunSchema":{"type":"object","properties":{"created":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionOptionSchema"}},"skipped":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionOptionSchema"}},"invalid":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionInvalidSchema"}}},"required":["created","skipped","invalid"],"description":"Preview of what a bulk suppression import would do"},"UpdateSuppressionSchema":{"type":"object","properties":{"reason":{"$ref":"#/components/schemas/SuppressionReasonSchema"},"note":{"type":["string","null"],"maxLength":500}},"description":"Schema for updating a suppression"},"ActivitySchema":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/ActivityTypeSchema"},"actor":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"Schema for a limited user"}]},"assistant":{"$ref":"#/components/schemas/ActivityAssistantSchema"},"segment":{"$ref":"#/components/schemas/SegmentSchema"},"broadcast":{"allOf":[{"$ref":"#/components/schemas/BroadcastPublicSchema"},{"description":"Public information about a broadcast"}]},"comment":{"type":["string","null"],"description":"Comment body when type='comment' (null/undefined otherwise)"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/FileSchema"},"description":"Files attached to the comment when type='comment'"},"file":{"$ref":"#/components/schemas/FileSchema"},"metadata":{"$ref":"#/components/schemas/ActivityMetadataSchema"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","type","created_at","updated_at"],"description":"Schema for a timeline activity event"},"ActivityAssistantSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]}},"required":["id","name","avatar_url"],"description":"Schema for an assistant actor in an activity"},"ActivityMetadataSchema":{"oneOf":[{"$ref":"#/components/schemas/ContactUpdatedMetadataSchema"}],"discriminator":{"propertyName":"type","mapping":{"contact_updated":"#/components/schemas/ContactUpdatedMetadataSchema"}},"description":"Activity metadata payload. Discriminated by `type`, which mirrors the parent activity row `type`."},"ContactUpdatedMetadataSchema":{"type":"object","properties":{"type":{"type":"string","enum":["contact_updated"]},"changes":{"type":"array","items":{"$ref":"#/components/schemas/ContactUpdatedChangeSchema"},"minItems":1}},"required":["type","changes"],"description":"Metadata payload for the `contact_updated` activity type"},"ContactUpdatedChangeSchema":{"type":"object","properties":{"key":{"type":"string","description":"Field key. Built-in fields use `name`/`email`/`phone`. Custom contact properties are prefixed with `properties.` (e.g. `properties.dob`)."},"old_value":{},"new_value":{}},"required":["key"],"description":"A single field change recorded on a contact_updated activity"},"DuplicateContactGroupSchema":{"type":"object","properties":{"primary":{"$ref":"#/components/schemas/ContactSchema"},"duplicates":{"type":"array","items":{"$ref":"#/components/schemas/ContactSchema"}},"matched_on":{"type":"array","items":{"$ref":"#/components/schemas/DuplicateChannelMatchSchema"}},"detected_at":{"type":["string","null"],"format":"date-time"}},"required":["primary","duplicates","matched_on","detected_at"],"description":"A group of contacts in an org that appear to be the same person"},"DuplicateChannelMatchSchema":{"type":"object","properties":{"type":{"type":"string","description":"Channel type (e.g. email, whatsapp_bot)"},"user_id":{"type":"string","description":"External user identifier on the channel"}},"required":["type","user_id"]},"MergeContactsResultSchema":{"type":"object","properties":{"merged":{"$ref":"#/components/schemas/ContactSchema"},"merged_contact_ids":{"type":"array","items":{"type":"string"}}},"required":["merged","merged_contact_ids"]},"MergeContactsSchema":{"type":"object","properties":{"source_contact_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":50,"description":"Contacts to merge into the primary. Omit to merge all auto-detected duplicates."}}},"CreateContactSchema":{"type":"object","properties":{"segment_ids":{"type":"array","items":{"type":"string"},"maxItems":10,"description":"The ID of the segment to add the contact to"},"channel":{"$ref":"#/components/schemas/ContactChannelOptionSchema"}},"required":["channel"],"description":"Schema for creating a contact"},"ContactChannelOptionSchema":{"type":"object","properties":{"user_id":{"type":"string","maxLength":1024,"description":"The user ID of the contact channel"},"name":{"type":["string","null"],"maxLength":256,"description":"The name for the contact channel (e.g. John Doe)"},"email":{"type":"string","maxLength":256,"description":"The email for the contact channel (e.g. user@example.com)"},"phone":{"type":"string","maxLength":256,"description":"The phone number for the contact channel (e.g. +1234567890)"},"contact_id":{"type":"string","description":"The ID of the contact used only for dry run response, ignored in the request"},"properties":{"type":"object","additionalProperties":{},"description":"Map of contact property key → value to set on the contact after creation/match. Pass null/[] to clear."}},"description":"Schema for creating a contact channel option"},"ContactStatsSchema":{"type":"object","properties":{"total":{"type":"number"},"subscribed":{"type":"number"},"unsubscribed":{"type":"number"},"blocked":{"type":"number"}},"required":["total","subscribed","unsubscribed","blocked"],"description":"Contact subscription stats"},"ContactsImportedSchema":{"type":"object","properties":{"created_ids":{"type":"array","items":{"type":"string"}},"updated_ids":{"type":"array","items":{"type":"string"}}},"required":["created_ids","updated_ids"],"description":"Schema for the created contacts"},"CreateContactsSchema":{"type":"object","properties":{"segment_ids":{"type":"array","items":{"type":"string"},"maxItems":10,"description":"The ID of the segment to add the contacts to"},"channels":{"type":"array","items":{"$ref":"#/components/schemas/ContactChannelOptionSchema"},"maxItems":50000}},"required":["channels"],"description":"Schema for creating multiple contacts"},"ContactsImportedDryRunSchema":{"type":"object","properties":{"created":{"type":"array","items":{"$ref":"#/components/schemas/ContactChannelOptionSchema"}},"updated":{"type":"array","items":{"$ref":"#/components/schemas/ContactChannelOptionSchema"}},"invalid":{"type":"array","items":{"$ref":"#/components/schemas/ContactChannelInvalidSchema"}}},"required":["created","updated","invalid"],"description":"Schema for the created and updated contacts"},"ContactChannelInvalidSchema":{"type":"object","properties":{"index":{"type":"number","description":"Position of the channel in the submitted array"},"channel":{"$ref":"#/components/schemas/ContactChannelOptionSchema"},"reason":{"$ref":"#/components/schemas/ContactChannelInvalidReasonSchema"}},"required":["index","channel","reason"],"description":"A rejected channel with the reason it failed validation"},"ContactChannelInvalidReasonSchema":{"type":"string","enum":["INVALID_EMAIL","INVALID_PHONE","MISSING_IDENTIFIER","DUPLICATE_IN_FILE"],"description":"Why an imported channel was rejected"},"DeleteContactsSchema":{"type":"object","properties":{"contact_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":1000,"description":"Array of contact IDs to delete"}},"required":["contact_ids"],"description":"Schema for bulk deleting contacts"},"UpdateContactSchema":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":512,"description":"Name of the contact"},"blocked":{"type":"boolean","description":"Whether the contact is blocked"},"unsubscribed":{"type":"boolean","description":"Whether the contact is unsubscribed"},"ai_replies":{"type":"boolean","description":"Whether the assistant auto-replies to this contact (false = human-handled only)"}},"description":"Schema for updating a contact"},"ContactLastSeenSchema":{"type":"object","properties":{"id":{"type":"string"},"last_contact_at":{"type":["string","null"],"format":"date-time"}},"required":["id","last_contact_at"],"description":"Last time the contact interacted via a message"},"AddContactChannelSchema":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":256,"description":"The name for the contact channel"},"email":{"type":["string","null"],"maxLength":256,"format":"email","description":"The email for the contact channel"},"phone":{"type":["string","null"],"maxLength":256,"description":"The phone number for the contact channel"},"username":{"type":["string","null"],"maxLength":256,"description":"The username for the contact channel"}},"description":"Schema for adding a custom channel to an existing contact. At least one field must be provided."},"ContactChannelStatsSchema":{"type":"object","properties":{"chats":{"type":"number"},"broadcast_recipients":{"type":"number"}},"required":["chats","broadcast_recipients"],"description":"Related entity counts for a contact channel. Used to warn before deletion."},"UpdateContactChannelSchema":{"type":"object","properties":{"avatar":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"The avatar for the contact channel, e.g X Avatar URL"},"name":{"type":["string","null"],"maxLength":256,"description":"The name for the contact channel, e.g Full Name"},"phone":{"type":["string","null"],"maxLength":256,"description":"The phone number for the contact channel, e.g Phone Number"},"username":{"type":["string","null"],"maxLength":256,"description":"The username for the contact channel, e.g Username"},"email":{"type":["string","null"],"maxLength":256,"format":"email","description":"The email for the contact channel, e.g Email"}},"description":"Schema for updating a contact channel"},"ContactFileSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the file"},"file_path":{"type":"string","maxLength":2048,"description":"Path to the file in the storage system"},"file_filename":{"type":"string","maxLength":255,"description":"Name of the file","example":"document.pdf"},"file_size":{"type":"number","description":"Size of the file in bytes","example":1024},"file_mimetype":{"type":"string","maxLength":255,"description":"MIME type of the file","example":"application/pdf"},"file_url":{"type":"string","maxLength":2048,"description":"URL to access the file"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the file was created"},"source":{"$ref":"#/components/schemas/ContactFileSourceSchema"},"user":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"Staff member who linked the file to the contact. Null when the file came from the contact themselves or was generated by the assistant."}]}},"required":["id","file_path","file_filename","file_size","file_mimetype","file_url","created_at","source"],"description":"A file in a contact collection, with its origin metadata"},"ContactFileSourceSchema":{"type":"string","enum":["direct","comment","chat"],"description":"Where the file came from in the contact: a direct upload, attached to a comment, or sent in a chat"},"ContactCommentSchema":{"type":"object","properties":{"id":{"type":"string"},"actor":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"User who posted the comment"}]},"contact_id":{"type":"string"},"comment":{"type":["string","null"]},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/FileSchema"},"description":"Files attached to the comment"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","contact_id","comment","attachments","created_at","updated_at"],"description":"Schema for a contact comment"},"CreateContactCommentSchema":{"type":"object","properties":{"comment":{"type":"string","maxLength":2048,"description":"The content of the comment (max 2048 characters)"},"attachments":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Array of file IDs to attach to the comment"}},"description":"Schema for creating a contact comment"},"UpdateContactCommentSchema":{"type":"object","properties":{"comment":{"type":"string","minLength":1,"maxLength":2048,"description":"The content of the comment (max 2048 characters)"},"attachments":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Array of file IDs to attach to the comment (replaces existing attachments)"}},"description":"Schema for updating a contact comment"},"MemorySchema":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"contact_id":{"type":"string"},"agent_id":{"type":"string"},"content":{"type":"string","maxLength":200},"type":{"$ref":"#/components/schemas/MemoryTypeSchema"},"importance":{"type":"number","minimum":0,"maximum":1},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","content","type","importance","created_at","updated_at"],"description":"A memory is a piece of information that the assistant can use to help the user."},"MemoryTypeSchema":{"type":"string","enum":["FACT","PREFERENCE","GOAL","EXPERIENCE"],"description":"The type of memory."},"CreateContactChannelChatSchema":{"type":"object","properties":{"assistant_id":{"type":"string","maxLength":128,"description":"The assistant that will handle this chat"},"title":{"type":["string","null"],"maxLength":256,"description":"The title of the chat"},"message":{"allOf":[{"$ref":"#/components/schemas/ChatMessageUserPartsSchema"},{"description":"Optional initial message. Authored as the contact, not the admin."}]},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ModelToolSchema"},"maxItems":100,"description":"Per-chat tool overrides. The assistant's actions are enabled by default; include an entry with the resolved tool name and enabled:false to turn one off for this chat."}},"required":["assistant_id"]},"SendContactChannelChatMessageSchema":{"type":"object","properties":{"message":{"allOf":[{"$ref":"#/components/schemas/ChatMessageUserPartsSchema"},{"description":"The message content, authored as the contact."}]}},"required":["message"]},"MessageDecideApprovalSchema":{"type":"object","properties":{"decision":{"$ref":"#/components/schemas/ConnectionActionApprovalDecisionSchema"},"reason":{"type":"string","maxLength":512,"description":"Optional explanation for the decision. When rejecting, this is surfaced back to the assistant."},"background":{"type":"boolean","description":"When true, the decision is recorded immediately and the approved tool runs in the background — the response returns the \"running\" state. Defaults to false, which blocks until the tool finishes executing and returns the final message."}},"required":["decision"],"description":"Accept or reject a pending approval on an assistant action"},"TableSchema":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/TableTypeSchema"},"name":{"type":["string","null"],"description":"The name of the table.","example":"Companies"},"description":{"type":["string","null"],"description":"The description of the table.","example":"Companies are organizations that own and manage other organizations."},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}],"description":"The picked icon. Null renders the default table icon."},"color":{"anyOf":[{"$ref":"#/components/schemas/ColorNameSchema"},{"type":"null"}],"description":"The picked icon tint. Null renders the default color."},"display_field_id":{"type":["string","null"],"description":"The id of the display field."},"archived":{"type":"boolean","description":"Whether the table is archived."},"position":{"type":"integer","description":"Manual display order within the org."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/TableFieldSchema"}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","type","name","description","icon","color","display_field_id","archived","position","fields","created_at","updated_at"]},"CreateTableSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Human-readable name (e.g. \"Companies\"). 1-128 chars."},"description":{"type":"string","maxLength":512,"description":"Optional long-form description of what the table represents."},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]}]},"color":{"$ref":"#/components/schemas/ColorNameSchema"}},"required":["name"]},"ReorderTablesSchema":{"type":"object","properties":{"positions":{"$ref":"#/components/schemas/ReorderTablesSchemaPositions"}},"required":["positions"]},"ReorderTablesSchemaPositions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"position":{"type":"integer","minimum":0,"description":"New position for the table."}},"required":["id","position"]},"description":"New positions for the tables."},"UpdateTableSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Human-readable name (e.g. \"Companies\"). 1-128 chars."},"description":{"type":["string","null"],"maxLength":512,"description":"Optional long-form description of what the table represents."},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}]},"color":{"anyOf":[{"$ref":"#/components/schemas/ColorNameSchema"},{"type":"null"}]},"display_field_id":{"type":["string","null"],"maxLength":128,"description":"Encoded id of the TableField whose value renders as the record headline. Must belong to this table and not be archived. Pass `null` to clear."},"archived":{"type":"boolean","description":"Visibility flag. Archived tables are hidden from default lists. No effect on records, fields, or behavior; reversible at any time."}}},"DuplicateTableSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Human-readable name (e.g. \"Companies\"). 1-128 chars."}},"required":["name"],"description":"Schema for duplicating a table."},"CreateTableFieldSchema":{"type":"object","properties":{"id":{"type":"string","maxLength":128,"description":"Client-generated id for the new field (enables optimistic creation). Encoded (`field_…`) or raw UUID. Rejected if already in use."},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"schema":{"$ref":"#/components/schemas/TableFieldFieldSchema"},"config":{"$ref":"#/components/schemas/TableFieldConfigSchema"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]}]},"color":{"$ref":"#/components/schemas/ColorNameSchema"},"connection_id":{"type":"string","maxLength":128},"unique":{"type":"boolean"},"readonly":{"type":"boolean"},"ai_mode":{"$ref":"#/components/schemas/TableFieldAiModeSchema"},"on_target_delete":{"$ref":"#/components/schemas/TableFieldOnTargetDeleteSchema"},"before":{"type":"string","maxLength":1024},"after":{"type":"string","maxLength":1024}},"required":["key","schema"]},"TableFieldFieldSchema":{"oneOf":[{"$ref":"#/components/schemas/FieldFileSchema"},{"$ref":"#/components/schemas/FieldIdSchema"},{"$ref":"#/components/schemas/FieldNumberSchema"},{"$ref":"#/components/schemas/FieldStringSchema"},{"$ref":"#/components/schemas/FieldBooleanSchema"},{"$ref":"#/components/schemas/FieldDateSchema"},{"$ref":"#/components/schemas/FieldDateTimeSchema"},{"$ref":"#/components/schemas/FieldTimeSchema"},{"$ref":"#/components/schemas/FieldEnumSchema"},{"$ref":"#/components/schemas/FieldContentSchema"},{"$ref":"#/components/schemas/FieldConnectionSchema"},{"$ref":"#/components/schemas/FieldRecordSchema"},{"$ref":"#/components/schemas/FieldContactSchema"},{"$ref":"#/components/schemas/FieldUserSchema"},{"$ref":"#/components/schemas/FieldChatSchema"},{"$ref":"#/components/schemas/FieldSegmentSchema"},{"$ref":"#/components/schemas/FieldAssistantSchema"},{"$ref":"#/components/schemas/FieldAgentSchema"},{"$ref":"#/components/schemas/FieldObjectSchema"}],"discriminator":{"propertyName":"type","mapping":{"file":"#/components/schemas/FieldFileSchema","id":"#/components/schemas/FieldIdSchema","number":"#/components/schemas/FieldNumberSchema","string":"#/components/schemas/FieldStringSchema","boolean":"#/components/schemas/FieldBooleanSchema","date":"#/components/schemas/FieldDateSchema","datetime":"#/components/schemas/FieldDateTimeSchema","time":"#/components/schemas/FieldTimeSchema","enum":"#/components/schemas/FieldEnumSchema","content":"#/components/schemas/FieldContentSchema","connection":"#/components/schemas/FieldConnectionSchema","record":"#/components/schemas/FieldRecordSchema","contact":"#/components/schemas/FieldContactSchema","user":"#/components/schemas/FieldUserSchema","chat":"#/components/schemas/FieldChatSchema","segment":"#/components/schemas/FieldSegmentSchema","assistant":"#/components/schemas/FieldAssistantSchema","agent":"#/components/schemas/FieldAgentSchema","object":"#/components/schemas/FieldObjectSchema"}},"description":"A table field schema"},"MoveTableFieldSchema":{"type":"object","properties":{"field_id":{"type":"string","maxLength":128},"after":{"type":"string","maxLength":1024},"before":{"type":"string","maxLength":1024}},"required":["field_id"]},"UpdateTableFieldSchema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"schema":{"$ref":"#/components/schemas/TableFieldFieldSchema"},"config":{"$ref":"#/components/schemas/TableFieldConfigSchema"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}]},"color":{"anyOf":[{"$ref":"#/components/schemas/ColorNameSchema"},{"type":"null"}]},"connection_id":{"type":["string","null"],"maxLength":128},"unique":{"type":"boolean"},"readonly":{"type":"boolean","description":"Whether the field is readonly."},"archived":{"type":"boolean","description":"Whether the field is archived."},"ai_mode":{"$ref":"#/components/schemas/TableFieldAiModeSchema"},"on_target_delete":{"$ref":"#/components/schemas/TableFieldOnTargetDeleteSchema"}}},"ImportTableRecordsResultSchema":{"type":"object","properties":{"created":{"type":"number","description":"Rows imported successfully."},"failed":{"type":"number","description":"Rows that were rejected."},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number","description":"1-based row number (the header is row 1)."},"message":{"type":"string"}},"required":["row","message"]},"description":"Per-row failures. Successful rows still commit."}},"required":["created","failed","errors"]},"ImportTableRecordsSchema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"mapping":{"type":"string","maxLength":8192,"description":"Optional JSON object mapping a CSV header to a field key, e.g. {\"Full Name\":\"name\"}."}},"required":["file"]},"TableRecordSchema":{"type":"object","properties":{"id":{"type":"string"},"table_id":{"type":"string"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}],"description":"The picked icon. Null falls back to the table icon."},"archived":{"type":"boolean","description":"Whether the record is archived."},"position":{"type":["string","null"],"description":"The position of the record in the view."},"updated_at":{"type":["string","null"],"format":"date-time","description":"Last modification time. Total-orders concurrent updates so caches can keep the newest copy."},"values":{"type":"array","items":{"$ref":"#/components/schemas/TableRecordValueSchema"},"description":"The values of the record."}},"required":["id","table_id","icon","archived","position","updated_at","values"]},"TableRecordValueSchema":{"oneOf":[{"$ref":"#/components/schemas/TableRecordValueStringSchema"},{"$ref":"#/components/schemas/TableRecordValueNumberSchema"},{"$ref":"#/components/schemas/TableRecordValueBooleanSchema"},{"$ref":"#/components/schemas/TableRecordValueDateSchema"},{"$ref":"#/components/schemas/TableRecordValueDatetimeSchema"},{"$ref":"#/components/schemas/TableRecordValueEnumSchema"},{"$ref":"#/components/schemas/TableRecordValueFileSchema"},{"$ref":"#/components/schemas/TableRecordValueRecordSchema"},{"$ref":"#/components/schemas/TableRecordValueContactSchema"},{"$ref":"#/components/schemas/TableRecordValueUserSchema"},{"$ref":"#/components/schemas/TableRecordValueChatSchema"},{"$ref":"#/components/schemas/TableRecordValueSegmentSchema"},{"$ref":"#/components/schemas/TableRecordValueAssistantSchema"},{"$ref":"#/components/schemas/TableRecordValueAgentSchema"}],"discriminator":{"propertyName":"type","mapping":{"string":"#/components/schemas/TableRecordValueStringSchema","number":"#/components/schemas/TableRecordValueNumberSchema","boolean":"#/components/schemas/TableRecordValueBooleanSchema","date":"#/components/schemas/TableRecordValueDateSchema","datetime":"#/components/schemas/TableRecordValueDatetimeSchema","enum":"#/components/schemas/TableRecordValueEnumSchema","file":"#/components/schemas/TableRecordValueFileSchema","record":"#/components/schemas/TableRecordValueRecordSchema","contact":"#/components/schemas/TableRecordValueContactSchema","user":"#/components/schemas/TableRecordValueUserSchema","chat":"#/components/schemas/TableRecordValueChatSchema","segment":"#/components/schemas/TableRecordValueSegmentSchema","assistant":"#/components/schemas/TableRecordValueAssistantSchema","agent":"#/components/schemas/TableRecordValueAgentSchema"}}},"TableRecordValueStringSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["string"]},"value":{"type":"string","maxLength":50000}},"required":["id","key","type","value"]},"TableRecordValueNumberSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["number"]},"value":{"type":"number"}},"required":["id","key","type","value"]},"TableRecordValueBooleanSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["boolean"]},"value":{"type":"boolean"}},"required":["id","key","type","value"]},"TableRecordValueDateSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["date"]},"value":{"anyOf":[{"type":["string","null"],"format":"date-time"},{"type":"array","items":{"type":["string","null"],"format":"date-time"}},{"type":"null"}]}},"required":["id","key","type","value"]},"TableRecordValueDatetimeSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["datetime"]},"value":{"anyOf":[{"type":["string","null"],"format":"date-time"},{"type":"array","items":{"type":["string","null"],"format":"date-time"}},{"type":"null"}]}},"required":["id","key","type","value"]},"TableRecordValueEnumSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["enum"]},"value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"array","items":{"type":"string","maxLength":2048}}]}},"required":["id","key","type","value"]},"TableRecordValueFileSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["file"]},"value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"array","items":{"type":"string","maxLength":2048}}]},"display":{"anyOf":[{"$ref":"#/components/schemas/FileSchema"},{"type":"array","items":{"$ref":"#/components/schemas/FileSchema"}}]}},"required":["id","key","type","value"]},"TableRecordValueRecordSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["record"]},"value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"array","items":{"type":"string","maxLength":2048}}]},"display":{"anyOf":[{"$ref":"#/components/schemas/TableRecordLimitedSchema"},{"type":"array","items":{"$ref":"#/components/schemas/TableRecordLimitedSchema"}}]}},"required":["id","key","type","value"]},"TableRecordLimitedSchema":{"type":"object","properties":{"id":{"type":"string"},"table_id":{"type":"string"},"display":{"oneOf":[{"$ref":"#/components/schemas/TableRecordValueSchema"},{"type":"null"}]}},"required":["id","table_id","display"],"description":"Compact reference to a record from another table, used when one record points at another via a `record`-typed field."},"TableRecordValueContactSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["contact"]},"value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"array","items":{"type":"string","maxLength":2048}}]},"display":{"anyOf":[{"$ref":"#/components/schemas/ContactSchema"},{"type":"array","items":{"$ref":"#/components/schemas/ContactSchema"}}]}},"required":["id","key","type","value"]},"TableRecordValueUserSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["user"]},"value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"array","items":{"type":"string","maxLength":2048}}]},"display":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"Schema for a limited user"}]},{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"Schema for a limited user"}]}}]}},"required":["id","key","type","value"]},"TableRecordValueChatSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["chat"]},"value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"array","items":{"type":"string","maxLength":2048}}]},"display":{"anyOf":[{"$ref":"#/components/schemas/ChatLimitedSchema"},{"type":"array","items":{"$ref":"#/components/schemas/ChatLimitedSchema"}}]}},"required":["id","key","type","value"]},"ChatLimitedSchema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["RUNNING","COMPLETED","FAILED","CANCELED"]},"state":{"$ref":"#/components/schemas/ChatLimitedStateSchema"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","title","status","created_at"],"description":"Compact chat reference for embedding in other resources (table value display, ref cells, etc.). Carries the minimum the FE needs to render a chat chip: title, status indicator, state subset (ai_enabled, muted, follow-up, unseen), and created date."},"ChatLimitedStateSchema":{"type":"object","properties":{"state":{"$ref":"#/components/schemas/ChatStateStatusSchema"},"ai_enabled":{"type":"boolean"},"admin_unseen_count":{"type":"number"},"muted_until":{"type":["string","null"],"format":"date-time"},"follow_up_at":{"type":["string","null"],"format":"date-time"}},"required":["state","ai_enabled","admin_unseen_count","muted_until","follow_up_at"]},"TableRecordValueSegmentSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["segment"]},"value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"array","items":{"type":"string","maxLength":2048}}]},"display":{"anyOf":[{"$ref":"#/components/schemas/SegmentLimitedSchema"},{"type":"array","items":{"$ref":"#/components/schemas/SegmentLimitedSchema"}}]}},"required":["id","key","type","value"]},"TableRecordValueAssistantSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["assistant"]},"value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"array","items":{"type":"string","maxLength":2048}}]},"display":{"anyOf":[{"$ref":"#/components/schemas/AssistantLimitedSchema"},{"type":"array","items":{"$ref":"#/components/schemas/AssistantLimitedSchema"}}]}},"required":["id","key","type","value"]},"AssistantLimitedSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"deleted":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","avatar_url","deleted","created_at","updated_at"],"description":"Compact assistant reference for embedding in other resources (table value display, ref cells, etc.). `deleted` lets the FE render soft-deleted assistants as non-clickable while still showing the name and avatar."},"TableRecordValueAgentSchema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["agent"]},"value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"array","items":{"type":"string","maxLength":2048}}]},"display":{"anyOf":[{"$ref":"#/components/schemas/AgentLimitedSchema"},{"type":"array","items":{"$ref":"#/components/schemas/AgentLimitedSchema"}}]}},"required":["id","key","type","value"]},"CreateTableRecordSchema":{"type":"object","properties":{"id":{"type":"string","maxLength":128,"description":"Client-generated id for the new record (enables optimistic creation). Encoded (`rec_…`) or raw UUID — use UUID v7 to keep ids time-sortable. Rejected if already in use."},"values":{"$ref":"#/components/schemas/SetTableRecordValuesSchema"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]}]},"view_id":{"type":"string","maxLength":128,"description":"The view to place the record in."},"after":{"type":"string","maxLength":1024,"description":"The neighbor to sort the record after."},"before":{"type":"string","maxLength":1024,"description":"The neighbor to sort the record before."}}},"SetTableRecordValuesSchema":{"type":"object","additionalProperties":{},"description":"Map of field key → value. Multi-value fields accept arrays; pass null or [] to clear."},"BulkTableRecordsSchema":{"type":"object","properties":{"create":{"type":"array","items":{"$ref":"#/components/schemas/CreateTableRecordSchema"}},"patch":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"values":{"$ref":"#/components/schemas/SetTableRecordValuesSchema"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["id"]}},"delete":{"type":"array","items":{"type":"string","maxLength":128}}}},"BulkUpdateTableRecordValuesSchema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"record_id":{"type":"string","maxLength":128},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"value":{"description":"The value to set. Repeat a record_id + key pair to build a multi-value array; null clears the field."}},"required":["record_id","key"]},"minItems":1,"maxItems":500}},"required":["updates"]},"UpdateTableRecordSchema":{"type":"object","properties":{"values":{"$ref":"#/components/schemas/SetTableRecordValuesSchema"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}]},"archived":{"type":"boolean"}}},"DuplicateTableRecordSchema":{"type":"object","properties":{"view_id":{"type":"string","maxLength":128,"description":"When set, the duplicate is placed immediately after the source record in this view manual order."}},"description":"Schema for duplicating a record."},"TableRecordCommentSchema":{"type":"object","properties":{"id":{"type":"string"},"actor":{"allOf":[{"$ref":"#/components/schemas/UserLimitedSchema"},{"description":"User who posted the comment"}]},"record_id":{"type":"string"},"comment":{"type":["string","null"]},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/FileSchema"},"description":"Files attached to the comment"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","record_id","comment","attachments","created_at","updated_at"],"description":"Schema for a table record comment"},"CreateTableRecordCommentSchema":{"type":"object","properties":{"comment":{"type":"string","maxLength":2048,"description":"The content of the comment (max 2048 characters)"},"attachments":{"type":"array","items":{"type":"string","maxLength":128},"maxItems":20,"description":"Array of file IDs to attach to the comment"}},"description":"Schema for creating a table record comment"},"UpdateTableRecordCommentSchema":{"type":"object","properties":{"comment":{"type":"string","minLength":1,"maxLength":2048,"description":"The content of the comment (max 2048 characters)"},"attachments":{"type":"array","items":{"type":"string","maxLength":128},"maxItems":20,"description":"Array of file IDs to attach to the comment (replaces existing attachments)"}},"description":"Schema for updating a table record comment"},"TableViewSchema":{"type":"object","properties":{"id":{"type":"string"},"table_id":{"type":"string"},"table_type":{"$ref":"#/components/schemas/TableTypeSchema"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"color":{"anyOf":[{"$ref":"#/components/schemas/ColorNameSchema"},{"type":"null"}]},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}]},"kind":{"$ref":"#/components/schemas/TableViewKindSchema"},"config":{"$ref":"#/components/schemas/TableViewConfigSchema"},"sort":{"$ref":"#/components/schemas/TableViewSortSchema"},"filter":{"$ref":"#/components/schemas/NullableFilterSchema"},"position":{"type":"integer"},"is_default":{"type":"boolean"},"show_in_sidebar":{"type":"boolean"},"archived":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","table_id","table_type","name","description","color","icon","kind","config","sort","filter","position","is_default","show_in_sidebar","archived","created_at","updated_at"]},"TableViewKindSchema":{"type":"string","enum":["table","board","calendar","timeline","list","gallery"]},"TableViewConfigSchema":{"type":"object","properties":{"shared":{"$ref":"#/components/schemas/TableViewSharedConfigSchema"},"board":{"$ref":"#/components/schemas/TableViewBoardConfigSchema"},"table":{"$ref":"#/components/schemas/TableViewTableConfigSchema"},"calendar":{"$ref":"#/components/schemas/TableViewCalendarConfigSchema"},"timeline":{"$ref":"#/components/schemas/TableViewTimelineConfigSchema"},"list":{"$ref":"#/components/schemas/TableViewListConfigSchema"},"gallery":{"$ref":"#/components/schemas/TableViewGalleryConfigSchema"}}},"TableViewSharedConfigSchema":{"type":"object","properties":{"open_items_in":{"type":"string","enum":["side_peek","center_peek","full_page"]}}},"TableViewBoardConfigSchema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"hide_empty_groups":{"type":"boolean"},"card_fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"}},"columns":{"type":"array","items":{"$ref":"#/components/schemas/TableViewBoardColumnSchema"},"maxItems":512},"date":{"$ref":"#/components/schemas/TableViewBoardDateConfigSchema"},"number":{"$ref":"#/components/schemas/TableViewBoardNumberConfigSchema"},"card_color":{"$ref":"#/components/schemas/TableViewBoardCardColorSchema"}}},"TableViewBoardColumnSchema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":256},"visible":{"type":"boolean"}},"required":["key","visible"]},"TableViewBoardDateConfigSchema":{"type":"object","properties":{"granularity":{"$ref":"#/components/schemas/TableViewBoardDateConfigGranularitySchema"},"sort":{"$ref":"#/components/schemas/TableViewBoardDateConfigSortSchema"}}},"TableViewBoardDateConfigGranularitySchema":{"type":"string","enum":["relative","day","week","month","year"],"description":"Granularity for the date buckets."},"TableViewBoardDateConfigSortSchema":{"type":"string","enum":["oldest_first","newest_first"],"description":"Sort order for the date buckets."},"TableViewBoardNumberConfigSchema":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"sort":{"type":"string","enum":["asc","desc"]}}},"TableViewBoardCardColorSchema":{"type":"string","enum":["none","bordered","background"],"description":"How board cards are tinted by their group color."},"TableViewTableConfigSchema":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/TableViewTableColumnSchema"},"maxItems":105}}},"TableViewTableColumnSchema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"visible":{"type":"boolean"},"sticky":{"type":"boolean"},"wrap":{"type":"boolean"},"width":{"type":"integer","minimum":30,"maximum":2000}},"required":["key","visible","sticky"]},"TableViewCalendarConfigSchema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"show_as":{"type":"string","enum":["month","week"]},"show_weekends":{"type":"boolean"}}},"TableViewTimelineConfigSchema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"show_as":{"$ref":"#/components/schemas/TableViewTimelineShowAsSchema"},"card_fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"description":"Fields shown on each bar beside the title. Array order is display order."}}},"TableViewTimelineShowAsSchema":{"type":"string","enum":["hours","day","week","bi_week","month","quarter","year","five_years"],"description":"Zoom preset: the time span one timeline page covers, from hours to five years"},"TableViewListConfigSchema":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"description":"Fields shown inline on each row beside the title. Array order is display order."}}},"TableViewGalleryConfigSchema":{"type":"object","properties":{"cover_key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"fit":{"type":"string","enum":["cover","contain"],"description":"How the cover fills the card frame."},"size":{"type":"string","enum":["small","medium","large"],"description":"Card size, mapped to grid cell dimensions on the FE."},"card_fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"description":"Fields shown on each card below the title. Array order is display order."}}},"TableViewSortSchema":{"type":["object","null"],"properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"direction":{"type":"string","enum":["asc","desc"]}},"required":["key","direction"]},"NullableFilterSchema":{"anyOf":[{"$ref":"#/components/schemas/FilterRuleSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"},{"type":"null"}]},"FilterRuleSchema":{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"operator":{"$ref":"#/components/schemas/FilterOperatorSchema"},"value":{}},"required":["type","key","operator"]},"FilterOperatorSchema":{"type":"string","enum":["contains","not_contains","eq","neq","gt","lt","gte","lte","before","after","on_or_before","on_or_after","in","not_in","is_empty","is_not_empty"]},"FilterGroupSchema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"combinator":{"$ref":"#/components/schemas/FilterCombinatorSchema"},"children":{"type":"array","items":{"$ref":"#/components/schemas/FilterSchema"}}},"required":["type","combinator","children"]},"FilterCombinatorSchema":{"type":"string","enum":["and","or"]},"FilterSchema":{"anyOf":[{"$ref":"#/components/schemas/FilterRuleSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]},"CreateTableViewSchema":{"type":"object","properties":{"id":{"type":"string","maxLength":128,"description":"Client-generated id for the new view (enables optimistic creation). Encoded (`view_…`) or raw UUID. Rejected if already in use."},"table_id":{"type":"string","maxLength":128},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","maxLength":512},"color":{"$ref":"#/components/schemas/ColorNameSchema"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]}]},"kind":{"$ref":"#/components/schemas/TableViewKindSchema"},"config":{"$ref":"#/components/schemas/TableViewConfigSchema"},"sort":{"$ref":"#/components/schemas/TableViewSortSchema"},"filter":{"$ref":"#/components/schemas/NullableFilterSchema"}},"required":["table_id","kind"]},"UpdateTableViewSchema":{"type":"object","properties":{"name":{"type":["string","null"],"minLength":1,"maxLength":128},"description":{"type":["string","null"],"maxLength":512},"color":{"anyOf":[{"$ref":"#/components/schemas/ColorNameSchema"},{"type":"null"}]},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}]},"config":{"$ref":"#/components/schemas/TableViewConfigSchema"},"sort":{"$ref":"#/components/schemas/TableViewSortSchema"},"filter":{"$ref":"#/components/schemas/NullableFilterSchema"},"show_in_sidebar":{"type":"boolean"},"archived":{"type":"boolean"}}},"ReorderTableViewsSchema":{"type":"object","properties":{"positions":{"$ref":"#/components/schemas/ReorderTableViewsSchemaPositions"}},"required":["positions"]},"ReorderTableViewsSchemaPositions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"position":{"type":"integer","minimum":0,"description":"New position for the view."}},"required":["id","position"]},"description":"New positions for the views."},"DuplicateTableViewSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Name for the duplicate. If omitted, the copy has no name (locale fallback is shown)."}},"description":"Schema for duplicating a view."},"ViewFieldSchema":{"oneOf":[{"$ref":"#/components/schemas/ViewScalarFieldSchema"},{"$ref":"#/components/schemas/ViewRefOneFieldSchema"}],"discriminator":{"propertyName":"kind","mapping":{"scalar":"#/components/schemas/ViewScalarFieldSchema","ref-1":"#/components/schemas/ViewRefOneFieldSchema"}}},"ViewScalarFieldSchema":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"readonly":{"type":"boolean"},"sortable":{"type":"boolean"},"groupable_in":{"type":"array","items":{"$ref":"#/components/schemas/TableViewKindSchema"}},"kind":{"type":"string","enum":["scalar"]},"type":{"$ref":"#/components/schemas/ViewScalarFieldTypeSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/FieldEnumItemSchema"}}},"required":["key","readonly","sortable","groupable_in","kind","type"]},"ViewScalarFieldTypeSchema":{"type":"string","enum":["string","number","boolean","date","datetime","enum"]},"ViewRefOneFieldSchema":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"readonly":{"type":"boolean"},"sortable":{"type":"boolean"},"groupable_in":{"type":"array","items":{"$ref":"#/components/schemas/TableViewKindSchema"}},"kind":{"type":"string","enum":["ref-1"]},"type":{"$ref":"#/components/schemas/ViewRefOneFieldTypeSchema"}},"required":["key","readonly","sortable","groupable_in","kind","type"]},"ViewRefOneFieldTypeSchema":{"type":"string","enum":["user","record","contact","chat","file","assistant","agent","segment"]},"TableViewGroupsResponseSchema":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/TableViewGroupSchema"}},"capabilities":{"$ref":"#/components/schemas/TableViewGroupsCapabilitiesSchema"}},"required":["groups","capabilities"]},"TableViewGroupSchema":{"oneOf":[{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["unmatched"]}},"required":["key","type"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["enum"]},"enum":{"$ref":"#/components/schemas/FieldEnumItemSchema"}},"required":["key","type","enum"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["user"]},"user":{"$ref":"#/components/schemas/UserPublicSchema"}},"required":["key","type","user"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["date_relative"]},"date_relative":{"$ref":"#/components/schemas/TableViewGroupDateRelativeSchema"}},"required":["key","type","date_relative"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["date_granular"]},"date_granular":{"$ref":"#/components/schemas/TableViewGroupDateGranularSchema"}},"required":["key","type","date_granular"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["number"]},"number":{"$ref":"#/components/schemas/TableViewGroupNumberSchema"}},"required":["key","type","number"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["boolean"]},"boolean":{"$ref":"#/components/schemas/TableViewGroupBooleanSchema"}},"required":["key","type","boolean"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["string"]},"string":{"$ref":"#/components/schemas/TableViewGroupStringSchema"}},"required":["key","type","string"]}]},"TableViewGroupDateRelativeSchema":{"type":"object","properties":{"token":{"type":"string","enum":["future","today","yesterday","last_7_days","last_30_days","this_month","last_month","older"]}},"required":["token"]},"TableViewGroupDateGranularSchema":{"type":"object","properties":{"date":{"type":"string"},"granularity":{"type":"string","enum":["relative","day","week","month","year"]}},"required":["date","granularity"]},"TableViewGroupNumberSchema":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"]},"TableViewGroupBooleanSchema":{"type":"object","properties":{"value":{"type":"boolean"}},"required":["value"]},"TableViewGroupStringSchema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"TableViewGroupsCapabilitiesSchema":{"type":"object","properties":{"reorderable_columns":{"type":"boolean"},"movable_items":{"type":"boolean"},"axis":{"$ref":"#/components/schemas/ViewFieldSchema"}},"required":["reorderable_columns","movable_items","axis"]},"MoveTableViewGroupSchema":{"type":"object","properties":{"group_key":{"type":"string","minLength":1,"maxLength":256},"after":{"type":"string","minLength":1,"maxLength":256},"before":{"type":"string","minLength":1,"maxLength":256}},"required":["group_key"]},"MoveTableViewItemSchema":{"type":"object","properties":{"item_id":{"type":"string","maxLength":128},"group_value":{"type":["string","null"],"maxLength":1024,"description":"Board only — new group_by value. Pass `null` for the unmatched group. Omit to leave the field value unchanged."},"after":{"type":"string","maxLength":1024,"description":"Neighbor item id this one should come after. Required for `kind='board'`."},"before":{"type":"string","maxLength":1024,"description":"Neighbor item id this one should come before. Required for `kind='board'`."}},"required":["item_id"]},"TableAggregateResultSchema":{"oneOf":[{"$ref":"#/components/schemas/TableAggregateValueSchema"},{"$ref":"#/components/schemas/TableAggregateSeriesSchema"}],"discriminator":{"propertyName":"kind","mapping":{"value":"#/components/schemas/TableAggregateValueSchema","series":"#/components/schemas/TableAggregateSeriesSchema"}}},"TableAggregateValueSchema":{"type":"object","properties":{"kind":{"type":"string","enum":["value"]},"value":{"type":["number","null"]},"previous":{"type":["number","null"]}},"required":["kind","value"]},"TableAggregateSeriesSchema":{"type":"object","properties":{"kind":{"type":"string","enum":["series"]},"groups":{"type":"array","items":{"$ref":"#/components/schemas/TableAggregateGroupSchema"}},"truncated":{"type":"boolean","description":"True when enum groups overflowed the cap and were folded into `__other__`."}},"required":["kind","groups","truncated"]},"TableAggregateGroupSchema":{"type":"object","properties":{"key":{"type":["string","null"],"description":"Group value: enum/string value, bucket start as ISO date, `__other__` for the folded tail, null for records without a value."},"value":{"type":["number","null"]}},"required":["key","value"]},"TableAggregateSpecSchema":{"type":"object","properties":{"metric":{"$ref":"#/components/schemas/TableAggregateMetricSchema"},"group_by":{"$ref":"#/components/schemas/TableAggregateGroupBySchema"},"window":{"$ref":"#/components/schemas/TableAggregateWindowSchema"},"filter":{"$ref":"#/components/schemas/FilterSchema"},"compare":{"type":"string","enum":["previous_period"]},"limit":{"type":"integer","minimum":1,"maximum":50}},"required":["metric"]},"TableAggregateMetricSchema":{"type":"object","properties":{"aggregation":{"$ref":"#/components/schemas/TableAggregationSchema"},"field_key":{"type":"string","minLength":1,"maxLength":64}},"required":["aggregation"]},"TableAggregationSchema":{"type":"string","enum":["count","sum","avg","min","max"]},"TableAggregateGroupBySchema":{"type":"object","properties":{"field_key":{"type":"string","minLength":1,"maxLength":64},"bucket":{"$ref":"#/components/schemas/TableAggregateDateBucketSchema"}},"required":["field_key"]},"TableAggregateDateBucketSchema":{"type":"string","enum":["day","week","month"]},"TableAggregateWindowSchema":{"type":"object","properties":{"field_key":{"type":"string","minLength":1,"maxLength":64},"last":{"$ref":"#/components/schemas/TableAggregateWindowLastSchema"}},"required":["field_key","last"]},"TableAggregateWindowLastSchema":{"type":"string","enum":["7d","30d","90d","365d"]},"PageSchema":{"type":"object","properties":{"id":{"type":"string","example":"page_5Fb7…"},"slug":{"$ref":"#/components/schemas/PageSlugSchema"},"title":{"type":["string","null"],"minLength":1,"maxLength":255,"description":"Page title.","example":"Store overview"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}]},"color":{"anyOf":[{"$ref":"#/components/schemas/ColorNameSchema"},{"type":"null"}]},"parent_id":{"type":["string","null"],"description":"Parent page id. Reserved for nesting; unused by the UI."},"position":{"type":"integer","description":"Sidebar-zone order."},"show_in_sidebar":{"type":"boolean"},"archived":{"type":"boolean"},"readonly":{"type":"boolean","description":"Locked: the UI hides all edit affordances until unlocked."},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","slug","title","icon","color","parent_id","position","show_in_sidebar","archived","readonly","created_at","updated_at"]},"PageSlugSchema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9-]{0,63}$","description":"Friendly URL segment, unique per org.","example":"store-overview"},"CreatePageSchema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255,"description":"Page title.","example":"Store overview"},"slug":{"allOf":[{"$ref":"#/components/schemas/PageSlugSchema"},{"description":"Omit to auto-generate from the title."}]},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]}]},"color":{"$ref":"#/components/schemas/ColorNameSchema"},"parent_id":{"type":"string","maxLength":128,"description":"Parent page id or slug. Reserved for nesting."},"show_in_sidebar":{"type":"boolean"}},"required":["title"]},"ReorderPagesSchema":{"type":"object","properties":{"positions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"position":{"type":"integer","minimum":0}},"required":["id","position"]},"minItems":1,"maxItems":500}},"required":["positions"]},"PageWithBlocksSchema":{"allOf":[{"$ref":"#/components/schemas/PageSchema"},{"type":"object","properties":{"blocks":{"type":"array","items":{"$ref":"#/components/schemas/PageBlockSchema"}}},"required":["blocks"]}]},"PageBlockSchema":{"type":"object","properties":{"id":{"type":"string","example":"block_5Fb7…"},"page_id":{"type":"string","example":"page_5Fb7…"},"type":{"$ref":"#/components/schemas/PageBlockTypeSchema"},"config":{"$ref":"#/components/schemas/PageBlockConfigSchema"},"table_id":{"type":["string","null"],"description":"Source table for data blocks. Null when the table was deleted."},"view_id":{"type":["string","null"],"description":"Embedded view for table blocks. Null when the view was deleted."},"position":{"type":"string","description":"Fractional order within the page."},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","page_id","type","config","table_id","view_id","position","created_at","updated_at"]},"PageBlockTypeSchema":{"type":"string","enum":["heading","text","stat","chart","table","pages"]},"PageBlockConfigSchema":{"type":"object","properties":{"shared":{"$ref":"#/components/schemas/PageBlockSharedConfigSchema"},"heading":{"$ref":"#/components/schemas/PageBlockHeadingConfigSchema"},"text":{"$ref":"#/components/schemas/PageBlockTextConfigSchema"},"stat":{"$ref":"#/components/schemas/PageBlockStatConfigSchema"},"chart":{"$ref":"#/components/schemas/PageBlockChartConfigSchema"},"table":{"$ref":"#/components/schemas/PageBlockTableConfigSchema"},"pages":{"$ref":"#/components/schemas/PageBlockPagesConfigSchema"}}},"PageBlockSharedConfigSchema":{"type":"object","properties":{"size":{"$ref":"#/components/schemas/PageBlockSizeSchema"},"height":{"$ref":"#/components/schemas/PageBlockHeightSchema"}}},"PageBlockSizeSchema":{"type":"string","enum":["sm","md","lg","full"]},"PageBlockHeightSchema":{"type":"string","enum":["sm","md","lg","xl"]},"PageBlockHeadingConfigSchema":{"type":"object","properties":{"text":{"type":"string","maxLength":255},"level":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]}}},"PageBlockTextConfigSchema":{"type":"object","properties":{"markdown":{"type":"string","maxLength":30000}}},"PageBlockStatConfigSchema":{"type":"object","properties":{"label":{"type":"string","maxLength":128},"metric":{"$ref":"#/components/schemas/TableAggregateMetricSchema"},"window":{"$ref":"#/components/schemas/TableAggregateWindowSchema"},"filter":{"$ref":"#/components/schemas/FilterSchema"},"format":{"$ref":"#/components/schemas/PageBlockStatFormatSchema"},"compare":{"type":"string","enum":["previous_period"]}}},"PageBlockStatFormatSchema":{"type":"string","enum":["number","currency","percent"]},"PageBlockChartConfigSchema":{"type":"object","properties":{"label":{"type":"string","maxLength":128},"kind":{"$ref":"#/components/schemas/PageBlockChartKindSchema"},"metric":{"$ref":"#/components/schemas/TableAggregateMetricSchema"},"group_by":{"$ref":"#/components/schemas/TableAggregateGroupBySchema"},"window":{"$ref":"#/components/schemas/TableAggregateWindowSchema"},"filter":{"$ref":"#/components/schemas/FilterSchema"},"limit":{"type":"integer","minimum":1,"maximum":50}}},"PageBlockChartKindSchema":{"type":"string","enum":["bar","line","area","donut"]},"PageBlockTableConfigSchema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50},"interaction":{"$ref":"#/components/schemas/PageBlockTableInteractionSchema"}}},"PageBlockTableInteractionSchema":{"type":"string","enum":["readonly","open","edit"],"description":"How the embedded table reacts: `readonly` pure display, `open` rows open the record panel, `edit` adds inline cell editing. Defaults to `open`."},"PageBlockPagesConfigSchema":{"type":"object","properties":{"page_ids":{"type":"array","items":{"type":"string"},"maxItems":50},"style":{"$ref":"#/components/schemas/PageBlockPagesStyleSchema"}}},"PageBlockPagesStyleSchema":{"type":"string","enum":["cards","list"]},"UpdatePageSchema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255,"description":"Page title.","example":"Store overview"},"slug":{"$ref":"#/components/schemas/PageSlugSchema"},"icon":{"anyOf":[{"$ref":"#/components/schemas/PickerIconEmojiSchema"},{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"The name of a curated icon a user can pick for a table, view, field, or other entity","oneOf":[{"$ref":"#/components/schemas/PickerIconNameSchema"}]},{"type":"null"}]},"color":{"anyOf":[{"$ref":"#/components/schemas/ColorNameSchema"},{"type":"null"}]},"parent_id":{"type":["string","null"],"maxLength":128,"description":"Parent page id or slug. Reserved for nesting."},"show_in_sidebar":{"type":"boolean"},"archived":{"type":"boolean"},"readonly":{"type":"boolean"}}},"CreatePageBlockSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/PageBlockTypeSchema"},"config":{"$ref":"#/components/schemas/PageBlockConfigSchema"},"table_id":{"type":"string","maxLength":128},"view_id":{"type":"string","maxLength":128},"after":{"type":"string","maxLength":128,"description":"Insert after this block id. Omit both to append."},"before":{"type":"string","maxLength":128,"description":"Insert before this block id."}},"required":["type"]},"UpdatePageBlockSchema":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/PageBlockConfigSchema"},"table_id":{"type":["string","null"],"maxLength":128},"view_id":{"type":["string","null"],"maxLength":128}}},"MovePageBlockSchema":{"type":"object","properties":{"after":{"type":"string","maxLength":128},"before":{"type":"string","maxLength":128}}},"CreateBroadcastSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"The name of the broadcast"},"type":{"allOf":[{"$ref":"#/components/schemas/BroadcastTypeSchema"},{"description":"The mode of the broadcast. Defaults to MARKETING. Cannot be changed after creation."}]},"show_in_inbox":{"type":"boolean","description":"Whether the broadcast appears as a conversation in Inbox"},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"When to send the broadcast. Use null to send immediately."},"pace_minutes":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Marketing only — spread the send evenly over this many minutes. Use null to send as fast as the safe cap allows."},"segment_ids":{"type":"array","items":{"type":"string"},"maxItems":10,"description":"The segments to include in the broadcast"},"send_to_all":{"type":"boolean","description":"Whether to send the broadcast to all contacts or only to the segments"}},"required":["name"],"description":"Schema for creating a broadcast"},"BroadcastRecipientSchema":{"type":"object","properties":{"id":{"type":"string"},"broadcast_id":{"type":"string"},"broadcast_name":{"type":"string"},"template_id":{"type":["string","null"]},"channel_type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"contact":{"$ref":"#/components/schemas/ContactSchema"},"user_id":{"type":["string","null"]},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/BroadcastRecipientStatusSchema"},"source":{"$ref":"#/components/schemas/BroadcastRecipientSourceSchema"},"payload":{"type":["object","null"],"additionalProperties":{}},"retries":{"type":"number"},"is_skipped":{"type":["boolean","null"]},"is_skipped_at":{"type":["string","null"],"format":"date-time"},"is_failed":{"type":["boolean","null"]},"is_failed_at":{"type":["string","null"],"format":"date-time"},"is_bounced":{"type":["boolean","null"]},"is_bounced_at":{"type":["string","null"],"format":"date-time"},"is_sent":{"type":["boolean","null"]},"is_sent_at":{"type":["string","null"],"format":"date-time"},"is_delivered":{"type":["boolean","null"]},"is_delivered_at":{"type":["string","null"],"format":"date-time"},"is_complained":{"type":["boolean","null"]},"is_complained_at":{"type":["string","null"],"format":"date-time"},"is_unsubscribed":{"type":["boolean","null"]},"is_unsubscribed_at":{"type":["string","null"],"format":"date-time"},"is_opened":{"type":["boolean","null"]},"is_opened_at":{"type":["string","null"],"format":"date-time"},"is_played":{"type":["boolean","null"]},"is_played_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":["string","null"]},"external_message_id":{"type":["string","null"]},"interactions":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastRecipientInteractionItemSchema"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","broadcast_id","broadcast_name","template_id","channel_type","user_id","name","username","phone","email","status","source","payload","retries","is_skipped","is_skipped_at","is_failed","is_failed_at","is_bounced","is_bounced_at","is_sent","is_sent_at","is_delivered","is_delivered_at","is_complained","is_complained_at","is_unsubscribed","is_unsubscribed_at","is_opened","is_opened_at","is_played","is_played_at","error_message","external_message_id","interactions","created_at","updated_at"],"description":"Schema for a broadcast recipient"},"BroadcastRecipientStatusSchema":{"type":"string","enum":["QUEUED","SENDING","PROCESSED","SENT","FAILED","SKIPPED"],"description":"The status of the broadcast recipient"},"BroadcastRecipientSourceSchema":{"type":["string","null"],"enum":["API","MANUAL","INBOX","IMPORT",null],"description":"How the recipient was triggered (transactional only)"},"BroadcastRecipientInteractionItemSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/BroadcastRecipientInteractionTypeSchema"},"label":{"type":["string","null"]},"value":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["type","label","value","created_at"],"description":"An interaction embedded on the recipient's row"},"BroadcastRecipientInteractionSchema":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/BroadcastRecipientInteractionTypeSchema"},"label":{"type":["string","null"]},"value":{"type":"string"},"broadcast_id":{"type":"string"},"recipient_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","type","label","value","broadcast_id","recipient_id","created_at"],"description":"Schema for a broadcast recipient interaction"},"UpdateBroadcastSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"The name of the broadcast"},"show_in_inbox":{"type":"boolean","description":"Whether the broadcast appears as a conversation in Inbox"},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"When to send the broadcast. Use null to send immediately."},"pace_minutes":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Marketing only — spread the send evenly over this many minutes. Use null to send as fast as the safe cap allows."},"segment_ids":{"type":"array","items":{"type":"string"},"maxItems":10,"description":"The segments to include in the broadcast"},"send_to_all":{"type":"boolean","description":"Whether to send the broadcast to all contacts or only to the segments"}},"description":"Schema for updating a broadcast"},"SendBroadcastTestSchema":{"type":"object","properties":{"user_id":{"type":"string","maxLength":1024,"description":"The user ID of the contact channel"},"name":{"type":["string","null"],"maxLength":256,"description":"The name for the contact channel (e.g. John Doe)"},"email":{"type":"string","maxLength":256,"description":"The email for the contact channel (e.g. user@example.com)"},"phone":{"type":"string","maxLength":256,"description":"The phone number for the contact channel (e.g. +1234567890)"},"properties":{"$ref":"#/components/schemas/BroadcastFieldValuesSchema"},"template_ids":{"type":"array","items":{"type":"string","maxLength":128},"description":"Optional list of template IDs to test. If omitted, all templates are tested."}},"description":"Schema for sending a broadcast test"},"BroadcastFieldValuesSchema":{"type":"object","additionalProperties":{"type":"string","maxLength":524288},"description":"A record of field keys and values per broadcast contact"},"DuplicateBroadcastSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"description":"Schema for duplicating a broadcast"},"CreateBroadcastTemplateSchema":{"type":"object","properties":{"connection_id":{"type":["string","null"],"maxLength":128},"channel_type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"config":{"$ref":"#/components/schemas/BroadcastTemplateConfigSchema"}},"required":["channel_type","config"],"description":"Schema for creating a broadcast template"},"UpdateBroadcastTemplateSchema":{"type":"object","properties":{"connection_id":{"type":["string","null"],"maxLength":128},"config":{"$ref":"#/components/schemas/BroadcastTemplateConfigSchema"}},"description":"Schema for updating a broadcast template"},"BroadcastFieldEntrySchema":{"type":"object","properties":{"id":{"type":"string"},"broadcast_id":{"type":"string"},"user_id":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"values":{"$ref":"#/components/schemas/BroadcastFieldValuesSchema"}},"required":["id","broadcast_id","user_id","email","phone","values"],"description":"A broadcast field entry (per-contact field values)"},"UpdateBroadcastFieldEntriesResultSchema":{"type":"object","properties":{"fields_count":{"type":"number"},"entries_count":{"type":"number"}},"required":["fields_count","entries_count"]},"UpdateBroadcastFieldEntriesSchema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","maxLength":1024,"description":"The user ID of the contact channel"},"email":{"type":"string","maxLength":256,"description":"The email for the contact channel (e.g. user@example.com)"},"phone":{"type":"string","maxLength":256,"description":"The phone number for the contact channel (e.g. +1234567890)"},"values":{"$ref":"#/components/schemas/BroadcastFieldValuesSchema"}},"required":["values"]},"maxItems":50000},"mode":{"type":"string","enum":["replace","merge"],"description":"'replace' (default) swaps the whole entry set; 'merge' upserts by identifier (user_id, email or phone) and merges values into matching entries."}},"required":["entries"],"description":"Schema for importing broadcast field entries"},"UpdateBroadcastFieldEntriesDryRunSchema":{"type":"object","properties":{"valid":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastFieldEntryDryRunItemSchema"}},"invalid":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastFieldEntryInvalidSchema"}}},"required":["valid","invalid"],"description":"Dry run result classifying entries as valid or invalid"},"BroadcastFieldEntryDryRunItemSchema":{"type":"object","properties":{"user_id":{"type":"string","maxLength":1024,"description":"The user ID of the contact channel"},"email":{"type":"string","maxLength":256,"description":"The email for the contact channel (e.g. user@example.com)"},"phone":{"type":"string","maxLength":256,"description":"The phone number for the contact channel (e.g. +1234567890)"}},"description":"An entry item for broadcast field dry run"},"BroadcastFieldEntryInvalidSchema":{"type":"object","properties":{"index":{"type":"number","description":"Position of the entry in the submitted array"},"entry":{"$ref":"#/components/schemas/BroadcastFieldEntryDryRunItemSchema"},"reason":{"$ref":"#/components/schemas/ContactChannelInvalidReasonSchema"}},"required":["index","entry","reason"],"description":"A rejected entry with the reason it failed validation"},"CreateBroadcastFieldSchema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"default_value":{"type":"string","maxLength":2048}},"required":["key","default_value"],"description":"Schema for creating a broadcast field"},"UpdateBroadcastFieldSchema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"default_value":{"type":"string","maxLength":2048}},"description":"Schema for updating a broadcast field"},"ImportedBroadcastRecipientsCountSchema":{"type":"object","properties":{"contacts_count":{"type":"number"}},"required":["contacts_count"]},"ImportBroadcastRecipientsResultSchema":{"type":"object","properties":{"imported_count":{"type":"number"}},"required":["imported_count"]},"ImportBroadcastRecipientsSchema":{"type":"object","properties":{"contact_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":50000}},"required":["contact_ids"],"description":"Schema for adding contacts to a marketing broadcast's audience"},"DeleteBroadcastRecipientsResultSchema":{"type":"object","properties":{"deleted_count":{"type":"number"}},"required":["deleted_count"]},"DeleteBroadcastRecipientsSchema":{"type":"object","properties":{"contact_ids":{"type":"array","items":{"type":"string"},"maxItems":50000}},"description":"Schema for removing imported recipients; omit contact_ids to remove them all"},"RetryBroadcastRecipientsResultSchema":{"type":"object","properties":{"retried_count":{"type":"number"},"remaining_count":{"type":"number"}},"required":["retried_count","remaining_count"]},"RetryBroadcastRecipientsSchema":{"type":"object","properties":{"recipient_ids":{"type":"array","items":{"type":"string"},"maxItems":1000}},"description":"Schema for retrying failed recipients; omit recipient_ids to retry them all"},"BroadcastRecipientCountSchema":{"type":"object","properties":{"channel_type":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"recipients_count":{"type":"number"}},"required":["channel_type","recipients_count"],"description":"Schema for the destination of the broadcast recipient"},"TriggerBroadcastResponseSchema":{"type":"object","properties":{"recipients":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastRecipientSchema"}}},"required":["recipients"],"description":"Result of triggering a transactional broadcast. One BroadcastRecipient row per template fired."},"TriggerBroadcastSchema":{"type":"object","properties":{"contact_channel_id":{"type":"string","description":"Tier 1 (most specific): exact ContactChannel id. Skips contact resolution and channel-availability filter since the caller has chosen the channel."},"contact_id":{"type":"string","description":"Tier 2: known Contact id. Channel is inferred per template at send time."},"phone":{"type":"string","maxLength":256,"description":"Raw phone. When no contact is resolved by contact_channel_id/contact_id, it find-or-creates a contact by phone. When a contact is resolved, it overrides the phone used for this send only (the contact and its channels are not modified)."},"email":{"type":"string","maxLength":256,"description":"Raw email. When no contact is resolved by contact_channel_id/contact_id, it find-or-creates a contact by email. When a contact is resolved, it overrides the email used for this send only (the contact and its channels are not modified)."},"name":{"type":"string","maxLength":256,"description":"Optional display name override for this send only. Takes precedence over the resolved channel and contact name. Does not resolve or create a contact on its own and does not modify the contact."},"subject":{"type":"string","maxLength":1000,"description":"Replaces the configured subject on every email template of this broadcast, for this send only. Supports {{variable}} placeholders."},"body":{"type":"string","maxLength":524288,"description":"Replaces the configured body (HTML) on every email template of this broadcast, for this send only. Supports {{variable}} placeholders."},"message":{"type":"string","maxLength":4000,"description":"Replaces the configured message text on every SMS template of this broadcast, for this send only. Supports {{variable}} placeholders."},"reply_to":{"type":"string","maxLength":512,"description":"Replaces the configured reply-to address on every email template of this broadcast, for this send only. Supports {{variable}} placeholders."},"variables":{"type":"object","additionalProperties":{"type":"string","maxLength":524288},"description":"Values for the broadcast fields. Variables override the contact's stored field values. Any broadcast field you omit falls back to its configured default value."},"template_ids":{"type":"array","items":{"type":"string","maxLength":128},"description":"Optional subset of broadcast templates to fire. Omit to fire all templates on the broadcast."},"background":{"type":"boolean","description":"When false (default), the call awaits the send and returns external_message_id per template. When true, the call enqueues and returns immediately."}},"description":"Schema for firing one trigger on a transactional broadcast. Recipient identifier fields are at the root. Fans out across the broadcast templates to a single recipient."},"BroadcastAnalyticsItemSchema":{"type":"object","properties":{"broadcast_id":{"type":"string"},"broadcast_name":{"type":"string"},"sent_at":{"type":["string","null"]},"total":{"type":"number"},"sent":{"type":"number"},"delivered":{"type":"number"},"opened":{"type":"number"},"failed":{"type":"number"},"bounced":{"type":"number"},"skipped":{"type":"number"},"delivery_rate":{"type":"number"},"open_rate":{"type":"number"}},"required":["broadcast_id","broadcast_name","sent_at","total","sent","delivered","opened","failed","bounced","skipped","delivery_rate","open_rate"]},"BroadcastsOverviewSchema":{"type":"object","properties":{"kpis":{"$ref":"#/components/schemas/BroadcastsOverviewKpisSchema"},"funnel":{"$ref":"#/components/schemas/BroadcastsFunnelSchema"},"volume":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date-time"},"amount":{"type":"number"}},"required":["date","amount"]}}},"required":["key","points"]}},"by_channel":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastsChannelItemSchema"}},"failure_reasons":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastsFailureReasonSchema"}},"broadcasts":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastsOverviewItemSchema"}}},"required":["kpis","funnel","volume","by_channel","failure_reasons","broadcasts"]},"BroadcastsOverviewKpisSchema":{"type":"object","properties":{"sent":{"type":"number"},"sent_previous":{"type":"number"},"delivery_rate":{"type":["number","null"]},"open_rate":{"type":["number","null"]},"click_rate":{"type":["number","null"]},"failed":{"type":"number"},"unsubscribed":{"type":"number"}},"required":["sent","sent_previous","delivery_rate","open_rate","click_rate","failed","unsubscribed"]},"BroadcastsFunnelSchema":{"type":"object","properties":{"recipients":{"type":"number"},"queued":{"type":"number"},"sent":{"type":"number"},"delivered":{"type":"number"},"opened":{"type":"number"},"played":{"type":"number"},"skipped":{"type":"number"},"failed":{"type":"number"},"bounced":{"type":"number"},"unsubscribed":{"type":"number"},"complained":{"type":"number"},"clicked":{"type":"number"}},"required":["recipients","queued","sent","delivered","opened","played","skipped","failed","bounced","unsubscribed","complained","clicked"]},"BroadcastsChannelItemSchema":{"type":"object","properties":{"channel_type":{"type":"string"},"recipients":{"type":"number"},"sent":{"type":"number"},"delivered":{"type":"number"},"failed":{"type":"number"}},"required":["channel_type","recipients","sent","delivered","failed"]},"BroadcastsFailureReasonSchema":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"number"}},"required":["reason","count"]},"BroadcastsOverviewItemSchema":{"allOf":[{"$ref":"#/components/schemas/BroadcastAnalyticsItemSchema"},{"type":"object","properties":{"clicked":{"type":"number"}},"required":["clicked"]}]},"BroadcastDetailAnalyticsSchema":{"type":"object","properties":{"funnel":{"$ref":"#/components/schemas/BroadcastsFunnelSchema"},"series":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date-time"},"amount":{"type":"number"}},"required":["date","amount"]}}},"required":["key","points"]}},"by_channel":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastsChannelItemSchema"}},"failure_reasons":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastsFailureReasonSchema"}}},"required":["funnel","series","by_channel","failure_reasons"]},"WorkflowAnalyticsItemSchema":{"type":"object","properties":{"workflow_id":{"type":"string"},"workflow_name":{"type":"string"},"total_runs":{"type":"number"},"completed":{"type":"number"},"failed":{"type":"number"},"canceled":{"type":"number"},"success_rate":{"type":"number"}},"required":["workflow_id","workflow_name","total_runs","completed","failed","canceled","success_rate"]},"CreateEmailIdentitySchema":{"type":"object","properties":{"email":{"type":"string","maxLength":512,"format":"email","description":"Email address to add as an identity"},"name":{"type":"string","maxLength":255,"description":"Display name for the identity"}},"required":["email"],"description":"Schema for adding a new email identity"},"UpdateEmailIdentitySchema":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Display name for the identity"},"is_default":{"type":"boolean","description":"Set as the default identity for the org"},"click_tracking":{"type":"boolean","description":"Enable or disable click tracking"},"open_tracking":{"type":"boolean","description":"Enable or disable open tracking"}},"description":"Schema for updating an email identity"},"CreateEmailDomainSchema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":512,"description":"Domain name to verify for DKIM"}},"required":["domain"],"description":"Schema for adding a new email domain"},"UpdateEmailDomainSchema":{"type":"object","properties":{},"description":"Schema for updating email domain settings"},"EmailDomainProviderSchema":{"type":"object","properties":{"provider":{"type":["string","null"],"description":"Provider identifier (e.g. \"cloudflare\", \"godaddy\")"},"name":{"type":["string","null"],"description":"Display name of the DNS provider"},"logo_url":{"type":["string","null"],"description":"URL to the provider logo icon"},"dns_settings_url":{"type":["string","null"],"description":"Deep link to the DNS settings page for this domain"},"auto_config_url":{"type":["string","null"],"description":"Domain Connect URL for one-click auto-configuration (when supported)"}},"required":["provider","name","logo_url","dns_settings_url","auto_config_url"],"description":"Detected DNS provider information for a domain"},"ConnectionActionDynamicToolsSchema":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionActionDynamicToolSchema"}},"fetched_at":{"type":"string","format":"date-time"},"stale":{"type":"boolean","description":"The catalog could not be refreshed, this is the last one that loaded"}},"required":["tools","fetched_at","stale"],"description":"The live tool catalog of a dynamic action"},"ConnectionActionDynamicToolSchema":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":4096},"parameters":{"$ref":"#/components/schemas/FieldsSchema"},"input":{"allOf":[{"$ref":"#/components/schemas/InputValuesSchema"},{"description":"Merged into the row input when the tool runs, beside the arguments"}]},"write":{"type":"boolean","description":"Whether the tool changes data on the other side"},"method":{"type":"string","maxLength":16,"description":"HTTP method, for tools that are API endpoints"},"path":{"type":"string","maxLength":2048,"description":"Endpoint path, for tools that are API endpoints"}},"required":["name","parameters","input","write"],"description":"One tool of a dynamic action catalog"},"CreateConnectionSchema":{"type":"object","properties":{"name":{"type":"string","maxLength":256,"description":"Name for the new connection","example":"My New Connection"},"config":{"type":"object","properties":{},"additionalProperties":{},"description":"Configuration of a connection","oneOf":[{"$ref":"#/components/schemas/ConnectionConfigSchema"}]}},"required":["config"]},"UpdateConnectionSchema":{"type":"object","properties":{"name":{"type":"string","maxLength":256,"description":"Name for the new connection","example":"My New Connection"},"config":{"type":"object","properties":{},"additionalProperties":{},"description":"Configuration of a partial connection","oneOf":[{"$ref":"#/components/schemas/ConnectionConfigPartialSchema"}]}}},"WhatsAppTemplateSchema":{"type":"object","properties":{"id":{"type":"string"},"waba_id":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"status":{"$ref":"#/components/schemas/WhatsAppTemplateStatusSchema"},"category":{"$ref":"#/components/schemas/WhatsAppTemplateCategorySchema"},"components":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateComponentSchema"}},"quality_score":{"$ref":"#/components/schemas/WhatsAppTemplateQualityScoreSchema"}},"required":["id","waba_id","name","language","status","category","components"]},"WhatsAppTemplateCategorySchema":{"type":"string","enum":["AUTHENTICATION","MARKETING","UTILITY"]},"WhatsAppTemplateComponentSchema":{"type":"object","properties":{"type":{"type":"string"},"format":{"type":"string"},"text":{"type":"string"},"buttons":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateButtonSchema"}},"example":{"$ref":"#/components/schemas/WhatsAppTemplateComponentExampleSchema"},"cards":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateCardSchema"}},"add_security_recommendation":{"type":"boolean"},"code_expiration_minutes":{"type":"number"},"limited_time_offer":{"$ref":"#/components/schemas/WhatsAppTemplateLimitedTimeOfferSchema"}},"required":["type"]},"WhatsAppTemplateButtonSchema":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"url":{"type":"string"},"phone_number":{"type":"string"},"example":{"type":"array","items":{"type":"string"}},"otp_type":{"type":"string"},"autofill_text":{"type":"string"},"zero_tap_terms_accepted":{"type":"boolean"},"supported_apps":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateSupportedAppSchema"}},"flow_id":{"type":"string"},"flow_name":{"type":"string"},"flow_action":{"type":"string"},"navigate_screen":{"type":"string"}},"required":["type"]},"WhatsAppTemplateSupportedAppSchema":{"type":"object","properties":{"package_name":{"type":"string"},"signature_hash":{"type":"string"}},"required":["package_name","signature_hash"]},"WhatsAppTemplateComponentExampleSchema":{"type":"object","properties":{"header_text":{"type":"array","items":{"type":"string"}},"body_text":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"header_handle":{"type":"array","items":{"type":"string"}},"header_url":{"type":"array","items":{"type":"string"}},"header_text_named_params":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateNamedParamSchema"}},"body_text_named_params":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateNamedParamSchema"}}}},"WhatsAppTemplateNamedParamSchema":{"type":"object","properties":{"param_name":{"type":"string"},"example":{"type":"string"}},"required":["param_name","example"]},"WhatsAppTemplateCardSchema":{"type":"object","properties":{"components":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateCardComponentSchema"}}},"required":["components"]},"WhatsAppTemplateCardComponentSchema":{"type":"object","properties":{"type":{"type":"string"},"format":{"type":"string"},"text":{"type":"string"},"buttons":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateButtonSchema"}},"example":{"$ref":"#/components/schemas/WhatsAppTemplateComponentExampleSchema"}},"required":["type"]},"WhatsAppTemplateLimitedTimeOfferSchema":{"type":"object","properties":{"text":{"type":"string"},"has_expiration":{"type":"boolean"}},"required":["text"]},"WhatsAppTemplateQualityScoreSchema":{"type":"object","properties":{"score":{"type":"string"},"date":{"type":"number"}},"required":["score"]},"WhatsAppTemplateLibraryEntrySchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"category":{"type":"string"},"topic":{"type":"string"},"usecase":{"type":"string"},"industry":{"type":"array","items":{"type":"string"}},"header":{"type":"string"},"body":{"type":"string"},"body_params":{"type":"array","items":{"type":"string"}},"body_param_types":{"type":"array","items":{"type":"string"}},"buttons":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateButtonSchema"}}},"required":["id","name","language","category"]},"CreateWhatsAppTemplateFromLibrarySchema":{"type":"object","properties":{"waba_id":{"type":"string","maxLength":128},"phone_number_id":{"type":"string","maxLength":128},"name":{"type":"string","minLength":1,"maxLength":512},"language":{"type":"string","maxLength":32},"category":{"$ref":"#/components/schemas/WhatsAppTemplateCategorySchema"},"library_template_name":{"type":"string"},"library_template_button_inputs":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateLibraryButtonInputSchema"}},"library_template_body_inputs":{"$ref":"#/components/schemas/WhatsAppTemplateLibraryBodyInputsSchema"}},"required":["name","language","category","library_template_name"]},"WhatsAppTemplateLibraryButtonInputSchema":{"type":"object","properties":{"type":{"type":"string"},"url":{"$ref":"#/components/schemas/WhatsAppTemplateLibraryButtonUrlSchema"},"phone_number":{"type":"string"},"otp_type":{"type":"string"},"zero_tap_terms_accepted":{"type":"boolean"},"supported_apps":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateSupportedAppSchema"}}},"required":["type"]},"WhatsAppTemplateLibraryButtonUrlSchema":{"type":"object","properties":{"base_url":{"type":"string"},"url_suffix_example":{"type":"string"}},"required":["base_url"]},"WhatsAppTemplateLibraryBodyInputsSchema":{"type":"object","properties":{"add_contact_number":{"type":"boolean"},"add_learn_more_link":{"type":"boolean"},"add_security_recommendation":{"type":"boolean"},"add_track_package_link":{"type":"boolean"},"code_expiration_minutes":{"type":"number"}}},"CreateWhatsAppTemplateSchema":{"type":"object","properties":{"waba_id":{"type":"string","maxLength":128},"phone_number_id":{"type":"string","maxLength":128},"name":{"type":"string","minLength":1,"maxLength":512},"language":{"type":"string","maxLength":32},"category":{"$ref":"#/components/schemas/WhatsAppTemplateCategorySchema"},"parameter_format":{"$ref":"#/components/schemas/WhatsAppParameterFormatSchema"},"components":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateComponentSchema"}},"message_send_ttl_seconds":{"type":"number"}},"required":["name","language","category","components"]},"WhatsAppParameterFormatSchema":{"type":"string","enum":["POSITIONAL","NAMED"]},"EditWhatsAppTemplateSchema":{"type":"object","properties":{"waba_id":{"type":"string","maxLength":128},"category":{"$ref":"#/components/schemas/WhatsAppTemplateCategorySchema"},"parameter_format":{"$ref":"#/components/schemas/WhatsAppParameterFormatSchema"},"components":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateComponentSchema"}},"message_send_ttl_seconds":{"type":"number"}},"required":["waba_id"]},"WhatsAppFlowSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}}},"required":["id","name","status"]},"WhatsAppFlowScreenSchema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id"]},"WhatsAppCatalogSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"WhatsAppBusinessProfileSchema":{"type":"object","properties":{"about":{"type":"string"},"address":{"type":"string"},"description":{"type":"string"},"email":{"type":"string"},"profile_picture_url":{"type":"string"},"vertical":{"type":"string","enum":["UNDEFINED","NOT_A_BIZ","OTHER","AUTO","BEAUTY","APPAREL","EDU","ENTERTAIN","EVENT_PLAN","FINANCE","GROCERY","GOVT","HOTEL","HEALTH","NONPROFIT","PROF_SERVICES","RETAIL","TRAVEL","RESTAURANT","ALCOHOL","ONLINE_GAMBLING","PHYSICAL_GAMBLING","OTC_DRUGS"]},"websites":{"type":"array","items":{"type":"string"}}}},"UpdateWhatsAppBusinessProfileSchema":{"type":"object","properties":{"phone_number_id":{"type":"string","minLength":1,"maxLength":128},"about":{"type":"string","maxLength":139},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","maxLength":128},"vertical":{"type":"string","enum":["OTHER","AUTO","BEAUTY","APPAREL","EDU","ENTERTAIN","EVENT_PLAN","FINANCE","GROCERY","GOVT","HOTEL","HEALTH","NONPROFIT","PROF_SERVICES","RETAIL","TRAVEL","RESTAURANT"]},"websites":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":2},"profile_picture_url":{"type":"string"}},"required":["phone_number_id"]},"WhatsAppPhoneNumberSchema":{"type":"object","properties":{"id":{"type":"string"},"waba_id":{"type":"string"},"display_phone_number":{"type":"string"},"verified_name":{"type":"string"},"status":{"type":"string"},"quality_score":{"type":"object","properties":{"score":{"type":"string"}},"required":["score"]},"name_status":{"type":"string"},"messaging_limit_tier":{"type":"string"},"platform_type":{"type":"string"},"account_mode":{"type":"string"},"is_official_business_account":{"type":"boolean"},"is_pin_enabled":{"type":"boolean"},"health":{"$ref":"#/components/schemas/WhatsAppHealthSchema"}},"required":["id","waba_id","display_phone_number"]},"WhatsAppHealthSchema":{"type":"object","properties":{"can_send_message":{"type":"string"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppHealthEntitySchema"}}}},"WhatsAppHealthEntitySchema":{"type":"object","properties":{"entity_type":{"type":"string"},"id":{"type":"string"},"can_send_message":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppHealthErrorSchema"}},"additional_info":{"type":"array","items":{"type":"string"}}}},"WhatsAppHealthErrorSchema":{"type":"object","properties":{"error_code":{"type":"number"},"error_description":{"type":"string"},"possible_solution":{"type":"string"}}},"RequestWhatsAppDisplayNameSchema":{"type":"object","properties":{"new_display_name":{"type":"string","minLength":1,"maxLength":256}},"required":["new_display_name"]},"WhatsAppAccountSchema":{"type":"object","properties":{"waba_id":{"type":"string"},"business_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"business_verification_status":{"type":"string"},"health":{"$ref":"#/components/schemas/WhatsAppHealthSchema"},"currency":{"type":"string"},"timezone_id":{"type":"string"},"country":{"type":"string"},"ownership_type":{"type":"string"},"messaging_limit":{"type":"string"},"funding_attached":{"type":"boolean"},"purchase_order_number":{"type":"string"},"activity":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppAccountEventSchema"}}},"required":["waba_id","activity"]},"WhatsAppAccountEventSchema":{"type":"object","properties":{"id":{"type":"string"},"field":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"at":{"type":"number"}},"required":["id","field","at"]},"WhatsAppQrCodeSchema":{"type":"object","properties":{"code":{"type":"string"},"prefilled_message":{"type":"string"},"deep_link_url":{"type":"string"}},"required":["code","prefilled_message","deep_link_url"]},"SaveWhatsAppQrCodeSchema":{"type":"object","properties":{"prefilled_message":{"type":"string","minLength":1,"maxLength":1000}},"required":["prefilled_message"]}},"parameters":{}},"paths":{"/chats/{chat_id}":{"patch":{"summary":"Update Chat","description":"Update a specific chat by its ID.","tags":["Chats"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateChatSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSchema"}}}}}},"get":{"summary":"Get Chat","description":"Get a specific chat by its ID.","tags":["Chats"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSchema"}}}}}},"delete":{"summary":"Delete Chat","description":"Delete a specific chat by its ID.","tags":["Chats"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/chats/{chat_id}/typing":{"post":{"tags":["Chats"],"summary":"Report Chat Typing","description":"Report that a user is typing in a chat.","parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/chats/{chat_id}/fork":{"post":{"tags":["Chats"],"summary":"Fork Chat","description":"Fork a personal or org chat from a given message into a new chat owned by the caller. Copies the conversation up to and including the message, along with the model, tools, features and linked files.","parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkChatSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ForkChatSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSchema"}}}}}}},"/chats/{chat_id}/cancel":{"post":{"tags":["Chats"],"summary":"Cancel Chat Generation","description":"Cancel the generation of a chat.","parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/chats/{chat_id}/skills":{"patch":{"summary":"Update Chat Skills","description":"Replace the set of skills enabled in an org chat.","tags":["Chats Skills"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"requestBody":{"description":"The full set of skill IDs to enable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatSkillsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateChatSkillsSchema"}}}},"responses":{"200":{"description":"The updated chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSchema"}}}}}}},"/chats/{chat_id}/state":{"patch":{"summary":"Update Chat State","description":"Update the state of a specific chat by its ID.","tags":["Chats State"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatStateSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateChatStateSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSchema"}}}}}}},"/chats/{chat_id}/state/info":{"get":{"summary":"Get Chat State Info","description":"Get the state info of a specific chat by its ID.","tags":["Chats State"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatStateInfoSchema"}}}}}}},"/chats/{chat_id}/state/assign":{"patch":{"summary":"Assign Conversation","description":"Assign or unassign a conversation to/from a team member.","tags":["Chats State"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignConversationSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AssignConversationSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatStateSchema"}}}}}}},"/chats/{chat_id}/seen":{"post":{"tags":["Chats"],"summary":"Mark Chat Seen","description":"Update the member's last seen time for the chat, optionally up to one message.","parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkChatSeenSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MarkChatSeenSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/chats/{chat_id}/unseen":{"post":{"summary":"Mark Chat as Unseen","description":"Mark a specific chat as unseen by its ID.","tags":["Chats Unseen"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatStateUnseenCountSchema"}}}}}}},"/chats/{chat_id}/messages/{message_id}/approvals":{"post":{"summary":"Decide Action Approvals","description":"Decide several pending action approvals of a message in one request. The assistant resumes only when no pending approval remains, and exactly once.","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Message ID","name":"message_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDecideApprovalsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MessageDecideApprovalsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}}},"/chats/{chat_id}/messages":{"get":{"summary":"Get Chat Messages","description":"Get a list of messages for a specific chat.","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time","description":"The date to start fetching messages from"},"required":false,"description":"The date to start fetching messages from","name":"from_date","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}}},"post":{"summary":"Create Chat Message","description":"Create a new message for a specific chat.","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatMessageSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateChatMessageSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}}},"/chats/{chat_id}/messages/{message_id}":{"get":{"summary":"Get Chat Message","description":"Get a specific message by its ID.","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Message ID","name":"message_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}},"delete":{"summary":"Delete Chat Message","description":"Delete a specific message by its ID.","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Message ID","name":"message_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}},"patch":{"summary":"Edit Chat Message","description":"Edit the text content of a specific message.","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Message ID","name":"message_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatMessageSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateChatMessageSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}}},"/chats/{chat_id}/messages/{message_id}/reactions":{"post":{"summary":"Add Message Reaction","description":"React to a specific message with an emoji.","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Message ID","name":"message_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetChatMessageReactionSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SetChatMessageReactionSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}},"delete":{"summary":"Remove Message Reaction","description":"Remove your emoji reaction from a specific message.","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Message ID","name":"message_id","in":"path"},{"schema":{"type":"string","format":"emoji"},"required":true,"name":"emoji","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/chats/{chat_id}/messages/template":{"post":{"summary":"Send Chat Template Message","description":"Send a message through the channel's template action (e.g. a WhatsApp template). Works outside the messaging window.","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatTemplateMessageSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateChatTemplateMessageSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}}},"/chats/{chat_id}/messages/{message_id}/tools/{tool_call_id}/respond":{"post":{"summary":"Respond to Interactive Tool","description":"Submit a user response to an interactive tool (e.g. connecting an app).","tags":["Chats Messages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Message ID","name":"message_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the tool call being responded to.","name":"tool_call_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondChatToolSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/RespondChatToolSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}}},"/chats/{chat_id}/files":{"get":{"summary":"Get Chat Files","description":"Retrieve all files shared in this chat.","tags":["Chats Files"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search files by filename","example":"document.pdf"},"required":false,"description":"Search files by filename","name":"search","in":"query"},{"schema":{"type":"string","description":"Filter by MIME type (prefix match)","example":"image/"},"required":false,"description":"Filter by MIME type (prefix match)","name":"mimetype","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileSchema"}}}}}}}},"/chats/{chat_id}/memories":{"get":{"summary":"Get conversation summaries","description":"Retrieve all conversation summaries for a chat, created automatically every 10 messages.","tags":["Chats Memories"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMemorySchema"}}}}}}},"delete":{"summary":"Clear conversation summaries","description":"Delete all conversation summaries for a chat. This does not delete messages, only the summaries.","tags":["Chats Memories"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/chats/{chat_id}/memories/{memory_id}":{"delete":{"summary":"Delete a conversation summary","description":"Delete a specific conversation summary by ID.","tags":["Chats Memories"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Memory ID","name":"memory_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/metadata/actions":{"get":{"summary":"List Connection Actions","description":"Every action a connection exposes, with its input fields. Pass `lang` to localise the copy.","tags":["Metadata Actions"],"parameters":[{"schema":{"type":"string","maxLength":32,"description":"Language code for translated content","example":"en"},"required":false,"description":"Language code for translated content","name":"lang","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionActionsSchema"}}}}}}},"/orgs/{org_id}/connections/oauth/url":{"post":{"summary":"Create OAuth Provider URL","description":"Create a URL to authenticate with an OAuth provider for a specific organization.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionSignInUrlSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateConnectionSignInUrlSchema"}}}},"responses":{"200":{"description":"The URL to redirect the user to for OAuth authentication.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionOAuthUrlSchema"}}}}}}},"/orgs/{org_id}/connections/oauth/validate":{"post":{"summary":"Authenticate OAuth Provider","description":"Authenticate with an OAuth provider to create a new connection.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateConnectionOAuthSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ValidateConnectionOAuthSchema"}}}},"responses":{"200":{"description":"The access token to authenticate with the OAuth provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionOAuthValidatedSchema"}}}}}}},"/orgs/{org_id}/connections/oauth/connect":{"post":{"summary":"Connect OAuth Provider","description":"Authenticate with an OAuth provider and create or re-authenticate the connection in one call. Credentials stay on the server.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectConnectionOAuthSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ConnectConnectionOAuthSchema"}}}},"responses":{"200":{"description":"The created or re-authenticated connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionSchema"}}}}}}},"/orgs/{org_id}/analytics/dashboard":{"get":{"summary":"Get Org Dashboard Analytics","description":"Get the analytics for the specified organization.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"}],"responses":{"200":{"description":"The analytics for the specified organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDashboardAnalyticsSchema"}}}}}}},"/orgs/{org_id}/analytics/assistants":{"get":{"summary":"Get Assistant Stats","description":"Get per-assistant performance statistics for the specified organization.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"Per-assistant performance statistics for the specified organization.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantStatsItemSchema"}}}}}}}},"/orgs/{org_id}/analytics/team":{"get":{"summary":"Get Team Stats","description":"Get per-member performance statistics for the specified organization.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"Per-member performance statistics for the specified organization.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberStatsItemSchema"}}}}}}}},"/orgs/{org_id}/analytics/channels":{"get":{"summary":"Get Channel Distribution","description":"Get conversation counts grouped by channel (channel_type) for the specified organization.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"Channel distribution stats for the specified organization.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChannelStatsItemSchema"}}}}}}}},"/orgs/{org_id}/analytics/conversations":{"get":{"summary":"Get Conversations Analytics","description":"Everything the Conversations analytics view renders, in one call: KPIs, the handoff flow, per-channel volume, message split, resolution and CSAT trends, and the takeover-time distribution. The channel filter applies to conversation and message volume; outcome metrics (resolution, handoffs, CSAT) are not channel-segmented.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"$ref":"#/components/schemas/MetricsIntervalSchema"},"required":false,"name":"interval","in":"query"},{"schema":{"$ref":"#/components/schemas/TimezoneValueSchema"},"required":false,"description":"IANA timezone identifier (e.g. America/New_York)","name":"timezone","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"assistant_id","in":"query"},{"schema":{"$ref":"#/components/schemas/ChannelTypeIdSchema"},"required":false,"description":"The channel type","name":"channel_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"member_id","in":"query"}],"responses":{"200":{"description":"Conversations analytics for the specified organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationsAnalyticsSchema"}}}}}}},"/orgs/{org_id}/analytics/contacts/growth":{"get":{"summary":"Get Contact Growth","description":"Get new and unsubscribed contact counts over time with running total.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"type":"string","enum":["day","week","month"],"default":"day"},"required":false,"name":"interval","in":"query"},{"schema":{"$ref":"#/components/schemas/TimezoneValueSchema"},"required":false,"description":"IANA timezone identifier (e.g. America/New_York)","name":"timezone","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactGrowthItemSchema"}}}}}}}},"/orgs/{org_id}/analytics/contacts/by-channel":{"get":{"summary":"Get Contacts by Channel","description":"Get contact count per channel type.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactsByChannelItemSchema"}}}}}}}},"/orgs/{org_id}/analytics/contacts/top-segments":{"get":{"summary":"Get Top Segments","description":"Get top segments by contact count.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactSegmentStatsItemSchema"}}}}}}}},"/orgs/{org_id}/analytics/metrics/types":{"get":{"summary":"Get Org Metric Types","description":"Get the types of metrics for the specified organization.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"The types of metrics for the specified organization.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgMetricSchema"}}}}}}}},"/orgs/{org_id}/analytics/metrics":{"get":{"summary":"Get Org Metrics","description":"Get the metrics for the specified organization.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"$ref":"#/components/schemas/OrgMetricIdSchema"},"required":true,"name":"metric","in":"query"},{"schema":{"$ref":"#/components/schemas/MetricsIntervalSchema"},"required":false,"name":"interval","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"$ref":"#/components/schemas/TimezoneValueSchema"},"required":false,"description":"IANA timezone identifier (e.g. America/New_York)","name":"timezone","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"assistant_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"workflow_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"agent_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"routine_id","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"The metrics for the specified organization.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MetricItemSchema"}}}}}}}},"/orgs/{org_id}/analytics/metrics/total":{"get":{"summary":"Get Org Metric Total","description":"Get the total of metrics for the specified organization.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"$ref":"#/components/schemas/OrgMetricIdSchema"},"required":true,"name":"metric","in":"query"},{"schema":{"$ref":"#/components/schemas/MetricsIntervalSchema"},"required":false,"name":"interval","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"$ref":"#/components/schemas/TimezoneValueSchema"},"required":false,"description":"IANA timezone identifier (e.g. America/New_York)","name":"timezone","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"assistant_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"workflow_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"agent_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"routine_id","in":"query"}],"responses":{"200":{"description":"The total of metrics for the specified organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMetricTotalSchema"}}}}}}},"/orgs/{org_id}/analytics/response-times":{"get":{"summary":"Get Response Times","description":"Get average and median resolution time and human response time after transfer.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTimesSchema"}}}}}}},"/orgs/{org_id}/inbox":{"get":{"summary":"Get Org Inbox Chats","description":"Get a list of inbox chats for a specific org.","tags":["Orgs Inbox"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search term to filter chats"},"required":false,"description":"Search term to filter chats","name":"search","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"assistant_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"assistant_channel_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"conversation_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"contact_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"segment_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"assigned_user_id","in":"query"},{"schema":{"$ref":"#/components/schemas/OrgChatsStatusSchema"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/OrgChatsStateSchema"},"required":false,"name":"state","in":"query"},{"schema":{"$ref":"#/components/schemas/OrgChatsAiStatusSchema"},"required":false,"name":"ai_status","in":"query"},{"schema":{"$ref":"#/components/schemas/OrgChatsFilterSchema"},"required":false,"description":"Filter for chats","name":"filter","in":"query"},{"schema":{"$ref":"#/components/schemas/OrgChatsReferralTypeSchema"},"required":false,"name":"referral_type","in":"query"},{"schema":{"$ref":"#/components/schemas/OrgChatsCsatMaxSchema"},"required":false,"description":"Filter chats with CSAT score less than or equal to this value. 0 means no filter.","name":"csat_max","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatSchema"}}}}}}}},"/orgs/{org_id}/inbox/ws":{"get":{"summary":"Chat Org Inbox WebSocket","description":"Get a WebSocket for chat events for an organization inbox.","tags":["Orgs Inbox"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatEventSchema"}}}}}}},"/orgs/{org_id}/domains":{"get":{"summary":"Get Domains","description":"Get a list of domains for a specific org.","tags":["Orgs Domains"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search domains by domain string"},"required":false,"description":"Search domains by domain string","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DomainSchema"}}}}}}},"post":{"summary":"Create Domain","description":"Add a new domain to an org.","tags":["Orgs Domains"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateDomainSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainSchema"}}}}}}},"/orgs/{org_id}/domains/{domain_id}":{"get":{"summary":"Get a Domain","description":"Get a specific domain by its ID.","tags":["Orgs Domains"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Domain ID","name":"domain_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainSchema"}}}}}},"delete":{"summary":"Delete Domain","description":"Delete a domain from an org.","tags":["Orgs Domains"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Domain ID","name":"domain_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/domains/{domain_id}/status":{"post":{"summary":"Get Domain Status","description":"Get the status of a domain.","tags":["Orgs Domains"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Domain ID","name":"domain_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainStatusSchema"}}}}}}},"/orgs/{org_id}/domains/{domain_id}/verify":{"post":{"summary":"Verify Domain","description":"Verify a domain. This will check DNS records or HTTP verification file.","tags":["Orgs Domains"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Domain ID","name":"domain_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainSchema"}}}}}}},"/orgs/{org_id}/domains/{domain_id}/provider":{"get":{"summary":"Get Domain DNS Provider","description":"Detect the DNS provider for a custom domain via NS lookup.","tags":["Orgs Domains"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Domain ID","name":"domain_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnsProviderSchema"}}}}}}},"/orgs/{org_id}/knowledge/index":{"get":{"summary":"Get Vector Index","description":"Fetch the vector index for the organization.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"responses":{"200":{"description":"The vector index details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorIndexInfoSchema"}}}}}}},"/orgs/{org_id}/knowledge/main-index":{"get":{"summary":"Get Vector Index","description":"Fetch the vector index for the organization.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"responses":{"200":{"description":"The vector index details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorIndexInfoSchema"}}}}}}},"/orgs/{org_id}/knowledge/contents":{"get":{"summary":"Get Contents","description":"Fetch all contents for the organization.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search query"},"required":false,"description":"Search query","name":"search","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryVectorContentTypeSchema"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryVectorContentStatusSchema"},"required":false,"name":"status","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of contents.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VectorContentLimitedSchema"}}}}}}},"post":{"summary":"Create Content","description":"Create a new content for the organization.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"The content information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVectorContentSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateVectorContentSchema"}}}},"responses":{"200":{"description":"The created content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorContentLimitedSchema"}}}}}}},"/orgs/{org_id}/knowledge/contents/{content_id}":{"get":{"summary":"Get Content","description":"Fetch a specific content by ID.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"}],"responses":{"200":{"description":"The content details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorContentSchema"}}}}}},"patch":{"summary":"Update Content","description":"Update an existing content.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVectorContentSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateVectorContentSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorContentLimitedSchema"}}}}}},"delete":{"summary":"Delete Content","description":"Delete an existing content.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/knowledge/contents/{content_id}/url":{"patch":{"summary":"Update Content URL","description":"Update the URL of an existing content.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVectorContentUrlSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateVectorContentUrlSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorContentLimitedSchema"}}}}}}},"/orgs/{org_id}/knowledge/contents/{content_id}/children":{"post":{"summary":"Create Child Content","description":"Create a new child content for the organization.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVectorContentSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateVectorContentSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorContentSchema"}}}}}}},"/orgs/{org_id}/knowledge/contents/{content_id}/reindex":{"post":{"summary":"Reindex Content","description":"Reindex an existing content.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorContentSchema"}}}}}}},"/orgs/{org_id}/knowledge/contents/{content_id}/chunks":{"get":{"summary":"Get Content Chunks","description":"Fetch all chunks for a specific content.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"},{"schema":{"$ref":"#/components/schemas/QueryVectorChunkStatusSchema"},"required":false,"name":"status","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of vector chunks.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VectorChunkSchema"}}}}}}}},"/orgs/{org_id}/knowledge/contents/{content_id}/chunks/{chunk_id}":{"get":{"summary":"Get Content Chunk","description":"Fetch a specific content chunk by ID.","tags":["Orgs Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content chunk","name":"chunk_id","in":"path"}],"responses":{"200":{"description":"The content chunk details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorChunkSchema"}}}}}}},"/orgs/{org_id}/assistants":{"get":{"summary":"Get Assistants","description":"Fetch all assistants for a specific org.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search assistants by name."},"required":false,"description":"Search assistants by name.","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of assistants.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantSchema"}}}}}}},"post":{"summary":"Create Assistant","description":"Create a new assistant for a specific org.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"The assistant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssistantSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateAssistantSchema"}}}},"responses":{"200":{"description":"The created assistant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantSchema"}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}":{"get":{"summary":"Get Assistant","description":"Fetch a specific assistant by ID.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"}],"responses":{"200":{"description":"The assistant details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantSchema"}}}}}},"patch":{"summary":"Update Assistant","description":"Update an existing assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"}],"requestBody":{"description":"The assistant information to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssistantSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateAssistantSchema"}}}},"responses":{"200":{"description":"The updated assistant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantSchema"}}}}}},"delete":{"summary":"Delete Assistant","description":"Delete an existing assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"}],"responses":{"200":{"description":"Returns null on successful deletion.","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key":{"post":{"summary":"Rotate Assistant Secret Key","description":"Rotate the secret key for a specific assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"}],"responses":{"200":{"description":"The updated assistant with a new secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantSchema"}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/duplicate":{"post":{"summary":"Duplicate an Assistant","description":"Duplicate an assistant including its actions, agents, and knowledge links. Integrations are not cloned. When duplicating to a different org, connections, agents, and knowledge links are excluded.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateAssistantSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DuplicateAssistantSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantSchema"}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/channels":{"get":{"summary":"Get Assistant Channels","description":"Fetch all channels for a specific assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of assistant channels.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantChannelSchema"}}}}}}},"post":{"summary":"Create Assistant Channel","description":"Connect a specific assistant to a new channel.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"}],"requestBody":{"description":"The assistant channel information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssistantChannelSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateAssistantChannelSchema"}}}},"responses":{"200":{"description":"The created assistant channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantChannelSchema"}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/channels/{channel_id}":{"get":{"summary":"Get Assistant Channel","description":"Fetch a specific assistant channel by ID.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant channel","name":"channel_id","in":"path"}],"responses":{"200":{"description":"The assistant channel details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantChannelSchema"}}}}}},"patch":{"summary":"Update Assistant Channel","description":"Update an existing assistant channel.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant channel","name":"channel_id","in":"path"}],"requestBody":{"description":"The assistant channel information to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssistantChannelSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateAssistantChannelSchema"}}}},"responses":{"200":{"description":"The updated assistant channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantChannelSchema"}}}}}},"delete":{"summary":"Delete Assistant Channel","description":"Delete an existing assistant channel.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant channel","name":"channel_id","in":"path"}],"responses":{"200":{"description":"Returns null on successful deletion.","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/actions":{"get":{"summary":"Get Assistant Actions","description":"Fetch all actions for a specific assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of assistant actions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantActionSchema"}}}}}}},"post":{"summary":"Create Assistant Action","description":"Create a new action for a specific assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"}],"requestBody":{"description":"The assistant action information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssistantActionSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateAssistantActionSchema"}}}},"responses":{"200":{"description":"The created assistant action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantActionSchema"}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/actions/{action_id}":{"get":{"summary":"Get Assistant Action","description":"Fetch a specific assistant action by ID.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant action","name":"action_id","in":"path"}],"responses":{"200":{"description":"The assistant action details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantActionSchema"}}}}}},"patch":{"summary":"Update Assistant Action","description":"Update an existing assistant action.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant action","name":"action_id","in":"path"}],"requestBody":{"description":"The assistant action information to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssistantActionSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateAssistantActionSchema"}}}},"responses":{"200":{"description":"The updated assistant action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantActionSchema"}}}}}},"delete":{"summary":"Delete Assistant Action","description":"Delete an existing assistant action.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant action","name":"action_id","in":"path"}],"responses":{"200":{"description":"Returns null on successful deletion.","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/actions/bulk":{"post":{"summary":"Bulk Assistant Actions","description":"Create and delete multiple assistant actions in a single request.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"requestBody":{"description":"The actions to create and the action IDs to delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAssistantActionsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BulkAssistantActionsSchema"}}}},"responses":{"200":{"description":"All assistant actions after the changes.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantActionSchema"}}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/actions/reorder":{"patch":{"summary":"Reorder Assistant Actions","description":"Reorder the actions of a specific assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"requestBody":{"description":"Ordered list of assistant action IDs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderAssistantActionsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReorderAssistantActionsSchema"}}}},"responses":{"200":{"description":"The reordered assistant actions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantActionSchema"}}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/knowledge/contents/search":{"get":{"summary":"Search Available Contents","description":"Search for available contents that can be linked to the assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search query"},"required":false,"description":"Search query","name":"search","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryVectorContentTypeSchema"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryVectorContentStatusSchema"},"required":false,"name":"status","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of available vector contents.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantAvailableVectorContentSchema"}}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/knowledge/contents":{"get":{"summary":"Get Contents","description":"Fetch all contents for the organization.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search query"},"required":false,"description":"Search query","name":"search","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryVectorContentTypeSchema"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryVectorContentStatusSchema"},"required":false,"name":"status","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of contents.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VectorContentLimitedSchema"}}}}}}}},"/orgs/{org_id}/assistants/{assistant_id}/knowledge/contents/{content_id}":{"post":{"summary":"Link Knowledge Content to Assistant","description":"Link an existing knowledge content to an assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"}],"responses":{"200":{"description":"The limited vector content linked to the assistant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorContentLimitedSchema"}}}}}},"delete":{"summary":"Unlink Knowledge Content from Assistant","description":"Unlink an existing knowledge content from an assistant.","tags":["Orgs Assistants"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the assistant","name":"assistant_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the content","name":"content_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/agents/{agent_id}/actions":{"get":{"summary":"Get Agent Actions","description":"Fetch all actions for a specific agent.","tags":["Orgs Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent","name":"agent_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of agent actions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentActionSchema"}}}}}}},"post":{"summary":"Create Agent Action","description":"Create a new action for a specific agent.","tags":["Orgs Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent","name":"agent_id","in":"path"}],"requestBody":{"description":"The agent action information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentActionSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateAgentActionSchema"}}}},"responses":{"200":{"description":"The created agent action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentActionSchema"}}}}}}},"/orgs/{org_id}/agents/{agent_id}/actions/{action_id}":{"get":{"summary":"Get Agent Action","description":"Fetch a specific agent action by ID.","tags":["Orgs Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent","name":"agent_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent action","name":"action_id","in":"path"}],"responses":{"200":{"description":"The agent action details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentActionSchema"}}}}}},"patch":{"summary":"Update Agent Action","description":"Update an existing agent action.","tags":["Orgs Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent","name":"agent_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent action","name":"action_id","in":"path"}],"requestBody":{"description":"The agent action information to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentActionSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateAgentActionSchema"}}}},"responses":{"200":{"description":"The updated agent action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentActionSchema"}}}}}},"delete":{"summary":"Delete Agent Action","description":"Delete an existing agent action.","tags":["Orgs Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent","name":"agent_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent action","name":"action_id","in":"path"}],"responses":{"200":{"description":"Returns null on successful deletion.","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/agents/{agent_id}/actions/bulk":{"post":{"summary":"Bulk Agent Actions","description":"Create and delete multiple agent actions in a single request.","tags":["Orgs Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent","name":"agent_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"requestBody":{"description":"The actions to create and the action IDs to delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAgentActionsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BulkAgentActionsSchema"}}}},"responses":{"200":{"description":"All agent actions after the changes.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentActionSchema"}}}}}}}},"/orgs/{org_id}/agents/{agent_id}/actions/reorder":{"patch":{"summary":"Reorder Agent Actions","description":"Reorder the actions of a specific agent.","tags":["Orgs Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the agent","name":"agent_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"requestBody":{"description":"Ordered list of agent action IDs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderAgentActionsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReorderAgentActionsSchema"}}}},"responses":{"200":{"description":"The reordered agent actions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentActionSchema"}}}}}}}},"/orgs/{org_id}/skills":{"get":{"summary":"Get Skills","description":"Fetch all skills for a specific org.","tags":["Orgs Skills"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search skills by name."},"required":false,"description":"Search skills by name.","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of skills.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SkillSchema"}}}}}}},"post":{"summary":"Create Skill","description":"Create a new skill for a specific org.","tags":["Orgs Skills"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"The skill information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateSkillSchema"}}}},"responses":{"200":{"description":"The created skill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillSchema"}}}}}}},"/orgs/{org_id}/skills/{skill_id}":{"get":{"summary":"Get Skill","description":"Fetch a specific skill by ID.","tags":["Orgs Skills"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the skill","name":"skill_id","in":"path"}],"responses":{"200":{"description":"The skill details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillSchema"}}}}}},"patch":{"summary":"Update Skill","description":"Update an existing skill.","tags":["Orgs Skills"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the skill","name":"skill_id","in":"path"}],"requestBody":{"description":"The skill information to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSkillSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateSkillSchema"}}}},"responses":{"200":{"description":"The updated skill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillSchema"}}}}}},"delete":{"summary":"Delete Skill","description":"Delete an existing skill.","tags":["Orgs Skills"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the skill","name":"skill_id","in":"path"}],"responses":{"200":{"description":"Returns null on successful deletion.","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/variables":{"get":{"summary":"Get Org Variables","description":"Fetch all variables for a specific org.","tags":["Orgs Variables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of org variables.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgVariableSchema"}}}}}}},"patch":{"summary":"Update Org Variables","description":"Update variables for a specific org.","tags":["Orgs Variables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"requestBody":{"description":"An array of org variables to update.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgVariableSchema"}}},"multipart/form-data":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgVariableSchema"}}}}},"responses":{"200":{"description":"An array of updated org variables.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgVariableSchema"}}}}}}},"post":{"summary":"Create Org Variable","description":"Create a variable for a specific org.","tags":["Orgs Variables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"The new variable information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgVariableSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateOrgVariableSchema"}}}},"responses":{"200":{"description":"The created org variable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgVariableSchema"}}}}}}},"/orgs/{org_id}/variables/{key}":{"patch":{"summary":"Rename Org Variable","description":"Rename a variable for a specific org.","tags":["Orgs Variables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The key of the variable to rename.","name":"key","in":"path"}],"requestBody":{"description":"The new variable information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgVariableSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateOrgVariableSchema"}}}},"responses":{"200":{"description":"The updated org variables.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgVariableSchema"}}}}}},"delete":{"summary":"Delete Org Variable","description":"Delete a variable for a specific org.","tags":["Orgs Variables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The key of the variable to delete.","name":"key","in":"path"}],"responses":{"200":{"description":"The deleted org variable.","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/webhooks/events":{"get":{"summary":"List Webhook Events","description":"List every event type an endpoint can subscribe to.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgWebhookSubscribableEventIdSchema"}}}}}}}},"/orgs/{org_id}/webhooks":{"get":{"summary":"List Webhooks","description":"List the webhook endpoints of an organization.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgWebhookSchema"}}}}}}},"post":{"summary":"Create Webhook","description":"Create a webhook endpoint. The signing secret is returned in full here and never again — store it.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgWebhookSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateOrgWebhookSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebhookSchema"}}}}}}},"/orgs/{org_id}/webhooks/{webhook_id}":{"get":{"summary":"Get Webhook","description":"Retrieve a single webhook endpoint.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the webhook endpoint","name":"webhook_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebhookSchema"}}}}}},"patch":{"summary":"Update Webhook","description":"Update a webhook endpoint.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the webhook endpoint","name":"webhook_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgWebhookSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateOrgWebhookSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebhookSchema"}}}}}},"delete":{"summary":"Delete Webhook","description":"Delete a webhook endpoint and its delivery history.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the webhook endpoint","name":"webhook_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/webhooks/{webhook_id}/rotate":{"post":{"summary":"Rotate Webhook Secret","description":"Issue a new signing secret. The previous secret stops signing immediately.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the webhook endpoint","name":"webhook_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebhookSchema"}}}}}}},"/orgs/{org_id}/webhooks/{webhook_id}/test":{"post":{"summary":"Test Webhook","description":"Send a signed `ping` event to the endpoint and return the delivery result.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the webhook endpoint","name":"webhook_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebhookDeliverySchema"}}}}}}},"/orgs/{org_id}/webhooks/{webhook_id}/deliveries":{"get":{"summary":"List Webhook Deliveries","description":"List recent delivery attempts for an endpoint.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the webhook endpoint","name":"webhook_id","in":"path"},{"schema":{"type":"string","enum":["PENDING","DELIVERED","FAILED","SKIPPED"]},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/OrgWebhookEventIdSchema"},"required":false,"description":"An event a delivery can carry","name":"event","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgWebhookDeliverySchema"}}}}}}}},"/orgs/{org_id}/webhooks/{webhook_id}/deliveries/{delivery_id}/replay":{"post":{"summary":"Replay Webhook Delivery","description":"Re-send a past event to the endpoint as a new delivery. Works for succeeded and failed deliveries alike.","tags":["Orgs Webhooks"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the webhook endpoint","name":"webhook_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the delivery to replay","name":"delivery_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebhookDeliverySchema"}}}}}}},"/orgs/{org_id}/audit-logs":{"get":{"summary":"Get Audit Logs","description":"Fetch all audit logs for a specific org.","tags":["Orgs Audit-Logs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"$ref":"#/components/schemas/AuditLogActionFilterSchema"},"required":false,"description":"Filter by action type","name":"action","in":"query"},{"schema":{"type":["string","null"],"format":"date-time","description":"Filter logs from this date (inclusive), YYYY-MM-DD"},"required":false,"description":"Filter logs from this date (inclusive), YYYY-MM-DD","name":"from","in":"query"},{"schema":{"type":["string","null"],"format":"date-time","description":"Filter logs until this date (inclusive), YYYY-MM-DD"},"required":false,"description":"Filter logs until this date (inclusive), YYYY-MM-DD","name":"to","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter by user who performed the action"},"required":false,"description":"Filter by user who performed the action","name":"user_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter by affected assistant"},"required":false,"description":"Filter by affected assistant","name":"assistant_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter by affected agent"},"required":false,"description":"Filter by affected agent","name":"agent_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter by affected workflow"},"required":false,"description":"Filter by affected workflow","name":"workflow_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter by affected connection"},"required":false,"description":"Filter by affected connection","name":"connection_id","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"An array of audit log entries.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogSchema"}}}}}}}},"/orgs/{org_id}/files":{"get":{"summary":"List Files","description":"Retrieve a list of files.","tags":["Orgs Files"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileSchema"}}}}}}},"post":{"summary":"Create File","description":"Create a new file.","tags":["Orgs Files"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateFileSchema"},{"type":"object","properties":{"visibility":{"$ref":"#/components/schemas/FileVisibilitySchema"}}}],"description":"CreateOrgFileSchema"}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateFileSchema"},{"type":"object","properties":{"visibility":{"$ref":"#/components/schemas/FileVisibilitySchema"}}}],"description":"CreateOrgFileSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileSchema"}}}}}}},"/orgs/{org_id}/files/{file_id}":{"get":{"summary":"Get File","description":"Retrieve a specific file.","tags":["Orgs Files"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"File ID","name":"file_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileSchema"}}}}}},"delete":{"summary":"Delete File","description":"Delete a specific file.","tags":["Orgs Files"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"File ID","name":"file_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/orgs/usage":{"get":{"summary":"Get Consolidated Sub-Organizations Usage","description":"Returns aggregated meter usage across all sub-organizations for the specified date range and interval.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time","description":"Start date for the usage period"},"required":false,"description":"Start date for the usage period","name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time","description":"End date for the usage period"},"required":false,"description":"End date for the usage period","name":"to_date","in":"query"},{"schema":{"$ref":"#/components/schemas/MeterIntervalSchema"},"required":true,"description":"Meter interval for the usage chart","name":"interval","in":"query"},{"schema":{"$ref":"#/components/schemas/MeterEventIdSchema"},"required":false,"description":"Meter ID for the organization","name":"type","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"Per-sub-organization usage grouped by event type and time bucket.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubOrgUsageItemSchema"}}}}}}}},"/orgs/{org_id}/orgs":{"get":{"summary":"List Sub-Organizations","description":"Returns all sub-organizations belonging to the specified organization.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"List of sub-organizations with their plan, balance, members, and features.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubOrgSchema"}}}}}}},"post":{"summary":"Create Sub-Organization","description":"Creates a new sub-organization belonging to the specified organization.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubOrgSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateSubOrgSchema"}}}},"responses":{"200":{"description":"Created sub-organization with its plan, balance, members, and features.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOrgSchema"}}}}}}},"/orgs/{org_id}/orgs/{sub_org_id}":{"get":{"summary":"Get Sub-Organization","description":"Returns a single sub-organization by ID belonging to the specified parent organization.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the parent organization","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the sub-organization","name":"sub_org_id","in":"path"}],"responses":{"200":{"description":"The sub-organization with its plan, balance, members, and features.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOrgSchema"}}}}}},"patch":{"summary":"Update Sub-Organization","description":"Updates a sub-organization from the parent. Accepts a partial `config` (deep-merged server-side, includes `modules` visibility toggles) and an optional `logo_id`. Feature flags are not writable from this endpoint.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the parent organization","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the sub-organization","name":"sub_org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubOrgSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateSubOrgSchema"}}}},"responses":{"200":{"description":"The updated sub-organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOrgSchema"}}}}}},"delete":{"summary":"Detach Sub-Organization","description":"Detaches a sub-organization from the parent, making it a standalone organization. The sub-organization retains its current features and data.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the parent organization","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the sub-organization","name":"sub_org_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}},"post":{"summary":"Transfer Organization","description":"Transfers an existing standalone organization to become a sub-organization of the specified parent. The requesting user must be an admin of both organizations.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the parent organization","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the sub-organization","name":"sub_org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferSubOrgSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TransferSubOrgSchema"}}}},"responses":{"200":{"description":"The transferred organization with updated parent and features.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOrgSchema"}}}}}}},"/orgs/{org_id}/orgs/{sub_org_id}/join":{"post":{"summary":"Join Sub-Organization","description":"Adds the authenticated parent org admin as a member of the specified sub-organization with the given role.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the parent organization","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the sub-organization","name":"sub_org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinSubOrgSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/JoinSubOrgSchema"}}}},"responses":{"200":{"description":"The sub-organization after the user has been added as a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOrgSchema"}}}}}}},"/orgs/{org_id}/orgs/{sub_org_id}/role":{"patch":{"summary":"Change Role in Sub-Organization","description":"Changes the role of the authenticated user in the specified sub-organization.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the parent organization","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the sub-organization","name":"sub_org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinSubOrgSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/JoinSubOrgSchema"}}}},"responses":{"200":{"description":"The sub-organization after the role has been updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOrgSchema"}}}}}}},"/orgs/{org_id}/orgs/{sub_org_id}/billing":{"patch":{"summary":"Update Sub-Organization Billing Config","description":"Updates billing configuration for a sub-organization, including spending cap. Only parent organization admins can call this endpoint.","tags":["Orgs Orgs"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the parent organization","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the sub-organization","name":"sub_org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingConfigSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateBillingConfigSchema"}}}},"responses":{"200":{"description":"The sub-organization with updated billing config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgSchema"}}}}}}},"/orgs/{org_id}/workflows/runs":{"get":{"summary":"Get Runs","description":"Retrieve a list of runs.","tags":["Orgs Workflows"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"boolean"},"required":false,"name":"expand","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryRunOriginSchema"},"required":false,"description":"Origin of the run","name":"origin","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryRunStatusSchema"},"required":false,"description":"Status of the run","name":"status","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RunSchema"}}}}}}}},"/orgs/{org_id}/workflows/{workflow_id}/runs":{"get":{"summary":"Get Workflow Runs","description":"Retrieve a list of runs for a specific workflow.","tags":["Orgs Workflows"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the workflow","name":"workflow_id","in":"path"},{"schema":{"type":"boolean"},"required":false,"name":"expand","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryRunOriginSchema"},"required":false,"description":"Origin of the run","name":"origin","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryRunStatusSchema"},"required":false,"description":"Status of the run","name":"status","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RunSchema"}}}}}}},"post":{"summary":"Run a Workflow","description":"Run a specific workflow by its ID.","tags":["Orgs Workflows"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the workflow","name":"workflow_id","in":"path"},{"schema":{"type":"boolean"},"required":false,"name":"expand","in":"query"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateRunSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunSchema"}}}}}}},"/orgs/{org_id}/workflows/{workflow_id}/runs/{run_id}":{"get":{"summary":"Get a Workflow Run","description":"Retrieve details of a specific workflow run.","tags":["Orgs Workflows"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the workflow","name":"workflow_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the workflow run.","name":"run_id","in":"path"},{"schema":{"type":"boolean"},"required":false,"name":"expand","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunSchema"}}}}}}},"/orgs/{org_id}/workflows/{workflow_id}/runs/{run_id}/replay":{"post":{"summary":"Replay a Workflow Run","description":"Replay a specific workflow run.","tags":["Orgs Workflows"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the workflow","name":"workflow_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the workflow run.","name":"run_id","in":"path"},{"schema":{"type":"boolean"},"required":false,"name":"expand","in":"query"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayRunSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReplayRunSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunSchema"}}}}}}},"/orgs/{org_id}/workflows/{workflow_id}/runs/{run_id}/cancel":{"post":{"summary":"Cancel a Workflow Run","description":"Cancel a workflow run that is currently running.","tags":["Orgs Workflows"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the workflow","name":"workflow_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the workflow run.","name":"run_id","in":"path"},{"schema":{"type":"boolean"},"required":false,"name":"expand","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunSchema"}}}}}}},"/orgs/{org_id}/segments":{"get":{"summary":"Get Segments","description":"Get a list of segments for a specific org.","tags":["Orgs Segments"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search segments by name"},"required":false,"description":"Search segments by name","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SegmentSchema"}}}}}}},"post":{"summary":"Create a Segment","description":"Create a new segment for the organization.","tags":["Orgs Segments"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSegmentSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateSegmentSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentSchema"}}}}}}},"/orgs/{org_id}/segments/{segment_id}":{"get":{"summary":"Get a Segment","description":"Get a specific segment by its ID.","tags":["Orgs Segments"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Segment ID","name":"segment_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentSchema"}}}}}},"patch":{"summary":"Update a Segment","description":"Update a specific segment by its ID.","tags":["Orgs Segments"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Segment ID","name":"segment_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSegmentSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateSegmentSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentSchema"}}}}}},"delete":{"summary":"Delete a Segment","description":"Delete a segment and all associated contact segment relationships. Contacts will not be deleted.","tags":["Orgs Segments"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Segment ID","name":"segment_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/suppressions":{"get":{"summary":"Get Suppressions","description":"Get the org suppression list — the emails and phone numbers excluded from automated messaging.","tags":["Orgs Suppressions"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search suppressions by identifier"},"required":false,"description":"Search suppressions by identifier","name":"search","in":"query"},{"schema":{"$ref":"#/components/schemas/SuppressionChannelSchema"},"required":false,"description":"The channel an identifier is suppressed on","name":"channel","in":"query"},{"schema":{"$ref":"#/components/schemas/SuppressionReasonSchema"},"required":false,"description":"Why the identifier is suppressed","name":"reason","in":"query"},{"schema":{"$ref":"#/components/schemas/SuppressionSourceSchema"},"required":false,"description":"What put the identifier on the list","name":"source","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionSchema"}}}}}}},"post":{"summary":"Suppress an Identifier","description":"Add an email or phone number to the org suppression list. Suppressing an identifier that is already on the list refreshes its reason.","tags":["Orgs Suppressions"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSuppressionSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateSuppressionSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionSchema"}}}}}}},"/orgs/{org_id}/suppressions/bulk":{"post":{"summary":"Suppress Identifiers in Bulk","description":"Add many emails or phone numbers to the org suppression list at once. Contacts are never created or modified.","tags":["Orgs Suppressions"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSuppressionsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateSuppressionsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionsImportedSchema"}}}}}}},"/orgs/{org_id}/suppressions/bulk/dry":{"post":{"summary":"Dry Run Suppress Identifiers in Bulk","description":"Preview what a bulk suppression import would create, skip and reject.","tags":["Orgs Suppressions"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSuppressionsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateSuppressionsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionsImportedDryRunSchema"}}}}}}},"/orgs/{org_id}/suppressions/{suppression_id}":{"patch":{"summary":"Update a Suppression","description":"Update the reason or note of a suppression entry.","tags":["Orgs Suppressions"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Suppression ID","name":"suppression_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSuppressionSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateSuppressionSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionSchema"}}}}}},"delete":{"summary":"Remove a Suppression","description":"Remove an email or phone number from the org suppression list.","tags":["Orgs Suppressions"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Suppression ID","name":"suppression_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/activities":{"get":{"summary":"List activities","description":"Retrieve an activity timeline for the org, sorted by creation date (newest first). Filter by any combination of contact, table, record, actor, assistant, or segment.","tags":["Orgs Activities"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"$ref":"#/components/schemas/ActivityTypeSchema"},"required":false,"description":"Schema for the type of an activity event","name":"type","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this contact."},"required":false,"description":"Filter to activities scoped to this contact.","name":"contact_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this table."},"required":false,"description":"Filter to activities scoped to this table.","name":"table_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this table record."},"required":false,"description":"Filter to activities scoped to this table record.","name":"record_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities performed by this user."},"required":false,"description":"Filter to activities performed by this user.","name":"actor_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities performed by this assistant."},"required":false,"description":"Filter to activities performed by this assistant.","name":"assistant_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities involving this segment."},"required":false,"description":"Filter to activities involving this segment.","name":"segment_id","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivitySchema"}}}}}}}},"/orgs/{org_id}/contacts/duplicates":{"get":{"summary":"List duplicate contact groups","description":"Paginated list of contacts in this org that share at least one external channel. Each group has a recommended primary and the duplicates that would be merged into it.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DuplicateContactGroupSchema"}}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/duplicates":{"get":{"summary":"List duplicates of a contact","description":"Returns every contact in the same org that shares at least one external channel with the contact in the URL.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactSchema"}}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/merge":{"post":{"summary":"Merge contacts","description":"Merge other contacts INTO the contact in the URL. If `source_contact_ids` is provided, those exact contacts are merged in; otherwise every auto-detected duplicate is merged. Source contacts are deleted.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeContactsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MergeContactsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeContactsResultSchema"}}}}}}},"/orgs/{org_id}/contacts/fields":{"get":{"summary":"List contact fields","description":"List of custom contact fields","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableFieldSchema"}}}}}}}},"/orgs/{org_id}/contacts":{"get":{"summary":"Get Contacts","description":"Get a list of contacts for a specific org.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search contacts by name"},"required":false,"description":"Search contacts by name","name":"search","in":"query"},{"schema":{"type":"boolean","description":"Whether the contact is unsubscribed"},"required":false,"description":"Whether the contact is unsubscribed","name":"unsubscribed","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Search contacts by user ID match"},"required":false,"description":"Search contacts by user ID match","name":"user_id","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search contacts by name match"},"required":false,"description":"Search contacts by name match","name":"name","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search contacts by username match"},"required":false,"description":"Search contacts by username match","name":"username","in":"query"},{"schema":{"type":"string","maxLength":256,"format":"email","description":"Search contacts by email match"},"required":false,"description":"Search contacts by email match","name":"email","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Search contacts by segment ID match"},"required":false,"description":"Search contacts by segment ID match","name":"segment_id","in":"query"},{"schema":{"type":"boolean","description":"Exclude admin contacts"},"required":false,"description":"Exclude admin contacts","name":"exclude_admins","in":"query"},{"schema":{"$ref":"#/components/schemas/ContactStatusSchema"},"required":false,"description":"Filter contacts by subscription status","name":"status","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactSchema"}}}}}}},"post":{"summary":"Create a Contact","description":"Create a new contact for the organization.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateContactSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSchema"}}}}}}},"/orgs/{org_id}/contacts/stats":{"get":{"summary":"Get Contact Stats","description":"Get contact subscription stats (total, subscribed, unsubscribed, blocked).","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactStatsSchema"}}}}}}},"/orgs/{org_id}/contacts/bulk":{"post":{"summary":"Create Multiple Contacts","description":"Create multiple contacts for the organization in bulk.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateContactsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsImportedSchema"}}}}}},"delete":{"summary":"Delete Multiple Contacts","description":"Delete multiple contacts and all associated channels and notes.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteContactsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DeleteContactsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/contacts/bulk/dry":{"post":{"summary":"Dry Run Create Multiple Contacts","description":"Dry run create multiple contacts for the organization in bulk.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateContactsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsImportedDryRunSchema"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}":{"get":{"summary":"Get a Contact","description":"Get a specific contact by its ID.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSchema"}}}}}},"patch":{"summary":"Update a Contact","description":"Update a specific contact by its ID.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateContactSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSchema"}}}}}},"delete":{"summary":"Delete a contact","description":"Delete a contact and all associated channels and notes.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/last-seen":{"get":{"summary":"Get Contact Last Seen","description":"Get the timestamp of the last message from or to this contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactLastSeenSchema"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/activities":{"get":{"summary":"List contact activities","description":"Retrieve the activity timeline for a contact, sorted by creation date (newest first).","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"$ref":"#/components/schemas/ActivityTypeSchema"},"required":false,"description":"Schema for the type of an activity event","name":"type","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this contact."},"required":false,"description":"Filter to activities scoped to this contact.","name":"contact_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this table."},"required":false,"description":"Filter to activities scoped to this table.","name":"table_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this table record."},"required":false,"description":"Filter to activities scoped to this table record.","name":"record_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities performed by this user."},"required":false,"description":"Filter to activities performed by this user.","name":"actor_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities performed by this assistant."},"required":false,"description":"Filter to activities performed by this assistant.","name":"assistant_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities involving this segment."},"required":false,"description":"Filter to activities involving this segment.","name":"segment_id","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivitySchema"}}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/segments":{"get":{"summary":"Get Contact Segments","description":"Get all segments for a specific contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SegmentLimitedSchema"}}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/segments/{segment_id}":{"post":{"summary":"Add Segment to Contact","description":"Add a segment to a contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Segment ID","name":"segment_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSchema"}}}}}},"delete":{"summary":"Remove Segment from Contact","description":"Remove a segment from a contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Segment ID","name":"segment_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/channels":{"post":{"summary":"Add a custom channel to a contact","description":"Add a new custom channel to an existing contact. At least one field (name, email, phone, or username) must be provided.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddContactChannelSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AddContactChannelSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactChannelSchema"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/channels/{channel_id}/stats":{"get":{"summary":"Get related entity counts for a contact channel","description":"Returns the number of chats and broadcast recipients linked to this channel. Use before deletion to warn the user about impact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Channel ID","name":"channel_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactChannelStatsSchema"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/channels/{channel_id}":{"patch":{"summary":"Update a contact channel (only for custom channels)","description":"Update a contact channel. Only channels of type 'custom' can be updated. For other channel types, the channel information is managed by the integration and cannot be modified directly.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Channel ID","name":"channel_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactChannelSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateContactChannelSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactChannelSchema"}}}}}},"delete":{"summary":"Delete a contact channel","description":"Delete a contact channel.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Channel ID","name":"channel_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/files":{"get":{"summary":"Get Contact Files","description":"Retrieve all files for this contact, including chat files and direct uploads.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search files by filename","example":"document.pdf"},"required":false,"description":"Search files by filename","name":"search","in":"query"},{"schema":{"type":"string","maxLength":1024,"description":"Filter by MIME type (prefix match)","example":"image/"},"required":false,"description":"Filter by MIME type (prefix match)","name":"mimetype","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactFileSchema"}}}}}}},"post":{"summary":"Upload Contact File","description":"Upload a file to a contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFileSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateFileSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFileSchema"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/files/{file_id}":{"delete":{"summary":"Delete Contact File","description":"Delete a file from a contact. If the file belongs to a note with no text and is the last attachment, the note is deleted too.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"File ID","name":"file_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/comments":{"get":{"summary":"List contact comments","description":"Retrieve all comments for a contact, sorted by creation date (newest first).","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactCommentSchema"}}}}}}},"post":{"summary":"Create a contact comment","description":"Add a new comment to a contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactCommentSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateContactCommentSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCommentSchema"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/comments/{activity_id}":{"get":{"summary":"Get a contact comment","description":"Retrieve a specific comment for a contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Activity ID","name":"activity_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCommentSchema"}}}}}},"patch":{"summary":"Update a contact comment","description":"Update the content of an existing comment.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Activity ID","name":"activity_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactCommentSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateContactCommentSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCommentSchema"}}}}}},"delete":{"summary":"Delete a contact comment","description":"Remove a comment from a contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Activity ID","name":"activity_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/memories":{"get":{"summary":"Get contact memories","description":"Retrieve all memories associated with a contact, sorted by importance.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemorySchema"}}}}}}},"delete":{"summary":"Clear all contact memories","description":"Delete all memories associated with a contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/memories/{memory_id}":{"delete":{"summary":"Delete a specific contact memory","description":"Delete a single memory by ID for a contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Memory ID","name":"memory_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/channels/{channel_id}/chats":{"post":{"summary":"Create a chat on a contact channel","description":"Start a new chat with a contact on one of its custom channels. The chat is seeded with the contact channel as the sole member; the admin is not a chat member. Any initial message is authored as the contact.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Channel ID","name":"channel_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactChannelChatSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateContactChannelChatSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSchema"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/channels/{channel_id}/chats/{chat_id}/messages":{"post":{"summary":"Send a message as a contact on a channel","description":"Post a message into an existing chat, authored as the contact (not as the admin). Only custom channels are supported.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Channel ID","name":"channel_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendContactChannelChatMessageSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SendContactChannelChatMessageSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/channels/{channel_id}/chats/{chat_id}/messages/{message_id}/approvals/{tool_call_id}":{"post":{"summary":"Decide Action Approval as a contact on a channel","description":"Decide on a pending action approval, recorded as the contact (not as the admin / API key). Only custom channels are supported. Use this from custom integrations so the decision is attributed to the right chat member.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Channel ID","name":"channel_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the message with the pending approval.","name":"message_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the tool call to decide on.","name":"tool_call_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDecideApprovalSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MessageDecideApprovalSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}}},"/orgs/{org_id}/contacts/{contact_id}/channels/{channel_id}/chats/{chat_id}/messages/{message_id}/tools/{tool_call_id}/respond":{"post":{"summary":"Respond to Interactive Tool as a contact on a channel","description":"Submit a user response to an interactive tool (e.g. an action approval), recorded as the contact (not as the admin / API key). Only custom channels are supported. Use this from custom integrations so the response is attributed to the right chat member.","tags":["Orgs Contacts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Contact ID","name":"contact_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Channel ID","name":"channel_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Chat ID","name":"chat_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the message with the pending tool.","name":"message_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the tool call being responded to.","name":"tool_call_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondChatToolSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/RespondChatToolSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageSchema"}}}}}}},"/orgs/{org_id}/tables":{"get":{"summary":"List tables","description":"List the tables defined for an org.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"$ref":"#/components/schemas/TableTypeSchema"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search tables by name."},"required":false,"description":"Search tables by name.","name":"search","in":"query"},{"schema":{"$ref":"#/components/schemas/TableStatusSchema"},"required":false,"description":"Filter by visibility. `ACTIVE` excludes archived (default), `ARCHIVED` returns only archived, `ALL` returns both.","name":"status","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableSchema"}}}}}}},"post":{"summary":"Create a table","description":"Create a new table.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTableSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateTableSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableSchema"}}}}}}},"/orgs/{org_id}/tables/positions":{"patch":{"summary":"Reorder tables","description":"Bulk-update the display position of an org's tables in one transaction.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderTablesSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReorderTablesSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableSchema"}}}}}}}},"/orgs/{org_id}/tables/{table_id}":{"get":{"summary":"Get a table","description":"Get a single table by id.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableSchema"}}}}}},"patch":{"summary":"Update a table","description":"Update a table.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTableSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateTableSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableSchema"}}}}}},"delete":{"summary":"Delete a table","description":"Permanently delete a table. Irreversible: cascades all records, fields, and refs. Rejected while Record fields on other tables link to this one, unless `force` is set — those fields are then deleted with it.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"type":"boolean","description":"Delete even when Record fields on other tables link to this one. Those fields are deleted with it."},"required":false,"description":"Delete even when Record fields on other tables link to this one. Those fields are deleted with it.","name":"force","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/tables/{table_id}/duplicate":{"post":{"summary":"Duplicate a table","description":"Duplicate a table structure: its fields and views. Records are not copied. Not available for system tables.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateTableSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DuplicateTableSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableSchema"}}}}}}},"/orgs/{org_id}/tables/{table_id}/fields":{"get":{"summary":"List table fields","description":"List the fields defined on a table, ordered by position.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableFieldSchema"}}}}}}},"post":{"summary":"Create a table field","description":"Create a new field on a table. Pass `before` / `after` (a sibling field key) to slot it at a global position; omit both to append.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTableFieldSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateTableFieldSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableFieldSchema"}}}}}}},"/orgs/{org_id}/tables/{table_id}/fields/move":{"post":{"summary":"Reorder a table field","description":"Move a field to a new global position. Pass `field_id` for the field being moved and `after` / `before` for the neighbor field key. Resequences the table and returns the updated field.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveTableFieldSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MoveTableFieldSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableFieldSchema"}}}}}}},"/orgs/{org_id}/tables/{table_id}/fields/{field_id}":{"get":{"summary":"Get a table field","description":"Get a single field by id.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Field ID","name":"field_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableFieldSchema"}}}}}},"patch":{"summary":"Update a table field","description":"Update a field. `type` and `key` can both be changed. Changing the type preserves existing values in place (they go dormant in their original column and return if the type is reverted); same-storage types reuse the value directly. System fields stay immutable.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Field ID","name":"field_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTableFieldSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateTableFieldSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableFieldSchema"}}}}}},"delete":{"summary":"Delete a table field","description":"Permanently delete a field. Cascades all values. Deleting the display field promotes the first available field, or clears it.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Field ID","name":"field_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/tables/{table_id}/records/export":{"get":{"summary":"Export records","description":"Export a table's records as a CSV file. Reflects the same `status` and `search` filters as the list endpoint. Synchronous and capped — over the limit the request is rejected with `EXPORT/OVER_SYNC_LIMIT`.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"$ref":"#/components/schemas/TableStatusSchema"},"required":false,"description":"Filter by visibility. `ACTIVE` excludes archived (default), `ARCHIVED` returns only archived, `ALL` returns both.","name":"status","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Restrict the export to records matching this search."},"required":false,"description":"Restrict the export to records matching this search.","name":"search","in":"query"},{"schema":{"type":"string","enum":["csv"],"description":"Export format. Only `csv` is currently supported."},"required":false,"description":"Export format. Only `csv` is currently supported.","name":"format","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/tables/{table_id}/records/import":{"post":{"summary":"Import records","description":"Import records from a CSV or XLSX file. Headers map to field keys (override per column with `mapping`). Synchronous and capped — over the limit the request is rejected with `IMPORT/OVER_SYNC_LIMIT`. Partial success: valid rows commit, failed rows are returned per row.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTableRecordsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImportTableRecordsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTableRecordsResultSchema"}}}}}}},"/orgs/{org_id}/tables/{table_id}/records":{"get":{"summary":"List records","description":"List the records in a table.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"$ref":"#/components/schemas/TableStatusSchema"},"required":false,"description":"Filter by visibility. `ACTIVE` excludes archived (default), `ARCHIVED` returns only archived, `ALL` returns both.","name":"status","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search records by display-field value."},"required":false,"description":"Search records by display-field value.","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableRecordSchema"}}}}}}},"post":{"summary":"Create a record","description":"Create a new record in a table.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTableRecordSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateTableRecordSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRecordSchema"}}}}}}},"/orgs/{org_id}/tables/{table_id}/records/bulk":{"post":{"summary":"Bulk record operations","description":"Apply a batch of create / patch / delete operations in a single request.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTableRecordsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BulkTableRecordsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"number"},"updated":{"type":"number"},"deleted":{"type":"number"}},"required":["created","updated","deleted"]}}}}}}},"/orgs/{org_id}/tables/{table_id}/records/values/bulk":{"post":{"summary":"Bulk update record values","description":"Update individual field values across many existing records in one request. Update-only: unknown records are reported in `failed`, never created.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateTableRecordValuesSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BulkUpdateTableRecordValuesSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"array","items":{"type":"string"}},"failed":{"type":"array","items":{"type":"object","properties":{"record_id":{"type":"string"},"error":{"type":"string"}},"required":["record_id","error"]}}},"required":["updated","failed"]}}}}}}},"/orgs/{org_id}/records":{"get":{"summary":"List org records","description":"List records across every custom table in the org. Primarily used to browse archived records org-wide. Pass `status=ARCHIVED` for the archive view.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"$ref":"#/components/schemas/TableStatusSchema"},"required":false,"description":"Filter by visibility. `ACTIVE` excludes archived (default), `ARCHIVED` returns only archived, `ALL` returns both.","name":"status","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search records by display-field value."},"required":false,"description":"Search records by display-field value.","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableRecordSchema"}}}}}}}},"/orgs/{org_id}/records/{record_id}":{"get":{"summary":"Get a record","description":"Get a single record by id. The table is resolved from the record and asserted to belong to this org.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRecordSchema"}}}}}},"patch":{"summary":"Update a record","description":"Update record values and/or archived flag.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTableRecordSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateTableRecordSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRecordSchema"}}}}}},"delete":{"summary":"Delete a record","description":"Permanently delete a record. Blocked if referenced by restrict-mode fields; cascades referenced rows on cascade-mode fields.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/records/{record_id}/fields/{field_id_or_key}":{"patch":{"summary":"Set a single record field value","description":"Upsert one field value on a record. The path accepts an encoded field id or the field key.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Encoded field ID or field key","name":"field_id_or_key","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"value":{}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRecordSchema"}}}}}}},"/orgs/{org_id}/tables/{table_id}/records/{record_id}/duplicate":{"post":{"summary":"Duplicate a record","description":"Duplicate a record in a table. Unique-field values are not copied (left empty on the duplicate). Not available for system tables.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateTableRecordSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DuplicateTableRecordSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRecordSchema"}}}}}}},"/orgs/{org_id}/records/{record_id}/comments":{"get":{"summary":"List record comments","description":"Retrieve all comments for a record, sorted by creation date (newest first). Contacts- and conversations-table records resolve to the underlying contact.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableRecordCommentSchema"}}}}}}},"post":{"summary":"Create a record comment","description":"Add a new comment to a table record.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTableRecordCommentSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateTableRecordCommentSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRecordCommentSchema"}}}}}}},"/orgs/{org_id}/records/{record_id}/comments/{activity_id}":{"get":{"summary":"Get a record comment","description":"Retrieve a specific comment by id.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Activity ID","name":"activity_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRecordCommentSchema"}}}}}},"patch":{"summary":"Update a record comment","description":"Update the content or attachments of an existing comment.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Activity ID","name":"activity_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTableRecordCommentSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateTableRecordCommentSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRecordCommentSchema"}}}}}},"delete":{"summary":"Delete a record comment","description":"Remove a comment from a record.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Activity ID","name":"activity_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/records/{record_id}/activities":{"get":{"summary":"List record activities","description":"Retrieve the activity timeline for a record, sorted by creation date (newest first). Contacts- and conversations-table records resolve to the underlying contact.","tags":["Orgs Records"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Record ID","name":"record_id","in":"path"},{"schema":{"$ref":"#/components/schemas/ActivityTypeSchema"},"required":false,"description":"Schema for the type of an activity event","name":"type","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this contact."},"required":false,"description":"Filter to activities scoped to this contact.","name":"contact_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this table."},"required":false,"description":"Filter to activities scoped to this table.","name":"table_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities scoped to this table record."},"required":false,"description":"Filter to activities scoped to this table record.","name":"record_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities performed by this user."},"required":false,"description":"Filter to activities performed by this user.","name":"actor_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities performed by this assistant."},"required":false,"description":"Filter to activities performed by this assistant.","name":"assistant_id","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Filter to activities involving this segment."},"required":false,"description":"Filter to activities involving this segment.","name":"segment_id","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivitySchema"}}}}}}}},"/orgs/{org_id}/views":{"get":{"summary":"List org views","description":"Non-archived views in the org, ordered by `position`. Pass `table_type=contacts` for the Audience tab strip, `table_type=chats` for Inbox, `table_type=custom` for user-created tables. Omit to fetch all. Per-table tab order lives under `/tables/:table_id/views`.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"$ref":"#/components/schemas/TableTypeSchema"},"required":false,"name":"table_type","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableViewSchema"}}}}}}},"post":{"summary":"Create a view","description":"Create a view on a table. `table_id` may be a regular table id or a system-table keyword (`contacts`, `chats`, `users`) — system tables are lazy-created on first interaction.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTableViewSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateTableViewSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableViewSchema"}}}}}}},"/orgs/{org_id}/views/{view_id}":{"get":{"summary":"Get a view","description":"Get a single view by id.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableViewSchema"}}}}}},"patch":{"summary":"Update a view","description":"Update a view. `sort` is re-validated against the table's field catalog when present.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTableViewSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateTableViewSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableViewSchema"}}}}}},"delete":{"summary":"Delete a view","description":"Permanently delete a view. Blocked if this is the only view on the table.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/tables/{table_id}/views":{"get":{"summary":"List table views","description":"List the views defined on a table, ordered by tab-strip `position`.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableViewSchema"}}}}}}}},"/orgs/{org_id}/tables/{table_id}/views/positions":{"patch":{"summary":"Reorder this table's tab strip","description":"Bulk-update the position of multiple views on one table in one transaction.","tags":["Orgs Tables"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Table ID","name":"table_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderTableViewsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReorderTableViewsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableViewSchema"}}}}}}}},"/orgs/{org_id}/views/{view_id}/duplicate":{"post":{"summary":"Duplicate a view","description":"Duplicate a view within the same table. The copy is appended to the tab strip and is never the default view.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateTableViewSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DuplicateTableViewSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableViewSchema"}}}}}}},"/orgs/{org_id}/views/{view_id}/fields":{"get":{"summary":"List fields available on a view","description":"Every field the view's entity exposes (built-ins + dynamic TableField rows) with its `type`, `readonly`, `sortable`, and `groupable_in` capability flags. Drives the FE's axis / sort / filter / column pickers and the inline cell editor dispatch from one payload.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ViewFieldSchema"}}}}}}}},"/orgs/{org_id}/views/{view_id}/groups":{"get":{"summary":"List groups (columns) for a view","description":"Returns the board column descriptors (enum items, boolean buckets, date / number ranges, distinct strings) plus capability flags — `reorderable_columns` enables column-header DnD, `movable_items` enables card DnD between columns (only meaningful for enum / user / boolean axes), `axis` carries the resolved field for the FE header. No pagination — bounded by `MAX_BOARD_COLUMNS`. Throws 400 for kinds that have no groups (table / calendar / timeline).","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableViewGroupsResponseSchema"}}}}}}},"/orgs/{org_id}/views/{view_id}/groups/move":{"post":{"summary":"Reorder a group (board column)","description":"Move a board column to a new position. Pass `group_key` for the column being moved and `after` / `before` for the neighbor group keys. The new full column order is persisted on `view.config.board.columns`. Returns the updated view.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveTableViewGroupSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MoveTableViewGroupSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableViewSchema"}}}}}}},"/orgs/{org_id}/views/{view_id}/items":{"get":{"summary":"List records for a view","description":"Paginated records for the view, applying its sort + per-view manual positions.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"},{"schema":{"$ref":"#/components/schemas/TableStatusSchema"},"required":false,"description":"Filter by visibility. `ACTIVE` excludes archived (default), `ARCHIVED` returns only archived, `ALL` returns both.","name":"status","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search query"},"required":false,"description":"Search query","name":"search","in":"query"},{"schema":{"type":"string","maxLength":1024,"description":"Board only — the group key whose records to return. Use a key from `GET /views/:view_id/groups` (an enum option value, or `'__unmatched__'` for the unmatched group). Omit to get the whole view ungrouped."},"required":false,"description":"Board only — the group key whose records to return. Use a key from `GET /views/:view_id/groups` (an enum option value, or `'__unmatched__'` for the unmatched group). Omit to get the whole view ungrouped.","name":"group","in":"query"},{"schema":{"type":["string","null"],"format":"date-time","description":"Calendar / Timeline — visible window start. Records whose date axis falls before this are excluded. ISO 8601."},"required":false,"description":"Calendar / Timeline — visible window start. Records whose date axis falls before this are excluded. ISO 8601.","name":"date_from","in":"query"},{"schema":{"type":["string","null"],"format":"date-time","description":"Calendar / Timeline — visible window end. Records whose date axis falls after this are excluded. ISO 8601."},"required":false,"description":"Calendar / Timeline — visible window end. Records whose date axis falls after this are excluded. ISO 8601.","name":"date_to","in":"query"},{"schema":{"type":"boolean","description":"Timeline only. Return just the records whose start-date axis is empty (the \"No date\" bucket). Takes precedence over `date_from` / `date_to`."},"required":false,"description":"Timeline only. Return just the records whose start-date axis is empty (the \"No date\" bucket). Takes precedence over `date_from` / `date_to`.","name":"date_missing","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableRecordSchema"}}}}}}}},"/orgs/{org_id}/views/{view_id}/move":{"post":{"summary":"Move an item in a view","description":"Drag-reorder an item in any view kind. Updates the item's per-view manual position between `after` and `before`. For board views, optionally set `group_value` to drag the card between columns — the runner writes the new axis value back to the row (rejected for readonly fields and for axes that can't take drop-writes, e.g. date / number ranges).","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveTableViewItemSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MoveTableViewItemSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/views/{view_id}/aggregate":{"post":{"summary":"Aggregate view records","description":"Compute count/sum/avg/min/max over the records of a view, optionally grouped, windowed and filtered. Honors the view filter on top of the spec filter.","tags":["Orgs Views"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"View ID","name":"view_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableAggregateSpecSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TableAggregateSpecSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableAggregateResultSchema"}}}}}}},"/orgs/{org_id}/pages":{"get":{"summary":"List pages","description":"List the pages defined for an org.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search pages by title or slug."},"required":false,"description":"Search pages by title or slug.","name":"search","in":"query"},{"schema":{"$ref":"#/components/schemas/PageStatusSchema"},"required":false,"description":"Filter by visibility. `ACTIVE` excludes archived (default), `ARCHIVED` returns only archived, `ALL` returns both.","name":"status","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PageSchema"}}}}}}},"post":{"summary":"Create a page","description":"Create a new page. The slug is auto-generated from the title when omitted.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePageSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreatePageSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageSchema"}}}}}}},"/orgs/{org_id}/pages/positions":{"patch":{"summary":"Reorder pages","description":"Bulk-update the sidebar position of multiple pages in one transaction.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderPagesSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReorderPagesSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PageSchema"}}}}}}}},"/orgs/{org_id}/pages/{page_ref}":{"get":{"summary":"Get a page","description":"Get a single page with its blocks, by slug or id.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Page slug or encoded page id","name":"page_ref","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageWithBlocksSchema"}}}}}},"patch":{"summary":"Update a page","description":"Update a page.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Page slug or encoded page id","name":"page_ref","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdatePageSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageSchema"}}}}}},"delete":{"summary":"Delete a page","description":"Permanently delete a page and its blocks. Child pages are promoted to roots.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Page slug or encoded page id","name":"page_ref","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/pages/{page_ref}/blocks":{"post":{"summary":"Add a block","description":"Add a block to a page. Only the type is required; data blocks can be pointed at a table or view later.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Page slug or encoded page id","name":"page_ref","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePageBlockSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreatePageBlockSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageBlockSchema"}}}}}}},"/orgs/{org_id}/pages/{page_ref}/blocks/{block_id}":{"patch":{"summary":"Update a block","description":"Update a block config or repoint its source table or view.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Page slug or encoded page id","name":"page_ref","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Block ID","name":"block_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageBlockSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdatePageBlockSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageBlockSchema"}}}}}},"delete":{"summary":"Remove a block","description":"Permanently remove a block from its page.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Page slug or encoded page id","name":"page_ref","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Block ID","name":"block_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/pages/{page_ref}/blocks/{block_id}/move":{"post":{"summary":"Move a block","description":"Reposition a block between two neighbors on its page.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Page slug or encoded page id","name":"page_ref","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Block ID","name":"block_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovePageBlockSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MovePageBlockSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageBlockSchema"}}}}}}},"/orgs/{org_id}/pages/{page_ref}/blocks/{block_id}/data":{"get":{"summary":"Get block data","description":"Compute a stat or chart block from its stored config, validated against the live table fields. Windows resolve to real dates at query time.","tags":["Orgs Pages"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Page slug or encoded page id","name":"page_ref","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Block ID","name":"block_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableAggregateResultSchema"}}}}}}},"/orgs/{org_id}/broadcasts":{"get":{"summary":"Get Broadcasts","description":"Get a list of broadcasts for a specific org.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"$ref":"#/components/schemas/BroadcastsTypeSchema"},"required":false,"description":"The type of the broadcasts","name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/BroadcastsStatusSchema"},"required":false,"description":"The status of the broadcasts","name":"status","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search query"},"required":false,"description":"Search query","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastSchema"}}}}}}},"post":{"summary":"Create a Broadcast","description":"Create a new broadcast for the organization.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBroadcastSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateBroadcastSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSchema"}}}}}}},"/orgs/{org_id}/broadcasts/recipients":{"get":{"summary":"Get Org Broadcast Recipients","description":"Get recipients for a specific org.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"$ref":"#/components/schemas/BroadcastRecipientsStatusSchema"},"required":false,"description":"The status of the broadcast recipients","name":"status","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_skipped","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_failed","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_bounced","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_sent","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_delivered","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_complained","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_unsubscribed","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_opened","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_played","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_clicked","in":"query"},{"schema":{"type":"string"},"required":false,"name":"clicked_link","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error_reason","in":"query"},{"schema":{"type":"string"},"required":false,"name":"channel_type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"contact_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryBroadcastRecipientsSortFieldSchema"},"required":false,"description":"Field to sort broadcast recipients by","name":"sort_field","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryBroadcastRecipientsSortDirectionSchema"},"required":false,"description":"Direction to sort broadcast recipients by","name":"sort_direction","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastRecipientSchema"}}}}}}}},"/orgs/{org_id}/broadcasts/interactions":{"get":{"summary":"Get Broadcasts Interactions","description":"Get a list of interactions for a specific broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"broadcast_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"contact_id","in":"query"},{"schema":{"$ref":"#/components/schemas/BroadcastRecipientInteractionTypeSchema"},"required":false,"description":"The type of the broadcast recipient interaction","name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"value","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastRecipientInteractionSchema"}}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}":{"get":{"summary":"Get a Broadcast","description":"Get a specific broadcast by its ID.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSchema"}}}}}},"patch":{"summary":"Update a Broadcast","description":"Update a specific broadcast by its ID. Only draft broadcasts can be updated.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSchema"}}}}}},"delete":{"summary":"Delete a Broadcast","description":"Delete a broadcast. Cannot delete broadcasts that are currently sending.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/send/test":{"post":{"summary":"Send a Broadcast Test","description":"Send a broadcast test. Can only send tests for broadcasts in DRAFT, CANCELLED or FAILED status.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBroadcastTestSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SendBroadcastTestSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBroadcastTestSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/duplicate":{"post":{"summary":"Duplicate a Broadcast","description":"Duplicate a broadcast including its segments and templates. The new broadcast will be in DRAFT status.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateBroadcastSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DuplicateBroadcastSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/templates":{"get":{"summary":"Get Broadcast Templates","description":"Get all templates for a specific broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastTemplateSchema"}}}}}}},"post":{"summary":"Create a Broadcast Template","description":"Create a new template for a broadcast. The broadcast must be in DRAFT status.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBroadcastTemplateSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateBroadcastTemplateSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastTemplateSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/templates/{template_id}":{"get":{"summary":"Get a Broadcast Template","description":"Get a specific template by its ID.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Template ID","name":"template_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastTemplateSchema"}}}}}},"patch":{"summary":"Update a Broadcast Template","description":"Update an existing template. The broadcast must be in DRAFT status.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Template ID","name":"template_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastTemplateSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastTemplateSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastTemplateSchema"}}}}}},"delete":{"summary":"Delete a Broadcast Template","description":"Delete a template. The broadcast must be in DRAFT status. Templates cannot be deleted after a broadcast starts.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Template ID","name":"template_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/fields/entries":{"get":{"summary":"Get Broadcast Field Entries","description":"List field entries for a broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastFieldEntrySchema"}}}}}}},"patch":{"summary":"Update Broadcast Field Entries","description":"Update field entries for broadcast recipients. Replaces any existing entries for this broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastFieldEntriesSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastFieldEntriesSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastFieldEntriesResultSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/fields/entries/dry":{"patch":{"summary":"Dry Run Update Broadcast Field Entries","description":"Dry run to classify entries as valid or invalid without importing anything.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastFieldEntriesSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastFieldEntriesSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastFieldEntriesDryRunSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/fields":{"get":{"summary":"Get Broadcast Fields","description":"List all fields for a broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastFieldSchema"}}}}}}},"post":{"summary":"Create Broadcast Field","description":"Create a new field for a broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBroadcastFieldSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateBroadcastFieldSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastFieldSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/fields/{field_id}":{"get":{"summary":"Get Broadcast Field","description":"Get a specific field for a broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Field ID","name":"field_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastFieldSchema"}}}}}},"patch":{"summary":"Update Broadcast Field","description":"Update a specific field for a broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Field ID","name":"field_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastFieldSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastFieldSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastFieldSchema"}}}}}},"delete":{"summary":"Delete Broadcast Field","description":"Delete a field and all its entries from a broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Field ID","name":"field_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/schedule":{"post":{"summary":"Schedule a Marketing Broadcast","description":"Queue a marketing broadcast for delivery. Fires immediately when the broadcast has no scheduled_at, otherwise waits for the scheduled time. Can only be called on broadcasts in DRAFT, CANCELLED or FAILED status.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/cancel":{"post":{"summary":"Cancel a Broadcast","description":"Cancel a broadcast, returning it to DRAFT so it can be edited and sent again. Can only cancel broadcasts in SCHEDULED or SENDING status. Cancelling a live send keeps the messages already delivered and discards the unsent remainder; a later send skips every contact that already received it.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/recipients":{"get":{"summary":"Get Broadcast Recipients","description":"Get recipients for a specific broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"$ref":"#/components/schemas/BroadcastRecipientsStatusSchema"},"required":false,"description":"The status of the broadcast recipients","name":"status","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_skipped","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_failed","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_bounced","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_sent","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_delivered","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_complained","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_unsubscribed","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_opened","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_played","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"is_clicked","in":"query"},{"schema":{"type":"string"},"required":false,"name":"clicked_link","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error_reason","in":"query"},{"schema":{"type":"string"},"required":false,"name":"channel_type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"contact_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryBroadcastRecipientsSortFieldSchema"},"required":false,"description":"Field to sort broadcast recipients by","name":"sort_field","in":"query"},{"schema":{"$ref":"#/components/schemas/QueryBroadcastRecipientsSortDirectionSchema"},"required":false,"description":"Direction to sort broadcast recipients by","name":"sort_direction","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastRecipientSchema"}}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/recipients/import":{"get":{"summary":"Get Imported Broadcast Recipients Count","description":"How many contacts were imported straight into this broadcast's audience.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportedBroadcastRecipientsCountSchema"}}}}}},"post":{"summary":"Import Broadcast Recipients","description":"Add contacts to a marketing broadcast's audience. They are resolved into recipients when the broadcast sends.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBroadcastRecipientsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImportBroadcastRecipientsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBroadcastRecipientsResultSchema"}}}}}},"delete":{"summary":"Remove Imported Broadcast Recipients","description":"Remove imported contacts from a broadcast's audience. Omit contact_ids to remove all of them.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteBroadcastRecipientsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DeleteBroadcastRecipientsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteBroadcastRecipientsResultSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/recipients/audience":{"get":{"summary":"List Broadcast Audience","description":"The contacts this broadcast sends to, resolved from everyone, its segments and the contacts imported into it.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search imported contacts by name, email or phone"},"required":false,"description":"Search imported contacts by name, email or phone","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactSchema"}}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/recipients/import/contacts":{"get":{"summary":"List Imported Broadcast Contacts","description":"The contacts imported straight into this broadcast's audience.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search imported contacts by name, email or phone"},"required":false,"description":"Search imported contacts by name, email or phone","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactSchema"}}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/recipients/retry":{"post":{"summary":"Retry Failed Broadcast Recipients","description":"Put failed recipients back on the send queue. Omit recipient_ids to retry every failed recipient.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryBroadcastRecipientsSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/RetryBroadcastRecipientsSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryBroadcastRecipientsResultSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/recipients/counts":{"get":{"summary":"Get Broadcast Channel Recipient Counts","description":"Get recipient counts per channel type for a specific broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastRecipientCountSchema"}}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/recipients/{recipient_id}":{"get":{"summary":"Get Broadcast Recipient","description":"Get a specific recipient for a broadcast.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Recipient ID","name":"recipient_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastRecipientSchema"}}}}}},"delete":{"summary":"Delete Broadcast Recipient","description":"Remove a recipient that has not reached anyone yet — imported, queued, failed or skipped.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Recipient ID","name":"recipient_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/send":{"post":{"summary":"Send a Transactional Broadcast","description":"Fire a transactional broadcast for a single recipient. Fans out across the broadcast templates: one BroadcastRecipient row is created per template (sent or skipped).","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerBroadcastSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TriggerBroadcastSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerBroadcastResponseSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/activate":{"post":{"summary":"Activate a Transactional Broadcast","description":"Activate a transactional broadcast so it can accept triggers. Allowed from DRAFT or PAUSED. Requires at least one template.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSchema"}}}}}}},"/orgs/{org_id}/broadcasts/{broadcast_id}/pause":{"post":{"summary":"Pause a Transactional Broadcast","description":"Pause an active transactional broadcast. Triggers are rejected until the broadcast is activated again. Configuration is preserved.","tags":["Orgs Broadcasts"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"Org ID","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"Broadcast ID","name":"broadcast_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSchema"}}}}}}},"/orgs/{org_id}/analytics/broadcasts":{"get":{"summary":"Get Broadcast Analytics","description":"Get aggregated delivery and engagement stats per broadcast.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastAnalyticsItemSchema"}}}}}}}},"/orgs/{org_id}/analytics/broadcasts/overview":{"get":{"summary":"Get Broadcasts Overview","description":"Org-wide broadcast analytics for a period: delivery funnel, volume over time, channel and failure breakdowns, and per-broadcast performance.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"$ref":"#/components/schemas/MetricsIntervalSchema"},"required":false,"name":"interval","in":"query"},{"schema":{"$ref":"#/components/schemas/TimezoneValueSchema"},"required":false,"description":"IANA timezone identifier (e.g. America/New_York)","name":"timezone","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastsOverviewSchema"}}}}}}},"/orgs/{org_id}/analytics/broadcasts/{broadcast_id}":{"get":{"summary":"Get Broadcast Detail Analytics","description":"Funnel, per-day engagement series, channels and failure reasons for one broadcast.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"broadcast_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"$ref":"#/components/schemas/MetricsIntervalSchema"},"required":false,"name":"interval","in":"query"},{"schema":{"$ref":"#/components/schemas/TimezoneValueSchema"},"required":false,"description":"IANA timezone identifier (e.g. America/New_York)","name":"timezone","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastDetailAnalyticsSchema"}}}}}}},"/orgs/{org_id}/analytics/workflows":{"get":{"summary":"Get Workflow Analytics","description":"Get aggregated run stats per workflow.","tags":["Orgs Analytics"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"from_date","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"to_date","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowAnalyticsItemSchema"}}}}}}}},"/orgs/{org_id}/emails/identities":{"get":{"summary":"Get Email Identities","description":"Get a list of email identities for a specific org.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search identities by email or name"},"required":false,"description":"Search identities by email or name","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailIdentitySchema"}}}}}}},"post":{"summary":"Create an Email Identity","description":"Add a new email identity for the organization.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailIdentitySchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateEmailIdentitySchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailIdentitySchema"}}}}}}},"/orgs/{org_id}/emails/identities/{identity_id}":{"get":{"summary":"Get an Email Identity","description":"Get a specific email identity by its ID.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the email identity","name":"identity_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailIdentitySchema"}}}}}},"patch":{"summary":"Update an Email Identity","description":"Update the name or default status of an email identity.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the email identity","name":"identity_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailIdentitySchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateEmailIdentitySchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailIdentitySchema"}}}}}},"delete":{"summary":"Delete an Email Identity","description":"Delete an email identity and remove the identity from SES.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the email identity","name":"identity_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/emails/identities/{identity_id}/verify":{"post":{"summary":"Verify an Email Identity","description":"Check the current verification status of an email identity.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the email identity","name":"identity_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailIdentitySchema"}}}}}}},"/orgs/{org_id}/emails/identities/{identity_id}/resend":{"post":{"summary":"Resend Verification Email","description":"Resend the verification email for a pending identity.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the email identity","name":"identity_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/emails/domains":{"get":{"summary":"Get Email Domains","description":"Get a list of email domains for a specific org.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":256,"description":"Search domains by name"},"required":false,"description":"Search domains by name","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/EmailDomainSchema"},{"description":"An email domain with DKIM verification"}]}}}}}}},"post":{"summary":"Add an Email Domain","description":"Add a new email domain for DKIM verification. Returns the DKIM TXT record to add to DNS.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailDomainSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateEmailDomainSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EmailDomainSchema"},{"description":"An email domain with DKIM verification"}]}}}}}}},"/orgs/{org_id}/emails/domains/{domain_id}":{"get":{"summary":"Get an Email Domain","description":"Get a specific email domain by its ID.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID or domain name of the email domain","name":"domain_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EmailDomainSchema"},{"description":"An email domain with DKIM verification"}]}}}}}},"patch":{"summary":"Update Email Domain Settings","description":"Update tracking configuration for an email domain.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID or domain name of the email domain","name":"domain_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailDomainSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateEmailDomainSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EmailDomainSchema"},{"description":"An email domain with DKIM verification"}]}}}}}},"delete":{"summary":"Delete an Email Domain","description":"Delete an email domain and remove the identity from SES. Senders linked to this domain will be unlinked.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID or domain name of the email domain","name":"domain_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/emails/domains/{domain_id}/verify":{"post":{"summary":"Verify an Email Domain","description":"Check the current DKIM verification status of an email domain.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID or domain name of the email domain","name":"domain_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EmailDomainSchema"},{"description":"An email domain with DKIM verification"}]}}}}}}},"/orgs/{org_id}/emails/domains/{domain_id}/provider":{"get":{"summary":"Get DNS Provider","description":"Detect the DNS provider for a domain via NS lookup. Returns provider info including logo, DNS settings URL, and auto-configure URL when supported.","tags":["Orgs Emails"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID or domain name of the email domain","name":"domain_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainProviderSchema"}}}}}}},"/connections/actions":{"get":{"summary":"Get the actions for a connection","description":"Get the actions for a connection","tags":["Connections Actions"],"responses":{"200":{"description":"The actions for a connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionActionsSchema"}}}}}}},"/orgs/{org_id}/connections/actions/options":{"post":{"summary":"Get the options for an action","description":"Returns searchable, paginated options for a connection action's fields, so you can populate dropdowns and selectors as the user configures it.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":4096,"description":"Search query"},"required":false,"description":"Search query","name":"search","in":"query"},{"schema":{"type":"string","maxLength":4096,"description":"Filter by a single value"},"required":false,"description":"Filter by a single value","name":"value","in":"query"},{"schema":{"type":"array","items":{"type":"string","maxLength":4096},"maxItems":50,"description":"Filter by multiple values"},"required":false,"description":"Filter by multiple values","name":"values","in":"query"},{"schema":{"type":"string","maxLength":16,"description":"Language code for translated labels","example":"en"},"required":false,"description":"Language code for translated labels","name":"lang","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema","oneOf":[{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema"}]}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema","oneOf":[{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema"}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FieldEnumItemSchema"}}}}}}}},"/orgs/{org_id}/connections/actions/fields":{"post":{"summary":"Get the fields for an action","description":"Returns the input field schema for a connection action, so your integration can dynamically render the form used to configure that action.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string","maxLength":16,"description":"Language code for translated labels","example":"en"},"required":false,"description":"Language code for translated labels","name":"lang","in":"query"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema","oneOf":[{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema"}]}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema","oneOf":[{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema"}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldsSchema"}}}}}}},"/orgs/{org_id}/connections/actions/tools":{"post":{"summary":"Get the live tools of a dynamic action","description":"Returns the tool catalog a dynamic action (an MCP server, an OpenAPI spec) exposes for the given input, minus the excluded tools, with the time it was last loaded.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema","oneOf":[{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema"}]}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema","oneOf":[{"$ref":"#/components/schemas/ConnectionActionInterfaceSchema"}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionActionDynamicToolsSchema"}}}}}}},"/orgs/{org_id}/connections":{"get":{"summary":"Get Org Connections","description":"Retrieve a list of connections for the specified app.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"allOf":[{"$ref":"#/components/schemas/ConnectionTypeSchema"},{"description":"Filter connections by type"}]},"required":false,"description":"Filter connections by type","name":"type","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"A list of connections.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionSchema"}}}}}}},"post":{"summary":"Create User Connection","description":"Create a new connection for the specified app.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org_id","in":"path"}],"requestBody":{"description":"The details of the connection to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateConnectionSchema"}}}},"responses":{"200":{"description":"The newly created connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionSchema"}}}}}}},"/orgs/{org_id}/connections/{connection_id}":{"get":{"summary":"Get a Connection","description":"Retrieve details of a specific connection.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"}],"responses":{"200":{"description":"The details of the connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionSchema"}}}}}},"patch":{"summary":"Update a Connection","description":"Update the details of an existing connection.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"}],"requestBody":{"description":"The updated details of the connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectionSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateConnectionSchema"}}}},"responses":{"200":{"description":"The updated connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionSchema"}}}}}},"delete":{"summary":"Delete a Connection","description":"Delete an existing connection.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"}],"responses":{"200":{"description":"No content.","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/templates":{"get":{"summary":"List WhatsApp templates","description":"List WhatsApp message templates (all statuses) for a connection, read through a Redis cache.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"waba_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"phone_number_id","in":"query"},{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateStatusSchema"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search query"},"required":false,"description":"Search query","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateSchema"}}}}}}},"post":{"summary":"Create a WhatsApp template","description":"Create a custom WhatsApp message template and submit it to Meta for review.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWhatsAppTemplateSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateWhatsAppTemplateSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateSchema"}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh":{"post":{"summary":"Refresh WhatsApp templates","description":"Bust the cache and refetch templates from Meta.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"waba_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"phone_number_id","in":"query"},{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateStatusSchema"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search query"},"required":false,"description":"Search query","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateSchema"}}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/library":{"get":{"summary":"Browse the WhatsApp template library","description":"Browse Meta's pre-approved template library (read through a Redis cache).","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string","maxLength":32},"required":true,"name":"language","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string"},"required":false,"name":"topic","in":"query"},{"schema":{"type":"string"},"required":false,"name":"usecase","in":"query"},{"schema":{"type":"string"},"required":false,"name":"industry","in":"query"},{"schema":{"type":"string","maxLength":256,"description":"Search query"},"required":false,"description":"Search query","name":"search","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateLibraryEntrySchema"}}}}}}},"post":{"summary":"Create a WhatsApp template from the library","description":"Create a message template from an entry in Meta's pre-approved library. Submits the template to Meta for review.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWhatsAppTemplateFromLibrarySchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateWhatsAppTemplateFromLibrarySchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateSchema"}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/{template_id}":{"get":{"summary":"Get a WhatsApp template","description":"Fetch a single WhatsApp template by id (read-through cache).","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the template","name":"template_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateSchema"}}}}}},"patch":{"summary":"Edit a WhatsApp template","description":"Edit an existing WhatsApp message template. Category and component changes may require Meta re-approval.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the template","name":"template_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditWhatsAppTemplateSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/EditWhatsAppTemplateSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateSchema"}}}}}},"delete":{"summary":"Delete a WhatsApp template","description":"Delete a WhatsApp message template from the WABA. Meta requires `name` (and `language` for cache invalidation) in the query alongside the template id.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the template","name":"template_id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"name","in":"query"},{"schema":{"type":"string","maxLength":32},"required":true,"name":"language","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"waba_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/flows":{"get":{"summary":"List WhatsApp Flows","description":"List the WhatsApp Flows of a connection's WABA (read through a Redis cache). Flows are authored in Meta's Flow builder.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"waba_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"phone_number_id","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppFlowSchema"}}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/flows/{flow_id}/screens":{"get":{"summary":"List the screens of a WhatsApp Flow","description":"The screens declared in the flow's JSON, for picking a flow button's entry screen (read through a Redis cache).","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the flow","name":"flow_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppFlowScreenSchema"}}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/catalogs":{"get":{"summary":"List WhatsApp product catalogs","description":"List the product catalogs connected to a connection's WABA (read through a Redis cache). Catalogs are authored in Meta's Commerce Manager.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"waba_id","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"phone_number_id","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppCatalogSchema"}}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/profile":{"get":{"summary":"Get the WhatsApp business profile","description":"Fetch the WhatsApp business profile of a phone number, read through a Redis cache.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"phone_number_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppBusinessProfileSchema"}}}}}},"patch":{"summary":"Update the WhatsApp business profile","description":"Update profile fields on WhatsApp; the profile picture URL is resolved to a media handle server-side.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWhatsAppBusinessProfileSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateWhatsAppBusinessProfileSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppBusinessProfileSchema"}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers":{"get":{"summary":"List WhatsApp phone numbers","description":"List the phone numbers on the WhatsApp Business accounts of a connection, read through a Redis cache.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppPhoneNumberSchema"}}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/display-name":{"post":{"summary":"Request a WhatsApp display name change","description":"Submit a new display name for WhatsApp review; the approval webhook applies it automatically.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the WhatsApp phone number","name":"phone_number_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestWhatsAppDisplayNameSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/RequestWhatsAppDisplayNameSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppPhoneNumberSchema"}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/deregister":{"post":{"summary":"Deregister a WhatsApp phone number","description":"Deregister the phone number from the Cloud API; it stays on the WhatsApp Business account and can be registered again.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the WhatsApp phone number","name":"phone_number_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppPhoneNumberSchema"}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/account":{"get":{"summary":"Get the WhatsApp Business account overview","description":"Account info, health, messaging limit, billing state and recent account activity, read through a Redis cache.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"waba_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppAccountSchema"}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/qr-codes":{"get":{"summary":"List WhatsApp QR codes","description":"List the QR codes and prefilled messages of a WhatsApp phone number, read through a Redis cache.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the WhatsApp phone number","name":"phone_number_id","in":"path"},{"schema":{"type":"number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Number of items to take","name":"take","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Next page token (Only used on special endpoints)","name":"next","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppQrCodeSchema"}}}}}}},"post":{"summary":"Create a WhatsApp QR code","description":"Create a QR code with a prefilled message on the WhatsApp phone number.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the WhatsApp phone number","name":"phone_number_id","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveWhatsAppQrCodeSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SaveWhatsAppQrCodeSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppQrCodeSchema"}}}}}}},"/orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/qr-codes/{code}":{"patch":{"summary":"Update a WhatsApp QR code","description":"Update the prefilled message of a WhatsApp QR code.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the WhatsApp phone number","name":"phone_number_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The QR code identifier","name":"code","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveWhatsAppQrCodeSchema"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SaveWhatsAppQrCodeSchema"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppQrCodeSchema"}}}}}},"delete":{"summary":"Delete a WhatsApp QR code","description":"Delete a QR code from the WhatsApp phone number.","tags":["Orgs Connections"],"parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the org","name":"org_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the connection","name":"connection_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the WhatsApp phone number","name":"phone_number_id","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The QR code identifier","name":"code","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}}},"webhooks":{}}