# Update number settings (/docs/api-reference/whatsapp/updateWhatsappNumberSettings)

> Change any of a number's name, agent replies, reply touches, and welcome prompts and commands. Only the fields you send change.

> **Set up WhatsApp first.** Connect a WhatsApp number in the dashboard or with [Connect numbers](/docs/api-reference/whatsapp/importWhatsappNumbers). Included on every paid plan. [See plans](https://omnidim.io/pricing).

**PATCH** `/whatsapp/numbers/{number_id}/settings`

Change any of a number's name, agent replies, reply touches, and welcome
prompts and commands. Only the fields you send change.

`automation` replaces both lists at Meta: send the full lists you want,
and empty lists to clear them. Meta Cloud numbers only. When Meta refuses
it, nothing else changes either.

Turning `voice` on is billed per second of audio: the first try returns
`400 voice_charges_not_acknowledged` with the rate in `voice_billing`.
Show the rate, then send again with `acknowledge_voice_charges: true`.

```yaml
operationId: updateWhatsappNumberSettings
parameters:
  - in: path
    name: number_id
    required: true
    schema:
      type: integer
    description: |
      Id of a WhatsApp number in your workspace, from
      [listWhatsappNumbers](/docs/api-reference/whatsapp/listWhatsappNumbers).
      A number in another workspace answers `404`.
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        minProperties: 1
        properties:
          name:
            type: string
            minLength: 1
            maxLength: 64
            description: The number's name in your workspace. WhatsApp's display name does not change.
          agent_replies:
            type: boolean
            description: Whether the agent answers customers' messages on this number.
          touches:
            type: object
            minProperties: 1
            description: |
              Reply touches to turn on or off; send only the ones to change. Meta
              Cloud numbers only.
            properties:
              typing:
                type: boolean
                description: Mark the customer's message read and show typing while the agent writes.
              quote:
                type: boolean
                description: Send each reply as a reply to the message it answers.
              react:
                type: boolean
                description: Let the agent react to a message with an emoji.
              buttons:
                type: boolean
                description: Let the agent send a tap-to-call button, or ask for a location or a phone number.
              voice:
                type: boolean
                description: >-
                  Let the agent reply with voice notes. Billed per second of audio; needs
                  `acknowledge_voice_charges`.
          acknowledge_voice_charges:
            type: boolean
            description: '`true` to accept the voice note rate when turning `voice` on.'
          automation:
            type: object
            description: >-
              Welcome prompts and commands customers see when they open a chat (Meta Cloud numbers
              only).
            properties:
              prompts:
                type: array
                maxItems: 4
                items:
                  type: string
                  maxLength: 80
                description: Up to 4 welcome prompts a customer can tap to start.
              commands:
                type: array
                maxItems: 30
                items:
                  type: object
                  required:
                    - name
                    - description
                  properties:
                    name:
                      type: string
                      maxLength: 32
                      description: The command without `/`, no spaces.
                    description:
                      type: string
                      maxLength: 256
                description: Up to 30 commands a customer can type after `/`.
      example:
        agent_replies: true
        touches:
          typing: true
          buttons: false
        automation:
          prompts:
            - Book a demo
            - Talk to sales
          commands:
            - name: help
              description: Get help with your order
responses:
  '200':
    description: The number's settings after the change.
    content:
      application/json:
        schema:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
              nullable: true
            agent_replies:
              type: boolean
              description: Whether the agent answers customers' messages.
            inbound_workflow:
              type: object
              nullable: true
              description: The workflow that takes customers' media on this number.
              properties:
                workflow_id:
                  type: integer
                name:
                  type: string
                published:
                  type: boolean
            touches:
              type: object
              properties:
                supported:
                  type: boolean
                  description: Whether this number's provider can use touches.
                typing:
                  type: boolean
                quote:
                  type: boolean
                react:
                  type: boolean
                buttons:
                  type: boolean
                voice:
                  type: boolean
                  description: Present only where voice replies are offered.
                available:
                  type: object
                  additionalProperties:
                    type: boolean
                  description: Which touches this number can turn on.
                voice_billing:
                  type: object
                  additionalProperties: true
                  description: The voice note rate, where voice replies are offered.
            automation:
              type: object
              description: >-
                Welcome prompts and commands customers see when they open a chat (Meta Cloud numbers
                only).
              nullable: true
              properties:
                prompts:
                  type: array
                  maxItems: 4
                  items:
                    type: string
                    maxLength: 80
                  description: Up to 4 welcome prompts a customer can tap to start.
                commands:
                  type: array
                  maxItems: 30
                  items:
                    type: object
                    required:
                      - name
                      - description
                    properties:
                      name:
                        type: string
                        maxLength: 32
                        description: The command without `/`, no spaces.
                      description:
                        type: string
                        maxLength: 256
                  description: Up to 30 commands a customer can type after `/`.
  '400':
    description: >-
      A bad parameter or body. `code` says which, such as `invalid_parameter`, `invalid_json`,
      `invalid_limit` or `invalid_cursor`.
    content:
      application/json:
        schema:
          type: object
          description: |
            The error envelope for every WhatsApp route. Some errors add keys:
            `fields` (the template parameters a send still needs), `ref` (a
            500's support reference) and `failed` (on `import_failed`).
          properties:
            error:
              type: string
              description: Machine-readable category, such as `invalid_request`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason, such as `window_closed`.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            fields:
              type: array
              items:
                type: string
              description: >-
                On a template send missing parameters (`missing_fields`), the field keys you still
                need.
            ref:
              type: string
              description: On a `500`, the reference to quote to support.
            failed:
              type: array
              items:
                type: object
                properties:
                  phone_number_id:
                    type: string
                  message:
                    type: string
                    example: >-
                      This WhatsApp number is already connected to another account. Disconnect it
                      there first, then import it again. Contact support if you cannot access that
                      account.
              description: On `import_failed`, each number and why it could not be connected.
        example:
          error: invalid_request
          error_description: limit must be a whole number from 1 to 100.
          code: invalid_limit
          request_id: req_4a1c7d9e2f60
  '401':
    description: Missing or invalid API key.
    content:
      application/json:
        schema:
          type: object
          description: |
            The error envelope for every WhatsApp route. Some errors add keys:
            `fields` (the template parameters a send still needs), `ref` (a
            500's support reference) and `failed` (on `import_failed`).
          properties:
            error:
              type: string
              description: Machine-readable category, such as `invalid_request`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason, such as `window_closed`.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            fields:
              type: array
              items:
                type: string
              description: >-
                On a template send missing parameters (`missing_fields`), the field keys you still
                need.
            ref:
              type: string
              description: On a `500`, the reference to quote to support.
            failed:
              type: array
              items:
                type: object
                properties:
                  phone_number_id:
                    type: string
                  message:
                    type: string
                    example: >-
                      This WhatsApp number is already connected to another account. Disconnect it
                      there first, then import it again. Contact support if you cannot access that
                      account.
              description: On `import_failed`, each number and why it could not be connected.
        example:
          error: unauthorized
          error_description: Missing or invalid API key
          code: invalid_api_key
          request_id: req_6e2b9d4f1a38
  '403':
    description: |
      `feature_not_enabled` when your plan or role cannot use WhatsApp,
      `permission_denied` when the key's user cannot make changes, or
      `service_unavailable` when the account is on hold.
    content:
      application/json:
        schema:
          type: object
          description: |
            The error envelope for every WhatsApp route. Some errors add keys:
            `fields` (the template parameters a send still needs), `ref` (a
            500's support reference) and `failed` (on `import_failed`).
          properties:
            error:
              type: string
              description: Machine-readable category, such as `invalid_request`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason, such as `window_closed`.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            fields:
              type: array
              items:
                type: string
              description: >-
                On a template send missing parameters (`missing_fields`), the field keys you still
                need.
            ref:
              type: string
              description: On a `500`, the reference to quote to support.
            failed:
              type: array
              items:
                type: object
                properties:
                  phone_number_id:
                    type: string
                  message:
                    type: string
                    example: >-
                      This WhatsApp number is already connected to another account. Disconnect it
                      there first, then import it again. Contact support if you cannot access that
                      account.
              description: On `import_failed`, each number and why it could not be connected.
        example:
          error: forbidden
          error_description: You do not have permission to make changes to WhatsApp.
          code: permission_denied
          request_id: req_9f2c1a4b7d3e
  '404':
    description: |
      No number, conversation, message, template, media upload, agent,
      campaign, contact or opt-out with that id in your workspace. `code`
      says which. Another workspace's id gives the same answer.
    content:
      application/json:
        schema:
          type: object
          description: |
            The error envelope for every WhatsApp route. Some errors add keys:
            `fields` (the template parameters a send still needs), `ref` (a
            500's support reference) and `failed` (on `import_failed`).
          properties:
            error:
              type: string
              description: Machine-readable category, such as `invalid_request`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason, such as `window_closed`.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            fields:
              type: array
              items:
                type: string
              description: >-
                On a template send missing parameters (`missing_fields`), the field keys you still
                need.
            ref:
              type: string
              description: On a `500`, the reference to quote to support.
            failed:
              type: array
              items:
                type: object
                properties:
                  phone_number_id:
                    type: string
                  message:
                    type: string
                    example: >-
                      This WhatsApp number is already connected to another account. Disconnect it
                      there first, then import it again. Contact support if you cannot access that
                      account.
              description: On `import_failed`, each number and why it could not be connected.
        example:
          error: not_found
          error_description: WhatsApp number not found.
          code: number_not_found
          request_id: req_2c8e7a1d9b40
  '409':
    description: |
      The request cannot run in the current state. `code` says which:
      `not_supported` (this number cannot do it), `window_closed` (the
      24-hour window needs a template), `opted_out`, `invalid_transition`
      (a campaign), `idempotency_key_reused`, `customer_opt_out`, or
      `sync_in_progress`.
    content:
      application/json:
        schema:
          type: object
          description: |
            The error envelope for every WhatsApp route. Some errors add keys:
            `fields` (the template parameters a send still needs), `ref` (a
            500's support reference) and `failed` (on `import_failed`).
          properties:
            error:
              type: string
              description: Machine-readable category, such as `invalid_request`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason, such as `window_closed`.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            fields:
              type: array
              items:
                type: string
              description: >-
                On a template send missing parameters (`missing_fields`), the field keys you still
                need.
            ref:
              type: string
              description: On a `500`, the reference to quote to support.
            failed:
              type: array
              items:
                type: object
                properties:
                  phone_number_id:
                    type: string
                  message:
                    type: string
                    example: >-
                      This WhatsApp number is already connected to another account. Disconnect it
                      there first, then import it again. Contact support if you cannot access that
                      account.
              description: On `import_failed`, each number and why it could not be connected.
        example:
          error: conflict
          error_description: >-
            It has been more than 24 hours since this customer last wrote or called, so WhatsApp
            only allows an approved template. Send a template instead.
          code: window_closed
          request_id: req_7b3d1f8a2c95
  '500':
    description: Something went wrong on our side. Quote `ref` to support.
    content:
      application/json:
        schema:
          type: object
          description: |
            The error envelope for every WhatsApp route. Some errors add keys:
            `fields` (the template parameters a send still needs), `ref` (a
            500's support reference) and `failed` (on `import_failed`).
          properties:
            error:
              type: string
              description: Machine-readable category, such as `invalid_request`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason, such as `window_closed`.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            fields:
              type: array
              items:
                type: string
              description: >-
                On a template send missing parameters (`missing_fields`), the field keys you still
                need.
            ref:
              type: string
              description: On a `500`, the reference to quote to support.
            failed:
              type: array
              items:
                type: object
                properties:
                  phone_number_id:
                    type: string
                  message:
                    type: string
                    example: >-
                      This WhatsApp number is already connected to another account. Disconnect it
                      there first, then import it again. Contact support if you cannot access that
                      account.
              description: On `import_failed`, each number and why it could not be connected.
        example:
          error: server_error
          error_description: >-
            Something went wrong on our side. Please try again shortly, or contact support with
            reference 9a1f3e8b02c4.
          ref: 9a1f3e8b02c4
          code: server_error
          request_id: req_9a1f3e8b02c4
```

**curl**

```bash
curl -X PATCH "https://omnidim.io/api/v1/whatsapp/numbers/{number_id}/settings" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agent_replies": true,
  "touches": {
    "typing": true,
    "buttons": false
  },
  "automation": {
    "prompts": [
      "Book a demo",
      "Talk to sales"
    ],
    "commands": [
      {
        "name": "help",
        "description": "Get help with your order"
      }
    ]
  }
}'
```