> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useinvent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add chat member

> Share an org chat with a member of the org: they can read and write it, and it appears in their chats.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /chats/{chat_id}/members
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
tags:
  - name: Inbox
  - name: Chats
  - name: Messages
  - name: Contacts
  - name: Custom channels
  - name: Segments
  - name: Suppressions
  - name: Assistants
  - name: Agents
  - name: Skills
  - name: Knowledge
  - name: AI
  - name: Broadcasts
  - name: Email sending
  - name: WhatsApp
  - name: WhatsApp Meta agent
  - name: Tables
  - name: Records
  - name: Views
  - name: Pages
  - name: Connections
  - name: Workspace
  - name: Sub-organizations
  - name: Analytics and logs
  - name: Workflows
paths:
  /chats/{chat_id}/members:
    post:
      tags:
        - Chats
      summary: Add chat member
      description: >-
        Share an org chat with a member of the org: they can read and write it,
        and it appears in their chats.
      parameters:
        - schema:
            type: string
          required: true
          description: Chat ID
          name: chat_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddChatMemberSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AddChatMemberSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatSchema'
components:
  schemas:
    AddChatMemberSchema:
      type: object
      properties:
        member_id:
          type: string
          maxLength: 128
          description: The org member to add to the chat (member_...)
      required:
        - member_id
      description: Schema for adding an org member to a chat
    ChatSchema:
      type: object
      properties:
        id:
          type: string
        title:
          type:
            - string
            - 'null'
          description: The title of the chat
        model:
          type: string
          description: The model used for the chat
        tools:
          type: array
          items:
            $ref: '#/components/schemas/ModelToolSchema'
          description: The tools available in the chat
        skills:
          type: array
          items:
            $ref: '#/components/schemas/SkillLimitedSchema'
          description: The skills enabled in the chat
        features:
          $ref: '#/components/schemas/ChatFeaturesSchema'
        org_id:
          type: string
        members:
          type: array
          items:
            $ref: '#/components/schemas/ChatMemberSchema'
          description: The members of the chat
        temporary:
          type: boolean
          description: >-
            Whether the chat is temporary and would be deleted after 24 hours of
            last activity
        visibility:
          type: string
          enum:
            - PRIVATE
            - PUBLIC_READ
            - PUBLIC_WRITE
          description: The visibility of the chat
        pinned:
          type: boolean
          description: Whether the chat is pinned in the user interface
        status:
          type: string
          enum:
            - RUNNING
            - COMPLETED
            - FAILED
            - CANCELED
          description: The status of the chat
        agent:
          allOf:
            - $ref: '#/components/schemas/AgentLimitedSchema'
            - description: The agent whose run this chat is
        routine:
          $ref: '#/components/schemas/RoutineLimitedSchema'
        activity:
          $ref: '#/components/schemas/ActivityLimitedSchema'
        state:
          $ref: '#/components/schemas/ChatStateSchema'
        link:
          type: string
          description: The link to the chat in the integration
        shared_url:
          type:
            - string
            - 'null'
          description: The shared URL of the chat, if it is shared
        last_message:
          $ref: '#/components/schemas/ChatMessageSchema'
        referral:
          $ref: '#/components/schemas/ChatReferralSchema'
        reminders:
          type: array
          items:
            $ref: '#/components/schemas/ChatReminderSchema'
          description: The active reminders scheduled on this chat
        attentions:
          type: array
          items:
            $ref: '#/components/schemas/ChatAttentionItemSchema'
          description: The pending approvals and questions waiting on this chat
        spend:
          type: number
          description: >-
            What the organization paid for this chat's AI turns, in USD; org
            chats only
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - title
        - model
        - members
        - temporary
        - visibility
        - pinned
        - status
        - shared_url
        - created_at
        - updated_at
    ModelToolSchema:
      type: object
      properties:
        name:
          type: string
          maxLength: 256
          description: Name of the tool to called, can be a step key or custom tool
        display_name:
          type: string
          maxLength: 256
          description: Display name of the tool, can be used in UI
        action_name:
          type: string
          maxLength: 256
          description: >-
            The original name of the action this tool is based on, used for
            connection-based tools
        description:
          type: string
          maxLength: 2048
          description: Description of the tool
        icon:
          type: string
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
          description: The name of the icon to use in the UI
          oneOf:
            - $ref: '#/components/schemas/IconNameSchema'
        icon_url:
          type: string
          description: URL of the icon to use in the UI
        connection_id:
          type: string
          maxLength: 256
          description: >-
            For connection-bound tools (action runners), the id of the
            connection this tool executes against
        parameters:
          allOf:
            - $ref: '#/components/schemas/FieldsSchema'
            - description: Parameters for the tool call using an input schema definition
        input:
          $ref: '#/components/schemas/InputValuesSchema'
        definitions:
          type: array
          items:
            $ref: '#/components/schemas/DynamicFieldsSchema'
          description: >-
            For connection-bound tools, dynamic field schemas loaded for the
            selected resource, merged into the parameters at build time
        enabled:
          type: boolean
          description: >-
            For tools that are enabled by default, set to false to opt out and
            disable them for this chat
        callback:
          type: string
        validation:
          type: string
      required:
        - name
    SkillLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      description: >-
        Compact skill reference for embedding in other resources (e.g. the
        skills enabled in a chat)
    ChatFeaturesSchema:
      type: object
      properties:
        reasoning:
          $ref: '#/components/schemas/ModelFeatureReasoningSchema'
        mode:
          $ref: '#/components/schemas/ConnectionActionApprovalModeSchema'
        web:
          type: boolean
        image_generation:
          type: boolean
        workbench:
          $ref: '#/components/schemas/ChatWorkbenchFeatureSchema'
      description: >-
        Per-chat features and run settings: model features plus approval mode
        and org-chat tool toggles.
    ChatMemberSchema:
      type: object
      properties:
        id:
          type: string
        role:
          $ref: '#/components/schemas/ChatMemberRoleSchema'
        user:
          $ref: '#/components/schemas/UserPublicSchema'
        session:
          $ref: '#/components/schemas/PublicSessionSchema'
        contact_channel:
          $ref: '#/components/schemas/PublicContactChannelSchema'
        agent:
          $ref: '#/components/schemas/AgentLimitedSchema'
        seen_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - role
      description: The member of the chat
    AgentLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        icon:
          anyOf:
            - $ref: '#/components/schemas/PickerIconEmojiSchema'
            - type: string
              maxLength: 64
              pattern: ^[a-zA-Z0-9_-]+$
              description: >-
                The name of a curated icon a user can pick for a table, view,
                field, or other entity
              oneOf:
                - $ref: '#/components/schemas/PickerIconNameSchema'
            - type: 'null'
          description: >-
            A picked icon or emoji. Null = the generated face, unless a custom
            image is set.
        color:
          allOf:
            - $ref: '#/components/schemas/ColorNameSchema'
            - description: >-
                The identity color, reused by every surface that carries the
                agent
        shape:
          anyOf:
            - $ref: '#/components/schemas/AgentShapeSchema'
            - type: 'null'
          description: >-
            The silhouette of the generated face. Null when an icon or a custom
            image is set.
        avatar_url:
          type:
            - string
            - 'null'
          description: >-
            The agent as an image, either the custom picture or the PNG snapshot
            of its face or icon
      required:
        - id
        - name
        - icon
        - color
        - shape
        - avatar_url
      description: A reduced agent reference
    RoutineLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        type:
          $ref: '#/components/schemas/RoutineTypeSchema'
        trigger_action:
          type:
            - string
            - 'null'
          description: >-
            Trigger routines: the trigger that fires it, e.g.
            'GMAIL:ON_NEW_EMAIL'
      required:
        - id
        - name
        - type
        - trigger_action
      description: The routine whose fire started this chat
    ActivityLimitedSchema:
      type: object
      properties:
        id:
          type: string
        contact:
          $ref: '#/components/schemas/ModelReferenceSchema'
        record:
          $ref: '#/components/schemas/ModelReferenceSchema'
      required:
        - id
      description: >-
        Compact activity reference: its id and the contact or custom-table
        record it was written on, drawn like their mention chips
    ChatStateSchema:
      type: object
      properties:
        id:
          type: string
        state:
          $ref: '#/components/schemas/ChatStateStatusSchema'
        channel_type:
          $ref: '#/components/schemas/ChannelTypeIdSchema'
        assistant:
          $ref: '#/components/schemas/PublicAssistantSchema'
        assistant_channel:
          $ref: '#/components/schemas/PublicAssistantChannelSchema'
        conversation_id:
          type: string
          description: The ID of the conversation associated with the chat
        assigned_user:
          $ref: '#/components/schemas/UserLimitedSchema'
        assigned_at:
          type:
            - string
            - 'null'
          format: date-time
        assistant_config:
          $ref: '#/components/schemas/AssistantConfigSchema'
        ai_enabled:
          type: boolean
          description: Whether AI is enabled for the chat
        admin_unseen_count:
          type: number
          description: The number of unseen messages in the chat
        user_unseen_count:
          type: number
          description: The number of unseen messages in the chat
        follow_up_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Scheduled follow-up datetime
        muted_until:
          type:
            - string
            - 'null'
          format: date-time
          description: Mute expiry datetime (null = not muted)
        free_window_expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the free entry point window closes: templates sent before it
            are not charged. It never extends the reply window (null = no free
            window)
        csat_score:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 5
          description: Customer satisfaction score (1-5)
        last_contact_message_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - state
        - channel_type
        - conversation_id
        - ai_enabled
        - admin_unseen_count
        - user_unseen_count
      description: Schema for the chat state
    ChatMessageSchema:
      type: object
      properties:
        id:
          type: string
        role:
          $ref: '#/components/schemas/ModelMessageRoleSchema'
        model:
          type: string
          description: The model used for the message
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ModelMessageSchema'
          description: The message content
        member:
          $ref: '#/components/schemas/ChatMemberSchema'
        status:
          $ref: '#/components/schemas/ChatStatusSchema'
        error:
          type: string
          description: Error message if the message failed
        broadcast_id:
          type: string
          description: ID of the broadcast this message originates from
        is_broadcast_message:
          type: boolean
          description: Whether this message was sent via a broadcast template
        channel_type:
          allOf:
            - $ref: '#/components/schemas/ChannelTypeIdSchema'
            - description: The channel the message arrived through, if any
        usage:
          $ref: '#/components/schemas/ModelUsageSchema'
        cost:
          $ref: '#/components/schemas/ModelUsageCostSchema'
        delivered_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the message was delivered to the recipient
        reactions:
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageReactionSchema'
          description: Emoji reactions on the message
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - role
        - model
        - status
        - created_at
        - updated_at
      description: The chat message schema
    ChatReferralSchema:
      oneOf:
        - $ref: '#/components/schemas/ChatMessengerAdSchema'
        - $ref: '#/components/schemas/ChatMessengerProductSchema'
        - $ref: '#/components/schemas/ChatMessengerProductTemplateSchema'
        - $ref: '#/components/schemas/ChatWhatsAppAdSchema'
        - $ref: '#/components/schemas/ChatWhatsAppProductSchema'
        - $ref: '#/components/schemas/ChatWhatsAppOrderSchema'
        - $ref: '#/components/schemas/ChatInstagramAdSchema'
        - $ref: '#/components/schemas/ChatInstagramProductSchema'
        - $ref: '#/components/schemas/ChatInstagramProductTemplateSchema'
        - $ref: '#/components/schemas/ChatInstagramPostSchema'
        - $ref: '#/components/schemas/ChatInstagramReelSchema'
        - $ref: '#/components/schemas/ChatInstagramStorySchema'
        - $ref: '#/components/schemas/ChatInstagramStoryMentionSchema'
        - $ref: '#/components/schemas/ChatInstagramCommentSchema'
        - $ref: '#/components/schemas/ChatMessengerPostSchema'
        - $ref: '#/components/schemas/ChatMessengerReelSchema'
        - $ref: '#/components/schemas/ChatMessengerCommentSchema'
        - $ref: '#/components/schemas/ChatTikTokAdSchema'
        - $ref: '#/components/schemas/ChatTikTokPostShareSchema'
        - $ref: '#/components/schemas/ChatTikTokShortLinkSchema'
        - $ref: '#/components/schemas/ChatWebWidgetReferralSchema'
      discriminator:
        propertyName: type
        mapping:
          messenger_ad: '#/components/schemas/ChatMessengerAdSchema'
          messenger_product: '#/components/schemas/ChatMessengerProductSchema'
          messenger_product_template: '#/components/schemas/ChatMessengerProductTemplateSchema'
          whatsapp_ad: '#/components/schemas/ChatWhatsAppAdSchema'
          whatsapp_product: '#/components/schemas/ChatWhatsAppProductSchema'
          whatsapp_order: '#/components/schemas/ChatWhatsAppOrderSchema'
          instagram_ad: '#/components/schemas/ChatInstagramAdSchema'
          instagram_product: '#/components/schemas/ChatInstagramProductSchema'
          instagram_product_template: '#/components/schemas/ChatInstagramProductTemplateSchema'
          instagram_post: '#/components/schemas/ChatInstagramPostSchema'
          instagram_reel: '#/components/schemas/ChatInstagramReelSchema'
          instagram_story: '#/components/schemas/ChatInstagramStorySchema'
          instagram_story_mention: '#/components/schemas/ChatInstagramStoryMentionSchema'
          instagram_comment: '#/components/schemas/ChatInstagramCommentSchema'
          messenger_post: '#/components/schemas/ChatMessengerPostSchema'
          messenger_reel: '#/components/schemas/ChatMessengerReelSchema'
          messenger_comment: '#/components/schemas/ChatMessengerCommentSchema'
          tiktok_ad: '#/components/schemas/ChatTikTokAdSchema'
          tiktok_post_share: '#/components/schemas/ChatTikTokPostShareSchema'
          tiktok_short_link: '#/components/schemas/ChatTikTokShortLinkSchema'
          web_widget: '#/components/schemas/ChatWebWidgetReferralSchema'
      description: >-
        Referral/commerce event data from Meta platforms — ads, products,
        orders.
    ChatReminderSchema:
      type: object
      properties:
        id:
          type: string
        note:
          type: string
        schedule:
          type:
            - string
            - 'null'
        timezone:
          allOf:
            - $ref: '#/components/schemas/TimezoneValueSchema'
            - type:
                - string
                - 'null'
              description: IANA timezone identifier (e.g. America/New_York)
        next_run_at:
          type:
            - string
            - 'null'
          format: date-time
        occurrences:
          type: number
        max_occurrences:
          type:
            - number
            - 'null'
        created_at:
          type: string
          format: date-time
      required:
        - id
        - note
        - schedule
        - timezone
        - next_run_at
        - occurrences
        - max_occurrences
        - created_at
    ChatAttentionItemSchema:
      type: object
      properties:
        id:
          type: string
        kind:
          $ref: '#/components/schemas/ChatAttentionKindSchema'
        message_id:
          type: string
        tool_call_id:
          type: string
        action_name:
          type:
            - string
            - 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - kind
        - message_id
        - tool_call_id
        - action_name
        - created_at
    IconNameSchema:
      type: string
      enum:
        - StepFormIcon
        - StepAiIcon
        - StepNoteIcon
        - StepBranchIcon
        - StepCodeIcon
        - SmsIcon
        - ConnectionIcon
        - ConnectionSchedulerIcon
        - ConnectionFilesIcon
        - ConnectionHttpIcon
        - ConnectionHttpCredentialsIcon
        - ConnectionWorkflowIcon
        - ConnectionMcpIcon
        - ConnectionOpenApiIcon
        - ConnectionAudienceIcon
        - ConnectionContactsIcon
        - ConnectionTablesIcon
        - ConnectionAssistantsIcon
        - ConnectionAgentsIcon
        - ConnectionChatsIcon
        - ConnectionInboxIcon
        - ConnectionKnowledgeIcon
        - ConnectionAuditIcon
        - InternalIntegrationIcon
        - CustomIntegrationIcon
        - ToolThinkIcon
        - ToolWebSearchIcon
        - ToolWebScrapingIcon
        - ToolGenerateImageIcon
        - ToolDisplayFileIcon
        - ToolCalculatorIcon
        - ToolGenerateFileIcon
        - ToolGeneratePdfIcon
        - ToolRunCodeIcon
        - ToolDeepResearchIcon
        - ToolSearchKbIcon
        - ToolShowOptionsIcon
        - ToolRequestLocationIcon
        - ToolSendLocationIcon
        - ToolSendContactIcon
        - ToolManageMemoryIcon
        - ToolUpdateContactIcon
        - TextIcon
        - ClockFadingIcon
        - CalendarIcon
        - CloudIcon
        - GlobeAltIcon
        - LockClosedIcon
        - NoSymbolIcon
        - SparklesIcon
        - AcademicCapIcon
        - HandRaisedIcon
        - BoltIcon
        - WorkflowIcon
        - FileSpreadsheetIcon
        - DatabaseIcon
        - TableIcon
        - TableRowIcon
        - TableRowAddIcon
        - TableRowEditIcon
        - TableRowDeleteIcon
        - TableRowsIcon
        - PageIcon
        - UserIcon
        - UsersIcon
        - EmailIcon
        - PhoneIcon
        - CurrencyIcon
        - FunctionIcon
        - TableCellsIcon
        - DocumentTextIcon
        - QueueListIcon
        - TagIcon
        - SettingsIcon
        - ShoppingCartIcon
        - ShoppingBagIcon
        - BuildingStorefrontIcon
        - MegaphoneIcon
        - WrenchScrewdriverIcon
        - MagnifyingGlassIcon
        - DocumentChartBarIcon
        - ClipboardDocumentListIcon
        - ClipboardDocumentCheckIcon
        - FolderIcon
        - ArchiveBoxIcon
        - InboxIcon
        - BookOpenIcon
        - BookmarkIcon
        - NewspaperIcon
        - RectangleStackIcon
        - PencilSquareIcon
        - UserGroupIcon
        - UserPlusIcon
        - IdentificationIcon
        - FaceSmileIcon
        - HandThumbUpIcon
        - HeartIcon
        - StarIcon
        - CheckBadgeIcon
        - TrophyIcon
        - CrownIcon
        - ChatBubbleLeftIcon
        - ChatBubbleLeftRightIcon
        - EnvelopeIcon
        - EnvelopeOpenIcon
        - DevicePhoneMobileIcon
        - BellIcon
        - PaperAirplaneIcon
        - AtSymbolIcon
        - RssIcon
        - LifebuoyIcon
        - CreditCardIcon
        - BanknotesIcon
        - CurrencyDollarIcon
        - CurrencyEuroIcon
        - ReceiptPercentIcon
        - WalletIcon
        - CoinsIcon
        - GiftIcon
        - TicketIcon
        - ScaleIcon
        - TruckIcon
        - CubeIcon
        - CalendarDaysIcon
        - CalendarDateRangeIcon
        - ClockIcon
        - FlagIcon
        - CheckCircleIcon
        - ListBulletIcon
        - FunnelIcon
        - ChartBarIcon
        - ChartPieIcon
        - PresentationChartLineIcon
        - ArrowTrendingUpIcon
        - BriefcaseIcon
        - Cog6ToothIcon
        - KeyIcon
        - ShieldCheckIcon
        - LightBulbIcon
        - BeakerIcon
        - BugAntIcon
        - CpuChipIcon
        - CodeBracketIcon
        - CommandLineIcon
        - ServerIcon
        - LinkIcon
        - HomeIcon
        - HomeModernIcon
        - BuildingOfficeIcon
        - BuildingOffice2Icon
        - BuildingLibraryIcon
        - MapPinIcon
        - MapIcon
        - GlobeAmericasIcon
        - RocketLaunchIcon
        - PlaneIcon
        - CarIcon
        - SunIcon
        - MoonIcon
        - FireIcon
        - CakeIcon
        - ScissorsIcon
        - SwatchIcon
        - PaintBrushIcon
        - CoffeeIcon
        - UtensilsIcon
        - LeafIcon
        - DumbbellIcon
        - HeartPulseIcon
        - PawPrintIcon
        - StethoscopeIcon
        - CameraIcon
        - PhotoIcon
        - FilmIcon
        - VideoCameraIcon
        - MicrophoneIcon
        - MusicalNoteIcon
        - SpeakerWaveIcon
        - PlayCircleIcon
        - TvIcon
        - RadioIcon
        - PuzzlePieceIcon
        - GamepadIcon
        - ModelAutoIcon
        - ModelOpenAIIcon
        - ModelAnthropicIcon
        - ModelClaudeIcon
        - ModelGoogleIcon
        - ModelGeminiIcon
        - ModelXAIIcon
        - ModelGrokIcon
        - ModelPerplexityIcon
        - ModelGroqIcon
        - ModelAzureIcon
        - ModelElevenLabsIcon
        - ModelDeepgramIcon
        - ModelOpenRouterIcon
        - ModelDeepSeekIcon
        - ModelMoonshotIcon
        - ModelQwenIcon
        - ModelMetaIcon
        - ModelZhipuIcon
      description: The name of the icon to use in the UI
    FieldsSchema:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/FieldSchema'
      description: The definition of the field schemas
    InputValuesSchema:
      type: object
      additionalProperties: {}
      description: >-
        For connection-bound tools, locked input values (e.g. a selected
        resource) that drive dynamic fields and are injected at execution
    DynamicFieldsSchema:
      type: object
      properties:
        path:
          type: string
        definition:
          $ref: '#/components/schemas/FieldsSchema'
      required:
        - path
        - definition
      description: The dynamic fields input definitions
    ModelFeatureReasoningSchema:
      type: object
      properties:
        effort:
          $ref: '#/components/schemas/ModelFeatureReasoningEffortSchema'
      required:
        - effort
      description: The reasoning capability of the model.
    ConnectionActionApprovalModeSchema:
      type: string
      enum:
        - auto
        - ask
        - never
      description: When the assistant must ask before running the action
    ChatWorkbenchFeatureSchema:
      type: object
      properties:
        enabled:
          type: boolean
        network:
          $ref: '#/components/schemas/ChatWorkbenchNetworkSchema'
      description: 'Workbench: run code and tools in a sandbox.'
    ChatMemberRoleSchema:
      type: string
      enum:
        - ADMIN
        - MEMBER
      description: The role of the member in the chat
    UserPublicSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        avatar:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - avatar
    PublicSessionSchema:
      type: object
      properties:
        id:
          type: string
      required:
        - id
      description: Data that is publicly accessible for a session
    PublicContactChannelSchema:
      type: object
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/ChannelTypeIdSchema'
        user_id:
          type: string
          description: >-
            The unique identifier for the contact channel, e.g Phone Number or
            User ID
        avatar:
          type:
            - string
            - 'null'
          description: The avatar for the contact channel, e.g X Avatar URL
        name:
          type:
            - string
            - 'null'
          description: The name for the contact channel, e.g Full Name
        username:
          type:
            - string
            - 'null'
          description: The username for the contact channel, e.g Username
        email:
          type:
            - string
            - 'null'
          format: email
          description: The email for the contact channel, e.g Email
        phone:
          type:
            - string
            - 'null'
          description: The phone number for the contact channel, e.g Phone Number
        country:
          type:
            - string
            - 'null'
          description: >-
            The country code associated with the contact channel, e.g US for
            United States
        agent:
          type:
            - string
            - 'null'
          description: The user agent associated with the contact channel
        ip:
          type:
            - string
            - 'null'
          description: The IP address associated with the contact channel
        language:
          type:
            - string
            - 'null'
          description: >-
            The language code associated with the contact channel, e.g en for
            English
        link:
          type: string
          description: >-
            A link to the contact channel, e.g a link to the social media
            profile
        contact:
          $ref: '#/components/schemas/PublicContactSchema'
      required:
        - id
        - type
        - user_id
        - avatar
        - name
        - username
        - email
        - phone
        - country
        - agent
        - ip
        - language
        - contact
      description: Schema for the public contact channel
    PickerIconEmojiSchema:
      type: string
      format: emoji
      description: >-
        The emoji of a curated icon a user can pick for a table, view, field, or
        other entity
    PickerIconNameSchema:
      type: string
      enum:
        - TableCellsIcon
        - DatabaseIcon
        - DocumentTextIcon
        - DocumentChartBarIcon
        - ClipboardDocumentListIcon
        - ClipboardDocumentCheckIcon
        - FolderIcon
        - ArchiveBoxIcon
        - InboxIcon
        - BookOpenIcon
        - BookmarkIcon
        - NewspaperIcon
        - RectangleStackIcon
        - PencilSquareIcon
        - UserIcon
        - UsersIcon
        - UserGroupIcon
        - UserPlusIcon
        - IdentificationIcon
        - FaceSmileIcon
        - HandThumbUpIcon
        - HeartIcon
        - StarIcon
        - CheckBadgeIcon
        - TrophyIcon
        - CrownIcon
        - ChatBubbleLeftIcon
        - ChatBubbleLeftRightIcon
        - EnvelopeIcon
        - EnvelopeOpenIcon
        - PhoneIcon
        - DevicePhoneMobileIcon
        - MegaphoneIcon
        - BellIcon
        - PaperAirplaneIcon
        - AtSymbolIcon
        - RssIcon
        - LifebuoyIcon
        - ShoppingCartIcon
        - ShoppingBagIcon
        - BuildingStorefrontIcon
        - CreditCardIcon
        - BanknotesIcon
        - CurrencyDollarIcon
        - CurrencyEuroIcon
        - ReceiptPercentIcon
        - WalletIcon
        - CoinsIcon
        - GiftIcon
        - TagIcon
        - TicketIcon
        - ScaleIcon
        - TruckIcon
        - CubeIcon
        - CalendarIcon
        - CalendarDaysIcon
        - CalendarDateRangeIcon
        - ClockIcon
        - FlagIcon
        - CheckCircleIcon
        - ListBulletIcon
        - QueueListIcon
        - FunnelIcon
        - ChartBarIcon
        - ChartPieIcon
        - PresentationChartLineIcon
        - ArrowTrendingUpIcon
        - BriefcaseIcon
        - WrenchScrewdriverIcon
        - Cog6ToothIcon
        - KeyIcon
        - LockClosedIcon
        - ShieldCheckIcon
        - BoltIcon
        - LightBulbIcon
        - BeakerIcon
        - BugAntIcon
        - CpuChipIcon
        - CodeBracketIcon
        - CommandLineIcon
        - ServerIcon
        - LinkIcon
        - HomeIcon
        - HomeModernIcon
        - BuildingOfficeIcon
        - BuildingOffice2Icon
        - BuildingLibraryIcon
        - MapPinIcon
        - MapIcon
        - GlobeAltIcon
        - GlobeAmericasIcon
        - RocketLaunchIcon
        - PlaneIcon
        - CarIcon
        - SunIcon
        - MoonIcon
        - FireIcon
        - SparklesIcon
        - CakeIcon
        - AcademicCapIcon
        - ScissorsIcon
        - SwatchIcon
        - PaintBrushIcon
        - CoffeeIcon
        - UtensilsIcon
        - LeafIcon
        - DumbbellIcon
        - HeartPulseIcon
        - PawPrintIcon
        - StethoscopeIcon
        - CameraIcon
        - PhotoIcon
        - FilmIcon
        - VideoCameraIcon
        - MicrophoneIcon
        - MusicalNoteIcon
        - SpeakerWaveIcon
        - PlayCircleIcon
        - TvIcon
        - RadioIcon
        - PuzzlePieceIcon
        - GamepadIcon
      description: >-
        The name of a curated icon a user can pick for a table, view, field, or
        other entity
    ColorNameSchema:
      type: string
      enum:
        - red
        - orange
        - amber
        - yellow
        - lime
        - green
        - teal
        - cyan
        - sky
        - blue
        - indigo
        - violet
        - purple
        - fuchsia
        - pink
        - rose
        - neutral
      options:
        red:
          label: Red
          color: red
        orange:
          label: Orange
          color: orange
        amber:
          label: Amber
          color: amber
        yellow:
          label: Yellow
          color: yellow
        lime:
          label: Lime
          color: lime
        green:
          label: Green
          color: green
        teal:
          label: Teal
          color: teal
        cyan:
          label: Cyan
          color: cyan
        sky:
          label: Sky
          color: sky
        blue:
          label: Blue
          color: blue
        indigo:
          label: Indigo
          color: indigo
        violet:
          label: Violet
          color: violet
        purple:
          label: Purple
          color: purple
        fuchsia:
          label: Fuchsia
          color: fuchsia
        pink:
          label: Pink
          color: pink
        rose:
          label: Rose
          color: rose
        neutral:
          label: Neutral
          color: neutral
      title: Color
      description: Accent color, by name
    AgentShapeSchema:
      type: string
      enum:
        - square
        - round
        - pebble
        - slate
        - beam
        - bloom
        - arch
        - clave
      title: Shape
      description: The silhouette of a generated agent face
    RoutineTypeSchema:
      type: string
      enum:
        - SCHEDULED
        - AUTOPILOT
        - WEBHOOK
        - TRIGGER
      description: >-
        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
    ModelReferenceSchema:
      type: object
      properties:
        kind:
          $ref: '#/components/schemas/ModelReferenceKindSchema'
        id:
          type: string
          description: Public id of the referenced entity
        name:
          type: string
          description: Display name, snapshotted when the text was written
        icon:
          anyOf:
            - $ref: '#/components/schemas/PickerIconEmojiSchema'
            - type: string
              maxLength: 64
              pattern: ^[a-zA-Z0-9_-]+$
              description: >-
                The name of a curated icon a user can pick for a table, view,
                field, or other entity
              oneOf:
                - $ref: '#/components/schemas/PickerIconNameSchema'
            - type: 'null'
          description: >-
            The entity's own icon or emoji, filled on write. Null = the default
            of its kind
        icon_url:
          type:
            - string
            - 'null'
          format: uri
          description: The entity's image, filled on write, when it has one
        color:
          type:
            - string
            - 'null'
          enum:
            - red
            - orange
            - amber
            - yellow
            - lime
            - green
            - teal
            - cyan
            - sky
            - blue
            - indigo
            - violet
            - purple
            - fuchsia
            - pink
            - rose
            - neutral
            - null
          options:
            red:
              label: Red
              color: red
            orange:
              label: Orange
              color: orange
            amber:
              label: Amber
              color: amber
            yellow:
              label: Yellow
              color: yellow
            lime:
              label: Lime
              color: lime
            green:
              label: Green
              color: green
            teal:
              label: Teal
              color: teal
            cyan:
              label: Cyan
              color: cyan
            sky:
              label: Sky
              color: sky
            blue:
              label: Blue
              color: blue
            indigo:
              label: Indigo
              color: indigo
            violet:
              label: Violet
              color: violet
            purple:
              label: Purple
              color: purple
            fuchsia:
              label: Fuchsia
              color: fuchsia
            pink:
              label: Pink
              color: pink
            rose:
              label: Rose
              color: rose
            neutral:
              label: Neutral
              color: neutral
          title: Color
          description: The entity's tint, filled on write, when it has one
      required:
        - kind
        - id
        - name
      description: >-
        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
    ChatStateStatusSchema:
      type: string
      enum:
        - OPEN
        - CLOSED
      options:
        OPEN:
          label: Open
        CLOSED:
          label: Resolved
      title: Status
      description: The state status of the chat
    ChannelTypeIdSchema:
      type: string
      enum:
        - internal
        - org
        - agent
        - custom
        - whatsapp_bot
        - messenger_bot
        - instagram_dm
        - tiktok_dm
        - telegram_bot
        - slack_bot
        - teams_bot
        - gmail
        - outlook
        - twilio
        - telnyx
        - email
        - smpp
      description: The channel type
    PublicAssistantSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        avatar_url:
          type:
            - string
            - 'null'
        deleted:
          type: boolean
        config:
          $ref: '#/components/schemas/PublicAssistantConfigSchema'
      required:
        - id
        - name
        - avatar_url
        - deleted
        - config
      description: Schema for a public assistant
    PublicAssistantChannelSchema:
      type: object
      properties:
        id:
          type: string
        enabled:
          type: boolean
        has_connection:
          type: boolean
        updates_outside_window:
          type: boolean
          description: >-
            The channel delivers updates after the messaging window closed
            (WhatsApp Direct Send) and the provider has not rejected one for
            this connection yet
        identity:
          type:
            - string
            - 'null'
          description: >-
            The channel identity messages are exchanged through, e.g the
            WhatsApp phone number
      required:
        - id
        - enabled
        - has_connection
        - identity
      description: Schema for a public assistant channel
    UserLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        email:
          type: string
          format: email
        avatar:
          type:
            - string
            - 'null'
        seen_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - name
        - email
        - avatar
        - seen_at
      description: The assigned user for the conversation
    AssistantConfigSchema:
      type: object
      properties:
        instructions:
          type: string
          maxLength: 40000
          title: Instructions
          description: 'The instructions for the assistant: its system prompt'
        language:
          $ref: '#/components/schemas/ModelLanguageSchema'
        model:
          type: string
          minLength: 1
          maxLength: 128
          title: Model
          description: The model to use for the assistant
        conversation:
          $ref: '#/components/schemas/AssistantConversationConfigSchema'
        widget:
          $ref: '#/components/schemas/AssistantWidgetConfigSchema'
        knowledge_scope:
          $ref: '#/components/schemas/KnowledgeModeSchema'
        timezone:
          $ref: '#/components/schemas/TimezoneValueSchema'
      required:
        - language
        - model
        - conversation
        - knowledge_scope
        - timezone
      description: Schema for the configuration of an assistant
    ModelMessageRoleSchema:
      type: string
      enum:
        - user
        - assistant
        - system
        - tool
        - event
        - note
      description: The role of the message
    ModelMessageSchema:
      oneOf:
        - $ref: '#/components/schemas/ModelSystemMessageSchema'
        - $ref: '#/components/schemas/ModelAssistantMessageSchema'
        - $ref: '#/components/schemas/ModelUserMessageSchema'
        - $ref: '#/components/schemas/ModelToolMessageSchema'
        - $ref: '#/components/schemas/ModelEventMessageSchema'
        - $ref: '#/components/schemas/ModelNoteMessageSchema'
      discriminator:
        propertyName: role
        mapping:
          system: '#/components/schemas/ModelSystemMessageSchema'
          assistant: '#/components/schemas/ModelAssistantMessageSchema'
          user: '#/components/schemas/ModelUserMessageSchema'
          tool: '#/components/schemas/ModelToolMessageSchema'
          event: '#/components/schemas/ModelEventMessageSchema'
          note: '#/components/schemas/ModelNoteMessageSchema'
    ChatStatusSchema:
      type: string
      enum:
        - RUNNING
        - COMPLETED
        - FAILED
        - CANCELED
      description: The chat status
    ModelUsageSchema:
      type: object
      properties:
        input_tokens:
          type: number
          description: Number of input tokens used by the model
        output_tokens:
          type: number
          description: Number of output tokens generated by the model
        total_tokens:
          type: number
          description: Total number of tokens used by the model
        reasoning_tokens:
          type: number
          description: Number of reasoning tokens used by the model
        input_tokens_cache_read:
          type: number
          description: Number of input tokens cached read by the model
        input_tokens_cache_write:
          type: number
          description: Number of input tokens cached written by the model
        turns:
          type: array
          items:
            $ref: '#/components/schemas/ModelUsageTurnSchema'
      description: The usage information for the message
    ModelUsageCostSchema:
      type: object
      properties:
        total:
          type: number
          description: Amount billed for the message, in USD
        base:
          type: number
          description: Amount at the chat's base rate, before any discount, in USD
        lines:
          $ref: '#/components/schemas/ModelUsageCostLinesSchema'
      required:
        - total
        - base
        - lines
      description: The cost of a message, at the rates it is billed at
    ChatMessageReactionSchema:
      type: object
      properties:
        emoji:
          type: string
        member_id:
          type: string
          description: Reacting member; absent when the AI reacted
      required:
        - emoji
      description: An emoji reaction on a chat message
    ChatMessengerAdSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - messenger_ad
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        ref:
          type: string
        ad_id:
          type: string
        source:
          type: string
        referer_uri:
          type: string
        ads_context_data:
          type: object
          properties:
            ad_title:
              type: string
            photo_url:
              type: string
            video_url:
              type: string
            post_id:
              type: string
            product_id:
              type: string
      required:
        - type
    ChatMessengerProductSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - messenger_product
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        product:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            image_url:
              type: string
            price:
              type: string
            description:
              type: string
            url:
              type: string
          required:
            - id
      required:
        - type
        - product
    ChatMessengerProductTemplateSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - messenger_product_template
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        products:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              retailer_id:
                type: string
              image_url:
                type: string
              title:
                type: string
              subtitle:
                type: string
            required:
              - id
      required:
        - type
        - products
    ChatWhatsAppAdSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - whatsapp_ad
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        source_url:
          type: string
        source_id:
          type: string
        source_type:
          type: string
        headline:
          type: string
        body:
          type: string
        media_type:
          type: string
        image_url:
          type: string
        video_url:
          type: string
        thumbnail_url:
          type: string
        ctwa_clid:
          type: string
      required:
        - type
    ChatWhatsAppProductSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - whatsapp_product
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        catalog_id:
          type: string
        product_retailer_id:
          type: string
        name:
          type: string
        image_url:
          type: string
        price:
          type: string
        description:
          type: string
        url:
          type: string
        retailer_id:
          type: string
      required:
        - type
        - catalog_id
        - product_retailer_id
    ChatWhatsAppOrderSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - whatsapp_order
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        catalog_id:
          type: string
        product_items:
          type: array
          items:
            type: object
            properties:
              product_retailer_id:
                type: string
              quantity:
                type: number
              item_price:
                type: number
              currency:
                type: string
              name:
                type: string
              image_url:
                type: string
              price:
                type: string
              description:
                type: string
              url:
                type: string
              retailer_id:
                type: string
            required:
              - product_retailer_id
              - quantity
              - item_price
              - currency
        text:
          type: string
      required:
        - type
        - catalog_id
        - product_items
    ChatInstagramAdSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_ad
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        ref:
          type: string
        ad_id:
          type: string
        source:
          type: string
        ads_context_data:
          type: object
          properties:
            ad_title:
              type: string
            photo_url:
              type: string
            video_url:
              type: string
      required:
        - type
    ChatInstagramProductSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_product
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        product:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            image_url:
              type: string
            price:
              type: string
            description:
              type: string
            url:
              type: string
          required:
            - id
      required:
        - type
        - product
    ChatInstagramProductTemplateSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_product_template
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        products:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              retailer_id:
                type: string
              image_url:
                type: string
              title:
                type: string
              subtitle:
                type: string
            required:
              - id
      required:
        - type
        - products
    ChatInstagramPostSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_post
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        post_id:
          type: string
        post_media_id:
          type: string
        title:
          type: string
        media_url:
          type: string
        username:
          type: string
        permalink:
          type: string
      required:
        - type
    ChatInstagramReelSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_reel
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        reel_video_id:
          type: string
        title:
          type: string
        media_url:
          type: string
        username:
          type: string
        permalink:
          type: string
      required:
        - type
    ChatInstagramStorySchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_story
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        story_media_id:
          type: string
        media_url:
          type: string
        username:
          type: string
        permalink:
          type: string
        link_sticker_url:
          type: string
      required:
        - type
    ChatInstagramStoryMentionSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_story_mention
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        media_url:
          type: string
        username:
          type: string
        permalink:
          type: string
      required:
        - type
    ChatInstagramCommentSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_comment
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        comment_id:
          type: string
        media_id:
          type: string
        permalink:
          type: string
        text:
          type: string
        parent_id:
          type: string
        private_reply:
          type: boolean
          enum:
            - true
      required:
        - type
        - comment_id
    ChatMessengerPostSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - messenger_post
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        post_id:
          type: string
        title:
          type: string
        permalink:
          type: string
        media_url:
          type: string
      required:
        - type
    ChatMessengerReelSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - messenger_reel
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        reel_video_id:
          type: string
        title:
          type: string
        permalink:
          type: string
        media_url:
          type: string
      required:
        - type
    ChatMessengerCommentSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - messenger_comment
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        comment_id:
          type: string
        post_id:
          type: string
        permalink:
          type: string
        text:
          type: string
        parent_id:
          type: string
        private_reply:
          type: boolean
          enum:
            - true
      required:
        - type
        - comment_id
    ChatTikTokAdSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - tiktok_ad
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        advertiser_id:
          type: string
        ad_id:
          type: string
        ad_name:
          type: string
        embed_url:
          type: string
        message_material_id:
          type: string
        timestamp:
          type: number
      required:
        - type
    ChatTikTokPostShareSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - tiktok_post_share
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        video_id:
          type: string
        embed_url:
          type: string
      required:
        - type
    ChatTikTokShortLinkSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - tiktok_short_link
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        ref:
          type: string
        prefilled_message:
          type: string
        prefilled_message_audit_status:
          type: string
          enum:
            - PASS
            - REJECT
      required:
        - type
    ChatWebWidgetReferralSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - web_widget
        parts:
          $ref: '#/components/schemas/ChatMessageReferralPartsSchema'
        utm_source:
          type: string
        utm_medium:
          type: string
        utm_campaign:
          type: string
        utm_term:
          type: string
        utm_content:
          type: string
        utm_ad:
          type: string
        utm_match:
          type: string
        utm_referrer:
          type: string
        gclid:
          type: string
        fbclid:
          type: string
        msclkid:
          type: string
        ttclid:
          type: string
        li_fat_id:
          type: string
        rdt_cid:
          type: string
        referrer:
          type: string
        page_url:
          type: string
      required:
        - type
    TimezoneValueSchema:
      type: string
      title: Timezone
      description: IANA timezone, e.g. "America/New_York".
    ChatAttentionKindSchema:
      type: string
      enum:
        - approval
        - question
        - ask
        - connection
    FieldSchema:
      oneOf:
        - $ref: '#/components/schemas/FieldFileSchema'
        - $ref: '#/components/schemas/FieldIdSchema'
        - $ref: '#/components/schemas/FieldNumberSchema'
        - $ref: '#/components/schemas/FieldStringSchema'
        - $ref: '#/components/schemas/FieldBooleanSchema'
        - $ref: '#/components/schemas/FieldDateSchema'
        - $ref: '#/components/schemas/FieldDateTimeSchema'
        - $ref: '#/components/schemas/FieldTimeSchema'
        - $ref: '#/components/schemas/FieldEnumSchema'
        - $ref: '#/components/schemas/FieldContentSchema'
        - $ref: '#/components/schemas/FieldConnectionSchema'
        - $ref: '#/components/schemas/FieldRecordSchema'
        - $ref: '#/components/schemas/FieldTableFieldSchema'
        - $ref: '#/components/schemas/FieldContactSchema'
        - $ref: '#/components/schemas/FieldUserSchema'
        - $ref: '#/components/schemas/FieldChatSchema'
        - $ref: '#/components/schemas/FieldSegmentSchema'
        - $ref: '#/components/schemas/FieldAssistantSchema'
        - $ref: '#/components/schemas/FieldAgentSchema'
        - $ref: '#/components/schemas/FieldObjectSchema'
      discriminator:
        propertyName: type
        mapping:
          file: '#/components/schemas/FieldFileSchema'
          id: '#/components/schemas/FieldIdSchema'
          number: '#/components/schemas/FieldNumberSchema'
          string: '#/components/schemas/FieldStringSchema'
          boolean: '#/components/schemas/FieldBooleanSchema'
          date: '#/components/schemas/FieldDateSchema'
          datetime: '#/components/schemas/FieldDateTimeSchema'
          time: '#/components/schemas/FieldTimeSchema'
          enum: '#/components/schemas/FieldEnumSchema'
          content: '#/components/schemas/FieldContentSchema'
          connection: '#/components/schemas/FieldConnectionSchema'
          record: '#/components/schemas/FieldRecordSchema'
          table_field: '#/components/schemas/FieldTableFieldSchema'
          contact: '#/components/schemas/FieldContactSchema'
          user: '#/components/schemas/FieldUserSchema'
          chat: '#/components/schemas/FieldChatSchema'
          segment: '#/components/schemas/FieldSegmentSchema'
          assistant: '#/components/schemas/FieldAssistantSchema'
          agent: '#/components/schemas/FieldAgentSchema'
          object: '#/components/schemas/FieldObjectSchema'
    ModelFeatureReasoningEffortSchema:
      type: string
      enum:
        - low
        - medium
        - high
      description: The effort level of the reasoning capability.
    ChatWorkbenchNetworkSchema:
      type: string
      enum:
        - full
        - limited
        - none
      description: >-
        Workbench outbound network: full (open), limited (package registries
        only), or none (offline).
    PublicContactSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        blocked:
          type: boolean
        unsubscribed:
          type: boolean
        ai_replies:
          type: boolean
        is_admin:
          type: boolean
        segments:
          type: array
          items:
            $ref: '#/components/schemas/SegmentLimitedSchema'
      required:
        - id
        - name
        - blocked
        - unsubscribed
        - ai_replies
        - is_admin
      description: Schema for the contact
    ModelReferenceKindSchema:
      type: string
      enum:
        - agent
        - routine
        - contact
        - user
        - skill
        - record
        - table
        - assistant
      description: The kind of entity a reference points at
    PublicAssistantConfigSchema:
      type: object
      properties:
        conversation:
          $ref: '#/components/schemas/PublicAssistantConversationConfigSchema'
        widget:
          $ref: '#/components/schemas/PublicAssistantWidgetConfigSchema'
      required:
        - conversation
        - widget
      description: Schema for a public assistant configuration
    ModelLanguageSchema:
      type: string
      enum:
        - auto
        - en
        - es
      description: List of supported languages for the model in ISO 639-1 format or "auto"
    AssistantConversationConfigSchema:
      type: object
      properties:
        thread_mode:
          $ref: '#/components/schemas/AssistantThreadModeSchema'
        welcome_banner:
          type: string
          maxLength: 256
          title: Welcome Banner
          description: Static greeting shown in the UI when a conversation starts.
        suggested_messages:
          type: array
          items:
            type: string
            maxLength: 64
          maxItems: 5
          title: Suggested Messages
          description: Up to 5 suggested messages shown when a conversation starts.
        auto_intro_message:
          type: string
          maxLength: 256
          title: Auto Intro Message
          description: >-
            First message the assistant sends automatically when a conversation
            begins via API.
        enable_memories:
          type: boolean
          title: Memories
          description: Let the assistant store memories about the contact.
        enable_end_conversation_tool:
          type: boolean
          title: Close Conversation Tool
          description: Let the assistant close conversations on its own.
        enable_transfer_to_human_tool:
          type: boolean
          title: AI Routing
          description: >-
            The AI Routing switch: let the assistant hand a conversation to one
            of your members. Off turns routing off, whatever the routing
            instructions say. Who can receive a handoff is the Members list in
            the same AI Routing card: add members there to route only to them
            (empty means any member), and give each one a description so the
            assistant knows which chats go to whom.
        routing_instructions:
          type: string
          maxLength: 40000
          title: Routing Instructions
          description: >-
            Business instructions that steer how this assistant routes transfers
            to a human (which member or team to prefer, when to escalate).
            Appended to the transfer tool guidance. The assistant can only route
            to the members in the AI Routing Members list (any member when it is
            empty).
        enable_block_contact_tool:
          type: boolean
          title: Block Contact Tool
          description: Let the assistant block abusive contacts.
        enable_ai_replies:
          type: boolean
          title: AI Replies
          description: >-
            When false the assistant is human-only: messages are received but
            the AI never responds.
        enable_auto_resolve:
          type: boolean
          title: Auto Resolve
          description: Automatically resolve conversations after a period of inactivity.
        enable_auto_follow_ups:
          type: boolean
          title: Auto Follow-ups
          description: Let the assistant follow up on conversations on its own.
        follow_up_instructions:
          type: string
          maxLength: 40000
          title: Follow-up Instructions
          description: >-
            Business rules that steer automatic follow-ups (cadence, hours, stop
            rules, tone).
        follow_ups_outside_window:
          type: boolean
          title: Follow up after the window closes
          description: >-
            After the messaging window closes, still follow up about something
            the contact asked for or is waiting on (WhatsApp).
        enable_auto_csat:
          type: boolean
          title: Auto CSAT
          description: >-
            Automatically score customer satisfaction when closing
            conversations.
        enable_private_chats:
          type: boolean
          title: Private Chats
          description: Enable private chats that do not appear in the inbox.
        enable_update_contact_tool:
          type: boolean
          title: Update Contact Tool
          description: Let the assistant collect and update contact information.
        enable_transcription:
          type: boolean
          title: Transcriptions
          description: >-
            Turn voice notes and videos into text, and describe what videos
            show, so any model understands them.
      required:
        - thread_mode
        - enable_memories
        - enable_transfer_to_human_tool
      description: Configuration options for the conversation thread of the assistant
    AssistantWidgetConfigSchema:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the widget shows where its embed code is installed. Off
            hides it without removing the code.
        mode:
          $ref: '#/components/schemas/AssistantWidgetModeSchema'
        appearance:
          $ref: '#/components/schemas/AssistantWidgetAppearanceSchema'
        position:
          $ref: '#/components/schemas/AssistantWidgetPositionSchema'
        omnibar_minimize_desktop:
          type: boolean
          description: >-
            Fold the omnibar into its compact centered button while visitors
            scroll on desktop too. On mobile viewports it always folds.
        hide_powered_by:
          type: boolean
        enable_dictation:
          type: boolean
        enable_file_uploads:
          type: boolean
        colors:
          $ref: '#/components/schemas/AssistantWidgetColorsConfigSchema'
        teaser:
          $ref: '#/components/schemas/AssistantWidgetTeaserConfigSchema'
        channels:
          $ref: '#/components/schemas/AssistantWidgetChannelsConfigSchema'
      default: {}
      description: Configuration of the embeddable web chat widget
    KnowledgeModeSchema:
      type: string
      enum:
        - all
        - restricted
      options:
        all:
          label: All sources
        restricted:
          label: Selected sources
      title: Knowledge Scope
      description: >-
        Which knowledge the assistant searches: all sources, or only the ones
        linked to it (List/Link/Unlink Assistant Knowledge Source).
    ModelSystemMessageSchema:
      type: object
      properties:
        role:
          type: string
          enum:
            - system
        parts:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ModelTextPartSchema'
            discriminator:
              propertyName: type
              mapping:
                text: '#/components/schemas/ModelTextPartSchema'
      required:
        - role
        - parts
      description: System message
    ModelAssistantMessageSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the assistant message
        role:
          type: string
          enum:
            - assistant
        parts:
          type: array
          items:
            $ref: '#/components/schemas/ModelAssistantMessagePartsSchema'
        reactions:
          type: string
          maxLength: 1024
          description: >-
            Prerendered emoji reactions on the message, injected at prompt build
            time
      required:
        - role
        - parts
      description: Assistant message
    ModelUserMessageSchema:
      type: object
      properties:
        role:
          type: string
          enum:
            - user
        parts:
          type: array
          items:
            $ref: '#/components/schemas/ModelUserMessagePartsSchema'
        name:
          type: string
          maxLength: 512
          description: Name of the user, used to give context on multiplayer chats
        member_role:
          $ref: '#/components/schemas/ModelUserMessageMemberRoleSchema'
        timestamp:
          type: string
          maxLength: 64
          description: >-
            Formatted timestamp for the message, used for time-awareness in
            conversations
        reactions:
          type: string
          maxLength: 1024
          description: >-
            Prerendered emoji reactions on the message, injected at prompt build
            time
        message_id:
          type: string
          maxLength: 16
          description: >-
            Short reference to the stored message (the first uuid segment, 8
            characters), injected at prompt build time so tools can target the
            message
      required:
        - role
        - parts
      description: User message
    ModelToolMessageSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the assistant message
        role:
          type: string
          enum:
            - tool
        parts:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ModelToolResultPartSchema'
            discriminator:
              propertyName: type
              mapping:
                tool_result: '#/components/schemas/ModelToolResultPartSchema'
      required:
        - role
        - parts
      description: Tool message
    ModelEventMessageSchema:
      type: object
      properties:
        role:
          type: string
          enum:
            - event
        parts:
          type: array
          items:
            $ref: '#/components/schemas/ModelEventMessagePartsSchema'
        name:
          type: string
        member_role:
          $ref: '#/components/schemas/ModelUserMessageMemberRoleSchema'
        timestamp:
          type: string
          maxLength: 64
        reactions:
          type: string
          maxLength: 1024
          description: >-
            Prerendered emoji reactions on the message, injected at prompt build
            time
        message_id:
          type: string
          maxLength: 16
          description: >-
            Short reference to the stored message (the first uuid segment, 8
            characters), injected at prompt build time so tools can target the
            message
      required:
        - role
        - parts
    ModelNoteMessageSchema:
      type: object
      properties:
        role:
          type: string
          enum:
            - note
        parts:
          type: array
          items:
            $ref: '#/components/schemas/ModelUserPartsSchema'
        name:
          type: string
          maxLength: 512
          description: Name of the staff member who wrote the note
        member_role:
          $ref: '#/components/schemas/ModelUserMessageMemberRoleSchema'
        timestamp:
          type: string
          maxLength: 64
          description: >-
            Formatted timestamp for the note, used for time-awareness in
            conversations
      required:
        - role
        - parts
    ModelUsageTurnSchema:
      type: object
      properties:
        input_tokens:
          type: number
          description: Number of input tokens used by the model
        output_tokens:
          type: number
          description: Number of output tokens generated by the model
        total_tokens:
          type: number
          description: Total number of tokens used by the model
        reasoning_tokens:
          type: number
          description: Number of reasoning tokens used by the model
        input_tokens_cache_read:
          type: number
          description: Number of input tokens cached read by the model
        input_tokens_cache_write:
          type: number
          description: Number of input tokens cached written by the model
      description: The usage of a turn
    ModelUsageCostLinesSchema:
      type: object
      properties:
        input:
          type: number
        output:
          type: number
        reasoning:
          type: number
        cache_read:
          type: number
        cache_write:
          type: number
      required:
        - input
        - output
        - reasoning
        - cache_read
        - cache_write
      description: Share of the base amount per token type, in USD
    ChatMessageReferralPartsSchema:
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/ModelFilePartSchema'
          - $ref: '#/components/schemas/ModelImagePartSchema'
        discriminator:
          propertyName: type
          mapping:
            file: '#/components/schemas/ModelFilePartSchema'
            image: '#/components/schemas/ModelImagePartSchema'
    FieldFileSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - file
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldFileDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        allowed_types:
          type: array
          items:
            type: string
          description: >-
            Allowed mime types for the file field (e.g. image/*,
            application/pdf)
        visibility:
          $ref: '#/components/schemas/FileVisibilitySchema'
        default:
          anyOf:
            - $ref: '#/components/schemas/FileSchema'
            - type: array
              items:
                $ref: '#/components/schemas/FileSchema'
          description: >-
            The default value of the file field: the already-attached file(s),
            pre-filled and replaceable
      required:
        - type
      description: The file type allows users to upload files
    FieldIdSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - id
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        prefix:
          type: string
          pattern: ^[A-Z][A-Z0-9]{0,15}$
          description: >-
            Uppercase alphanumeric prefix rendered before the record number
            (e.g. `LEAD` → `LEAD-42`). Omit to render the bare number.
      required:
        - type
      description: >-
        Readonly auto-numbered record identifier, rendered from the record
        number with an optional prefix
    FieldNumberSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - number
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldNumberDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: number
            - type: string
              enum:
                - '{{auto}}'
          description: The default value of the number field
      required:
        - type
      description: The number field allows users to input numbers
    FieldStringSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - string
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldStringDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the string field
        format:
          type: string
          enum:
            - url
            - email
            - phone
          description: The validation type for the field
        min:
          type: number
          minimum: 1
          description: The minimum length of the string field
        max:
          type: number
          minimum: 1
          description: The maximum length of the string field
      required:
        - type
      description: The string field allows users to input text
    FieldBooleanSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - boolean
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          type: boolean
          description: The default value of the boolean field
      required:
        - type
      description: The boolean field allows users mark a field as true or false
    FieldDateSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - date
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDateDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          type:
            - string
            - 'null'
          format: date-time
          description: The default value of the date field, formatted as YYYY-MM-DD
        range:
          type: boolean
          description: >-
            Turns the field into a range: requires `array: true`, and the value
            becomes an array of exactly two dates (start, end). A Timeline can
            draw it as a bar.
      required:
        - type
      description: The date field allows users to select a date
    FieldDateTimeSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - datetime
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDateTimeDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The default value of the date time field, formatted as
            YYYY-MM-DDTHH:MM:SS
        range:
          type: boolean
          description: >-
            Turns the field into a range: requires `array: true`, and the value
            becomes an array of exactly two dates (start, end). A Timeline can
            draw it as a bar.
        source:
          $ref: '#/components/schemas/FieldDateTimeSourceSchema'
      required:
        - type
      description: The date and time field allows users to select a date and time
    FieldTimeSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - time
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldTimeDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
      required:
        - type
      description: The time field allows users to select a time
    FieldEnumSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - enum
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldEnumDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the enum field
        items:
          type: array
          items:
            $ref: '#/components/schemas/FieldEnumItemSchema'
          description: The options for the enum field
        list:
          $ref: '#/components/schemas/FieldListSchema'
        additional_items:
          type: boolean
          description: Indicates whether additional unlisted items are allowed
        component:
          $ref: '#/components/schemas/FieldComponentSchema'
      required:
        - type
        - items
      description: The select field used to select from a list of items
    FieldContentSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - content
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        content:
          type: string
          description: Any markdown content
        component:
          $ref: '#/components/schemas/FieldComponentSchema'
      required:
        - type
      description: The content field used to display markdown content
    FieldConnectionSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - connection
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        connection_type:
          $ref: '#/components/schemas/ConnectionTypeSchema'
      required:
        - type
        - connection_type
      description: The connection field used to select a connection
    FieldRecordSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - record
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the record field (encoded record id)
        target_table_id:
          type: string
          description: The id of the table whose records are referenceable
      required:
        - type
      description: A reference to one or more records in another table
    FieldTableFieldSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - table_field
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          type: string
          description: >-
            The default value of the table field (field id, or the key of a
            system field)
        target_table_id:
          type: string
          description: The id of the table whose fields are listed
      required:
        - type
      description: >-
        A reference to a field (column) of a table, kept by id so a rename never
        breaks it
    FieldContactSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - contact
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the contact field (encoded contact id)
      required:
        - type
      description: A reference to one or more contacts
    FieldUserSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - user
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: >-
            The default value of the user field (encoded user id of an org
            member)
        source:
          $ref: '#/components/schemas/FieldUserSourceSchema'
      required:
        - type
      description: A reference to one or more users (org members)
    FieldChatSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - chat
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the chat field (encoded chat id)
      required:
        - type
      description: A reference to one or more chats
    FieldSegmentSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - segment
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the segment field (encoded segment id)
      required:
        - type
      description: A reference to one or more segments
    FieldAssistantSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - assistant
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the assistant field (encoded assistant id)
      required:
        - type
      description: A reference to one or more assistants
    FieldAgentSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - agent
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the agent field (encoded agent id)
      required:
        - type
      description: A reference to one or more agents
    FieldObjectSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - object
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        broadcast_exposed:
          type: boolean
          description: >-
            A per-recipient slot: the broadcast trigger `variables` and imported
            values override it by key (string inputs only)
        integration_field:
          type: boolean
          description: Indicates whether the field is common to all integrations
        display_field:
          type: boolean
          description: >-
            Marks this field as the human-readable identifier for the
            integration. Its resolved value (enum label or string) is shown on
            the assistant channel card to disambiguate multiple integrations of
            the same type.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FieldConditionSchema'
          description: Conditions that must be met for the field to be shown
        hidden:
          type: boolean
          description: Indicates whether the field is hidden from the UI
        picker:
          $ref: '#/components/schemas/FieldPickerSchema'
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: >-
            Sibling field keys that must be filled before this field can resolve
            its data (list options, dynamic fields, or a scoped reference
            picker)
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        any:
          type: boolean
          description: >-
            Offers an "Any" choice first, stored as `any`: the field matches
            every value (enum and reference pickers)
        properties:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/FieldSchema'
          description: >-
            A record of fields that can be of various types including object
            fields
        format:
          type: string
          enum:
            - schema
          description: The validation type for the object field
        additional_properties:
          anyOf:
            - $ref: '#/components/schemas/FieldAdditionalPropertiesSchema'
            - $ref: '#/components/schemas/FieldListSchema'
            - type: boolean
        default:
          anyOf:
            - type: object
              properties: {}
              additionalProperties: {}
            - type: array
              items:
                type: object
                properties: {}
                additionalProperties: {}
          description: The default value of the object field
      required:
        - type
        - properties
      description: The object field that can contain other fields, including nested objects
    SegmentLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        color:
          $ref: '#/components/schemas/ColorNameSchema'
        contacts_count:
          type: number
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - color
        - contacts_count
        - created_at
        - updated_at
      description: Schema for the segment
    PublicAssistantConversationConfigSchema:
      type: object
      properties:
        thread_mode:
          $ref: '#/components/schemas/AssistantThreadModeSchema'
        welcome_banner:
          type: string
          maxLength: 256
          title: Welcome Banner
          description: Static greeting shown in the UI when a conversation starts.
        suggested_messages:
          type: array
          items:
            type: string
            maxLength: 64
          maxItems: 5
          title: Suggested Messages
          description: Up to 5 suggested messages shown when a conversation starts.
        auto_intro_message:
          type: string
          maxLength: 256
          title: Auto Intro Message
          description: >-
            First message the assistant sends automatically when a conversation
            begins via API.
        enable_auto_csat:
          type: boolean
          title: Auto CSAT
          description: >-
            Automatically score customer satisfaction when closing
            conversations.
        enable_ai_replies:
          type: boolean
          title: AI Replies
          description: >-
            When false the assistant is human-only: messages are received but
            the AI never responds.
      required:
        - thread_mode
      description: Schema for a public assistant conversation configuration
    PublicAssistantWidgetConfigSchema:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the widget shows where its embed code is installed. Off
            hides it without removing the code.
        mode:
          $ref: '#/components/schemas/AssistantWidgetModeSchema'
        appearance:
          $ref: '#/components/schemas/AssistantWidgetAppearanceSchema'
        position:
          $ref: '#/components/schemas/AssistantWidgetPositionSchema'
        omnibar_minimize_desktop:
          type: boolean
          description: >-
            Fold the omnibar into its compact centered button while visitors
            scroll on desktop too. On mobile viewports it always folds.
        hide_powered_by:
          type: boolean
        enable_dictation:
          type: boolean
        enable_file_uploads:
          type: boolean
        colors:
          $ref: '#/components/schemas/AssistantWidgetColorsConfigSchema'
        teaser:
          $ref: '#/components/schemas/AssistantWidgetTeaserConfigSchema'
        channels:
          type: object
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/PublicAssistantWidgetChannelSchema'
            label:
              type: string
            chat_button_label:
              type: string
          required:
            - items
      required:
        - channels
      description: Widget configuration with channel references resolved to links
    AssistantThreadModeSchema:
      type: string
      enum:
        - new
        - continue
      options:
        new:
          label: New conversation
        continue:
          label: Continue previous
      title: Thread Mode
      description: >-
        Whether returning users start a new conversation or continue the
        previous one.
    AssistantWidgetModeSchema:
      type: string
      enum:
        - button
        - omnibar
        - auto
      default: button
      description: >-
        Default shape of the embedded widget: corner bubble button, centered
        omnibar, or auto (omnibar until the visitor has a conversation). A mode
        attribute on the embed element overrides it, and a visitor’s own
        header-toggle pick outranks both on desktop; mobile has no toggle and
        always follows the attribute or this setting.
    AssistantWidgetAppearanceSchema:
      type: string
      enum:
        - auto
        - light
        - dark
      default: auto
      description: 'Theme of the widget: follow the visitor system or force one'
    AssistantWidgetPositionSchema:
      type: string
      enum:
        - right
        - left
      default: right
      description: >-
        Corner where the bubble launcher is anchored (the omnibar is always
        centered). A position attribute on the embed element overrides it.
    AssistantWidgetColorsConfigSchema:
      type: object
      properties:
        accent:
          type: string
          pattern: ^#[0-9a-f]{6}$/i
          description: Accent color used inside the chat (buttons, visitor messages, links)
        launcher_background:
          type: string
          pattern: ^#[0-9a-f]{6}$/i
          description: >-
            Background color of the widget button; the icon color adapts
            automatically
      default: {}
      description: Color overrides for the widget
    AssistantWidgetTeaserConfigSchema:
      type: object
      properties:
        enabled:
          type: boolean
        message:
          type: string
          maxLength: 140
          description: Short invitation shown next to the closed widget button
        modes:
          type: string
          enum:
            - all
            - button
            - omnibar
          default: all
          description: >-
            Which widget modes show the teaser: both, only the bubble button, or
            only the omnibar
        suggestions:
          type: string
          enum:
            - all
            - button
            - omnibar
            - none
          default: button
          description: >-
            Which widget modes show the suggested replies with the teaser, or
            none. Defaults to the bubble button; the omnibar already shows them
            when focused, independent of this setting.
        delay_seconds:
          type: integer
          minimum: 0
          maximum: 120
          default: 3
          description: Seconds to wait before showing the teaser
        frequency:
          $ref: '#/components/schemas/AssistantWidgetTeaserFrequencySchema'
        devices:
          $ref: '#/components/schemas/AssistantWidgetTeaserDevicesSchema'
        version:
          type: integer
          minimum: 1
          default: 1
          description: Bump to show the teaser again to visitors who already dismissed it
      default: {}
      description: >-
        Proactive teaser configuration for the widget. The suggested replies
        shown with the teaser come from conversation.suggested_messages.
    AssistantWidgetChannelsConfigSchema:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AssistantWidgetChannelItemSchema'
          maxItems: 20
          default: []
        label:
          type: string
          maxLength: 48
          description: Heading above the channels menu; defaults to "Talk to us on"
        chat_button_label:
          type: string
          maxLength: 48
          description: Label of the launcher chat action; defaults to "Chat with us"
      default: {}
      description: >-
        Alternative channels offered in the widget launcher menu when any are
        configured
    ModelTextPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
        audio:
          $ref: '#/components/schemas/FileSchema'
        start_ms:
          type: integer
          minimum: 0
          description: >-
            Where the spoken text starts on the voice call timeline, in ms from
            the call start
        end_ms:
          type: integer
          minimum: 0
          description: >-
            Where the spoken text ends on the voice call timeline, in ms from
            the call start
        html:
          type: boolean
          description: >-
            When true, text holds the raw original inbound email HTML, stored
            verbatim. Clients sanitize and render it; the model receives
            markdown derived at read time.
        json:
          type: boolean
          description: >-
            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:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - text
    ModelAssistantMessagePartsSchema:
      oneOf:
        - $ref: '#/components/schemas/ModelTextPartSchema'
        - $ref: '#/components/schemas/ModelFilePartSchema'
        - $ref: '#/components/schemas/ModelToolCallPartSchema'
        - $ref: '#/components/schemas/ModelMessageReasoningSchema'
        - $ref: '#/components/schemas/ModelSourcePartSchema'
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/ModelTextPartSchema'
          file: '#/components/schemas/ModelFilePartSchema'
          tool_call: '#/components/schemas/ModelToolCallPartSchema'
          reasoning: '#/components/schemas/ModelMessageReasoningSchema'
          source: '#/components/schemas/ModelSourcePartSchema'
      description: Parts of the assistant message
    ModelUserMessagePartsSchema:
      oneOf:
        - $ref: '#/components/schemas/ModelTextPartSchema'
        - $ref: '#/components/schemas/ModelFilePartSchema'
        - $ref: '#/components/schemas/ModelImagePartSchema'
        - $ref: '#/components/schemas/ModelOptionSelectedPartSchema'
        - $ref: '#/components/schemas/ModelContactPartSchema'
        - $ref: '#/components/schemas/ModelLocationPartSchema'
        - $ref: '#/components/schemas/ModelReferencePartSchema'
        - $ref: '#/components/schemas/ModelToolCallPartSchema'
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/ModelTextPartSchema'
          file: '#/components/schemas/ModelFilePartSchema'
          image: '#/components/schemas/ModelImagePartSchema'
          option_selected: '#/components/schemas/ModelOptionSelectedPartSchema'
          contact: '#/components/schemas/ModelContactPartSchema'
          location: '#/components/schemas/ModelLocationPartSchema'
          reference: '#/components/schemas/ModelReferencePartSchema'
          tool_call: '#/components/schemas/ModelToolCallPartSchema'
      description: >-
        Parts of the user message: the user parts, plus the options or requests
        a business showed the contact
    ModelUserMessageMemberRoleSchema:
      type: string
      enum:
        - customer
        - staff
        - agent
        - user
      description: >-
        Role of the message sender: customer/staff/agent for assistant chats,
        user for regular chats
    ModelToolResultPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - tool_result
        id:
          type: string
          description: Unique identifier for the tool call
        name:
          type: string
          description: The name of the tool called
        parts:
          type: array
          items:
            $ref: '#/components/schemas/ModelResultPartResultPartsSchema'
          description: Parts of the tool call result
        result:
          description: >-
            The result of the tool call, can be any type based on the tool
            schema
        refresh_tools:
          type: boolean
          description: >-
            Runtime-only signal: when true, the agent loop rebuilds its tool set
            before the next step (e.g. after enable_tools / disable_tools).
            Stripped before the result is persisted.
        stop:
          type: boolean
          description: >-
            Runtime-only signal: when true, the agent loop ends after this step
            instead of spawning the next turn (e.g. close_conversation with
            stop: true). Stripped before the result is persisted.
        is_error:
          type: boolean
          description: Indicates if the tool call resulted in an error
        timestamp:
          type: number
          description: Timestamp of the tool call in milliseconds
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - id
        - name
    ModelEventMessagePartsSchema:
      oneOf:
        - $ref: '#/components/schemas/ModelEventAssignmentPartSchema'
        - $ref: '#/components/schemas/ModelEventStatusChangePartSchema'
        - $ref: '#/components/schemas/ModelEventAiStatusPartSchema'
        - $ref: '#/components/schemas/ModelEventMuteChangePartSchema'
        - $ref: '#/components/schemas/ModelEventHandoverPartSchema'
        - $ref: '#/components/schemas/ModelEventFollowUpPartSchema'
        - $ref: '#/components/schemas/ModelEventPaymentPartSchema'
        - $ref: '#/components/schemas/ModelEventAnalysisPartSchema'
        - $ref: '#/components/schemas/ModelEventReferralPartSchema'
        - $ref: '#/components/schemas/ModelEventApprovalDecisionPartSchema'
        - $ref: '#/components/schemas/ModelEventQuestionsAnsweredPartSchema'
        - $ref: '#/components/schemas/ModelEventLocationSharedPartSchema'
        - $ref: '#/components/schemas/ModelEventContactUpdatePartSchema'
        - $ref: '#/components/schemas/ModelEventConnectionConnectedPartSchema'
        - $ref: '#/components/schemas/ModelEventAgentRunStartedPartSchema'
        - $ref: '#/components/schemas/ModelEventAgentRunFinishedPartSchema'
        - $ref: '#/components/schemas/ModelEventReminderPartSchema'
        - $ref: '#/components/schemas/ModelEventMemberJoinedPartSchema'
        - $ref: '#/components/schemas/ModelEventMemberLeftPartSchema'
        - $ref: '#/components/schemas/ModelEventCallStartedPartSchema'
        - $ref: '#/components/schemas/ModelEventCallEndedPartSchema'
      discriminator:
        propertyName: type
        mapping:
          event_assignment: '#/components/schemas/ModelEventAssignmentPartSchema'
          event_status_change: '#/components/schemas/ModelEventStatusChangePartSchema'
          event_ai_status: '#/components/schemas/ModelEventAiStatusPartSchema'
          event_mute_change: '#/components/schemas/ModelEventMuteChangePartSchema'
          event_handover: '#/components/schemas/ModelEventHandoverPartSchema'
          event_follow_up: '#/components/schemas/ModelEventFollowUpPartSchema'
          event_payment: '#/components/schemas/ModelEventPaymentPartSchema'
          event_analysis: '#/components/schemas/ModelEventAnalysisPartSchema'
          event_referral: '#/components/schemas/ModelEventReferralPartSchema'
          event_approval_decision: '#/components/schemas/ModelEventApprovalDecisionPartSchema'
          event_questions_answered: '#/components/schemas/ModelEventQuestionsAnsweredPartSchema'
          event_location_shared: '#/components/schemas/ModelEventLocationSharedPartSchema'
          event_contact_update: '#/components/schemas/ModelEventContactUpdatePartSchema'
          event_connection_connected: '#/components/schemas/ModelEventConnectionConnectedPartSchema'
          event_agent_run_started: '#/components/schemas/ModelEventAgentRunStartedPartSchema'
          event_agent_run_finished: '#/components/schemas/ModelEventAgentRunFinishedPartSchema'
          event_reminder: '#/components/schemas/ModelEventReminderPartSchema'
          event_member_joined: '#/components/schemas/ModelEventMemberJoinedPartSchema'
          event_member_left: '#/components/schemas/ModelEventMemberLeftPartSchema'
          event_call_started: '#/components/schemas/ModelEventCallStartedPartSchema'
          event_call_ended: '#/components/schemas/ModelEventCallEndedPartSchema'
      description: Parts of the event message
    ModelUserPartsSchema:
      oneOf:
        - $ref: '#/components/schemas/ModelTextPartSchema'
        - $ref: '#/components/schemas/ModelUserFilePartSchema'
        - $ref: '#/components/schemas/ModelImagePartSchema'
        - $ref: '#/components/schemas/ModelOptionSelectedPartSchema'
        - $ref: '#/components/schemas/ModelContactPartSchema'
        - $ref: '#/components/schemas/ModelLocationPartSchema'
        - $ref: '#/components/schemas/ModelReferencePartSchema'
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/ModelTextPartSchema'
          file: '#/components/schemas/ModelUserFilePartSchema'
          image: '#/components/schemas/ModelImagePartSchema'
          option_selected: '#/components/schemas/ModelOptionSelectedPartSchema'
          contact: '#/components/schemas/ModelContactPartSchema'
          location: '#/components/schemas/ModelLocationPartSchema'
          reference: '#/components/schemas/ModelReferencePartSchema'
      description: User message parts
    ModelFilePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - file
        url:
          type: string
        kind:
          $ref: '#/components/schemas/ModelFileKindSchema'
        file:
          $ref: '#/components/schemas/FileSchema'
        auto_consume:
          type: boolean
          description: >-
            Whether this file should be automatically consumed and processed by
            the model
        text:
          type: string
          description: >-
            Transcript of the sound in an audio or video file, written by the
            server when the message arrives
        description:
          type: string
          description: What a video shows, written by the server when the message arrives
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - url
    ModelImagePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - image
        url:
          type: string
        kind:
          $ref: '#/components/schemas/ModelFileKindSchema'
        file:
          $ref: '#/components/schemas/FileSchema'
        auto_consume:
          type: boolean
          description: >-
            Whether this file should be automatically consumed and processed by
            the model
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - url
    FieldFileDisplaySchema:
      allOf:
        - $ref: '#/components/schemas/FieldDisplaySchema'
        - type: object
          properties:
            render:
              $ref: '#/components/schemas/FieldFileDisplayRenderSchema'
      description: Display options for the file field
    FieldSelectorModeSchema:
      type: string
      enum:
        - all
        - auto
        - manual
      description: >-
        Indicates the mode of the selector, auto will allow AI to determine the
        value, manual will allow the user to manually input a value
    FieldConditionSchema:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/FieldKeySchema'
        operator:
          $ref: '#/components/schemas/FieldConditionOperatorSchema'
        value: {}
      required:
        - field
        - operator
      description: Condition for the field
    FieldPickerSchema:
      oneOf:
        - $ref: '#/components/schemas/FieldPickerGoogleDriveSchema'
        - $ref: '#/components/schemas/FieldPickerWhatsappTemplateSchema'
        - $ref: '#/components/schemas/FieldPickerMetaEventsSchema'
      discriminator:
        propertyName: type
        mapping:
          google_drive: '#/components/schemas/FieldPickerGoogleDriveSchema'
          whatsapp_template: '#/components/schemas/FieldPickerWhatsappTemplateSchema'
          meta_events: '#/components/schemas/FieldPickerMetaEventsSchema'
      description: Picker configuration, when specified it makes this field a picker
    FieldKeySchema:
      type: string
      maxLength: 256
      pattern: ^[^.]+$
      description: The key of the field
    FileVisibilitySchema:
      type: string
      enum:
        - PUBLIC
        - PRIVATE
      description: >-
        Whether the file is private or public, private files URLs are signed
        with a token and can be accessed temporarily
      example: PRIVATE
    FileSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file
        file_path:
          type: string
          maxLength: 2048
          description: Path to the file in the storage system
        file_filename:
          type: string
          maxLength: 255
          description: Name of the file
          example: document.pdf
        file_size:
          type: number
          description: Size of the file in bytes
          example: 1024
        file_mimetype:
          type: string
          maxLength: 255
          description: MIME type of the file
          example: application/pdf
        file_url:
          type: string
          maxLength: 2048
          description: URL to access the file
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the file was created
      required:
        - id
        - file_path
        - file_filename
        - file_size
        - file_mimetype
        - file_url
        - created_at
      description: Detailed information about a file
    FieldDisplaySchema:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/FieldLayoutSchema'
        container:
          $ref: '#/components/schemas/FieldContainerSchema'
        empty:
          $ref: '#/components/schemas/FieldEmptySchema'
      description: Display options for the field
    FieldNumberDisplaySchema:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/FieldLayoutSchema'
        container:
          $ref: '#/components/schemas/FieldContainerSchema'
        empty:
          $ref: '#/components/schemas/FieldEmptySchema'
        format:
          $ref: '#/components/schemas/FieldNumberDisplayFormatSchema'
        notation:
          $ref: '#/components/schemas/FieldNumberDisplayNotationSchema'
        decimals:
          type: integer
          minimum: 0
          maximum: 8
          description: Fixed fraction digits (min and max); omit for the locale default
        currency:
          type: string
          maxLength: 3
          description: >-
            ISO 4217 currency code, used when `format` is `currency`; defaults
            to USD when omitted
        show_as:
          $ref: '#/components/schemas/FieldNumberShowAsSchema'
      description: Display options for the number field
    FieldStringDisplaySchema:
      allOf:
        - $ref: '#/components/schemas/FieldDisplaySchema'
        - type: object
          properties:
            render:
              $ref: '#/components/schemas/FieldStringDisplayRenderSchema'
      description: Display options for the string field
    FieldDateDisplaySchema:
      allOf:
        - $ref: '#/components/schemas/FieldDisplaySchema'
        - type: object
          properties:
            date_format:
              $ref: '#/components/schemas/FieldDateFormatSchema'
      description: Display options for the date field
    FieldDateTimeDisplaySchema:
      allOf:
        - $ref: '#/components/schemas/FieldDisplaySchema'
        - type: object
          properties:
            date_format:
              $ref: '#/components/schemas/FieldDateFormatSchema'
            time_format:
              $ref: '#/components/schemas/FieldTimeFormatSchema'
      description: Display options for the datetime field
    FieldDateTimeSourceSchema:
      type: string
      enum:
        - created_at
        - updated_at
      description: >-
        Record timestamp a sourced datetime field renders. A sourced field is
        readonly and stores no values. Table fields on custom tables only;
        immutable after create.
    FieldTimeDisplaySchema:
      allOf:
        - $ref: '#/components/schemas/FieldDisplaySchema'
        - type: object
          properties:
            time_format:
              $ref: '#/components/schemas/FieldTimeFormatSchema'
      description: Display options for the time field
    FieldEnumDisplaySchema:
      allOf:
        - $ref: '#/components/schemas/FieldDisplaySchema'
        - type: object
          properties:
            render:
              $ref: '#/components/schemas/FieldEnumDisplayRenderSchema'
            sort:
              $ref: '#/components/schemas/FieldEnumDisplaySortSchema'
      description: Display options for the enum field
    FieldEnumItemSchema:
      type: object
      properties:
        label:
          type: string
          description: Label of the enum item
        value:
          type: string
          description: Value of the enum item
        description:
          type: string
          description: Description of the enum item
        color:
          $ref: '#/components/schemas/ColorNameSchema'
        icon:
          type: string
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
          description: The name of the icon to use in the UI
          oneOf:
            - $ref: '#/components/schemas/IconNameSchema'
        icon_url:
          type: string
        metadata:
          $ref: '#/components/schemas/FieldEnumItemMetadataSchema'
      required:
        - value
      description: The enum item
    FieldListSchema:
      type: object
      properties:
        path:
          type: string
          description: The connection list action path used to show autocomplete options
        resource_id:
          type: string
          description: >-
            An optional resource ID to scope the list to a specific resource,
            only used on dynamic fields
        sync_on_mount:
          type: boolean
          description: >-
            When true, the selected value is re-fetched on mount to keep cached
            metadata in sync with the remote source
      description: >-
        Configuration for fields that fetch their data from a remote connection
        list action
    FieldComponentSchema:
      oneOf:
        - $ref: '#/components/schemas/FieldWhatsappTemplateComponentSchema'
        - $ref: '#/components/schemas/FieldDynamicToolsComponentSchema'
      discriminator:
        propertyName: type
        mapping:
          whatsapp_template: '#/components/schemas/FieldWhatsappTemplateComponentSchema'
          dynamic_tools: '#/components/schemas/FieldDynamicToolsComponentSchema'
      description: The component field used to display a custom component
    ConnectionTypeSchema:
      type: string
      enum:
        - SCHEDULER
        - WORKFLOWS
        - TOOLS
        - FILES
        - EMAILS
        - HTTP_CREDENTIALS
        - TABLES
        - PAGES
        - KNOWLEDGE
        - SKILLS
        - CONTACTS
        - SEGMENTS
        - ASSISTANTS
        - AGENTS
        - CHATS
        - INBOX
        - MEMBERS
        - SUB_ORGS
        - BILLING
        - BROADCASTS
        - ANALYTICS
        - AUDIT
        - PHONE
        - GMAIL
        - GOOGLE_SHEETS
        - GOOGLE_CALENDAR
        - GOOGLE_DRIVE
        - GOOGLE_MEET
        - ONEDRIVE
        - SHAREPOINT
        - OUTLOOK_CALENDAR
        - OUTLOOK
        - AIRTABLE
        - NOTION
        - LINEAR
        - HUBSPOT
        - GOHIGHLEVEL
        - CAL
        - CALENDLY
        - RESEND
        - OAUTH
        - SLACK
        - TEAMS
        - TELEGRAM
        - TRELLO
        - FACEBOOK
        - WHATSAPP
        - INSTAGRAM
        - MESSENGER
        - TIKTOK
        - JAPIFON
        - SMPP
        - TWILIO
        - TELNYX
        - ZOHO
        - ZOHO_BOOKINGS
        - ZOHO_INVENTORY
        - ZOHO_CALENDAR
        - SALESFORCE
        - STRIPE
        - SHOPIFY
        - ZENDESK
        - MCP
        - OPENAPI
        - ODOO
        - WOOCOMMERCE
      description: Connection type
      example: SLACK
    FieldUserSourceSchema:
      type: string
      enum:
        - created_by
        - updated_by
      description: >-
        Record actor a sourced user field renders. A sourced field is readonly
        and stores no values. Table fields on custom tables only; immutable
        after create.
    FieldAdditionalPropertiesSchema:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/FieldSchema'
      required:
        - schema
    PublicAssistantWidgetChannelSchema:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AssistantWidgetChannelTypeSchema'
        label:
          type: string
        url:
          type: string
      required:
        - type
        - url
      description: A resolved widget channel link
    AssistantWidgetTeaserFrequencySchema:
      type: string
      enum:
        - once_per_visitor
        - once_per_session
        - every_visit
      default: once_per_visitor
      description: How often the teaser can show again to the same visitor
    AssistantWidgetTeaserDevicesSchema:
      type: string
      enum:
        - all
        - desktop
        - mobile
      default: desktop
      description: Devices where the teaser shows
    AssistantWidgetChannelItemSchema:
      type: object
      properties:
        channel_id:
          type: string
          maxLength: 128
          description: >-
            Connected assistant channel to link to; the URL is generated from
            the connection and ignored when the channel no longer exists
        enabled:
          type: boolean
          description: >-
            Connected channels are included by default; set to false to hide one
            from the widget
        type:
          allOf:
            - $ref: '#/components/schemas/AssistantWidgetChannelTypeSchema'
            - description: Type of a custom channel link
        label:
          type: string
          maxLength: 48
        url:
          type: string
          maxLength: 2048
          format: uri
          description: Destination of a custom link channel
        email:
          type: string
          maxLength: 320
          format: email
          description: Address of a custom email channel
        phone:
          type: string
          pattern: ^\+[1-9]\d{6,14}$
          description: E.164 number of a custom phone channel
      description: >-
        A widget channel link: either a connected channel reference or a custom
        entry
    ModelToolCallPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - tool_call
        id:
          type: string
          description: Unique identifier for the tool call
        name:
          type: string
          description: The name of the tool to call
        display_name:
          type: string
        action_name:
          type: string
        description:
          type: string
          description: >-
            Model-authored, present-tense summary of what this call is doing
            (lifted from the injected _description param when the tool sets
            describe). Shown as the action title in the UI.
        args:
          $ref: '#/components/schemas/ModelToolCallArgumentsSchema'
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: >-
            Metadata associated with the tool call, can include signature
            information
        approval:
          $ref: '#/components/schemas/ConnectionActionApprovalSchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - id
        - name
    ModelMessageReasoningSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - reasoning
        id:
          type: string
          description: Unique identifier for the message part
        text:
          type: string
        metadata:
          $ref: '#/components/schemas/ModelProviderMetadataSchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - id
        - text
    ModelSourcePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - source
        id:
          type: string
          description: Unique identifier for the source, typically a link identifier
        url:
          type: string
        title:
          type: string
          description: Title of the source, typically a document or webpage title
        description:
          type: string
          description: >-
            Description of the source, can be a summary or excerpt from the
            content
        favicon:
          type: string
          description: Favicon URL for the source, can be used in UI
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: >-
            Metadata associated with the source, can include additional
            information like author, date, etc.
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - id
        - url
      description: Source URL for the message, typically used for annotations
    ModelOptionSelectedPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - option_selected
        call_id:
          type: string
          description: The ID of the tool call that generated the options
        label:
          type: string
          description: Label for the option selected
        value:
          type: string
          description: Value for the option selected
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - label
        - value
      description: Option selected by the user, typically used in multiple choice scenarios
    ModelContactPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - contact
        name:
          type: string
        email:
          type: string
        phone:
          type: string
        username:
          type: string
        user_id:
          type: string
          description: Id of the person on the channel the message came from
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
    ModelLocationPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - location
        latitude:
          type: number
        longitude:
          type: number
        name:
          type: string
        address:
          type: string
        url:
          type: string
        google_place_id:
          type: string
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
    ModelReferencePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - reference
        kind:
          $ref: '#/components/schemas/ModelReferenceKindSchema'
        id:
          type: string
          description: Public id of the referenced entity
        name:
          type: string
          description: Display name, snapshotted when the text was written
        icon:
          anyOf:
            - $ref: '#/components/schemas/PickerIconEmojiSchema'
            - type: string
              maxLength: 64
              pattern: ^[a-zA-Z0-9_-]+$
              description: >-
                The name of a curated icon a user can pick for a table, view,
                field, or other entity
              oneOf:
                - $ref: '#/components/schemas/PickerIconNameSchema'
            - type: 'null'
          description: >-
            The entity's own icon or emoji, filled on write. Null = the default
            of its kind
        icon_url:
          type:
            - string
            - 'null'
          format: uri
          description: The entity's image, filled on write, when it has one
        color:
          type:
            - string
            - 'null'
          enum:
            - red
            - orange
            - amber
            - yellow
            - lime
            - green
            - teal
            - cyan
            - sky
            - blue
            - indigo
            - violet
            - purple
            - fuchsia
            - pink
            - rose
            - neutral
            - null
          options:
            red:
              label: Red
              color: red
            orange:
              label: Orange
              color: orange
            amber:
              label: Amber
              color: amber
            yellow:
              label: Yellow
              color: yellow
            lime:
              label: Lime
              color: lime
            green:
              label: Green
              color: green
            teal:
              label: Teal
              color: teal
            cyan:
              label: Cyan
              color: cyan
            sky:
              label: Sky
              color: sky
            blue:
              label: Blue
              color: blue
            indigo:
              label: Indigo
              color: indigo
            violet:
              label: Violet
              color: violet
            purple:
              label: Purple
              color: purple
            fuchsia:
              label: Fuchsia
              color: fuchsia
            pink:
              label: Pink
              color: pink
            rose:
              label: Rose
              color: rose
            neutral:
              label: Neutral
              color: neutral
          title: Color
          description: The entity's tint, filled on write, when it has one
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - kind
        - id
        - name
      description: >-
        An entity the user tagged in the message. Validated and enriched
        server-side on send; org chats only.
    ModelResultPartResultPartsSchema:
      oneOf:
        - $ref: '#/components/schemas/ModelTextPartSchema'
        - $ref: '#/components/schemas/ModelImagePartSchema'
        - $ref: '#/components/schemas/ModelFilePartSchema'
        - $ref: '#/components/schemas/ModelContactPartSchema'
        - $ref: '#/components/schemas/ModelLocationPartSchema'
        - $ref: '#/components/schemas/ModelSourcePartSchema'
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/ModelTextPartSchema'
          image: '#/components/schemas/ModelImagePartSchema'
          file: '#/components/schemas/ModelFilePartSchema'
          contact: '#/components/schemas/ModelContactPartSchema'
          location: '#/components/schemas/ModelLocationPartSchema'
          source: '#/components/schemas/ModelSourcePartSchema'
      description: Parts of the tool call result
    ModelEventAssignmentPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_assignment
        assigned_user_id:
          type:
            - string
            - 'null'
        source:
          $ref: '#/components/schemas/ModelEventSourceSchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - assigned_user_id
        - source
      description: Assignment event part - text generated from locales
    ModelEventStatusChangePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_status_change
        old_status:
          type: string
          enum:
            - OPEN
            - CLOSED
        new_status:
          type: string
          enum:
            - OPEN
            - CLOSED
        source:
          $ref: '#/components/schemas/ModelEventSourceSchema'
        follow_up_at:
          type: string
          format: date-time
          description: Scheduled follow-up date (ISO 8601)
        reason:
          type: string
          maxLength: 512
          description: AI analysis reason for the decision
        csat_score:
          type: integer
          minimum: 1
          maximum: 5
          description: AI-assigned customer satisfaction score (1-5)
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - old_status
        - new_status
        - source
      description: Status change event part (user-visible) - text generated from locales
    ModelEventAiStatusPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_ai_status
        status:
          type: boolean
        source:
          $ref: '#/components/schemas/ModelEventSourceSchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - status
        - source
      description: AI toggle event part - text generated from locales
    ModelEventMuteChangePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_mute_change
        muted_until:
          type:
            - string
            - 'null'
          format: date-time
          description: New mute expiry datetime (null = un-muted)
        source:
          $ref: '#/components/schemas/ModelEventMuteSourceSchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - muted_until
        - source
      description: Mute change event part
    ModelEventHandoverPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_handover
        direction:
          $ref: '#/components/schemas/ModelEventHandoverDirectionSchema'
        previous_owner:
          type: string
          maxLength: 128
        new_owner:
          type: string
          maxLength: 128
        metadata:
          type: string
          maxLength: 2048
          description: Free text the passing app attached to the handover
        summary:
          type: string
          maxLength: 4096
          description: >-
            Summary of the conversation so far, generated by the channel on
            handover
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - direction
      description: >-
        Another app on the channel passed, took or requested the conversation
        (Meta handover protocol)
    ModelEventFollowUpPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_follow_up
        old_status:
          type: string
          enum:
            - OPEN
            - CLOSED
        new_status:
          type: string
          enum:
            - OPEN
            - CLOSED
        reason:
          type: string
          maxLength: 512
          description: AI analysis reason for the follow-up
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
      description: Follow-up event — AI re-engaging an inactive conversation
    ModelEventPaymentPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_payment
        provider:
          type: string
          enum:
            - stripe
        status:
          type: string
          enum:
            - paid
        amount_total:
          type: integer
          description: Amount paid in the smallest currency unit (e.g. cents)
        currency:
          type: string
          maxLength: 8
        reference:
          type: string
          maxLength: 256
          description: Provider reference, e.g. the Stripe checkout session ID
        link:
          type: string
          maxLength: 2048
          description: Link to the payment in the provider dashboard
        paid_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the payment was made
        method:
          type: object
          properties:
            brand:
              type: string
              maxLength: 32
            last4:
              type: string
              maxLength: 4
            name:
              type: string
              maxLength: 256
        items:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                maxLength: 256
              quantity:
                type: integer
              amount_total:
                type: integer
                description: Line total in the smallest currency unit
            required:
              - name
              - quantity
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - provider
        - status
        - amount_total
        - currency
        - reference
      description: Payment event — a checkout the customer completed
    ModelEventAnalysisPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_analysis
        csat_score:
          type: integer
          minimum: 1
          maximum: 5
          description: AI-assigned customer satisfaction score (1-5)
        reason:
          type: string
          maxLength: 512
          description: Brief reason for the analysis result
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
      description: Analysis event — AI post-conversation analysis (CSAT, etc.)
    ModelEventReferralPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_referral
        referral:
          $ref: '#/components/schemas/ChatReferralSchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - referral
      description: >-
        Referral event — conversation initiated or resumed from an ad, post, or
        story
    ModelEventApprovalDecisionPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_approval_decision
        tool_call_id:
          type: string
          description: Tool call id the decision was made on
        action_id:
          type: string
          description: >-
            Canonical id of the gated action (the tool name, e.g.
            TOOLS:HTTP_REQUEST)
        action_name:
          type: string
          description: >-
            User-facing display name of the action at decision time, when
            available
        decision:
          type: string
          enum:
            - accepted
            - rejected
        reason:
          type: string
          maxLength: 512
          description: Optional reason supplied with the decision
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - tool_call_id
        - action_id
        - decision
      description: >-
        Approval decision event — a pending action was accepted or rejected by a
        chat member. The decider is the owner of the parent ChatMessage.
    ModelEventQuestionsAnsweredPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_questions_answered
        tool_call_id:
          type: string
          description: Tool call id of the ask_questions call that was answered
        answered_count:
          type: number
          description: How many questions received an answer
        skipped_count:
          type: number
          description: How many questions were skipped (no response)
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - tool_call_id
        - answered_count
        - skipped_count
      description: >-
        Questions answered event — a pending ask_questions call was answered by
        a chat member. The answerer is the owner of the parent ChatMessage.
    ModelEventLocationSharedPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_location_shared
        tool_call_id:
          type: string
          description: Tool call id of the request_location call that was answered
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - tool_call_id
      description: >-
        Location shared event — a pending request_location call was answered by
        a chat member. The sharer is the owner of the parent ChatMessage.
    ModelEventContactUpdatePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_contact_update
        changes:
          type: array
          items:
            $ref: '#/components/schemas/ModelContactFieldChangeSchema'
          minItems: 1
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - changes
      description: >-
        AI updated one or more contact properties. Emitted from the
        update_contact tool callback or the post-conversation analysis pass.
    ModelEventConnectionConnectedPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_connection_connected
        tool_call_id:
          type: string
          description: Tool call id this connection answers (the request_connection call)
        connection_id:
          type: string
          description: The connected connection id (con_...)
        connection_type:
          type: string
          description: Connection app type, e.g. GOOGLE_SHEETS
        connection_name:
          type: string
          description: The name of the connection, e.g. "Google Sheets"
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - tool_call_id
        - connection_id
      description: >-
        Connection-connected event: the user connected an app in response to
        request_connection.
    ModelEventAgentRunStartedPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_agent_run_started
        routine_id:
          type: string
          description: Routine that fired this run (rtn_...); absent for manual runs
        routine_name:
          type: string
          description: Name of the routine that fired this run, when it has one
        origin:
          $ref: '#/components/schemas/ModelEventAgentRunOriginSchema'
        trigger_action:
          type: string
          description: >-
            The trigger that fired this run (TYPE:ACTION); only for origin
            'trigger'
        note:
          type: string
          description: Note the previous run left for this one
        agent_id:
          type: string
          description: >-
            Agent whose chat dispatched this run (agt_...); only for origin
            'agent'
        agent_name:
          type: string
          description: >-
            Name of the agent whose chat dispatched this run; only for origin
            'agent'
        assistant_id:
          type: string
          description: >-
            Assistant whose conversation dispatched this run (ast_...); only for
            origin 'assistant'
        assistant_name:
          type: string
          description: >-
            Name of the assistant whose conversation dispatched this run; only
            for origin 'assistant'
        contact_id:
          type: string
          description: >-
            Contact whose comment named the agent (ctc_...); only for origin
            'mention'
        contact_name:
          type: string
          description: Name of that contact at the time; only for origin 'mention'
        record_id:
          type: string
          description: >-
            Record whose comment named the agent (rec_...); only for origin
            'mention'
        record_name:
          type: string
          description: Label of that record at the time; only for origin 'mention'
        comments:
          type: array
          items:
            $ref: '#/components/schemas/ModelEventAgentRunCommentSchema'
          description: >-
            Earlier comments of that thread, newest first; only for origin
            'mention'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - origin
      description: >-
        Run started — the first message of every run chat, recording what fired
        it.
    ModelEventAgentRunFinishedPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_agent_run_finished
        chat_id:
          type: string
          description: The run chat that finished (chat_...)
        agent_id:
          type: string
          description: The agent that ran (agt_...); absent for agentless runs
        agent_name:
          type: string
          description: Name of the agent that ran; absent for agentless runs
        status:
          type: string
          enum:
            - RUNNING
            - COMPLETED
            - FAILED
            - CANCELED
          description: How the run ended
        tool_call_id:
          type: string
          description: >-
            The run_agent call that dispatched it — its tool result carries the
            outcome
        summary:
          type: string
          description: >-
            The run's closing assistant message (older events only — the outcome
            now lives on the dispatching tool result)
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - chat_id
        - status
      description: >-
        Sub-agent run finished — posted to the chat that dispatched it, so the
        conversation can pick the result up.
    ModelEventReminderPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_reminder
        reminder_id:
          type: string
          description: The reminder that fired (rem_...)
        note:
          type: string
          description: The note the AI left itself when scheduling the reminder
        occurrence:
          type: number
          description: How many times this reminder has fired, including this one
        recurring:
          type: boolean
          description: Whether the reminder fires again after this one
        next_fire_at:
          type: string
          description: Next fire time (ISO), when the reminder recurs
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - reminder_id
        - note
        - occurrence
        - recurring
      description: Reminder fired — a wake-up the AI scheduled on this chat came due.
    ModelEventMemberJoinedPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_member_joined
        user_id:
          type: string
          description: The person who joined (user_...)
        name:
          type:
            - string
            - 'null'
          description: Their name at the time, kept for after they leave
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - user_id
        - name
      description: A person was added to the chat; the event owner is who added them.
    ModelEventMemberLeftPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_member_left
        user_id:
          type: string
          description: The person who left (user_...)
        name:
          type:
            - string
            - 'null'
          description: Their name at the time; they are no longer a member
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - user_id
        - name
      description: A person left the chat or was removed; the event owner is who did it.
    ModelEventCallStartedPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_call_started
        transport:
          $ref: '#/components/schemas/ModelEventCallTransportSchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - transport
      description: >-
        Voice call started — the turns that follow, up to event_call_ended, are
        its transcript.
    ModelEventCallEndedPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_call_ended
        duration_seconds:
          type: number
          minimum: 0
          description: Wall-clock length of the call
        reason:
          type: string
          description: >-
            Why the call ended: clients_left, provider_closed, start_failed or
            the provider's own reason
        billed_seconds:
          type: number
          minimum: 0
          description: Seconds metered as ai_voice
        latency:
          $ref: '#/components/schemas/ModelEventCallLatencySchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - duration_seconds
        - reason
        - billed_seconds
      description: >-
        Voice call ended — closes the call event_call_started opened; the
        messages between the two are the call.
    ModelUserFilePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - file
        url:
          type: string
        kind:
          $ref: '#/components/schemas/ModelFileKindSchema'
        file:
          $ref: '#/components/schemas/FileSchema'
        auto_consume:
          type: boolean
          description: >-
            Whether this file should be automatically consumed and processed by
            the model
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - url
      description: >-
        A file sent in a message. The server writes its transcript and
        description.
    ModelFileKindSchema:
      type: string
      enum:
        - voice
        - sticker
      description: >-
        Marks communication-only files (voice notes, stickers) from integrations
        so they can be excluded from the contact files tab.
    FieldFileDisplayRenderSchema:
      type: string
      enum:
        - button
        - dropzone
      description: The render type of the file field
    FieldConditionOperatorSchema:
      type: string
      enum:
        - eq
        - neq
        - gt
        - gte
        - lt
        - lte
        - contains
        - not_contains
        - is_empty
        - is_not_empty
      description: The operator for the field condition
    FieldPickerGoogleDriveSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - google_drive
          description: Picker that allows selecting files from Google Drive
        views:
          type: array
          items:
            $ref: '#/components/schemas/FieldPickerGoogleDriveViewSchema'
        selectable_mime_types:
          type: array
          items:
            type: string
          description: >-
            A comma-separated list of MIME types to restrict the selectable
            files in the picker
      required:
        - type
        - views
      description: Picker that allows selecting from Google Drive files
    FieldPickerWhatsappTemplateSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - whatsapp_template
          description: Picker that allows selecting from WhatsApp templates
      required:
        - type
      description: Picker that allows selecting a WhatsApp template
    FieldPickerMetaEventsSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - meta_events
          description: Picker that opens Meta Events Manager
      required:
        - type
      description: Picker that links out to Meta Events Manager datasets
    FieldLayoutSchema:
      type: string
      enum:
        - inline
        - stacked
      description: Controls how the label and field are arranged (inline or stacked)
    FieldContainerSchema:
      type: string
      enum:
        - grid
        - full
        - center
      description: >-
        Controls how the field container behaves in terms of width and
        positioning
    FieldEmptySchema:
      type: string
      enum:
        - show
        - hide
      description: >-
        What to render when an `object` field resolves to no visible sub-fields.
        Defaults to `hide` when the sub-fields come from a remote sync
        (`additional_properties.path`) — an empty result has nothing to fill in
        — and to `show` for every other field. Only honoured on fields marked
        `optional`: hiding a required field would leave a form that cannot be
        completed and no visible reason why. Never applies while the sync is
        loading or errored, nor while `requires` siblings are unfilled — those
        states keep rendering their own message — and never in the field editor,
        where the empty container is the drop target.
    FieldNumberDisplayFormatSchema:
      type: string
      enum:
        - number
        - percent
        - currency
      description: >-
        Numeric style (maps to Intl.NumberFormat `style`); `number` is a plain
        number. Thousand separators are always applied.
    FieldNumberDisplayNotationSchema:
      type: string
      enum:
        - standard
        - compact
      description: >-
        Number notation (maps to Intl.NumberFormat `notation`); `compact`
        renders 1.2K (short form)
    FieldNumberShowAsSchema:
      type: object
      properties:
        kind:
          type: string
          enum:
            - number
            - bar
            - ring
          description: 'How to render the number: a plain value, a progress bar, or a ring'
        color:
          $ref: '#/components/schemas/ColorNameSchema'
        divide_by:
          type: number
          exclusiveMinimum: 0
          description: Denominator for the bar / ring progress (value / divide_by)
        show_number:
          type: boolean
          description: Show the numeric value alongside the bar / ring
      required:
        - kind
      description: Renders the number as a plain value, a progress bar, or a ring
    FieldStringDisplayRenderSchema:
      type: string
      enum:
        - text
        - textarea
        - password
      description: >-
        The render type of the string field, text is a single line input,
        textarea is a multi-line input
    FieldDateFormatSchema:
      type: string
      enum:
        - full
        - short
        - month_day_year
        - day_month_year
        - year_month_day
        - relative
      description: The rendered date format for date / datetime fields
    FieldTimeFormatSchema:
      type: string
      enum:
        - hidden
        - 12h
        - 24h
      description: >-
        The rendered time format for datetime / time fields. `hidden` collapses
        a datetime to a date-only render.
    FieldEnumDisplayRenderSchema:
      type: string
      enum:
        - dropdown
        - inline
      description: The render type of the enum field
    FieldEnumDisplaySortSchema:
      type: string
      enum:
        - manual
        - asc
        - desc
      description: >-
        Option ordering by label; `manual` keeps the `items[]` order (default),
        `asc` A→Z, `desc` Z→A
    FieldEnumItemMetadataSchema:
      type: object
      properties:
        link:
          type: string
          format: uri
          description: A link associated with the enum item
        data:
          description: Additional data for the enum item
      description: Additional metadata for the enum item
    FieldWhatsappTemplateComponentSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - whatsapp_template
      required:
        - type
      description: The component field used to display a WhatsApp template
    FieldDynamicToolsComponentSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - dynamic_tools
        path:
          type: string
          description: >-
            The dynamic action whose tool catalog the component lists, e.g.
            MCP:TOOLS
      required:
        - type
        - path
      description: >-
        The component field that lists the tools of a dynamic action and lets
        the user turn them off
    AssistantWidgetChannelTypeSchema:
      type: string
      enum:
        - whatsapp
        - messenger
        - instagram
        - telegram
        - email
        - phone
        - link
      description: Type of a widget channel link
    ModelToolCallArgumentsSchema:
      description: Arguments for the tool call
    ConnectionActionApprovalSchema:
      type: object
      properties:
        title:
          type: string
          maxLength: 140
          description: >-
            The approval as one yes/no question ending in "?", in the
            conversation language
        accept_button:
          type: string
          maxLength: 32
          description: Label for the accept button, in the conversation language
        reject_button:
          type: string
          maxLength: 32
          description: Label for the reject button, in the conversation language
        decision:
          $ref: '#/components/schemas/ConnectionActionApprovalDecisionSchema'
        decided_at:
          type: number
          description: Decision timestamp in milliseconds since epoch
        decided_by_member_id:
          type: string
          description: Encoded chat member id of the decider
        reason:
          type: string
          maxLength: 512
          description: Optional reason supplied with the decision
      required:
        - title
        - accept_button
        - reject_button
      description: >-
        Approval prompt and decision state when the action requires confirmation
        before running
    ModelProviderMetadataSchema:
      type: object
      description: >-
        Provider metadata as the provider returned it, keyed by provider, such
        as a signature
      additionalProperties:
        type: object
    ModelEventSourceSchema:
      type: string
      enum:
        - user
        - member
        - ai
      description: >-
        Who the event came from. 'user' is the contact, 'member' is a human
        agent on the business side, 'ai' is an assistant.
    ModelEventMuteSourceSchema:
      type: string
      enum:
        - member
        - system
      description: 'Source of the mute event: a human agent or the system.'
    ModelEventHandoverDirectionSchema:
      type: string
      enum:
        - to_us
        - from_us
        - requested
      description: >-
        Who got the conversation: 'to_us' (this organization now owns it),
        'from_us' (another app on the channel owns it), 'requested' (another app
        asked for it).
    ModelContactFieldChangeSchema:
      type: object
      properties:
        field:
          type: string
          description: Contact field key.
        before: {}
        after: {}
      required:
        - field
      description: >-
        A single contact-property change. FE looks up the rest (id, name, type)
        by key against the assistant's contact-field whitelist.
    ModelEventAgentRunOriginSchema:
      type: string
      enum:
        - scheduled
        - manual
        - webhook
        - trigger
        - agent
        - assistant
        - mention
      description: Origin of the agent run
    ModelEventAgentRunCommentSchema:
      type: object
      properties:
        author:
          type: string
          description: Who wrote the comment
        comment:
          type: string
      required:
        - author
        - comment
      description: An earlier comment of the thread a mention run was started from
    ModelEventCallTransportSchema:
      type: string
      enum:
        - web
      description: Where the voice call takes place
    ModelEventCallLatencySchema:
      type: object
      properties:
        turns:
          type: integer
          minimum: 0
          description: Delegated turns the averages cover
        delegation_ms:
          type: number
          minimum: 0
          description: >-
            Average ms from the end of the user turn to the delegation the voice
            model raised
        first_token_ms:
          type: number
          minimum: 0
          description: Average ms from the delegation to the brain's first token
        first_speech_ms:
          type: number
          minimum: 0
          description: >-
            Average ms from the end of the user turn to the first spoken word
            that followed
      required:
        - turns
        - delegation_ms
        - first_token_ms
        - first_speech_ms
      description: Turn latency averages of a voice call
    FieldPickerGoogleDriveViewSchema:
      type: string
      enum:
        - DOCS
        - DOCS_IMAGES
        - DOCS_IMAGES_AND_VIDEOS
        - DOCS_VIDEOS
        - DOCUMENTS
        - DRAWINGS
        - FOLDERS
        - FORMS
        - PDFS
        - PRESENTATIONS
        - SPREADSHEETS
      description: The views available for the Google Drive picker
    ConnectionActionApprovalDecisionSchema:
      type: string
      enum:
        - accepted
        - rejected
      description: How a pending approval was resolved
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.