---
title: "Update chat"
method: PATCH
path: "/chats/{chat_id}"
tags: ["Chats"]
---

# Update chat

`PATCH /chats/{chat_id}`

## Request

- Base URL: `https://api.useinvent.com`
- URL: `https://api.useinvent.com/chats/{chat_id}`
- Auth: HTTP bearer

Update a specific chat by its ID.

## Path parameters

- `chat_id` string, required

## Request body

- UpdateChatSchema: The chat update schema
  - `title` string, nullable: The title of the chat
  - `model` string: The model used for the chat
  - `visibility` 'PRIVATE' | 'PUBLIC_READ' | 'PUBLIC_WRITE': The visibility of the chat
  - `pinned` boolean: Whether the chat is pinned in the user interface
  - `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
  - `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).

## Response `200`

- ChatSchema
  - `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[]
          - `id` string, required
          - `name` string, required
          - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: Accent color, by name
          - `contacts_count` number, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time, required
    - `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
          - `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_auto_csat` boolean: Automatically score customer satisfaction when closing conversations.
          - `enable_ai_replies` boolean: When false the assistant is human-only: messages are received but the AI never responds.
        - `widget` PublicAssistantWidgetConfigSchema, required: Widget configuration with channel references resolved to links
          - `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
            - `accent` string: Accent color used inside the chat (buttons, visitor messages, links)
            - `launcher_background` string: Background color of the widget button; the icon color adapts automatically
          - `teaser` AssistantWidgetTeaserConfigSchema: Proactive teaser configuration for the widget. The suggested replies shown with the teaser come from conversation.suggested_messages.
            - `enabled` boolean
            - `message` string: Short invitation shown next to the closed widget button
            - `modes` 'all' | 'button' | 'omnibar': Which widget modes show the teaser: both, only the bubble button, or only the omnibar
            - `suggestions` 'all' | 'button' | 'omnibar' | 'none': Which widget modes show the suggested replies with the teaser, or none. Defaults to the bubble button; the omnibar already shows them when focused, independent of this setting.
            - `delay_seconds` integer: Seconds to wait before showing the teaser
            - `frequency` 'once_per_visitor' | 'once_per_session' | 'every_visit': How often the teaser can show again to the same visitor
            - `devices` 'all' | 'desktop' | 'mobile': Devices where the teaser shows
            - `version` integer: Bump to show the teaser again to visitors who already dismissed it
          - `channels` object, required
            - `items` PublicAssistantWidgetChannelSchema[], required
              - …
            - `label` string
            - `chat_button_label` string
    - `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
          - `accent` string: Accent color used inside the chat (buttons, visitor messages, links)
          - `launcher_background` string: Background color of the widget button; the icon color adapts automatically
        - `teaser` AssistantWidgetTeaserConfigSchema: Proactive teaser configuration for the widget. The suggested replies shown with the teaser come from conversation.suggested_messages.
          - `enabled` boolean
          - `message` string: Short invitation shown next to the closed widget button
          - `modes` 'all' | 'button' | 'omnibar': Which widget modes show the teaser: both, only the bubble button, or only the omnibar
          - `suggestions` 'all' | 'button' | 'omnibar' | 'none': Which widget modes show the suggested replies with the teaser, or none. Defaults to the bubble button; the omnibar already shows them when focused, independent of this setting.
          - `delay_seconds` integer: Seconds to wait before showing the teaser
          - `frequency` 'once_per_visitor' | 'once_per_session' | 'every_visit': How often the teaser can show again to the same visitor
          - `devices` 'all' | 'desktop' | 'mobile': Devices where the teaser shows
          - `version` integer: Bump to show the teaser again to visitors who already dismissed it
        - `channels` AssistantWidgetChannelsConfigSchema: Alternative channels offered in the widget launcher menu when any are configured
          - `items` AssistantWidgetChannelItemSchema[]
            - `channel_id` string: Connected assistant channel to link to; the URL is generated from the connection and ignored when the channel no longer exists
            - `enabled` boolean: Connected channels are included by default; set to false to hide one from the widget
            - `type` 'whatsapp' | 'messenger' | 'instagram' | 'telegram' | 'email' | 'phone' | 'link': Type of a custom channel link
            - `label` string
            - `url` string, uri: Destination of a custom link channel
            - `email` string, email: Address of a custom email channel
            - `phone` string: E.164 number of a custom phone channel
          - `label` string: Heading above the channels menu; defaults to "Talk to us on"
          - `chat_button_label` string: Label of the launcher chat action; defaults to "Chat with us"
      - `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
          - `role` 'system', required
          - `parts` ModelTextPartSchema[], required
            - `type` 'text', required
            - `text` string, required
            - `audio` FileSchema: Detailed information about a file
              - …
            - `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
        - ModelAssistantMessageSchema: Assistant message
          - `id` string: Unique identifier for the assistant message
          - `role` 'assistant', required
          - `parts` ModelAssistantMessagePartsSchema[], required
            - union: Parts of the assistant message
              - …
          - `reactions` string: Prerendered emoji reactions on the message, injected at prompt build time
        - ModelUserMessageSchema: User message
          - `role` 'user', required
          - `parts` ModelUserMessagePartsSchema[], required
            - union: Parts of the user message: the user parts, plus the options or requests a business showed the contact
              - …
          - `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
            - `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
              - …
            - `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
        - ModelEventMessageSchema
          - `role` 'event', required
          - `parts` ModelEventMessagePartsSchema[], required
            - union: Parts of the event message
              - …
          - `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
            - union: User message parts
              - …
          - `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[]
            - `id` string, required
            - `name` string, required
            - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: Accent color, by name
            - `contacts_count` number, required
            - `created_at` string, date-time, required
            - `updated_at` string, date-time, required
      - `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
  - `referral` union: Referral/commerce event data from Meta platforms — ads, products, orders.
    - ChatMessengerAdSchema
      - `type` 'messenger_ad', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `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
          - 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
              - …
            - `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
              - …
            - `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
      - `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
          - 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
              - …
            - `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
              - …
            - `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
      - `products` object[], required
        - `id` string, required
        - `retailer_id` string
        - `image_url` string
        - `title` string
        - `subtitle` string
    - ChatWhatsAppAdSchema
      - `type` 'whatsapp_ad', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `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
          - 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
              - …
            - `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
              - …
            - `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
      - `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
          - 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
              - …
            - `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
              - …
            - `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
      - `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
          - 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
              - …
            - `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
              - …
            - `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
      - `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
          - 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
              - …
            - `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
              - …
            - `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
      - `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
          - 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
              - …
            - `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
              - …
            - `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
      - `products` object[], required
        - `id` string, required
        - `retailer_id` string
        - `image_url` string
        - `title` string
        - `subtitle` string
    - ChatInstagramPostSchema
      - `type` 'instagram_post', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `post_id` string
      - `post_media_id` string
      - `title` string
      - `media_url` string
      - `username` string
      - `permalink` string
    - ChatInstagramReelSchema
      - `type` 'instagram_reel', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `reel_video_id` string
      - `title` string
      - `media_url` string
      - `username` string
      - `permalink` string
    - ChatInstagramStorySchema
      - `type` 'instagram_story', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `story_media_id` string
      - `media_url` string
      - `username` string
      - `permalink` string
      - `link_sticker_url` string
    - ChatInstagramStoryMentionSchema
      - `type` 'instagram_story_mention', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `media_url` string
      - `username` string
      - `permalink` string
    - ChatInstagramCommentSchema
      - `type` 'instagram_comment', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `comment_id` string, required
      - `media_id` string
      - `permalink` string
      - `text` string
      - `private_reply` true, required
    - ChatMessengerPostSchema
      - `type` 'messenger_post', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `post_id` string
      - `title` string
      - `permalink` string
      - `media_url` string
    - ChatMessengerReelSchema
      - `type` 'messenger_reel', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `reel_video_id` string
      - `title` string
      - `permalink` string
      - `media_url` string
    - ChatMessengerCommentSchema
      - `type` 'messenger_comment', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `comment_id` string, required
      - `post_id` string
      - `permalink` string
      - `text` string
      - `private_reply` true, required
    - ChatTikTokAdSchema
      - `type` 'tiktok_ad', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `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
          - 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
              - …
            - `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
              - …
            - `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
      - `video_id` string
      - `embed_url` string
    - ChatTikTokShortLinkSchema
      - `type` 'tiktok_short_link', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `ref` string
      - `prefilled_message` string
      - `prefilled_message_audit_status` 'PASS' | 'REJECT'
    - ChatWebWidgetReferralSchema
      - `type` 'web_widget', required
      - `parts` union[]
        - union
          - 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
              - …
            - `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
              - …
            - `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
      - `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

---

[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)
