> ## 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.

# Fork Chat

> Fork a personal or org chat from a given message into a new chat owned by the caller. Copies the conversation up to and including the message, along with the model, tools, features and linked files.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /chats/{chat_id}/fork
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
paths:
  /chats/{chat_id}/fork:
    post:
      tags:
        - Chats
      summary: Fork Chat
      description: >-
        Fork a personal or org chat from a given message into a new chat owned
        by the caller. Copies the conversation up to and including the message,
        along with the model, tools, features and linked files.
      parameters:
        - schema:
            type: string
          required: true
          description: Chat ID
          name: chat_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForkChatSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ForkChatSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatSchema'
components:
  schemas:
    ForkChatSchema:
      type: object
      properties:
        message_id:
          type: string
          maxLength: 256
          description: >-
            The message to fork from (inclusive). The new chat copies the
            conversation up to and including this message.
        title:
          type:
            - string
            - 'null'
          maxLength: 256
          description: >-
            Optional title for the forked chat. Defaults to the source chat
            title.
      required:
        - message_id
      description: Fork a chat from a given message into a new chat.
    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
        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
        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'
        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: 125
          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:
          allOf:
            - $ref: '#/components/schemas/InputValuesSchema'
            - description: >-
                For connection-bound tools, locked input values (e.g. a selected
                resource) that drive dynamic fields and are injected at
                execution
        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
    ChatFeaturesSchema:
      type: object
      properties:
        reasoning:
          $ref: '#/components/schemas/ModelFeatureReasoningSchema'
        mode:
          $ref: '#/components/schemas/ConnectionActionApprovalModeSchema'
        auto_discover:
          type: boolean
        web:
          type: boolean
        image_generation:
          type: boolean
        workbench:
          $ref: '#/components/schemas/ChatWorkbenchFeatureSchema'
      description: >-
        Per-chat features and run settings: model features plus approval mode,
        auto-discover, and org-chat tool toggles.
    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'
      required:
        - id
        - role
      description: The member of the chat
    ChatStateSchema:
      type: object
      properties:
        id:
          type: string
        state:
          $ref: '#/components/schemas/ChatStateStatusSchema'
        integration_id:
          $ref: '#/components/schemas/ConnectionIntegrationIdSchema'
        assistant:
          $ref: '#/components/schemas/PublicAssistantSchema'
        assistant_id:
          type:
            - string
            - 'null'
          description: The ID of the assistant used in the chat
        assistant_integration:
          $ref: '#/components/schemas/PublicAssistantIntegrationSchema'
        assistant_integration_id:
          type:
            - string
            - 'null'
          description: The ID of the assistant integration used in the chat
        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)
        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
        - integration_id
        - assistant_id
        - assistant_integration_id
        - 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
        usage:
          $ref: '#/components/schemas/ModelUsageSchema'
        delivered_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the message was delivered to the recipient
        seen_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the recipient saw 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/ChatMessengerPostSchema'
        - $ref: '#/components/schemas/ChatMessengerReelSchema'
        - $ref: '#/components/schemas/ChatTikTokAdSchema'
        - $ref: '#/components/schemas/ChatTikTokPostShareSchema'
        - $ref: '#/components/schemas/ChatTikTokShortLinkSchema'
        - $ref: '#/components/schemas/ChatWebWidgetReferralSchema'
      discriminator:
        propertyName: type
        mapping:
          messenger_ad:
            $ref: '#/components/schemas/ChatMessengerAdSchema'
          messenger_product:
            $ref: '#/components/schemas/ChatMessengerProductSchema'
          messenger_product_template:
            $ref: '#/components/schemas/ChatMessengerProductTemplateSchema'
          whatsapp_ad:
            $ref: '#/components/schemas/ChatWhatsAppAdSchema'
          whatsapp_product:
            $ref: '#/components/schemas/ChatWhatsAppProductSchema'
          whatsapp_order:
            $ref: '#/components/schemas/ChatWhatsAppOrderSchema'
          instagram_ad:
            $ref: '#/components/schemas/ChatInstagramAdSchema'
          instagram_product:
            $ref: '#/components/schemas/ChatInstagramProductSchema'
          instagram_product_template:
            $ref: '#/components/schemas/ChatInstagramProductTemplateSchema'
          instagram_post:
            $ref: '#/components/schemas/ChatInstagramPostSchema'
          instagram_reel:
            $ref: '#/components/schemas/ChatInstagramReelSchema'
          instagram_story:
            $ref: '#/components/schemas/ChatInstagramStorySchema'
          instagram_story_mention:
            $ref: '#/components/schemas/ChatInstagramStoryMentionSchema'
          messenger_post:
            $ref: '#/components/schemas/ChatMessengerPostSchema'
          messenger_reel:
            $ref: '#/components/schemas/ChatMessengerReelSchema'
          tiktok_ad:
            $ref: '#/components/schemas/ChatTikTokAdSchema'
          tiktok_post_share:
            $ref: '#/components/schemas/ChatTikTokPostShareSchema'
          tiktok_short_link:
            $ref: '#/components/schemas/ChatTikTokShortLinkSchema'
          web_widget:
            $ref: '#/components/schemas/ChatWebWidgetReferralSchema'
      description: >-
        Referral/commerce event data from Meta platforms — ads, products,
        orders.
    IconNameSchema:
      type: string
      enum:
        - StepFormIcon
        - StepAiIcon
        - StepNoteIcon
        - StepBranchIcon
        - StepCodeIcon
        - ConnectionIcon
        - ConnectionSchedulerIcon
        - ConnectionFilesIcon
        - ConnectionHttpIcon
        - ConnectionWorkflowIcon
        - ConnectionMcpIcon
        - ConnectionAudienceIcon
        - InternalIntegrationIcon
        - CustomIntegrationIcon
        - ToolThinkIcon
        - ToolWebSearchIcon
        - ToolWebScrapingIcon
        - ToolGenerateImageIcon
        - ToolDisplayFileIcon
        - ToolCalculatorIcon
        - ToolGenerateFileIcon
        - ToolGeneratePdfIcon
        - ToolRunCodeIcon
        - ToolDeepResearchIcon
        - ToolSearchKbIcon
        - ToolShowOptionsIcon
        - ToolRequestLocationIcon
        - ToolSendLocationIcon
        - ToolManageMemoryIcon
        - ToolUpdateContactIcon
        - TextIcon
        - ClockFadingIcon
        - CalendarIcon
        - CloudIcon
        - GlobeAltIcon
        - LockClosedIcon
        - NoSymbolIcon
        - SparklesIcon
        - HandRaisedIcon
        - BoltIcon
        - 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
        - ModelAutoIcon
        - ModelOpenAIIcon
        - ModelAnthropicIcon
        - ModelClaudeIcon
        - ModelGoogleIcon
        - 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: Values of the fields
    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
      description: User who deployed the version
    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/ConnectionIntegrationIdSchema'
        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
    ChatStateStatusSchema:
      type: string
      enum:
        - OPEN
        - SNOOZED
        - CLOSED
      description: The state status of the chat
    ConnectionIntegrationIdSchema:
      type: string
      enum:
        - internal
        - org
        - custom
        - whatsapp_bot
        - messenger_bot
        - instagram_dm
        - tiktok_dm
        - telegram_bot
        - gmail
        - slack_bot
        - twilio
        - telnyx
        - email
      description: ID of the connection integration
    PublicAssistantSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        enabled:
          type: boolean
        avatar_url:
          type:
            - string
            - 'null'
        deleted:
          type: boolean
        config:
          $ref: '#/components/schemas/PublicAssistantConfigSchema'
      required:
        - id
        - name
        - enabled
        - avatar_url
        - deleted
        - config
      description: Schema for a public assistant
    PublicAssistantIntegrationSchema:
      type: object
      properties:
        id:
          type: string
        enabled:
          type: boolean
        has_connection:
          type: boolean
      required:
        - id
        - enabled
        - has_connection
      description: Schema for a public assistant integration
    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: 10240
          description: The instructions for the assistant
        language:
          $ref: '#/components/schemas/ModelLanguageSchema'
        model:
          type: string
          minLength: 1
          maxLength: 128
          description: The model to use for the assistant
        stt:
          $ref: '#/components/schemas/AssistantSttConfigSchema'
        tts:
          $ref: '#/components/schemas/AssistantTtsConfigSchema'
        conversation:
          $ref: '#/components/schemas/AssistantConversationConfigSchema'
        knowledge_scope:
          $ref: '#/components/schemas/KnowledgeModeSchema'
        timezone:
          type: string
          maxLength: 64
          description: IANA timezone for the assistant (e.g. "America/New_York")
      required:
        - language
        - model
        - stt
        - tts
        - conversation
        - knowledge_scope
        - timezone
      description: Schema for the configuration of an assistant
    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:
            $ref: '#/components/schemas/ModelSystemMessageSchema'
          assistant:
            $ref: '#/components/schemas/ModelAssistantMessageSchema'
          user:
            $ref: '#/components/schemas/ModelUserMessageSchema'
          tool:
            $ref: '#/components/schemas/ModelToolMessageSchema'
          event:
            $ref: '#/components/schemas/ModelEventMessageSchema'
          note:
            $ref: '#/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
    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
      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
    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
    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
    FieldSchema:
      oneOf:
        - $ref: '#/components/schemas/FieldFileSchema'
        - $ref: '#/components/schemas/FieldNumberSchema'
        - $ref: '#/components/schemas/FieldStringSchema'
        - $ref: '#/components/schemas/FieldBooleanSchema'
        - $ref: '#/components/schemas/FieldDateSchema'
        - $ref: '#/components/schemas/FieldDateTimeSchema'
        - $ref: '#/components/schemas/FieldTimeSchema'
        - $ref: '#/components/schemas/FieldEnumSchema'
        - $ref: '#/components/schemas/FieldContentSchema'
        - $ref: '#/components/schemas/FieldConnectionSchema'
        - $ref: '#/components/schemas/FieldRecordSchema'
        - $ref: '#/components/schemas/FieldContactSchema'
        - $ref: '#/components/schemas/FieldUserSchema'
        - $ref: '#/components/schemas/FieldChatSchema'
        - $ref: '#/components/schemas/FieldSegmentSchema'
        - $ref: '#/components/schemas/FieldAssistantSchema'
        - $ref: '#/components/schemas/FieldObjectSchema'
      discriminator:
        propertyName: type
        mapping:
          file:
            $ref: '#/components/schemas/FieldFileSchema'
          number:
            $ref: '#/components/schemas/FieldNumberSchema'
          string:
            $ref: '#/components/schemas/FieldStringSchema'
          boolean:
            $ref: '#/components/schemas/FieldBooleanSchema'
          date:
            $ref: '#/components/schemas/FieldDateSchema'
          datetime:
            $ref: '#/components/schemas/FieldDateTimeSchema'
          time:
            $ref: '#/components/schemas/FieldTimeSchema'
          enum:
            $ref: '#/components/schemas/FieldEnumSchema'
          content:
            $ref: '#/components/schemas/FieldContentSchema'
          connection:
            $ref: '#/components/schemas/FieldConnectionSchema'
          record:
            $ref: '#/components/schemas/FieldRecordSchema'
          contact:
            $ref: '#/components/schemas/FieldContactSchema'
          user:
            $ref: '#/components/schemas/FieldUserSchema'
          chat:
            $ref: '#/components/schemas/FieldChatSchema'
          segment:
            $ref: '#/components/schemas/FieldSegmentSchema'
          assistant:
            $ref: '#/components/schemas/FieldAssistantSchema'
          object:
            $ref: '#/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_disabled:
          type: boolean
        is_admin:
          type: boolean
      required:
        - id
        - name
        - blocked
        - unsubscribed
        - ai_replies_disabled
        - is_admin
      description: Schema for the contact
    PublicAssistantConfigSchema:
      type: object
      properties:
        conversation:
          $ref: '#/components/schemas/PublicAssistantConversationConfigSchema'
      required:
        - conversation
      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"
    AssistantSttConfigSchema:
      type: object
      properties:
        model:
          type: string
          minLength: 1
          maxLength: 128
      required:
        - model
      description: Schema for the STT configuration of an assistant
    AssistantTtsConfigSchema:
      type: object
      properties:
        model:
          type: string
          minLength: 1
          maxLength: 128
        voice_id:
          type: string
          minLength: 1
          maxLength: 128
      required:
        - model
        - voice_id
      description: Schema for the TTS configuration of an assistant
    AssistantConversationConfigSchema:
      type: object
      properties:
        thread_mode:
          $ref: '#/components/schemas/AssistantThreadModeSchema'
        welcome_banner:
          type: string
          maxLength: 256
          description: >-
            Static greeting text displayed in the UI when users start a new
            conversation
        suggested_messages:
          type: array
          items:
            type: string
            maxLength: 64
          maxItems: 5
          description: >-
            Suggested messages displayed to users when they start a new
            conversation
        auto_intro_message:
          type: string
          maxLength: 256
          description: >-
            First message automatically sent by the assistant only when a
            conversation begins via API call
        enable_memories:
          type: boolean
          description: Whether to enable the "Manage Memories" tool for the assistant
        enable_end_conversation_tool:
          type: boolean
          description: Whether to enable the "Close Conversation" tool for the assistant
        enable_transfer_to_human_tool:
          type: boolean
          description: Whether to enable the "Transfer to Human" tool for the assistant
        enable_block_contact_tool:
          type: boolean
          description: Whether to enable the "Block Contact" tool for the assistant
        enable_ai_replies:
          type: boolean
          description: >-
            Whether the AI generates replies. When false the assistant is
            human-only: incoming messages are still received and stored but the
            AI never responds, so a human answers.
        enable_auto_resolve:
          type: boolean
          description: >-
            Whether inactive conversations should automatically resolve after a
            period of inactivity
        enable_auto_follow_ups:
          type: boolean
          description: Whether the assistant can automatically follow up on conversations
        follow_up_instructions:
          type: string
          maxLength: 10240
          description: >-
            Business instructions that steer follow-up behavior (cadence, hours,
            stop rules, tone). Override the default follow-up guidance.
        enable_auto_csat:
          type: boolean
          description: >-
            Whether the assistant should automatically score customer
            satisfaction (CSAT) when closing conversations
        enable_private_chats:
          type: boolean
          description: Whether to enable private chats that do not appear in the inbox
        enable_update_contact_tool:
          type: boolean
          description: >-
            Whether to enable the assistant to collect and update contact
            information (name, email, phone)
      required:
        - thread_mode
        - enable_memories
        - enable_transfer_to_human_tool
      description: Configuration options for the conversation thread of the assistant
    KnowledgeModeSchema:
      type: string
      enum:
        - all
        - restricted
      description: The knowledge scope of the assistant
    ModelSystemMessageSchema:
      type: object
      properties:
        role:
          type: string
          enum:
            - system
        parts:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ModelTextPartSchema'
            discriminator:
              propertyName: type
              mapping:
                text:
                  $ref: '#/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'
      required:
        - role
        - parts
      description: Assistant message
    ModelUserMessageSchema:
      type: object
      properties:
        role:
          type: string
          enum:
            - user
        parts:
          type: array
          items:
            $ref: '#/components/schemas/ModelUserPartsSchema'
        name:
          type: string
          maxLength: 512
          description: Name of the user, used to give context on multiplayer chats
        member_role:
          $ref: '#/components/schemas/ModelUserMessageMemberRoleSchema'
        timestamp:
          type: string
          maxLength: 64
          description: >-
            Formatted timestamp for the message, used for time-awareness in
            conversations
      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:
                  $ref: '#/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
      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
    ChatMessageReferralPartsSchema:
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/ModelFilePartSchema'
          - $ref: '#/components/schemas/ModelImagePartSchema'
        discriminator:
          propertyName: type
          mapping:
            file:
              $ref: '#/components/schemas/ModelFilePartSchema'
            image:
              $ref: '#/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
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        allowed_types:
          type: array
          items:
            type: string
          description: >-
            Allowed mime types for the file field (e.g. image/*,
            application/pdf)
        visibility:
          $ref: '#/components/schemas/FileVisibilitySchema'
      required:
        - type
      description: The file type allows users to upload files
    FieldNumberSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - number
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldNumberDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          anyOf:
            - type: number
            - type: string
              enum:
                - '{{auto}}'
          description: The default value of the number field
      required:
        - type
      description: The number field allows users to input numbers
    FieldStringSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - string
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldStringDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the string field
        format:
          type: string
          enum:
            - url
            - email
            - phone
          description: The validation type for the field
        min:
          type: number
          minimum: 1
          description: The minimum length of the string field
        max:
          type: number
          minimum: 1
          description: The maximum length of the string field
      required:
        - type
      description: The string field allows users to input text
    FieldBooleanSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - boolean
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          type: boolean
          description: The default value of the boolean field
      required:
        - type
      description: The boolean field allows users mark a field as true or false
    FieldDateSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - date
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDateDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          type:
            - string
            - 'null'
          format: date-time
          description: The default value of the date field, formatted as YYYY-MM-DD
      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
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The default value of the date time field, formatted as
            YYYY-MM-DDTHH:MM:SS
      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
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
      required:
        - type
      description: The time field allows users to select a time
    FieldEnumSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - enum
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldEnumDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the enum field
        items:
          type: array
          items:
            $ref: '#/components/schemas/FieldEnumItemSchema'
          description: The options for the enum field
        list:
          $ref: '#/components/schemas/FieldListSchema'
        additional_items:
          type: boolean
          description: Indicates whether additional unlisted items are allowed
      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
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        content:
          type: string
          description: Any markdown content
        component:
          $ref: '#/components/schemas/FieldComponentSchema'
      required:
        - type
      description: The content field used to display markdown content
    FieldConnectionSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - connection
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        connection_type:
          $ref: '#/components/schemas/ConnectionTypeSchema'
      required:
        - type
        - connection_type
      description: The connection field used to select a connection
    FieldRecordSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - record
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the record field (encoded record id)
        target_table_id:
          type: string
          description: The id of the table whose records are referenceable
      required:
        - type
        - target_table_id
      description: A reference to one or more records in another table
    FieldContactSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - contact
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the contact field (encoded contact id)
      required:
        - type
      description: A reference to one or more contacts
    FieldUserSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - user
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: >-
            The default value of the user field (encoded user id of an org
            member)
      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
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the chat field (encoded chat id)
      required:
        - type
      description: A reference to one or more chats
    FieldSegmentSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - segment
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the segment field (encoded segment id)
      required:
        - type
      description: A reference to one or more segments
    FieldAssistantSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - assistant
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        default:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The default value of the assistant field (encoded assistant id)
      required:
        - type
      description: A reference to one or more assistants
    FieldObjectSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - object
          description: The type of the field
        name:
          type: string
          maxLength: 1024
          description: The name of the field
        description:
          type: string
          maxLength: 10240
          description: The description of the field
        optional:
          type: boolean
          description: Indicates whether the field is optional
        array:
          type: boolean
          description: Indicates whether the field can contain multiple values
        placeholder:
          type: string
          maxLength: 512
          description: The placeholder of the field
        display:
          $ref: '#/components/schemas/FieldDisplaySchema'
        order:
          type: number
          minimum: 0
          description: The order of the field relative to other fields in the form
        link:
          type: string
          description: The link to the documentation for the field
        metadata:
          type: object
          properties: {}
          additionalProperties: {}
          description: Additional metadata for the field
        allowed_modes:
          type: array
          items:
            $ref: '#/components/schemas/FieldSelectorModeSchema'
        broadcast_hidden:
          type: boolean
          description: Indicates whether the field is hidden from the broadcast UI
        broadcast_field:
          type: boolean
          description: Indicates whether the field is used for broadcast
        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'
        disable_variables:
          type: boolean
          description: >-
            When true, skip template variable replacement ({{variable}}) for
            this field
        properties:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/FieldSchema'
          description: >-
            A record of fields that can be of various types including object
            fields
        format:
          type: string
          enum:
            - schema
          description: The validation type for the object field
        additional_properties:
          anyOf:
            - $ref: '#/components/schemas/FieldAdditionalPropertiesSchema'
            - $ref: '#/components/schemas/FieldListSchema'
            - type: boolean
        default:
          anyOf:
            - type: object
              properties: {}
              additionalProperties: {}
            - type: array
              items:
                type: object
                properties: {}
                additionalProperties: {}
          description: The default value of the object field
      required:
        - type
        - properties
      description: The object field that can contain other fields, including nested objects
    PublicAssistantConversationConfigSchema:
      type: object
      properties:
        welcome_banner:
          type: string
          maxLength: 256
          description: >-
            Static greeting text displayed in the UI when users start a new
            conversation
        suggested_messages:
          type: array
          items:
            type: string
            maxLength: 64
          maxItems: 5
          description: >-
            Suggested messages displayed to users when they start a new
            conversation
        auto_intro_message:
          type: string
          maxLength: 256
          description: >-
            First message automatically sent by the assistant only when a
            conversation begins via API call
        enable_auto_csat:
          type: boolean
          description: >-
            Whether the assistant should automatically score customer
            satisfaction (CSAT) when closing conversations
        enable_ai_replies:
          type: boolean
          description: >-
            Whether the AI generates replies. When false the assistant is
            human-only: incoming messages are still received and stored but the
            AI never responds, so a human answers.
      description: Schema for a public assistant conversation configuration
    AssistantThreadModeSchema:
      type: string
      enum:
        - new
        - continue
      description: >-
        The thread mode of the assistant, either "new" for new threads or
        "continue" for continuing existing threads
    ModelTextPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
        audio:
          $ref: '#/components/schemas/FileSchema'
        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:
            $ref: '#/components/schemas/ModelTextPartSchema'
          file:
            $ref: '#/components/schemas/ModelFilePartSchema'
          tool_call:
            $ref: '#/components/schemas/ModelToolCallPartSchema'
          reasoning:
            $ref: '#/components/schemas/ModelMessageReasoningSchema'
          source:
            $ref: '#/components/schemas/ModelSourcePartSchema'
      description: Parts of the assistant message
    ModelUserPartsSchema:
      oneOf:
        - $ref: '#/components/schemas/ModelTextPartSchema'
        - $ref: '#/components/schemas/ModelFilePartSchema'
        - $ref: '#/components/schemas/ModelImagePartSchema'
        - $ref: '#/components/schemas/ModelOptionSelectedPartSchema'
        - $ref: '#/components/schemas/ModelContactPartSchema'
        - $ref: '#/components/schemas/ModelLocationPartSchema'
      discriminator:
        propertyName: type
        mapping:
          text:
            $ref: '#/components/schemas/ModelTextPartSchema'
          file:
            $ref: '#/components/schemas/ModelFilePartSchema'
          image:
            $ref: '#/components/schemas/ModelImagePartSchema'
          option_selected:
            $ref: '#/components/schemas/ModelOptionSelectedPartSchema'
          contact:
            $ref: '#/components/schemas/ModelContactPartSchema'
          location:
            $ref: '#/components/schemas/ModelLocationPartSchema'
      description: User message parts
    ModelUserMessageMemberRoleSchema:
      type: string
      enum:
        - customer
        - staff
        - user
      description: >-
        Role of the message sender: customer/staff 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.
        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/ModelEventFollowUpPartSchema'
        - $ref: '#/components/schemas/ModelEventAnalysisPartSchema'
        - $ref: '#/components/schemas/ModelEventReferralPartSchema'
        - $ref: '#/components/schemas/ModelEventApprovalDecisionPartSchema'
        - $ref: '#/components/schemas/ModelEventContactUpdatePartSchema'
        - $ref: '#/components/schemas/ModelEventConnectionConnectedPartSchema'
      discriminator:
        propertyName: type
        mapping:
          event_assignment:
            $ref: '#/components/schemas/ModelEventAssignmentPartSchema'
          event_status_change:
            $ref: '#/components/schemas/ModelEventStatusChangePartSchema'
          event_ai_status:
            $ref: '#/components/schemas/ModelEventAiStatusPartSchema'
          event_mute_change:
            $ref: '#/components/schemas/ModelEventMuteChangePartSchema'
          event_follow_up:
            $ref: '#/components/schemas/ModelEventFollowUpPartSchema'
          event_analysis:
            $ref: '#/components/schemas/ModelEventAnalysisPartSchema'
          event_referral:
            $ref: '#/components/schemas/ModelEventReferralPartSchema'
          event_approval_decision:
            $ref: '#/components/schemas/ModelEventApprovalDecisionPartSchema'
          event_contact_update:
            $ref: '#/components/schemas/ModelEventContactUpdatePartSchema'
          event_connection_connected:
            $ref: '#/components/schemas/ModelEventConnectionConnectedPartSchema'
      description: Parts of the event message
    ModelFilePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - file
        url:
          type: string
        kind:
          $ref: '#/components/schemas/ModelFileKindSchema'
        file:
          $ref: '#/components/schemas/FileSchema'
        auto_consume:
          type: boolean
          description: >-
            Whether this file should be automatically consumed and processed by
            the model
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - url
    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'
      discriminator:
        propertyName: type
        mapping:
          google_drive:
            $ref: '#/components/schemas/FieldPickerGoogleDriveSchema'
          whatsapp_template:
            $ref: '#/components/schemas/FieldPickerWhatsappTemplateSchema'
      description: Picker configuration, when specified it makes this field a picker
    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
    FieldNumberDisplaySchema:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/FieldLayoutSchema'
        container:
          $ref: '#/components/schemas/FieldContainerSchema'
        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
    FieldDisplaySchema:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/FieldLayoutSchema'
        container:
          $ref: '#/components/schemas/FieldContainerSchema'
      description: Display options for the 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
    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: 125
          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
        requires:
          type: array
          items:
            $ref: '#/components/schemas/FieldKeySchema'
          description: Fields that must be filled before the list can be fetched
        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'
      discriminator:
        propertyName: type
        mapping:
          whatsapp_template:
            $ref: '#/components/schemas/FieldWhatsappTemplateComponentSchema'
      description: The component field used to display a custom component
    ConnectionTypeSchema:
      type: string
      enum:
        - SCHEDULER
        - WORKFLOWS
        - TOOLS
        - FILES
        - EMAILS
        - HTTP_CREDENTIALS
        - AUDIENCE
        - TABLES
        - KNOWLEDGE
        - PHONE
        - GMAIL
        - GOOGLE_SHEETS
        - GOOGLE_CALENDAR
        - GOOGLE_DRIVE
        - OUTLOOK_CALENDAR
        - AIRTABLE
        - NOTION
        - LINEAR
        - HUBSPOT
        - GOHIGHLEVEL
        - CAL
        - CALENDLY
        - RESEND
        - OAUTH
        - SLACK
        - TELEGRAM
        - TRELLO
        - FACEBOOK
        - WHATSAPP
        - INSTAGRAM
        - MESSENGER
        - TIKTOK
        - JAPIFON
        - TWILIO
        - TELNYX
        - ZOHO
        - ZOHO_BOOKINGS
        - ZOHO_INVENTORY
        - ZOHO_CALENDAR
        - SALESFORCE
        - STRIPE
        - SHOPIFY
        - ZENDESK
        - MCP
        - ODOO
        - WOOCOMMERCE
      description: Connection type
      example: SLACK
    FieldAdditionalPropertiesSchema:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/FieldSchema'
      required:
        - schema
    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
    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
        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
        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
        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
    ModelResultPartResultPartsSchema:
      oneOf:
        - $ref: '#/components/schemas/ModelTextPartSchema'
        - $ref: '#/components/schemas/ModelImagePartSchema'
        - $ref: '#/components/schemas/ModelFilePartSchema'
        - $ref: '#/components/schemas/ModelLocationPartSchema'
        - $ref: '#/components/schemas/ModelSourcePartSchema'
      discriminator:
        propertyName: type
        mapping:
          text:
            $ref: '#/components/schemas/ModelTextPartSchema'
          image:
            $ref: '#/components/schemas/ModelImagePartSchema'
          file:
            $ref: '#/components/schemas/ModelFilePartSchema'
          location:
            $ref: '#/components/schemas/ModelLocationPartSchema'
          source:
            $ref: '#/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
            - SNOOZED
            - CLOSED
        new_status:
          type: string
          enum:
            - OPEN
            - SNOOZED
            - CLOSED
        source:
          $ref: '#/components/schemas/ModelEventSourceSchema'
        follow_up_at:
          type: string
          format: date-time
          description: Scheduled follow-up date (ISO 8601)
        reason:
          type: string
          maxLength: 512
          description: AI analysis reason for the decision
        csat_score:
          type: integer
          minimum: 1
          maximum: 5
          description: AI-assigned customer satisfaction score (1-5)
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - old_status
        - new_status
        - source
      description: Status change event part (user-visible) - text generated from locales
    ModelEventAiStatusPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_ai_status
        status:
          type: boolean
        source:
          $ref: '#/components/schemas/ModelEventSourceSchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - status
        - source
      description: AI toggle event part - text generated from locales
    ModelEventMuteChangePartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_mute_change
        muted_until:
          type:
            - string
            - 'null'
          format: date-time
          description: New mute expiry datetime (null = un-muted)
        source:
          $ref: '#/components/schemas/ModelEventMuteSourceSchema'
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
        - muted_until
        - source
      description: Mute change event part
    ModelEventFollowUpPartSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - event_follow_up
        old_status:
          type: string
          enum:
            - OPEN
            - SNOOZED
            - CLOSED
        new_status:
          type: string
          enum:
            - OPEN
            - SNOOZED
            - CLOSED
        reason:
          type: string
          maxLength: 512
          description: AI analysis reason for the follow-up
        start_timestamp:
          type: number
          description: Timestamp when the message part started processing, in milliseconds
        end_timestamp:
          type: number
          description: Timestamp when the message part finished processing, in milliseconds
      required:
        - type
      description: Follow-up event — AI re-engaging an inactive conversation
    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.
    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.
    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
    FieldKeySchema:
      type: string
      maxLength: 256
      pattern: ^[^.]+$
      description: The key of the field
    FieldConditionOperatorSchema:
      type: string
      enum:
        - eq
        - neq
        - gt
        - gte
        - lt
        - lte
        - contains
        - not_contains
        - is_empty
        - is_not_empty
      description: The operator for the field condition
    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
    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
    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
    ColorNameSchema:
      type: string
      enum:
        - red
        - orange
        - amber
        - yellow
        - lime
        - green
        - teal
        - cyan
        - sky
        - blue
        - indigo
        - violet
        - purple
        - fuchsia
        - pink
        - rose
        - neutral
      description: The name of the color to use in the UI
    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
    ModelToolCallArgumentsSchema:
      description: Arguments for the tool call
    ConnectionActionApprovalSchema:
      type: object
      properties:
        title:
          type: string
          maxLength: 140
          description: >-
            Short heading shown on the approval card, 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
    ModelEventSourceSchema:
      type: string
      enum:
        - user
        - agent
        - ai
      description: Source of the event
    ModelEventMuteSourceSchema:
      type: string
      enum:
        - agent
        - system
      description: Source of the mute event (only humans or system)
    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.
    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

````