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

# Update Meta agent settings

> Change any of the settings; omitted fields keep their value. Answering everyone needs a payment method in Meta Billing Hub; test mode (ALLOWLISTED_ONLY) does not.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json patch /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
tags:
  - name: Inbox
  - name: Chats
  - name: Messages
  - name: Contacts
  - name: Custom channels
  - name: Segments
  - name: Suppressions
  - name: Assistants
  - name: Agents
  - name: Skills
  - name: Knowledge
  - name: AI
  - name: Broadcasts
  - name: Email sending
  - name: WhatsApp
  - name: WhatsApp Meta agent
  - name: Tables
  - name: Records
  - name: Views
  - name: Pages
  - name: Connections
  - name: Workspace
  - name: Sub-organizations
  - name: Analytics and logs
  - name: Workflows
paths:
  /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings:
    patch:
      tags:
        - WhatsApp Meta agent
      summary: Update Meta agent settings
      description: >-
        Change any of the settings; omitted fields keep their value. Answering
        everyone needs a payment method in Meta Billing Hub; test mode
        (ALLOWLISTED_ONLY) does not.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the org
          name: org_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the connection
          name: connection_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the WhatsApp phone number the Meta agent runs on
          name: phone_number_id
          in: path
        - schema:
            type: string
            maxLength: 128
            description: >-
              The agent settings to read or change. Defaults to the most recent
              ones.
          required: false
          description: >-
            The agent settings to read or change. Defaults to the most recent
            ones.
          name: agent_id
          in: query
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWhatsAppMetaAgentSettingsSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UpdateWhatsAppMetaAgentSettingsSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppMetaAgentSettingsSchema'
components:
  schemas:
    UpdateWhatsAppMetaAgentSettingsSchema:
      type: object
      properties:
        rollout:
          type: object
          properties:
            enabled:
              type: boolean
              description: >-
                Turn the agent on or off. Off stops it on every conversation; on
                applies to new ones.
          required:
            - enabled
        handoff:
          type: object
          properties:
            enabled:
              type: boolean
            message:
              type: string
              maxLength: 20000
            message_selection:
              $ref: >-
                #/components/schemas/WhatsAppMetaAgentHandoffMessageSelectionSchema
        followup:
          type: object
          properties:
            enabled:
              type: boolean
            followup_interval_in_seconds:
              $ref: '#/components/schemas/WhatsAppMetaAgentFollowupIntervalSchema'
            message:
              type: string
              maxLength: 20000
        ai_audience:
          $ref: '#/components/schemas/WhatsAppMetaAgentAudienceSchema'
        never_say_phrases:
          type: array
          items:
            type: string
            maxLength: 256
          maxItems: 200
          description: >-
            Replaces the whole list: an answer containing one of these phrases
            is withheld. An empty list clears it.
    WhatsAppMetaAgentSettingsSchema:
      type: object
      properties:
        agent_id:
          type: string
        channel:
          type: string
        rollout:
          type: object
          properties:
            enabled:
              type: boolean
          required:
            - enabled
        handoff:
          type: object
          properties:
            enabled:
              type: boolean
            message:
              type: string
            message_selection:
              $ref: >-
                #/components/schemas/WhatsAppMetaAgentHandoffMessageSelectionSchema
          required:
            - enabled
        followup:
          type: object
          properties:
            enabled:
              type: boolean
            followup_interval_in_seconds:
              $ref: '#/components/schemas/WhatsAppMetaAgentFollowupIntervalSchema'
            message:
              type: string
          required:
            - enabled
        ai_audience:
          $ref: '#/components/schemas/WhatsAppMetaAgentAudienceSchema'
        never_say_phrases:
          type: array
          items:
            type: string
      required:
        - agent_id
        - channel
        - rollout
        - handoff
        - followup
        - ai_audience
    WhatsAppMetaAgentHandoffMessageSelectionSchema:
      type: string
      enum:
        - DEFAULT
        - AGENT
        - CUSTOM
    WhatsAppMetaAgentFollowupIntervalSchema:
      anyOf:
        - type: number
          enum:
            - 0
        - type: number
          enum:
            - 300
        - type: number
          enum:
            - 900
        - type: number
          enum:
            - 1800
        - type: number
          enum:
            - 3600
        - type: number
          enum:
            - 7200
        - type: number
          enum:
            - 28800
        - type: number
          enum:
            - 86400
      description: Seconds of customer silence before the follow-up; 0 disables it.
    WhatsAppMetaAgentAudienceSchema:
      type: string
      enum:
        - EVERYONE
        - ALLOWLISTED_ONLY
      description: >-
        Who the agent answers. ALLOWLISTED_ONLY is test mode: only the
        allowlisted numbers get replies.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````