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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Update agent settings

> Business Agent. Partial update: fields you omit keep their value.

- `rollout.enabled: true` turns the agent on for new conversations; `false` stops it on every thread. - Turning it on for `EVERYONE` needs a payment method on the Business Agent billable account (Meta accepts the call but delivers nothing without one). - `ALLOWLISTED_ONLY` does not need one, which is how you test with a few numbers before billing. - `never_say_phrases` replaces the whole list.

A write: needs messaging:write and is audited.

## Request contract

* **Method and path:** PATCH /apis/v1/social/messaging/business-agent/settings
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/social/messaging/business-agent/settings`
* **connectionId:** query; required
* **agentId:** query; optional

[Complete OpenAPI definition](https://aisa.one/docs/openapi/aisa-messaging.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "patch_aisa_messaging_apis_v1_social_messaging_bus_3272ae",
  "method": "PATCH",
  "path": "/apis/v1/social/messaging/business-agent/settings",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
      "in": "query",
      "name": "connectionId",
      "required": true,
      "schema": {
        "pattern": "^msc_[0-9A-Za-z]+$",
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "agentId",
      "required": false,
      "schema": {
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "example": {
          "handoff": {
            "enabled": true
          },
          "rollout": {
            "enabled": true
          }
        },
        "schema": {
          "additionalProperties": false,
          "properties": {
            "ai_audience": {
              "enum": [
                "EVERYONE",
                "ALLOWLISTED_ONLY"
              ],
              "type": "string"
            },
            "connectionId": {
              "description": "The connection, when not sent as the connectionId query parameter.",
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            },
            "followup": {
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "followup_interval_in_seconds": {
                  "enum": [
                    0,
                    300,
                    900,
                    1800,
                    3600,
                    7200,
                    28800,
                    86400
                  ],
                  "type": "integer"
                },
                "message": {
                  "maxLength": 1024,
                  "type": "string"
                }
              },
              "required": [
                "enabled"
              ],
              "type": "object"
            },
            "handoff": {
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "message": {
                  "maxLength": 1024,
                  "type": "string"
                },
                "message_selection": {
                  "enum": [
                    "DEFAULT",
                    "AGENT",
                    "CUSTOM"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "enabled"
              ],
              "type": "object"
            },
            "never_say_phrases": {
              "description": "Exact phrases the agent must never say; the full replacement list.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "rollout": {
              "properties": {
                "enabled": {
                  "type": "boolean"
                }
              },
              "required": [
                "enabled"
              ],
              "type": "object"
            }
          },
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

No additional charge for this operation.


## OpenAPI

````yaml openapi/aisa-messaging.json PATCH /apis/v1/social/messaging/business-agent/settings
openapi: 3.1.0
info:
  description: ''
  title: AIsa Messaging
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    aisa-messaging:
      description: ''
      title: AIsa Messaging
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 3f75dbfba86cc5ac46b20ee9310446322890eeeb034619f5c221a47d6b1064a2
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths: []
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:989b0c03378fa66fa7653d6c34e54850322e6be4bc7d9f0f130ac18a459676eb
    facts_hash: 3f75dbfba86cc5ac46b20ee9310446322890eeeb034619f5c221a47d6b1064a2
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: aisa-messaging
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/social/messaging/business-agent/settings:
    patch:
      summary: Update agent settings
      description: >-
        Business Agent. Partial update: fields you omit keep their value.


        - `rollout.enabled: true` turns the agent on for new conversations;
        `false` stops it on every thread. - Turning it on for `EVERYONE` needs a
        payment method on the Business Agent billable account (Meta accepts the
        call but delivers nothing without one). - `ALLOWLISTED_ONLY` does not
        need one, which is how you test with a few numbers before billing. -
        `never_say_phrases` replaces the whole list.


        A write: needs messaging:write and is audited.
      operationId: patch_aisa_messaging_apis_v1_social_messaging_bus_3272ae
      parameters:
        - description: >-
            Your messaging connection (msc_...), from GET
            /apis/v1/social/messaging/connections. On a request with a JSON body
            it may be sent as a top-level body member instead.
          in: query
          name: connectionId
          required: true
          schema:
            pattern: ^msc_[0-9A-Za-z]+$
            type: string
        - in: query
          name: agentId
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            example:
              handoff:
                enabled: true
              rollout:
                enabled: true
            schema:
              additionalProperties: false
              properties:
                ai_audience:
                  enum:
                    - EVERYONE
                    - ALLOWLISTED_ONLY
                  type: string
                connectionId:
                  description: >-
                    The connection, when not sent as the connectionId query
                    parameter.
                  pattern: ^msc_[0-9A-Za-z]+$
                  type: string
                followup:
                  properties:
                    enabled:
                      type: boolean
                    followup_interval_in_seconds:
                      enum:
                        - 0
                        - 300
                        - 900
                        - 1800
                        - 3600
                        - 7200
                        - 28800
                        - 86400
                      type: integer
                    message:
                      maxLength: 1024
                      type: string
                  required:
                    - enabled
                  type: object
                handoff:
                  properties:
                    enabled:
                      type: boolean
                    message:
                      maxLength: 1024
                      type: string
                    message_selection:
                      enum:
                        - DEFAULT
                        - AGENT
                        - CUSTOM
                      type: string
                  required:
                    - enabled
                  type: object
                never_say_phrases:
                  description: >-
                    Exact phrases the agent must never say; the full replacement
                    list.
                  items:
                    type: string
                  type: array
                rollout:
                  properties:
                    enabled:
                      type: boolean
                  required:
                    - enabled
                  type: object
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                description: >-
                  Meta Business Agent settings for one WhatsApp number, as Meta
                  returns them.
                properties:
                  agent_id:
                    type: string
                  ai_audience:
                    description: >-
                      EVERYONE answers all consumers; ALLOWLISTED_ONLY answers
                      only the allowlist and needs no payment method.
                    enum:
                      - EVERYONE
                      - ALLOWLISTED_ONLY
                      - null
                    type:
                      - string
                      - 'null'
                  channel:
                    type: string
                  followup:
                    properties:
                      enabled:
                        type: boolean
                      followup_interval_in_seconds:
                        enum:
                          - 0
                          - 300
                          - 900
                          - 1800
                          - 3600
                          - 7200
                          - 28800
                          - 86400
                        type: integer
                      message:
                        type: string
                    type:
                      - object
                      - 'null'
                  handoff:
                    properties:
                      enabled:
                        description: >-
                          Whether the agent releases the thread after sending
                          its handoff message.
                        type: boolean
                      message:
                        type: string
                      message_selection:
                        enum:
                          - DEFAULT
                          - AGENT
                          - CUSTOM
                        type: string
                    type:
                      - object
                      - 'null'
                  never_say_phrases:
                    description: Exact phrases the agent must never say.
                    items:
                      type: string
                    type: array
                  rollout:
                    properties:
                      enabled:
                        description: Whether the agent answers live conversations.
                        type: boolean
                    required:
                      - enabled
                    type: object
                required:
                  - agent_id
                  - channel
                  - rollout
                type: object
          description: Success
        default:
          content:
            application/json:
              schema:
                properties:
                  error:
                    properties:
                      code:
                        type:
                          - string
                          - 'null'
                      details:
                        additionalProperties: {}
                        type:
                          - object
                          - 'null'
                      message:
                        type:
                          - string
                          - 'null'
                      param:
                        type:
                          - string
                          - 'null'
                      retryHint:
                        type:
                          - string
                          - 'null'
                      retryable:
                        type:
                          - boolean
                          - 'null'
                      type:
                        type:
                          - string
                          - 'null'
                    type:
                      - object
                      - 'null'
                type: object
          description: Error. The code field is stable; see the error catalog.
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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