> ## Documentation Index
> Fetch the complete documentation index at: https://kapso-1adbad2d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update WhatsApp config

> Updates a WhatsApp configuration's details



## OpenAPI

````yaml api/legacy/openapi-platform.yaml patch /whatsapp_configs/{whatsapp_config_id}
openapi: 3.0.3
info:
  title: Kapso Platform API
  description: >-
    Build WhatsApp automation into your SaaS. Let your customers connect their
    own WhatsApp Business accounts.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /whatsapp_configs/{whatsapp_config_id}:
    patch:
      tags:
        - WhatsApp Configs
      summary: Update WhatsApp config
      description: Updates a WhatsApp configuration's details
      operationId: updateWhatsappConfig
      parameters:
        - name: whatsapp_config_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - whatsapp_config
              properties:
                whatsapp_config:
                  type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - production
                        - sandbox
                      description: Configuration environment type
                    name:
                      type: string
                    phone_number_id:
                      type: string
                      description: Required when updating a production configuration
                    business_account_id:
                      type: string
                      description: Required when updating a production configuration
                    webhook_verify_token:
                      type: string
                      description: >-
                        Token for webhook verification (write-only, not returned
                        in responses)
                    webhook_destination_url:
                      type: string
                      description: >-
                        URL for webhook delivery (write-only, not returned in
                        responses)
                    access_token:
                      type: string
                      description: Required when updating a production configuration
                    inbound_processing_enabled:
                      type: boolean
                      description: >-
                        Whether inbound message processing is enabled for this
                        configuration
                    calls_enabled:
                      type: boolean
                      description: Whether voice calling is enabled for this configuration
      responses:
        '200':
          description: WhatsApp configuration updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WhatsappConfig'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: WhatsApp configuration not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WhatsappConfig:
      type: object
      description: >
        WhatsApp configuration for a customer.

        Note: webhook_verify_token and webhook_destination_url are write-only
        fields

        and will not be returned in API responses for security reasons.
      properties:
        id:
          type: string
          example: 4a5b6c7d-8e9f-0a1b-2c3d-4e5f6a7b8c9d
        name:
          type: string
          example: Client WhatsApp
        display_name:
          type: string
          example: Client WhatsApp (+1234567890)
        phone_number_id:
          type: string
          example: '1234567890'
        business_account_id:
          type: string
          example: '98765432109'
        display_phone_number:
          type: string
          example: +56 9 61461262
          description: Formatted phone number for display purposes
        display_phone_number_normalized:
          type: string
          example: '56961461262'
          description: Normalized phone number without + prefix
        webhook_verify_token:
          type: string
          description: >-
            Write-only. Token for webhook verification. Not returned in
            responses.
        webhook_destination_url:
          type: string
          description: Write-only. URL for webhook delivery. Not returned in responses.
        customer_id:
          type: string
          format: uuid
          example: 3f2e1d0c-9b8a-7f6e-5d4c-3b2a1f0e9d8c
        inbound_processing_enabled:
          type: boolean
          example: true
          description: Whether inbound message processing is enabled for this configuration
        calls_enabled:
          type: boolean
          example: false
          description: Whether voice calling is enabled for this configuration
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your project API key

````