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

# Set incoming WhatsApp calls on or off

> Set enabled on a specific WhatsApp number. Requires a current workspace admin and revision from get_whatsapp_calling_settings. Enabling checks eligibility with Meta. On a conflict or uncertain result, read the current state. Report success only when state and confirmedEnabled agree with the requested change.



## OpenAPI

````yaml /openapi.json patch /channels/{channelId}/whatsapp/calling
openapi: 3.0.3
info:
  title: Visito M2M API
  version: 1.0.0
  description: >-
    Tenant-scoped server-to-server API for channels, conversations, commerce,
    custom AI tools, and WhatsApp templates. Send operations are asynchronous
    and return queued acknowledgements. Expansion adds conversation controls,
    knowledge, sales opportunities, delivery status, reporting, and signed
    webhooks.
servers:
  - url: https://platform-api.visitoai.com/m2m/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Channels
  - name: Conversations
  - name: Commerce
  - name: Custom tools
  - name: WhatsApp templates
  - name: Properties
  - name: Knowledge
  - name: Sales CRM
  - name: Delivery
  - name: Reporting
  - name: Webhooks
  - name: Tickets
    description: >-
      General tickets, escalations and Commerce-backed work. See the Tickets
      developer guide for lifecycle, MCP arguments, permissions and retry
      workflows.
    externalDocs:
      description: Tickets developer guide
      url: https://docs.visitoai.com/api-docs/tickets
  - name: Contact notes
    description: Sync customer-specific AI context from your CRM.
paths:
  /channels/{channelId}/whatsapp/calling:
    patch:
      tags:
        - Channels
      summary: Set incoming WhatsApp calls on or off
      description: >-
        Set enabled on a specific WhatsApp number. Requires a current workspace
        admin and revision from get_whatsapp_calling_settings. Enabling checks
        eligibility with Meta. On a conflict or uncertain result, read the
        current state. Report success only when state and confirmedEnabled agree
        with the requested change.
      operationId: set_whatsapp_calling_enabled
      parameters:
        - name: channelId
          in: path
          required: true
          description: >-
            Stored channel.id from list_channels or get_channel. Provider page,
            phone, account and WABA IDs are not this ID.
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsAppCallingSettingsPatch'
      responses:
        '200':
          description: Set incoming WhatsApp calls on or off
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppCallingSettings'
        default:
          $ref: '#/components/responses/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    WhatsAppCallingSettingsPatch:
      type: object
      additionalProperties: false
      properties:
        enabled:
          type: boolean
        revision:
          type: integer
          minimum: 0
      required:
        - enabled
        - revision
    WhatsAppCallingSettings:
      type: object
      additionalProperties: false
      properties:
        enabled:
          type: boolean
        confirmedEnabled:
          type: boolean
        revision:
          type: integer
          minimum: 0
        answerRoute:
          type: string
          enum:
            - ai
        reason:
          type: string
        state:
          type: string
          enum:
            - 'off'
            - test_only
            - 'on'
            - enabling
            - disabling
            - needs_attention
        eligibility:
          type: object
          additionalProperties: false
          properties:
            status:
              type: string
              enum:
                - meets_limit
                - below_limit
                - unsupported_connection
                - unknown
            minimum:
              type: integer
            checkedAt:
              type: string
              nullable: true
            messagingLimit:
              oneOf:
                - type: integer
                  nullable: true
                - type: string
                  enum:
                    - unlimited
          required:
            - status
            - minimum
            - checkedAt
            - messagingLimit
      required:
        - enabled
        - confirmedEnabled
        - revision
        - answerRoute
        - state
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: M2M_AUTH_INSUFFICIENT_SCOPE
            message:
              type: string
            details:
              type: object
              additionalProperties: true
      example:
        error:
          code: M2M_AUTH_INSUFFICIENT_SCOPE
          message: M2M credential does not have required scope.
          details:
            requiredScopes:
              - conversations:write
            missingScopes:
              - conversations:write
  responses:
    Error:
      description: Structured error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Visito M2M API key
      description: Server-side tenant-scoped credential created from Build > API Keys.

````

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