---
title: "Subscribe to inbox events"
method: GET
path: "/orgs/inbox/ws"
tags: ["Inbox"]
---

# Subscribe to inbox events

`GET /orgs/inbox/ws`

## Request

- Base URL: `https://api.useinvent.com`
- URL: `https://api.useinvent.com/orgs/inbox/ws`
- Auth: HTTP bearer

Open a WebSocket that streams the chat events of the org inbox. See the [WebSockets guide](/api-reference/getting-started/websockets).

## Response `200`

- union
  - ChatCreateEventSchema: Event emitted when a chat is created
    - `type` 'create', required
    - `data` ChatSchema, required
      - `id` string, required
      - `title` string, nullable, required: The title of the chat
      - `model` string, required: The model used for the chat
      - `tools` ModelToolSchema[]: The tools available in the chat
        - `name` string, required: Name of the tool to called, can be a step key or custom tool
        - `display_name` string: Display name of the tool, can be used in UI
        - `action_name` string: The original name of the action this tool is based on, used for connection-based tools
        - `description` string: Description of the tool
        - `icon` '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': The name of the icon to use in the UI
        - `icon_url` string: URL of the icon to use in the UI
        - `connection_id` string: For connection-bound tools (action runners), the id of the connection this tool executes against
        - `parameters` object: Parameters for the tool call using an input schema definition
        - `input` InputValuesSchema: For connection-bound tools, locked input values (e.g. a selected resource) that drive dynamic fields and are injected at execution
        - `definitions` DynamicFieldsSchema[]: For connection-bound tools, dynamic field schemas loaded for the selected resource, merged into the parameters at build time
          - `path` string, required
          - `definition` FieldsSchema, required: The definition of the field schemas
        - `enabled` boolean: For tools that are enabled by default, set to false to opt out and disable them for this chat
        - `callback` string
        - `validation` string
      - `skills` SkillLimitedSchema[]: The skills enabled in the chat
        - `id` string, required
        - `name` string, required
      - `features` ChatFeaturesSchema: Per-chat features and run settings: model features plus approval mode and org-chat tool toggles.
        - `reasoning` ModelFeatureReasoningSchema: The reasoning capability of the model.
          - `effort` 'low' | 'medium' | 'high', required: The effort level of the reasoning capability.
        - `mode` 'auto' | 'ask' | 'never': When the assistant must ask before running the action
        - `web` boolean
        - `image_generation` boolean
        - `workbench` ChatWorkbenchFeatureSchema: Workbench: run code and tools in a sandbox.
          - `enabled` boolean
          - `network` 'full' | 'limited' | 'none': Workbench outbound network: full (open), limited (package registries only), or none (offline).
      - `org_id` string
      - `members` ChatMemberSchema[], required: The members of the chat
        - `id` string, required
        - `role` 'ADMIN' | 'MEMBER', required: The role of the member in the chat
        - `user` UserPublicSchema
          - `id` string, required
          - `name` string, nullable, required
          - `avatar` string, nullable, required
        - `session` PublicSessionSchema: Data that is publicly accessible for a session
          - `id` string, required
        - `contact_channel` PublicContactChannelSchema: Schema for the public contact channel
          - `id` string, required
          - `type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp', required: The channel type
          - `user_id` string, required: The unique identifier for the contact channel, e.g Phone Number or User ID
          - `avatar` string, nullable, required: The avatar for the contact channel, e.g X Avatar URL
          - `name` string, nullable, required: The name for the contact channel, e.g Full Name
          - `username` string, nullable, required: The username for the contact channel, e.g Username
          - `email` string, email, nullable, required: The email for the contact channel, e.g Email
          - `phone` string, nullable, required: The phone number for the contact channel, e.g Phone Number
          - `country` string, nullable, required: The country code associated with the contact channel, e.g US for United States
          - `agent` string, nullable, required: The user agent associated with the contact channel
          - `ip` string, nullable, required: The IP address associated with the contact channel
          - `language` string, nullable, required: The language code associated with the contact channel, e.g en for English
          - `link` string: A link to the contact channel, e.g a link to the social media profile
          - `contact` PublicContactSchema, required: Schema for the contact
            - `id` string, required
            - `name` string, nullable, required
            - `blocked` boolean, required
            - `unsubscribed` boolean, required
            - `ai_replies` boolean, required
            - `is_admin` boolean, required
            - `segments` SegmentLimitedSchema[]
              - …
        - `agent` AgentLimitedSchema: A reduced agent reference
          - `id` string, required
          - `name` string, required
          - `icon` union, required: A picked icon or emoji. Null = the generated face, unless a custom image is set.
            - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
            - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
          - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: The identity color, reused by every surface that carries the agent
          - `shape` 'square' | 'round' | 'pebble' | 'slate' | 'beam' | 'bloom' | 'arch' | 'clave', required: The silhouette of a generated agent face
          - `avatar_url` string, nullable, required: The agent as an image, either the custom picture or the PNG snapshot of its face or icon
        - `seen_at` string, date-time, nullable
      - `temporary` boolean, required: Whether the chat is temporary and would be deleted after 24 hours of last activity
      - `visibility` 'PRIVATE' | 'PUBLIC_READ' | 'PUBLIC_WRITE', required: The visibility of the chat
      - `pinned` boolean, required: Whether the chat is pinned in the user interface
      - `status` 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED', required: The status of the chat
      - `agent` object: The agent whose run this chat is
        - `id` string, required
        - `name` string, required
        - `icon` union, required: A picked icon or emoji. Null = the generated face, unless a custom image is set.
          - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
          - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
        - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: The identity color, reused by every surface that carries the agent
        - `shape` 'square' | 'round' | 'pebble' | 'slate' | 'beam' | 'bloom' | 'arch' | 'clave', required: The silhouette of a generated agent face
        - `avatar_url` string, nullable, required: The agent as an image, either the custom picture or the PNG snapshot of its face or icon
      - `routine` RoutineLimitedSchema: The routine whose fire started this chat
        - `id` string, required
        - `name` string, nullable, required
        - `type` 'SCHEDULED' | 'AUTOPILOT' | 'WEBHOOK' | 'TRIGGER', required: How the routine fires: SCHEDULED = cron · AUTOPILOT = the run schedules itself · WEBHOOK = fired by its URL · TRIGGER = fired by an event of a connected app
        - `trigger_action` string, nullable, required: Trigger routines: the trigger that fires it, e.g. 'GMAIL:ON_NEW_EMAIL'
      - `activity` ActivityLimitedSchema: Compact activity reference: its id and the contact or custom-table record it was written on, drawn like their mention chips
        - `id` string, required
        - `contact` ModelReferenceSchema: An entity tagged by name in a text: what an `@Name` in it points at. The client sends kind, id and name; the API validates the id and fills the visuals
          - `kind` 'agent' | 'routine' | 'contact' | 'user' | 'skill' | 'record' | 'table' | 'assistant', required: The kind of entity a reference points at
          - `id` string, required: Public id of the referenced entity
          - `name` string, required: Display name, snapshotted when the text was written
          - `icon` union: The entity's own icon or emoji, filled on write. Null = the default of its kind
            - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
            - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
          - `icon_url` string, uri, nullable: The entity's image, filled on write, when it has one
          - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral' | 'null', nullable: The entity's tint, filled on write, when it has one
        - `record` ModelReferenceSchema: An entity tagged by name in a text: what an `@Name` in it points at. The client sends kind, id and name; the API validates the id and fills the visuals
          - `kind` 'agent' | 'routine' | 'contact' | 'user' | 'skill' | 'record' | 'table' | 'assistant', required: The kind of entity a reference points at
          - `id` string, required: Public id of the referenced entity
          - `name` string, required: Display name, snapshotted when the text was written
          - `icon` union: The entity's own icon or emoji, filled on write. Null = the default of its kind
            - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
            - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
          - `icon_url` string, uri, nullable: The entity's image, filled on write, when it has one
          - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral' | 'null', nullable: The entity's tint, filled on write, when it has one
      - `state` ChatStateSchema: Schema for the chat state
        - `id` string, required
        - `state` 'OPEN' | 'CLOSED', required: The state status of the chat
        - `channel_type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp', required: The channel type
        - `assistant` PublicAssistantSchema: Schema for a public assistant
          - `id` string, required
          - `name` string, required
          - `avatar_url` string, nullable, required
          - `deleted` boolean, required
          - `config` PublicAssistantConfigSchema, required: Schema for a public assistant configuration
            - `conversation` PublicAssistantConversationConfigSchema, required: Schema for a public assistant conversation configuration
              - …
            - `widget` PublicAssistantWidgetConfigSchema, required: Widget configuration with channel references resolved to links
              - …
        - `assistant_channel` PublicAssistantChannelSchema: Schema for a public assistant channel
          - `id` string, required
          - `enabled` boolean, required
          - `has_connection` boolean, required
          - `updates_outside_window` boolean: The channel delivers updates after the messaging window closed (WhatsApp Direct Send) and the provider has not rejected one for this connection yet
          - `identity` string, nullable, required: The channel identity messages are exchanged through, e.g the WhatsApp phone number
        - `conversation_id` string, required: The ID of the conversation associated with the chat
        - `assigned_user` UserLimitedSchema: The assigned user for the conversation
          - `id` string, required
          - `name` string, nullable, required
          - `email` string, email, required
          - `avatar` string, nullable, required
          - `seen_at` string, date-time, nullable, required
        - `assigned_at` string, date-time, nullable
        - `assistant_config` AssistantConfigSchema: Schema for the configuration of an assistant
          - `instructions` string: The instructions for the assistant: its system prompt
          - `language` 'auto' | 'en' | 'es', required: List of supported languages for the model in ISO 639-1 format or "auto"
          - `model` string, required: The model to use for the assistant
          - `conversation` AssistantConversationConfigSchema, required: Configuration options for the conversation thread of the assistant
            - `thread_mode` 'new' | 'continue', required: Whether returning users start a new conversation or continue the previous one.
            - `welcome_banner` string: Static greeting shown in the UI when a conversation starts.
            - `suggested_messages` string[]: Up to 5 suggested messages shown when a conversation starts.
            - `auto_intro_message` string: First message the assistant sends automatically when a conversation begins via API.
            - `enable_memories` boolean, required: Let the assistant store memories about the contact.
            - `enable_end_conversation_tool` boolean: Let the assistant close conversations on its own.
            - `enable_transfer_to_human_tool` boolean, required: The AI Routing switch: let the assistant hand a conversation to one of your members. Off turns routing off, whatever the routing instructions say.
            - `routing_instructions` string: 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` boolean: Let the assistant block abusive contacts.
            - `enable_ai_replies` boolean: When false the assistant is human-only: messages are received but the AI never responds.
            - `enable_auto_resolve` boolean: Automatically resolve conversations after a period of inactivity.
            - `enable_auto_follow_ups` boolean: Let the assistant follow up on conversations on its own.
            - `follow_up_instructions` string: Business rules that steer automatic follow-ups (cadence, hours, stop rules, tone).
            - `follow_ups_outside_window` boolean: After the messaging window closes, still follow up about something the contact asked for or is waiting on (WhatsApp).
            - `enable_auto_csat` boolean: Automatically score customer satisfaction when closing conversations.
            - `enable_private_chats` boolean: Enable private chats that do not appear in the inbox.
            - `enable_update_contact_tool` boolean: Let the assistant collect and update contact information.
            - `enable_transcription` boolean: Turn voice notes and videos into text, and describe what videos show, so any model understands them.
          - `widget` AssistantWidgetConfigSchema: Configuration of the embeddable web chat widget
            - `enabled` boolean: Whether the widget shows where its embed code is installed. Off hides it without removing the code.
            - `mode` 'button' | 'omnibar' | 'auto': 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.
            - `appearance` 'auto' | 'light' | 'dark': Theme of the widget: follow the visitor system or force one
            - `position` 'right' | 'left': Corner where the bubble launcher is anchored (the omnibar is always centered). A position attribute on the embed element overrides it.
            - `omnibar_minimize_desktop` boolean: Fold the omnibar into its compact centered button while visitors scroll on desktop too. On mobile viewports it always folds.
            - `hide_powered_by` boolean
            - `enable_dictation` boolean
            - `enable_file_uploads` boolean
            - `colors` AssistantWidgetColorsConfigSchema: Color overrides for the widget
              - …
            - `teaser` AssistantWidgetTeaserConfigSchema: Proactive teaser configuration for the widget. The suggested replies shown with the teaser come from conversation.suggested_messages.
              - …
            - `channels` AssistantWidgetChannelsConfigSchema: Alternative channels offered in the widget launcher menu when any are configured
              - …
          - `knowledge_scope` 'all' | 'restricted', required: Which knowledge the assistant searches: all sources, or only the ones linked to it (List/Link/Unlink Assistant Knowledge Source).
          - `timezone` string, required: IANA timezone, e.g. "America/New_York".
        - `ai_enabled` boolean, required: Whether AI is enabled for the chat
        - `admin_unseen_count` number, required: The number of unseen messages in the chat
        - `user_unseen_count` number, required: The number of unseen messages in the chat
        - `follow_up_at` string, date-time, nullable: Scheduled follow-up datetime
        - `muted_until` string, date-time, nullable: Mute expiry datetime (null = not muted)
        - `free_window_expires_at` string, date-time, nullable: 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` integer, nullable: Customer satisfaction score (1-5)
        - `last_contact_message_at` string, date-time, nullable
      - `link` string: The link to the chat in the integration
      - `shared_url` string, nullable, required: The shared URL of the chat, if it is shared
      - `last_message` ChatMessageSchema: The chat message schema
        - `id` string, required
        - `role` 'user' | 'assistant' | 'system' | 'tool' | 'event' | 'note', required: The role of the message
        - `model` string, required: The model used for the message
        - `messages` ModelMessageSchema[]: The message content
          - union
            - ModelSystemMessageSchema: System message
              - …
            - ModelAssistantMessageSchema: Assistant message
              - …
            - ModelUserMessageSchema: User message
              - …
            - ModelToolMessageSchema: Tool message
              - …
            - ModelEventMessageSchema
              - …
            - ModelNoteMessageSchema
              - …
        - `member` ChatMemberSchema: The member of the chat
          - `id` string, required
          - `role` 'ADMIN' | 'MEMBER', required: The role of the member in the chat
          - `user` UserPublicSchema
            - `id` string, required
            - `name` string, nullable, required
            - `avatar` string, nullable, required
          - `session` PublicSessionSchema: Data that is publicly accessible for a session
            - `id` string, required
          - `contact_channel` PublicContactChannelSchema: Schema for the public contact channel
            - `id` string, required
            - `type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp', required: The channel type
            - `user_id` string, required: The unique identifier for the contact channel, e.g Phone Number or User ID
            - `avatar` string, nullable, required: The avatar for the contact channel, e.g X Avatar URL
            - `name` string, nullable, required: The name for the contact channel, e.g Full Name
            - `username` string, nullable, required: The username for the contact channel, e.g Username
            - `email` string, email, nullable, required: The email for the contact channel, e.g Email
            - `phone` string, nullable, required: The phone number for the contact channel, e.g Phone Number
            - `country` string, nullable, required: The country code associated with the contact channel, e.g US for United States
            - `agent` string, nullable, required: The user agent associated with the contact channel
            - `ip` string, nullable, required: The IP address associated with the contact channel
            - `language` string, nullable, required: The language code associated with the contact channel, e.g en for English
            - `link` string: A link to the contact channel, e.g a link to the social media profile
            - `contact` PublicContactSchema, required: Schema for the contact
              - …
          - `agent` AgentLimitedSchema: A reduced agent reference
            - `id` string, required
            - `name` string, required
            - `icon` union, required: A picked icon or emoji. Null = the generated face, unless a custom image is set.
              - …
            - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: The identity color, reused by every surface that carries the agent
            - `shape` 'square' | 'round' | 'pebble' | 'slate' | 'beam' | 'bloom' | 'arch' | 'clave', required: The silhouette of a generated agent face
            - `avatar_url` string, nullable, required: The agent as an image, either the custom picture or the PNG snapshot of its face or icon
          - `seen_at` string, date-time, nullable
        - `status` 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED', required: The chat status
        - `error` string: Error message if the message failed
        - `broadcast_id` string: ID of the broadcast this message originates from
        - `is_broadcast_message` boolean: Whether this message was sent via a broadcast template
        - `channel_type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp': The channel the message arrived through, if any
        - `usage` ModelUsageSchema: The usage information for the message
          - `input_tokens` number: Number of input tokens used by the model
          - `output_tokens` number: Number of output tokens generated by the model
          - `total_tokens` number: Total number of tokens used by the model
          - `reasoning_tokens` number: Number of reasoning tokens used by the model
          - `input_tokens_cache_read` number: Number of input tokens cached read by the model
          - `input_tokens_cache_write` number: Number of input tokens cached written by the model
          - `turns` ModelUsageTurnSchema[]
            - `input_tokens` number: Number of input tokens used by the model
            - `output_tokens` number: Number of output tokens generated by the model
            - `total_tokens` number: Total number of tokens used by the model
            - `reasoning_tokens` number: Number of reasoning tokens used by the model
            - `input_tokens_cache_read` number: Number of input tokens cached read by the model
            - `input_tokens_cache_write` number: Number of input tokens cached written by the model
        - `cost` ModelUsageCostSchema: The cost of a message, at the rates it is billed at
          - `total` number, required: Amount billed for the message, in USD
          - `base` number, required: Amount at the chat's base rate, before any discount, in USD
          - `lines` ModelUsageCostLinesSchema, required: Share of the base amount per token type, in USD
            - `input` number, required
            - `output` number, required
            - `reasoning` number, required
            - `cache_read` number, required
            - `cache_write` number, required
        - `delivered_at` string, date-time, nullable: When the message was delivered to the recipient
        - `reactions` ChatMessageReactionSchema[]: Emoji reactions on the message
          - `emoji` string, required
          - `member_id` string: Reacting member; absent when the AI reacted
        - `created_at` string, date-time, nullable, required
        - `updated_at` string, date-time, nullable, required
      - `referral` union: Referral/commerce event data from Meta platforms — ads, products, orders.
        - ChatMessengerAdSchema
          - `type` 'messenger_ad', required
          - `parts` union[]
            - union
              - …
          - `ref` string
          - `ad_id` string
          - `source` string
          - `referer_uri` string
          - `ads_context_data` object
            - `ad_title` string
            - `photo_url` string
            - `video_url` string
            - `post_id` string
            - `product_id` string
        - ChatMessengerProductSchema
          - `type` 'messenger_product', required
          - `parts` union[]
            - union
              - …
          - `product` object, required
            - `id` string, required
            - `name` string
            - `image_url` string
            - `price` string
            - `description` string
            - `url` string
        - ChatMessengerProductTemplateSchema
          - `type` 'messenger_product_template', required
          - `parts` union[]
            - union
              - …
          - `products` object[], required
            - `id` string, required
            - `retailer_id` string
            - `image_url` string
            - `title` string
            - `subtitle` string
        - ChatWhatsAppAdSchema
          - `type` 'whatsapp_ad', required
          - `parts` union[]
            - union
              - …
          - `source_url` string
          - `source_id` string
          - `source_type` string
          - `headline` string
          - `body` string
          - `media_type` string
          - `image_url` string
          - `video_url` string
          - `thumbnail_url` string
          - `ctwa_clid` string
        - ChatWhatsAppProductSchema
          - `type` 'whatsapp_product', required
          - `parts` union[]
            - union
              - …
          - `catalog_id` string, required
          - `product_retailer_id` string, required
          - `name` string
          - `image_url` string
          - `price` string
          - `description` string
          - `url` string
          - `retailer_id` string
        - ChatWhatsAppOrderSchema
          - `type` 'whatsapp_order', required
          - `parts` union[]
            - union
              - …
          - `catalog_id` string, required
          - `product_items` object[], required
            - `product_retailer_id` string, required
            - `quantity` number, required
            - `item_price` number, required
            - `currency` string, required
            - `name` string
            - `image_url` string
            - `price` string
            - `description` string
            - `url` string
            - `retailer_id` string
          - `text` string
        - ChatInstagramAdSchema
          - `type` 'instagram_ad', required
          - `parts` union[]
            - union
              - …
          - `ref` string
          - `ad_id` string
          - `source` string
          - `ads_context_data` object
            - `ad_title` string
            - `photo_url` string
            - `video_url` string
        - ChatInstagramProductSchema
          - `type` 'instagram_product', required
          - `parts` union[]
            - union
              - …
          - `product` object, required
            - `id` string, required
            - `name` string
            - `image_url` string
            - `price` string
            - `description` string
            - `url` string
        - ChatInstagramProductTemplateSchema
          - `type` 'instagram_product_template', required
          - `parts` union[]
            - union
              - …
          - `products` object[], required
            - `id` string, required
            - `retailer_id` string
            - `image_url` string
            - `title` string
            - `subtitle` string
        - ChatInstagramPostSchema
          - `type` 'instagram_post', required
          - `parts` union[]
            - union
              - …
          - `post_id` string
          - `post_media_id` string
          - `title` string
          - `media_url` string
          - `username` string
          - `permalink` string
        - ChatInstagramReelSchema
          - `type` 'instagram_reel', required
          - `parts` union[]
            - union
              - …
          - `reel_video_id` string
          - `title` string
          - `media_url` string
          - `username` string
          - `permalink` string
        - ChatInstagramStorySchema
          - `type` 'instagram_story', required
          - `parts` union[]
            - union
              - …
          - `story_media_id` string
          - `media_url` string
          - `username` string
          - `permalink` string
          - `link_sticker_url` string
        - ChatInstagramStoryMentionSchema
          - `type` 'instagram_story_mention', required
          - `parts` union[]
            - union
              - …
          - `media_url` string
          - `username` string
          - `permalink` string
        - ChatInstagramCommentSchema
          - `type` 'instagram_comment', required
          - `parts` union[]
            - union
              - …
          - `comment_id` string, required
          - `media_id` string
          - `permalink` string
          - `text` string
          - `private_reply` true, required
        - ChatMessengerPostSchema
          - `type` 'messenger_post', required
          - `parts` union[]
            - union
              - …
          - `post_id` string
          - `title` string
          - `permalink` string
          - `media_url` string
        - ChatMessengerReelSchema
          - `type` 'messenger_reel', required
          - `parts` union[]
            - union
              - …
          - `reel_video_id` string
          - `title` string
          - `permalink` string
          - `media_url` string
        - ChatMessengerCommentSchema
          - `type` 'messenger_comment', required
          - `parts` union[]
            - union
              - …
          - `comment_id` string, required
          - `post_id` string
          - `permalink` string
          - `text` string
          - `private_reply` true, required
        - ChatTikTokAdSchema
          - `type` 'tiktok_ad', required
          - `parts` union[]
            - union
              - …
          - `advertiser_id` string
          - `ad_id` string
          - `ad_name` string
          - `embed_url` string
          - `message_material_id` string
          - `timestamp` number
        - ChatTikTokPostShareSchema
          - `type` 'tiktok_post_share', required
          - `parts` union[]
            - union
              - …
          - `video_id` string
          - `embed_url` string
        - ChatTikTokShortLinkSchema
          - `type` 'tiktok_short_link', required
          - `parts` union[]
            - union
              - …
          - `ref` string
          - `prefilled_message` string
          - `prefilled_message_audit_status` 'PASS' | 'REJECT'
        - ChatWebWidgetReferralSchema
          - `type` 'web_widget', required
          - `parts` union[]
            - union
              - …
          - `utm_source` string
          - `utm_medium` string
          - `utm_campaign` string
          - `utm_term` string
          - `utm_content` string
          - `utm_ad` string
          - `utm_match` string
          - `utm_referrer` string
          - `gclid` string
          - `fbclid` string
          - `msclkid` string
          - `ttclid` string
          - `li_fat_id` string
          - `rdt_cid` string
          - `referrer` string
          - `page_url` string
      - `reminders` ChatReminderSchema[]: The active reminders scheduled on this chat
        - `id` string, required
        - `note` string, required
        - `schedule` string, nullable, required
        - `timezone` string, nullable, required: IANA timezone identifier (e.g. America/New_York)
        - `next_run_at` string, date-time, nullable, required
        - `occurrences` number, required
        - `max_occurrences` number, nullable, required
        - `created_at` string, date-time, required
      - `attentions` ChatAttentionItemSchema[]: The pending approvals and questions waiting on this chat
        - `id` string, required
        - `kind` 'approval' | 'question' | 'ask' | 'connection', required
        - `message_id` string, required
        - `tool_call_id` string, required
        - `action_name` string, nullable, required
        - `created_at` string, date-time, nullable, required
      - `spend` number: What the organization paid for this chat's AI turns, in USD; org chats only
      - `created_at` string, date-time, nullable, required
      - `updated_at` string, date-time, nullable, required
    - `identifier` string, nullable, required
  - ChatUpdateEventSchema: Event emitted when a chat is updated
    - `type` 'update', required
    - `data` ChatSchema, required
      - `id` string, required
      - `title` string, nullable, required: The title of the chat
      - `model` string, required: The model used for the chat
      - `tools` ModelToolSchema[]: The tools available in the chat
        - `name` string, required: Name of the tool to called, can be a step key or custom tool
        - `display_name` string: Display name of the tool, can be used in UI
        - `action_name` string: The original name of the action this tool is based on, used for connection-based tools
        - `description` string: Description of the tool
        - `icon` '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': The name of the icon to use in the UI
        - `icon_url` string: URL of the icon to use in the UI
        - `connection_id` string: For connection-bound tools (action runners), the id of the connection this tool executes against
        - `parameters` object: Parameters for the tool call using an input schema definition
        - `input` InputValuesSchema: For connection-bound tools, locked input values (e.g. a selected resource) that drive dynamic fields and are injected at execution
        - `definitions` DynamicFieldsSchema[]: For connection-bound tools, dynamic field schemas loaded for the selected resource, merged into the parameters at build time
          - `path` string, required
          - `definition` FieldsSchema, required: The definition of the field schemas
        - `enabled` boolean: For tools that are enabled by default, set to false to opt out and disable them for this chat
        - `callback` string
        - `validation` string
      - `skills` SkillLimitedSchema[]: The skills enabled in the chat
        - `id` string, required
        - `name` string, required
      - `features` ChatFeaturesSchema: Per-chat features and run settings: model features plus approval mode and org-chat tool toggles.
        - `reasoning` ModelFeatureReasoningSchema: The reasoning capability of the model.
          - `effort` 'low' | 'medium' | 'high', required: The effort level of the reasoning capability.
        - `mode` 'auto' | 'ask' | 'never': When the assistant must ask before running the action
        - `web` boolean
        - `image_generation` boolean
        - `workbench` ChatWorkbenchFeatureSchema: Workbench: run code and tools in a sandbox.
          - `enabled` boolean
          - `network` 'full' | 'limited' | 'none': Workbench outbound network: full (open), limited (package registries only), or none (offline).
      - `org_id` string
      - `members` ChatMemberSchema[], required: The members of the chat
        - `id` string, required
        - `role` 'ADMIN' | 'MEMBER', required: The role of the member in the chat
        - `user` UserPublicSchema
          - `id` string, required
          - `name` string, nullable, required
          - `avatar` string, nullable, required
        - `session` PublicSessionSchema: Data that is publicly accessible for a session
          - `id` string, required
        - `contact_channel` PublicContactChannelSchema: Schema for the public contact channel
          - `id` string, required
          - `type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp', required: The channel type
          - `user_id` string, required: The unique identifier for the contact channel, e.g Phone Number or User ID
          - `avatar` string, nullable, required: The avatar for the contact channel, e.g X Avatar URL
          - `name` string, nullable, required: The name for the contact channel, e.g Full Name
          - `username` string, nullable, required: The username for the contact channel, e.g Username
          - `email` string, email, nullable, required: The email for the contact channel, e.g Email
          - `phone` string, nullable, required: The phone number for the contact channel, e.g Phone Number
          - `country` string, nullable, required: The country code associated with the contact channel, e.g US for United States
          - `agent` string, nullable, required: The user agent associated with the contact channel
          - `ip` string, nullable, required: The IP address associated with the contact channel
          - `language` string, nullable, required: The language code associated with the contact channel, e.g en for English
          - `link` string: A link to the contact channel, e.g a link to the social media profile
          - `contact` PublicContactSchema, required: Schema for the contact
            - `id` string, required
            - `name` string, nullable, required
            - `blocked` boolean, required
            - `unsubscribed` boolean, required
            - `ai_replies` boolean, required
            - `is_admin` boolean, required
            - `segments` SegmentLimitedSchema[]
              - …
        - `agent` AgentLimitedSchema: A reduced agent reference
          - `id` string, required
          - `name` string, required
          - `icon` union, required: A picked icon or emoji. Null = the generated face, unless a custom image is set.
            - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
            - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
          - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: The identity color, reused by every surface that carries the agent
          - `shape` 'square' | 'round' | 'pebble' | 'slate' | 'beam' | 'bloom' | 'arch' | 'clave', required: The silhouette of a generated agent face
          - `avatar_url` string, nullable, required: The agent as an image, either the custom picture or the PNG snapshot of its face or icon
        - `seen_at` string, date-time, nullable
      - `temporary` boolean, required: Whether the chat is temporary and would be deleted after 24 hours of last activity
      - `visibility` 'PRIVATE' | 'PUBLIC_READ' | 'PUBLIC_WRITE', required: The visibility of the chat
      - `pinned` boolean, required: Whether the chat is pinned in the user interface
      - `status` 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED', required: The status of the chat
      - `agent` object: The agent whose run this chat is
        - `id` string, required
        - `name` string, required
        - `icon` union, required: A picked icon or emoji. Null = the generated face, unless a custom image is set.
          - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
          - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
        - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: The identity color, reused by every surface that carries the agent
        - `shape` 'square' | 'round' | 'pebble' | 'slate' | 'beam' | 'bloom' | 'arch' | 'clave', required: The silhouette of a generated agent face
        - `avatar_url` string, nullable, required: The agent as an image, either the custom picture or the PNG snapshot of its face or icon
      - `routine` RoutineLimitedSchema: The routine whose fire started this chat
        - `id` string, required
        - `name` string, nullable, required
        - `type` 'SCHEDULED' | 'AUTOPILOT' | 'WEBHOOK' | 'TRIGGER', required: How the routine fires: SCHEDULED = cron · AUTOPILOT = the run schedules itself · WEBHOOK = fired by its URL · TRIGGER = fired by an event of a connected app
        - `trigger_action` string, nullable, required: Trigger routines: the trigger that fires it, e.g. 'GMAIL:ON_NEW_EMAIL'
      - `activity` ActivityLimitedSchema: Compact activity reference: its id and the contact or custom-table record it was written on, drawn like their mention chips
        - `id` string, required
        - `contact` ModelReferenceSchema: An entity tagged by name in a text: what an `@Name` in it points at. The client sends kind, id and name; the API validates the id and fills the visuals
          - `kind` 'agent' | 'routine' | 'contact' | 'user' | 'skill' | 'record' | 'table' | 'assistant', required: The kind of entity a reference points at
          - `id` string, required: Public id of the referenced entity
          - `name` string, required: Display name, snapshotted when the text was written
          - `icon` union: The entity's own icon or emoji, filled on write. Null = the default of its kind
            - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
            - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
          - `icon_url` string, uri, nullable: The entity's image, filled on write, when it has one
          - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral' | 'null', nullable: The entity's tint, filled on write, when it has one
        - `record` ModelReferenceSchema: An entity tagged by name in a text: what an `@Name` in it points at. The client sends kind, id and name; the API validates the id and fills the visuals
          - `kind` 'agent' | 'routine' | 'contact' | 'user' | 'skill' | 'record' | 'table' | 'assistant', required: The kind of entity a reference points at
          - `id` string, required: Public id of the referenced entity
          - `name` string, required: Display name, snapshotted when the text was written
          - `icon` union: The entity's own icon or emoji, filled on write. Null = the default of its kind
            - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
            - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
          - `icon_url` string, uri, nullable: The entity's image, filled on write, when it has one
          - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral' | 'null', nullable: The entity's tint, filled on write, when it has one
      - `state` ChatStateSchema: Schema for the chat state
        - `id` string, required
        - `state` 'OPEN' | 'CLOSED', required: The state status of the chat
        - `channel_type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp', required: The channel type
        - `assistant` PublicAssistantSchema: Schema for a public assistant
          - `id` string, required
          - `name` string, required
          - `avatar_url` string, nullable, required
          - `deleted` boolean, required
          - `config` PublicAssistantConfigSchema, required: Schema for a public assistant configuration
            - `conversation` PublicAssistantConversationConfigSchema, required: Schema for a public assistant conversation configuration
              - …
            - `widget` PublicAssistantWidgetConfigSchema, required: Widget configuration with channel references resolved to links
              - …
        - `assistant_channel` PublicAssistantChannelSchema: Schema for a public assistant channel
          - `id` string, required
          - `enabled` boolean, required
          - `has_connection` boolean, required
          - `updates_outside_window` boolean: The channel delivers updates after the messaging window closed (WhatsApp Direct Send) and the provider has not rejected one for this connection yet
          - `identity` string, nullable, required: The channel identity messages are exchanged through, e.g the WhatsApp phone number
        - `conversation_id` string, required: The ID of the conversation associated with the chat
        - `assigned_user` UserLimitedSchema: The assigned user for the conversation
          - `id` string, required
          - `name` string, nullable, required
          - `email` string, email, required
          - `avatar` string, nullable, required
          - `seen_at` string, date-time, nullable, required
        - `assigned_at` string, date-time, nullable
        - `assistant_config` AssistantConfigSchema: Schema for the configuration of an assistant
          - `instructions` string: The instructions for the assistant: its system prompt
          - `language` 'auto' | 'en' | 'es', required: List of supported languages for the model in ISO 639-1 format or "auto"
          - `model` string, required: The model to use for the assistant
          - `conversation` AssistantConversationConfigSchema, required: Configuration options for the conversation thread of the assistant
            - `thread_mode` 'new' | 'continue', required: Whether returning users start a new conversation or continue the previous one.
            - `welcome_banner` string: Static greeting shown in the UI when a conversation starts.
            - `suggested_messages` string[]: Up to 5 suggested messages shown when a conversation starts.
            - `auto_intro_message` string: First message the assistant sends automatically when a conversation begins via API.
            - `enable_memories` boolean, required: Let the assistant store memories about the contact.
            - `enable_end_conversation_tool` boolean: Let the assistant close conversations on its own.
            - `enable_transfer_to_human_tool` boolean, required: The AI Routing switch: let the assistant hand a conversation to one of your members. Off turns routing off, whatever the routing instructions say.
            - `routing_instructions` string: 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` boolean: Let the assistant block abusive contacts.
            - `enable_ai_replies` boolean: When false the assistant is human-only: messages are received but the AI never responds.
            - `enable_auto_resolve` boolean: Automatically resolve conversations after a period of inactivity.
            - `enable_auto_follow_ups` boolean: Let the assistant follow up on conversations on its own.
            - `follow_up_instructions` string: Business rules that steer automatic follow-ups (cadence, hours, stop rules, tone).
            - `follow_ups_outside_window` boolean: After the messaging window closes, still follow up about something the contact asked for or is waiting on (WhatsApp).
            - `enable_auto_csat` boolean: Automatically score customer satisfaction when closing conversations.
            - `enable_private_chats` boolean: Enable private chats that do not appear in the inbox.
            - `enable_update_contact_tool` boolean: Let the assistant collect and update contact information.
            - `enable_transcription` boolean: Turn voice notes and videos into text, and describe what videos show, so any model understands them.
          - `widget` AssistantWidgetConfigSchema: Configuration of the embeddable web chat widget
            - `enabled` boolean: Whether the widget shows where its embed code is installed. Off hides it without removing the code.
            - `mode` 'button' | 'omnibar' | 'auto': 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.
            - `appearance` 'auto' | 'light' | 'dark': Theme of the widget: follow the visitor system or force one
            - `position` 'right' | 'left': Corner where the bubble launcher is anchored (the omnibar is always centered). A position attribute on the embed element overrides it.
            - `omnibar_minimize_desktop` boolean: Fold the omnibar into its compact centered button while visitors scroll on desktop too. On mobile viewports it always folds.
            - `hide_powered_by` boolean
            - `enable_dictation` boolean
            - `enable_file_uploads` boolean
            - `colors` AssistantWidgetColorsConfigSchema: Color overrides for the widget
              - …
            - `teaser` AssistantWidgetTeaserConfigSchema: Proactive teaser configuration for the widget. The suggested replies shown with the teaser come from conversation.suggested_messages.
              - …
            - `channels` AssistantWidgetChannelsConfigSchema: Alternative channels offered in the widget launcher menu when any are configured
              - …
          - `knowledge_scope` 'all' | 'restricted', required: Which knowledge the assistant searches: all sources, or only the ones linked to it (List/Link/Unlink Assistant Knowledge Source).
          - `timezone` string, required: IANA timezone, e.g. "America/New_York".
        - `ai_enabled` boolean, required: Whether AI is enabled for the chat
        - `admin_unseen_count` number, required: The number of unseen messages in the chat
        - `user_unseen_count` number, required: The number of unseen messages in the chat
        - `follow_up_at` string, date-time, nullable: Scheduled follow-up datetime
        - `muted_until` string, date-time, nullable: Mute expiry datetime (null = not muted)
        - `free_window_expires_at` string, date-time, nullable: 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` integer, nullable: Customer satisfaction score (1-5)
        - `last_contact_message_at` string, date-time, nullable
      - `link` string: The link to the chat in the integration
      - `shared_url` string, nullable, required: The shared URL of the chat, if it is shared
      - `last_message` ChatMessageSchema: The chat message schema
        - `id` string, required
        - `role` 'user' | 'assistant' | 'system' | 'tool' | 'event' | 'note', required: The role of the message
        - `model` string, required: The model used for the message
        - `messages` ModelMessageSchema[]: The message content
          - union
            - ModelSystemMessageSchema: System message
              - …
            - ModelAssistantMessageSchema: Assistant message
              - …
            - ModelUserMessageSchema: User message
              - …
            - ModelToolMessageSchema: Tool message
              - …
            - ModelEventMessageSchema
              - …
            - ModelNoteMessageSchema
              - …
        - `member` ChatMemberSchema: The member of the chat
          - `id` string, required
          - `role` 'ADMIN' | 'MEMBER', required: The role of the member in the chat
          - `user` UserPublicSchema
            - `id` string, required
            - `name` string, nullable, required
            - `avatar` string, nullable, required
          - `session` PublicSessionSchema: Data that is publicly accessible for a session
            - `id` string, required
          - `contact_channel` PublicContactChannelSchema: Schema for the public contact channel
            - `id` string, required
            - `type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp', required: The channel type
            - `user_id` string, required: The unique identifier for the contact channel, e.g Phone Number or User ID
            - `avatar` string, nullable, required: The avatar for the contact channel, e.g X Avatar URL
            - `name` string, nullable, required: The name for the contact channel, e.g Full Name
            - `username` string, nullable, required: The username for the contact channel, e.g Username
            - `email` string, email, nullable, required: The email for the contact channel, e.g Email
            - `phone` string, nullable, required: The phone number for the contact channel, e.g Phone Number
            - `country` string, nullable, required: The country code associated with the contact channel, e.g US for United States
            - `agent` string, nullable, required: The user agent associated with the contact channel
            - `ip` string, nullable, required: The IP address associated with the contact channel
            - `language` string, nullable, required: The language code associated with the contact channel, e.g en for English
            - `link` string: A link to the contact channel, e.g a link to the social media profile
            - `contact` PublicContactSchema, required: Schema for the contact
              - …
          - `agent` AgentLimitedSchema: A reduced agent reference
            - `id` string, required
            - `name` string, required
            - `icon` union, required: A picked icon or emoji. Null = the generated face, unless a custom image is set.
              - …
            - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: The identity color, reused by every surface that carries the agent
            - `shape` 'square' | 'round' | 'pebble' | 'slate' | 'beam' | 'bloom' | 'arch' | 'clave', required: The silhouette of a generated agent face
            - `avatar_url` string, nullable, required: The agent as an image, either the custom picture or the PNG snapshot of its face or icon
          - `seen_at` string, date-time, nullable
        - `status` 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED', required: The chat status
        - `error` string: Error message if the message failed
        - `broadcast_id` string: ID of the broadcast this message originates from
        - `is_broadcast_message` boolean: Whether this message was sent via a broadcast template
        - `channel_type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp': The channel the message arrived through, if any
        - `usage` ModelUsageSchema: The usage information for the message
          - `input_tokens` number: Number of input tokens used by the model
          - `output_tokens` number: Number of output tokens generated by the model
          - `total_tokens` number: Total number of tokens used by the model
          - `reasoning_tokens` number: Number of reasoning tokens used by the model
          - `input_tokens_cache_read` number: Number of input tokens cached read by the model
          - `input_tokens_cache_write` number: Number of input tokens cached written by the model
          - `turns` ModelUsageTurnSchema[]
            - `input_tokens` number: Number of input tokens used by the model
            - `output_tokens` number: Number of output tokens generated by the model
            - `total_tokens` number: Total number of tokens used by the model
            - `reasoning_tokens` number: Number of reasoning tokens used by the model
            - `input_tokens_cache_read` number: Number of input tokens cached read by the model
            - `input_tokens_cache_write` number: Number of input tokens cached written by the model
        - `cost` ModelUsageCostSchema: The cost of a message, at the rates it is billed at
          - `total` number, required: Amount billed for the message, in USD
          - `base` number, required: Amount at the chat's base rate, before any discount, in USD
          - `lines` ModelUsageCostLinesSchema, required: Share of the base amount per token type, in USD
            - `input` number, required
            - `output` number, required
            - `reasoning` number, required
            - `cache_read` number, required
            - `cache_write` number, required
        - `delivered_at` string, date-time, nullable: When the message was delivered to the recipient
        - `reactions` ChatMessageReactionSchema[]: Emoji reactions on the message
          - `emoji` string, required
          - `member_id` string: Reacting member; absent when the AI reacted
        - `created_at` string, date-time, nullable, required
        - `updated_at` string, date-time, nullable, required
      - `referral` union: Referral/commerce event data from Meta platforms — ads, products, orders.
        - ChatMessengerAdSchema
          - `type` 'messenger_ad', required
          - `parts` union[]
            - union
              - …
          - `ref` string
          - `ad_id` string
          - `source` string
          - `referer_uri` string
          - `ads_context_data` object
            - `ad_title` string
            - `photo_url` string
            - `video_url` string
            - `post_id` string
            - `product_id` string
        - ChatMessengerProductSchema
          - `type` 'messenger_product', required
          - `parts` union[]
            - union
              - …
          - `product` object, required
            - `id` string, required
            - `name` string
            - `image_url` string
            - `price` string
            - `description` string
            - `url` string
        - ChatMessengerProductTemplateSchema
          - `type` 'messenger_product_template', required
          - `parts` union[]
            - union
              - …
          - `products` object[], required
            - `id` string, required
            - `retailer_id` string
            - `image_url` string
            - `title` string
            - `subtitle` string
        - ChatWhatsAppAdSchema
          - `type` 'whatsapp_ad', required
          - `parts` union[]
            - union
              - …
          - `source_url` string
          - `source_id` string
          - `source_type` string
          - `headline` string
          - `body` string
          - `media_type` string
          - `image_url` string
          - `video_url` string
          - `thumbnail_url` string
          - `ctwa_clid` string
        - ChatWhatsAppProductSchema
          - `type` 'whatsapp_product', required
          - `parts` union[]
            - union
              - …
          - `catalog_id` string, required
          - `product_retailer_id` string, required
          - `name` string
          - `image_url` string
          - `price` string
          - `description` string
          - `url` string
          - `retailer_id` string
        - ChatWhatsAppOrderSchema
          - `type` 'whatsapp_order', required
          - `parts` union[]
            - union
              - …
          - `catalog_id` string, required
          - `product_items` object[], required
            - `product_retailer_id` string, required
            - `quantity` number, required
            - `item_price` number, required
            - `currency` string, required
            - `name` string
            - `image_url` string
            - `price` string
            - `description` string
            - `url` string
            - `retailer_id` string
          - `text` string
        - ChatInstagramAdSchema
          - `type` 'instagram_ad', required
          - `parts` union[]
            - union
              - …
          - `ref` string
          - `ad_id` string
          - `source` string
          - `ads_context_data` object
            - `ad_title` string
            - `photo_url` string
            - `video_url` string
        - ChatInstagramProductSchema
          - `type` 'instagram_product', required
          - `parts` union[]
            - union
              - …
          - `product` object, required
            - `id` string, required
            - `name` string
            - `image_url` string
            - `price` string
            - `description` string
            - `url` string
        - ChatInstagramProductTemplateSchema
          - `type` 'instagram_product_template', required
          - `parts` union[]
            - union
              - …
          - `products` object[], required
            - `id` string, required
            - `retailer_id` string
            - `image_url` string
            - `title` string
            - `subtitle` string
        - ChatInstagramPostSchema
          - `type` 'instagram_post', required
          - `parts` union[]
            - union
              - …
          - `post_id` string
          - `post_media_id` string
          - `title` string
          - `media_url` string
          - `username` string
          - `permalink` string
        - ChatInstagramReelSchema
          - `type` 'instagram_reel', required
          - `parts` union[]
            - union
              - …
          - `reel_video_id` string
          - `title` string
          - `media_url` string
          - `username` string
          - `permalink` string
        - ChatInstagramStorySchema
          - `type` 'instagram_story', required
          - `parts` union[]
            - union
              - …
          - `story_media_id` string
          - `media_url` string
          - `username` string
          - `permalink` string
          - `link_sticker_url` string
        - ChatInstagramStoryMentionSchema
          - `type` 'instagram_story_mention', required
          - `parts` union[]
            - union
              - …
          - `media_url` string
          - `username` string
          - `permalink` string
        - ChatInstagramCommentSchema
          - `type` 'instagram_comment', required
          - `parts` union[]
            - union
              - …
          - `comment_id` string, required
          - `media_id` string
          - `permalink` string
          - `text` string
          - `private_reply` true, required
        - ChatMessengerPostSchema
          - `type` 'messenger_post', required
          - `parts` union[]
            - union
              - …
          - `post_id` string
          - `title` string
          - `permalink` string
          - `media_url` string
        - ChatMessengerReelSchema
          - `type` 'messenger_reel', required
          - `parts` union[]
            - union
              - …
          - `reel_video_id` string
          - `title` string
          - `permalink` string
          - `media_url` string
        - ChatMessengerCommentSchema
          - `type` 'messenger_comment', required
          - `parts` union[]
            - union
              - …
          - `comment_id` string, required
          - `post_id` string
          - `permalink` string
          - `text` string
          - `private_reply` true, required
        - ChatTikTokAdSchema
          - `type` 'tiktok_ad', required
          - `parts` union[]
            - union
              - …
          - `advertiser_id` string
          - `ad_id` string
          - `ad_name` string
          - `embed_url` string
          - `message_material_id` string
          - `timestamp` number
        - ChatTikTokPostShareSchema
          - `type` 'tiktok_post_share', required
          - `parts` union[]
            - union
              - …
          - `video_id` string
          - `embed_url` string
        - ChatTikTokShortLinkSchema
          - `type` 'tiktok_short_link', required
          - `parts` union[]
            - union
              - …
          - `ref` string
          - `prefilled_message` string
          - `prefilled_message_audit_status` 'PASS' | 'REJECT'
        - ChatWebWidgetReferralSchema
          - `type` 'web_widget', required
          - `parts` union[]
            - union
              - …
          - `utm_source` string
          - `utm_medium` string
          - `utm_campaign` string
          - `utm_term` string
          - `utm_content` string
          - `utm_ad` string
          - `utm_match` string
          - `utm_referrer` string
          - `gclid` string
          - `fbclid` string
          - `msclkid` string
          - `ttclid` string
          - `li_fat_id` string
          - `rdt_cid` string
          - `referrer` string
          - `page_url` string
      - `reminders` ChatReminderSchema[]: The active reminders scheduled on this chat
        - `id` string, required
        - `note` string, required
        - `schedule` string, nullable, required
        - `timezone` string, nullable, required: IANA timezone identifier (e.g. America/New_York)
        - `next_run_at` string, date-time, nullable, required
        - `occurrences` number, required
        - `max_occurrences` number, nullable, required
        - `created_at` string, date-time, required
      - `attentions` ChatAttentionItemSchema[]: The pending approvals and questions waiting on this chat
        - `id` string, required
        - `kind` 'approval' | 'question' | 'ask' | 'connection', required
        - `message_id` string, required
        - `tool_call_id` string, required
        - `action_name` string, nullable, required
        - `created_at` string, date-time, nullable, required
      - `spend` number: What the organization paid for this chat's AI turns, in USD; org chats only
      - `created_at` string, date-time, nullable, required
      - `updated_at` string, date-time, nullable, required
  - ChatTypingEventSchema: Event emitted when a user is typing in a chat
    - `type` 'typing', required
    - `chat_id` string, required
    - `member_id` string, required
  - ChatDeleteEventSchema: Event emitted when a chat is deleted
    - `type` 'delete', required
    - `chat_id` string, required
  - ChatMessageEventSchema: Event emitted when a message is sent in a chat
    - `type` 'message', required
    - `chat_id` string, required
    - `data` ChatMessageSchema, required: The chat message schema
      - `id` string, required
      - `role` 'user' | 'assistant' | 'system' | 'tool' | 'event' | 'note', required: The role of the message
      - `model` string, required: The model used for the message
      - `messages` ModelMessageSchema[]: The message content
        - union
          - ModelSystemMessageSchema: System message
            - `role` 'system', required
            - `parts` ModelTextPartSchema[], required
              - …
          - ModelAssistantMessageSchema: Assistant message
            - `id` string: Unique identifier for the assistant message
            - `role` 'assistant', required
            - `parts` ModelAssistantMessagePartsSchema[], required
              - …
            - `reactions` string: Prerendered emoji reactions on the message, injected at prompt build time
          - ModelUserMessageSchema: User message
            - `role` 'user', required
            - `parts` ModelUserMessagePartsSchema[], required
              - …
            - `name` string: Name of the user, used to give context on multiplayer chats
            - `member_role` 'customer' | 'staff' | 'agent' | 'user': Role of the message sender: customer/staff/agent for assistant chats, user for regular chats
            - `timestamp` string: Formatted timestamp for the message, used for time-awareness in conversations
            - `reactions` string: Prerendered emoji reactions on the message, injected at prompt build time
            - `message_id` string: Short reference to the stored message (the first uuid segment, 8 characters), injected at prompt build time so tools can target the message
          - ModelToolMessageSchema: Tool message
            - `id` string: Unique identifier for the assistant message
            - `role` 'tool', required
            - `parts` ModelToolResultPartSchema[], required
              - …
          - ModelEventMessageSchema
            - `role` 'event', required
            - `parts` ModelEventMessagePartsSchema[], required
              - …
            - `name` string
            - `member_role` 'customer' | 'staff' | 'agent' | 'user': Role of the message sender: customer/staff/agent for assistant chats, user for regular chats
            - `timestamp` string
            - `reactions` string: Prerendered emoji reactions on the message, injected at prompt build time
            - `message_id` string: Short reference to the stored message (the first uuid segment, 8 characters), injected at prompt build time so tools can target the message
          - ModelNoteMessageSchema
            - `role` 'note', required
            - `parts` ModelUserPartsSchema[], required
              - …
            - `name` string: Name of the staff member who wrote the note
            - `member_role` 'customer' | 'staff' | 'agent' | 'user': Role of the message sender: customer/staff/agent for assistant chats, user for regular chats
            - `timestamp` string: Formatted timestamp for the note, used for time-awareness in conversations
      - `member` ChatMemberSchema: The member of the chat
        - `id` string, required
        - `role` 'ADMIN' | 'MEMBER', required: The role of the member in the chat
        - `user` UserPublicSchema
          - `id` string, required
          - `name` string, nullable, required
          - `avatar` string, nullable, required
        - `session` PublicSessionSchema: Data that is publicly accessible for a session
          - `id` string, required
        - `contact_channel` PublicContactChannelSchema: Schema for the public contact channel
          - `id` string, required
          - `type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp', required: The channel type
          - `user_id` string, required: The unique identifier for the contact channel, e.g Phone Number or User ID
          - `avatar` string, nullable, required: The avatar for the contact channel, e.g X Avatar URL
          - `name` string, nullable, required: The name for the contact channel, e.g Full Name
          - `username` string, nullable, required: The username for the contact channel, e.g Username
          - `email` string, email, nullable, required: The email for the contact channel, e.g Email
          - `phone` string, nullable, required: The phone number for the contact channel, e.g Phone Number
          - `country` string, nullable, required: The country code associated with the contact channel, e.g US for United States
          - `agent` string, nullable, required: The user agent associated with the contact channel
          - `ip` string, nullable, required: The IP address associated with the contact channel
          - `language` string, nullable, required: The language code associated with the contact channel, e.g en for English
          - `link` string: A link to the contact channel, e.g a link to the social media profile
          - `contact` PublicContactSchema, required: Schema for the contact
            - `id` string, required
            - `name` string, nullable, required
            - `blocked` boolean, required
            - `unsubscribed` boolean, required
            - `ai_replies` boolean, required
            - `is_admin` boolean, required
            - `segments` SegmentLimitedSchema[]
              - …
        - `agent` AgentLimitedSchema: A reduced agent reference
          - `id` string, required
          - `name` string, required
          - `icon` union, required: A picked icon or emoji. Null = the generated face, unless a custom image is set.
            - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
            - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
          - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: The identity color, reused by every surface that carries the agent
          - `shape` 'square' | 'round' | 'pebble' | 'slate' | 'beam' | 'bloom' | 'arch' | 'clave', required: The silhouette of a generated agent face
          - `avatar_url` string, nullable, required: The agent as an image, either the custom picture or the PNG snapshot of its face or icon
        - `seen_at` string, date-time, nullable
      - `status` 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED', required: The chat status
      - `error` string: Error message if the message failed
      - `broadcast_id` string: ID of the broadcast this message originates from
      - `is_broadcast_message` boolean: Whether this message was sent via a broadcast template
      - `channel_type` 'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp': The channel the message arrived through, if any
      - `usage` ModelUsageSchema: The usage information for the message
        - `input_tokens` number: Number of input tokens used by the model
        - `output_tokens` number: Number of output tokens generated by the model
        - `total_tokens` number: Total number of tokens used by the model
        - `reasoning_tokens` number: Number of reasoning tokens used by the model
        - `input_tokens_cache_read` number: Number of input tokens cached read by the model
        - `input_tokens_cache_write` number: Number of input tokens cached written by the model
        - `turns` ModelUsageTurnSchema[]
          - `input_tokens` number: Number of input tokens used by the model
          - `output_tokens` number: Number of output tokens generated by the model
          - `total_tokens` number: Total number of tokens used by the model
          - `reasoning_tokens` number: Number of reasoning tokens used by the model
          - `input_tokens_cache_read` number: Number of input tokens cached read by the model
          - `input_tokens_cache_write` number: Number of input tokens cached written by the model
      - `cost` ModelUsageCostSchema: The cost of a message, at the rates it is billed at
        - `total` number, required: Amount billed for the message, in USD
        - `base` number, required: Amount at the chat's base rate, before any discount, in USD
        - `lines` ModelUsageCostLinesSchema, required: Share of the base amount per token type, in USD
          - `input` number, required
          - `output` number, required
          - `reasoning` number, required
          - `cache_read` number, required
          - `cache_write` number, required
      - `delivered_at` string, date-time, nullable: When the message was delivered to the recipient
      - `reactions` ChatMessageReactionSchema[]: Emoji reactions on the message
        - `emoji` string, required
        - `member_id` string: Reacting member; absent when the AI reacted
      - `created_at` string, date-time, nullable, required
      - `updated_at` string, date-time, nullable, required
  - ChatDeleteMessageEventSchema: Event emitted when a message is deleted in a chat
    - `type` 'delete-message', required
    - `chat_id` string, required
    - `message_id` string, required
  - ChatMessageReactionEventSchema: Event emitted when a reaction is added to or removed from a message
    - `type` 'message-reaction', required
    - `chat_id` string, required
    - `message_id` string, required
    - `member_id` string: Reacting member; absent when the AI reacted
    - `emoji` string, required
    - `action` 'react' | 'unreact', required: The action that was performed on the reaction
  - ChatMessagePartEventSchema: Event emitted when a message part is sent in a chat
    - `type` 'message-part', required
    - `chat_id` string, required
    - `message_id` string, required
    - `data` ModelMessagePartSchema, required
      - `id` string, required
      - `role` 'user' | 'assistant' | 'system' | 'tool' | 'event' | 'note', required: The role of the message
      - `part` union, required
        - ModelTextPartSchema
          - `type` 'text', required
          - `text` string, required
          - `audio` FileSchema: Detailed information about a file
            - `id` string, required: Unique identifier for the file
            - `file_path` string, required: Path to the file in the storage system
            - `file_filename` string, required: Name of the file
            - `file_size` number, required: Size of the file in bytes
            - `file_mimetype` string, required: MIME type of the file
            - `file_url` string, required: URL to access the file
            - `created_at` string, date-time, nullable, required: Timestamp when the file was created
          - `start_ms` integer: Where the spoken text starts on the voice call timeline, in ms from the call start
          - `end_ms` integer: Where the spoken text ends on the voice call timeline, in ms from the call start
          - `html` boolean: 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.
          - `json` boolean: When true, text holds a JSON document, such as a trigger payload. Clients render it as JSON; the model receives the text as-is.
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelFilePartSchema
          - `type` 'file', required
          - `url` string, required
          - `kind` 'voice' | 'sticker': Marks communication-only files (voice notes, stickers) from integrations so they can be excluded from the contact files tab.
          - `file` FileSchema: Detailed information about a file
            - `id` string, required: Unique identifier for the file
            - `file_path` string, required: Path to the file in the storage system
            - `file_filename` string, required: Name of the file
            - `file_size` number, required: Size of the file in bytes
            - `file_mimetype` string, required: MIME type of the file
            - `file_url` string, required: URL to access the file
            - `created_at` string, date-time, nullable, required: Timestamp when the file was created
          - `auto_consume` boolean: Whether this file should be automatically consumed and processed by the model
          - `text` string: Transcript of the sound in an audio or video file, written by the server when the message arrives
          - `description` string: What a video shows, written by the server when the message arrives
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelImagePartSchema
          - `type` 'image', required
          - `url` string, required
          - `kind` 'voice' | 'sticker': Marks communication-only files (voice notes, stickers) from integrations so they can be excluded from the contact files tab.
          - `file` FileSchema: Detailed information about a file
            - `id` string, required: Unique identifier for the file
            - `file_path` string, required: Path to the file in the storage system
            - `file_filename` string, required: Name of the file
            - `file_size` number, required: Size of the file in bytes
            - `file_mimetype` string, required: MIME type of the file
            - `file_url` string, required: URL to access the file
            - `created_at` string, date-time, nullable, required: Timestamp when the file was created
          - `auto_consume` boolean: Whether this file should be automatically consumed and processed by the model
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelOptionSelectedPartSchema: Option selected by the user, typically used in multiple choice scenarios
          - `type` 'option_selected', required
          - `call_id` string: The ID of the tool call that generated the options
          - `label` string, required: Label for the option selected
          - `value` string, required: Value for the option selected
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelContactPartSchema
          - `type` 'contact', required
          - `name` string
          - `email` string
          - `phone` string
          - `username` string
          - `user_id` string: Id of the person on the channel the message came from
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelLocationPartSchema
          - `type` 'location', required
          - `latitude` number
          - `longitude` number
          - `name` string
          - `address` string
          - `url` string
          - `google_place_id` string
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelReferencePartSchema: An entity the user tagged in the message. Validated and enriched server-side on send; org chats only.
          - `type` 'reference', required
          - `kind` 'agent' | 'routine' | 'contact' | 'user' | 'skill' | 'record' | 'table' | 'assistant', required: The kind of entity a reference points at
          - `id` string, required: Public id of the referenced entity
          - `name` string, required: Display name, snapshotted when the text was written
          - `icon` union: The entity's own icon or emoji, filled on write. Null = the default of its kind
            - string, emoji: The emoji of a curated icon a user can pick for a table, view, field, or other entity
            - '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': The name of a curated icon a user can pick for a table, view, field, or other entity
          - `icon_url` string, uri, nullable: The entity's image, filled on write, when it has one
          - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral' | 'null', nullable: The entity's tint, filled on write, when it has one
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelToolResultPartSchema
          - `type` 'tool_result', required
          - `id` string, required: Unique identifier for the tool call
          - `name` string, required: The name of the tool called
          - `parts` ModelResultPartResultPartsSchema[]: Parts of the tool call result
            - union: Parts of the tool call result
              - …
          - `result` unknown
          - `refresh_tools` boolean: 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` boolean: 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` boolean: Indicates if the tool call resulted in an error
          - `timestamp` number: Timestamp of the tool call in milliseconds
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelToolCallPartSchema
          - `type` 'tool_call', required
          - `id` string, required: Unique identifier for the tool call
          - `name` string, required: The name of the tool to call
          - `display_name` string
          - `action_name` string
          - `description` string: 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` unknown
          - `metadata` object: Metadata associated with the tool call, can include signature information
          - `approval` ConnectionActionApprovalSchema: Approval prompt and decision state when the action requires confirmation before running
            - `title` string, required: The approval as one yes/no question ending in "?", in the conversation language
            - `accept_button` string, required: Label for the accept button, in the conversation language
            - `reject_button` string, required: Label for the reject button, in the conversation language
            - `decision` 'accepted' | 'rejected': How a pending approval was resolved
            - `decided_at` number: Decision timestamp in milliseconds since epoch
            - `decided_by_member_id` string: Encoded chat member id of the decider
            - `reason` string: Optional reason supplied with the decision
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelSourcePartSchema: Source URL for the message, typically used for annotations
          - `type` 'source', required
          - `id` string, required: Unique identifier for the source, typically a link identifier
          - `url` string, required
          - `title` string: Title of the source, typically a document or webpage title
          - `description` string: Description of the source, can be a summary or excerpt from the content
          - `favicon` string: Favicon URL for the source, can be used in UI
          - `metadata` object: Metadata associated with the source, can include additional information like author, date, etc.
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelMessageReasoningSchema
          - `type` 'reasoning', required
          - `id` string, required: Unique identifier for the message part
          - `text` string, required
          - `metadata` ModelProviderMetadataSchema: Provider metadata as the provider returned it, keyed by provider, such as a signature
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelMessageReasoningStartSchema
          - `type` 'reasoning_start', required
          - `id` string, required: Unique identifier for the message part
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelMessageReasoningDeltaSchema
          - `type` 'reasoning_delta', required
          - `id` string, required: Unique identifier for the message part
          - `text` string, required
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelMessageReasoningEndSchema
          - `type` 'reasoning_end', required
          - `id` string, required: Unique identifier for the message part
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelToolCallPartStartSchema
          - `type` 'tool_call_start', required
          - `id` string, required: Unique identifier for the tool call
          - `name` string, required: The name of the tool to call
          - `display_name` string: Display name of the tool, can be used in UI
          - `action_name` string: The original name of the action this tool is based on, used for connection-based tools
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelToolCallPartDeltaSchema
          - `type` 'tool_call_delta', required
          - `id` string, required: Unique identifier for the tool call
          - `name` string, required: The name of the tool called
          - `args` string
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelToolCallPartEndSchema
          - `type` 'tool_call_end', required
          - `id` string, required: Unique identifier for the tool call
          - `name` string, required: The name of the tool called
          - `args` string
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelTextPartDeltaSchema
          - `type` 'text_delta', required
          - `text` string, required
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventAssignmentPartSchema: Assignment event part - text generated from locales
          - `type` 'event_assignment', required
          - `assigned_user_id` string, nullable, required
          - `source` 'user' | 'member' | 'ai', required: Who the event came from. 'user' is the contact, 'member' is a human agent on the business side, 'ai' is an assistant.
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventStatusChangePartSchema: Status change event part (user-visible) - text generated from locales
          - `type` 'event_status_change', required
          - `old_status` 'OPEN' | 'CLOSED', required
          - `new_status` 'OPEN' | 'CLOSED', required
          - `source` 'user' | 'member' | 'ai', required: Who the event came from. 'user' is the contact, 'member' is a human agent on the business side, 'ai' is an assistant.
          - `follow_up_at` string, date-time: Scheduled follow-up date (ISO 8601)
          - `reason` string: AI analysis reason for the decision
          - `csat_score` integer: AI-assigned customer satisfaction score (1-5)
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventAiStatusPartSchema: AI toggle event part - text generated from locales
          - `type` 'event_ai_status', required
          - `status` boolean, required
          - `source` 'user' | 'member' | 'ai', required: Who the event came from. 'user' is the contact, 'member' is a human agent on the business side, 'ai' is an assistant.
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventMuteChangePartSchema: Mute change event part
          - `type` 'event_mute_change', required
          - `muted_until` string, date-time, nullable, required: New mute expiry datetime (null = un-muted)
          - `source` 'member' | 'system', required: Source of the mute event: a human agent or the system.
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventHandoverPartSchema: Another app on the channel passed, took or requested the conversation (Meta handover protocol)
          - `type` 'event_handover', required
          - `direction` 'to_us' | 'from_us' | 'requested', required: Who got the conversation: 'to_us' (this organization now owns it), 'from_us' (another app on the channel owns it), 'requested' (another app asked for it).
          - `previous_owner` string
          - `new_owner` string
          - `metadata` string: Free text the passing app attached to the handover
          - `summary` string: Summary of the conversation so far, generated by the channel on handover
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventFollowUpPartSchema: Follow-up event — AI re-engaging an inactive conversation
          - `type` 'event_follow_up', required
          - `old_status` 'OPEN' | 'CLOSED'
          - `new_status` 'OPEN' | 'CLOSED'
          - `reason` string: AI analysis reason for the follow-up
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventPaymentPartSchema: Payment event — a checkout the customer completed
          - `type` 'event_payment', required
          - `provider` 'stripe', required
          - `status` 'paid', required
          - `amount_total` integer, required: Amount paid in the smallest currency unit (e.g. cents)
          - `currency` string, required
          - `reference` string, required: Provider reference, e.g. the Stripe checkout session ID
          - `link` string: Link to the payment in the provider dashboard
          - `paid_at` string, date-time, nullable: When the payment was made
          - `method` object
            - `brand` string
            - `last4` string
            - `name` string
          - `items` object[]
            - `name` string, required
            - `quantity` integer, required
            - `amount_total` integer: Line total in the smallest currency unit
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventAnalysisPartSchema: Analysis event — AI post-conversation analysis (CSAT, etc.)
          - `type` 'event_analysis', required
          - `csat_score` integer: AI-assigned customer satisfaction score (1-5)
          - `reason` string: Brief reason for the analysis result
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventReferralPartSchema: Referral event — conversation initiated or resumed from an ad, post, or story
          - `type` 'event_referral', required
          - `referral` union, required: Referral/commerce event data from Meta platforms — ads, products, orders.
            - ChatMessengerAdSchema
              - …
            - ChatMessengerProductSchema
              - …
            - ChatMessengerProductTemplateSchema
              - …
            - ChatWhatsAppAdSchema
              - …
            - ChatWhatsAppProductSchema
              - …
            - ChatWhatsAppOrderSchema
              - …
            - ChatInstagramAdSchema
              - …
            - ChatInstagramProductSchema
              - …
            - ChatInstagramProductTemplateSchema
              - …
            - ChatInstagramPostSchema
              - …
            - ChatInstagramReelSchema
              - …
            - ChatInstagramStorySchema
              - …
            - ChatInstagramStoryMentionSchema
              - …
            - ChatInstagramCommentSchema
              - …
            - ChatMessengerPostSchema
              - …
            - ChatMessengerReelSchema
              - …
            - ChatMessengerCommentSchema
              - …
            - ChatTikTokAdSchema
              - …
            - ChatTikTokPostShareSchema
              - …
            - ChatTikTokShortLinkSchema
              - …
            - ChatWebWidgetReferralSchema
              - …
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventApprovalDecisionPartSchema: Approval decision event — a pending action was accepted or rejected by a chat member. The decider is the owner of the parent ChatMessage.
          - `type` 'event_approval_decision', required
          - `tool_call_id` string, required: Tool call id the decision was made on
          - `action_id` string, required: Canonical id of the gated action (the tool name, e.g. TOOLS:HTTP_REQUEST)
          - `action_name` string: User-facing display name of the action at decision time, when available
          - `decision` 'accepted' | 'rejected', required
          - `reason` string: Optional reason supplied with the decision
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventQuestionsAnsweredPartSchema: Questions answered event — a pending ask_questions call was answered by a chat member. The answerer is the owner of the parent ChatMessage.
          - `type` 'event_questions_answered', required
          - `tool_call_id` string, required: Tool call id of the ask_questions call that was answered
          - `answered_count` number, required: How many questions received an answer
          - `skipped_count` number, required: How many questions were skipped (no response)
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventLocationSharedPartSchema: Location shared event — a pending request_location call was answered by a chat member. The sharer is the owner of the parent ChatMessage.
          - `type` 'event_location_shared', required
          - `tool_call_id` string, required: Tool call id of the request_location call that was answered
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventContactUpdatePartSchema: AI updated one or more contact properties. Emitted from the update_contact tool callback or the post-conversation analysis pass.
          - `type` 'event_contact_update', required
          - `changes` ModelContactFieldChangeSchema[], required
            - `field` string, required: Contact field key.
            - `before` unknown
            - `after` unknown
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventConnectionConnectedPartSchema: Connection-connected event: the user connected an app in response to request_connection.
          - `type` 'event_connection_connected', required
          - `tool_call_id` string, required: Tool call id this connection answers (the request_connection call)
          - `connection_id` string, required: The connected connection id (con_...)
          - `connection_type` string: Connection app type, e.g. GOOGLE_SHEETS
          - `connection_name` string: The name of the connection, e.g. "Google Sheets"
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventAgentRunStartedPartSchema: Run started — the first message of every run chat, recording what fired it.
          - `type` 'event_agent_run_started', required
          - `routine_id` string: Routine that fired this run (rtn_...); absent for manual runs
          - `routine_name` string: Name of the routine that fired this run, when it has one
          - `origin` 'scheduled' | 'manual' | 'webhook' | 'trigger' | 'agent' | 'assistant' | 'mention', required: Origin of the agent run
          - `trigger_action` string: The trigger that fired this run (TYPE:ACTION); only for origin 'trigger'
          - `note` string: Note the previous run left for this one
          - `agent_id` string: Agent whose chat dispatched this run (agt_...); only for origin 'agent'
          - `agent_name` string: Name of the agent whose chat dispatched this run; only for origin 'agent'
          - `assistant_id` string: Assistant whose conversation dispatched this run (ast_...); only for origin 'assistant'
          - `assistant_name` string: Name of the assistant whose conversation dispatched this run; only for origin 'assistant'
          - `contact_id` string: Contact whose comment named the agent (ctc_...); only for origin 'mention'
          - `contact_name` string: Name of that contact at the time; only for origin 'mention'
          - `record_id` string: Record whose comment named the agent (rec_...); only for origin 'mention'
          - `record_name` string: Label of that record at the time; only for origin 'mention'
          - `comments` ModelEventAgentRunCommentSchema[]: Earlier comments of that thread, newest first; only for origin 'mention'
            - `author` string, required: Who wrote the comment
            - `comment` string, required
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventAgentRunFinishedPartSchema: Sub-agent run finished — posted to the chat that dispatched it, so the conversation can pick the result up.
          - `type` 'event_agent_run_finished', required
          - `chat_id` string, required: The run chat that finished (chat_...)
          - `agent_id` string: The agent that ran (agt_...); absent for agentless runs
          - `agent_name` string: Name of the agent that ran; absent for agentless runs
          - `status` 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED', required: How the run ended
          - `tool_call_id` string: The run_agent call that dispatched it — its tool result carries the outcome
          - `summary` string: The run's closing assistant message (older events only — the outcome now lives on the dispatching tool result)
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventReminderPartSchema: Reminder fired — a wake-up the AI scheduled on this chat came due.
          - `type` 'event_reminder', required
          - `reminder_id` string, required: The reminder that fired (rem_...)
          - `note` string, required: The note the AI left itself when scheduling the reminder
          - `occurrence` number, required: How many times this reminder has fired, including this one
          - `recurring` boolean, required: Whether the reminder fires again after this one
          - `next_fire_at` string: Next fire time (ISO), when the reminder recurs
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventMemberJoinedPartSchema: A person was added to the chat; the event owner is who added them.
          - `type` 'event_member_joined', required
          - `user_id` string, required: The person who joined (user_...)
          - `name` string, nullable, required: Their name at the time, kept for after they leave
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventMemberLeftPartSchema: A person left the chat or was removed; the event owner is who did it.
          - `type` 'event_member_left', required
          - `user_id` string, required: The person who left (user_...)
          - `name` string, nullable, required: Their name at the time; they are no longer a member
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventCallStartedPartSchema: Voice call started — the turns that follow, up to event_call_ended, are its transcript.
          - `type` 'event_call_started', required
          - `transport` 'web', required: Where the voice call takes place
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
        - ModelEventCallEndedPartSchema: Voice call ended — closes the call event_call_started opened; the messages between the two are the call.
          - `type` 'event_call_ended', required
          - `duration_seconds` number, required: Wall-clock length of the call
          - `reason` string, required: Why the call ended: clients_left, provider_closed, start_failed or the provider's own reason
          - `billed_seconds` number, required: Seconds metered as ai_voice
          - `latency` ModelEventCallLatencySchema: Turn latency averages of a voice call
            - `turns` integer, required: Delegated turns the averages cover
            - `delegation_ms` number, required: Average ms from the end of the user turn to the delegation the voice model raised
            - `first_token_ms` number, required: Average ms from the delegation to the brain's first token
            - `first_speech_ms` number, required: Average ms from the end of the user turn to the first spoken word that followed
          - `start_timestamp` number: Timestamp when the message part started processing, in milliseconds
          - `end_timestamp` number: Timestamp when the message part finished processing, in milliseconds
  - ChatTierLimitsEventSchema: Event emitted when tier limits are updated for a chat
    - `type` 'tier-limits', required
    - `tier` 'low' | 'medium' | 'high' | 'max', required
    - `data` ChatLimitSchema, required: Schema for chat model limits
      - `remaining` number, required
      - `next_reset_at` string, date-time, nullable, required
  - ChatToolLimitsEventSchema: Event emitted when tool limits are updated for a chat
    - `type` 'tool-limits', required
    - `tool` string, required
    - `data` ChatLimitSchema, required: Schema for chat model limits
      - `remaining` number, required
      - `next_reset_at` string, date-time, nullable, required
  - ChatConversationMemoryUpdateEventSchema: Event emitted when a conversation memory (summary) is created or updated
    - `type` 'conversation-memory-update', required
    - `chat_id` string, required
    - `data` ConversationMemorySchema, required: A conversation memory is a summary of a chat conversation, created automatically every 10 messages.
      - `id` string, required
      - `chat_id` string, required
      - `summary` string, required
      - `key_points` string[], required
      - `message_count` number, required
      - `summarized_at` string, date-time, nullable, required
      - `created_at` string, date-time, nullable, required
  - ChatConversationMemoryDeleteEventSchema: Event emitted when a conversation memory (summary) is deleted
    - `type` 'conversation-memory-delete', required
    - `chat_id` string, required
    - `memory_id` string, required
  - ChatMediaEventSchema: One frame of voice session audio to play
    - `type` 'media', required
    - `chat_id` string, required
    - `listener_id` string, required
    - `data` VoiceMediaDataSchema, required: One voice audio frame, base64 encoded
      - `format` 'opus-rtp', required: Wire format of a voice audio frame
      - `audio` string, required
  - ChatVoiceEventSchema: Event emitted when the voice session changes state
    - `type` 'voice', required
    - `chat_id` string, required
    - `state` 'connecting' | 'listening' | 'speaking' | 'working' | 'reconnecting' | 'ended', required: Live state of a voice session

---

[API](https://skmtc.dev/useinvent/apis/invent-api.md) · [All operations](https://skmtc.dev/useinvent/apis/invent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useinvent/apis/invent-api/revisions/98824f3fde82?raw)
