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

# Replace Settings

> Creates or updates rollout, handoff, follow-up, audience, and response-policy settings for the agent. YCloud omits null fields before calling Meta. Omitting `never_say_phrases` preserves the current list, an empty list clears it, and a non-empty list fully replaces it.



## OpenAPI

````yaml /openapi/endpoints/meta-business-agent-public.openapi.json put /metaBusinessAgents/{entityId}/settings
openapi: 3.0.0
info:
  title: YCloud Meta Business Agent Public API
  version: v2
  description: >-
    Create, configure, test, and operate a Meta Business Agent for a WhatsApp
    Business phone number through YCloud.
servers:
  - url: https://api.ycloud.com/v2
    description: YCloud API base URL
security:
  - api_key: []
tags:
  - name: Meta Business Agents
    description: >-
      Meta Business Agent onboarding, knowledge, skills, connectors, tools,
      operations, and evaluations.
paths:
  /metaBusinessAgents/{entityId}/settings:
    put:
      tags:
        - Meta Business Agents
      summary: Replace Settings
      description: >-
        Creates or updates rollout, handoff, follow-up, audience, and
        response-policy settings for the agent. YCloud omits null fields before
        calling Meta. Omitting `never_say_phrases` preserves the current list,
        an empty list clears it, and a non-empty list fully replaces it.
      operationId: meta-business-agent-replace-settings
      parameters:
        - name: entityId
          in: path
          required: true
          schema:
            type: string
          description: WhatsApp Business Phone Number ID that owns the Meta Business Agent.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicReplaceSettingsRequest'
      responses:
        '200':
          description: Operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSettingsDTO'
        '400':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaBusinessAgentErrorResponse'
        '401':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaBusinessAgentErrorResponse'
        '403':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaBusinessAgentErrorResponse'
        '404':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaBusinessAgentErrorResponse'
        '409':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaBusinessAgentErrorResponse'
        '429':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaBusinessAgentErrorResponse'
        '500':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaBusinessAgentErrorResponse'
        '502':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaBusinessAgentErrorResponse'
components:
  schemas:
    PublicReplaceSettingsRequest:
      type: object
      properties:
        agent_id:
          type: string
          description: Meta Business Agent ID when explicit selection is required.
        rollout:
          $ref: '#/components/schemas/SettingsRolloutDTO'
          description: Replacement rollout configuration.
        handoff:
          $ref: '#/components/schemas/SettingsHandoffDTO'
          description: >-
            Replacement handoff configuration supported by the current YCloud
            contract.
        followup:
          $ref: '#/components/schemas/SettingsFollowupDTO'
          description: Replacement follow-up configuration.
        ai_audience:
          type: string
          enum:
            - ALLOWLISTED_ONLY
            - EVERYONE
          description: ALLOWLISTED_ONLY for testing or EVERYONE for full rollout.
        never_say_phrases:
          type: array
          description: >-
            Complete list of phrases the agent must not say. Omit to preserve
            the current list, send an empty array to clear it, or send a
            non-empty array to replace it.
          items:
            type: string
      additionalProperties: false
    AgentSettingsDTO:
      type: object
      properties:
        agent_id:
          type: string
          description: Meta Business Agent ID.
        channel:
          type: string
          description: Channel associated with the agent.
        rollout:
          $ref: '#/components/schemas/SettingsRolloutDTO'
          description: Live rollout configuration.
        handoff:
          $ref: '#/components/schemas/SettingsHandoffDTO'
          description: >-
            Human handoff configuration supported by the current YCloud
            contract.
        followup:
          $ref: '#/components/schemas/SettingsFollowupDTO'
          description: Inactivity follow-up configuration.
        ai_audience:
          type: string
          enum:
            - ALLOWLISTED_ONLY
            - EVERYONE
          description: Audience allowed to receive agent responses.
      additionalProperties: false
    MetaBusinessAgentErrorResponse:
      type: object
      additionalProperties: true
      properties:
        status:
          type: integer
        code:
          type: string
        message:
          type: string
        target:
          type: string
        docUrl:
          type: string
        requestId:
          type: string
        metaBusinessAgentApiError:
          $ref: '#/components/schemas/MetaBusinessAgentApiError'
    SettingsRolloutDTO:
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether the agent is enabled for live message handling.
      additionalProperties: false
      required:
        - enabled
    SettingsHandoffDTO:
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether human handoff is enabled.
        message_selection:
          type: string
          enum:
            - DEFAULT
            - AGENT
            - CUSTOM
          description: >-
            Selects the handoff message source. `message` is required when this
            value is `CUSTOM`.
        message:
          type: string
          description: Customer-facing message sent when handoff is triggered.
      additionalProperties: false
      required:
        - enabled
    SettingsFollowupDTO:
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether inactivity follow-up is enabled.
        followup_interval_in_seconds:
          type: integer
          format: int32
          enum:
            - 0
            - 300
            - 900
            - 1800
            - 3600
            - 7200
            - 28800
            - 86400
          description: >-
            Delay before the follow-up message. Must be one of 0, 300, 900,
            1800, 3600, 7200, 28800, or 86400 seconds.
        message:
          type: string
          description: Customer-facing follow-up message.
      additionalProperties: false
      required:
        - enabled
    MetaBusinessAgentApiError:
      type: object
      additionalProperties: false
      properties:
        title:
          type: string
          description: Meta error title, when available.
        detail:
          type: string
          description: Actionable Meta error detail, when available.
        type:
          type: string
          description: Meta error category or URI, when available.
        status:
          type: integer
          description: Upstream HTTP status.
        requestId:
          type: string
          description: Upstream request identifier.
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-API-Key

````

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