> ## 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 webhook

> Updates a WhatsApp webhook's configuration



## OpenAPI

````yaml api/legacy/openapi-platform.yaml patch /whatsapp_configs/{whatsapp_config_id}/whatsapp_webhooks/{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}/whatsapp_webhooks/{id}:
    patch:
      tags:
        - WhatsApp Webhooks
      summary: Update WhatsApp webhook
      description: Updates a WhatsApp webhook's configuration
      operationId: updatePlatformWhatsappWebhook
      parameters:
        - name: whatsapp_config_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - whatsapp_webhook
              properties:
                whatsapp_webhook:
                  type: object
                  properties:
                    url:
                      type: string
                      format: uri
                    secret_key:
                      type: string
                    events:
                      type: array
                      items:
                        type: string
                    active:
                      type: boolean
                    headers:
                      type: object
                      additionalProperties:
                        type: string
                    buffer_enabled:
                      type: boolean
                      description: Whether message buffering is enabled for batch delivery
                    buffer_window_seconds:
                      type: integer
                      minimum: 1
                      maximum: 60
                      description: >-
                        Time window in seconds to buffer messages before sending
                        as batch
                    max_buffer_size:
                      type: integer
                      minimum: 1
                      maximum: 100
                      description: Maximum number of messages to include in a single batch
                    buffer_events:
                      type: array
                      items:
                        type: string
                      description: >-
                        List of events that should be buffered (currently only
                        supports whatsapp.message.received)
                    inactivity_minutes:
                      type: integer
                      minimum: 1
                      maximum: 1440
                      description: >-
                        Time in minutes to wait with no messages before
                        triggering whatsapp.conversation.inactive event (1-1440
                        minutes, default 60)
      responses:
        '200':
          description: WhatsApp webhook updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WhatsappWebhook'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: WhatsApp webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WhatsappWebhook:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 9e8d7c6b-5a4f-3e2d-1c0b-9a8f7e6d5c4b
        url:
          type: string
          format: uri
          example: https://example.com/webhook
        secret_key:
          type: string
          example: your-secret-key
          description: Secret key for webhook signature verification
        events:
          type: array
          items:
            type: string
          example:
            - whatsapp.message.received
            - whatsapp.message.sent
          description: List of events this webhook should receive
        active:
          type: boolean
          example: true
          description: Whether this webhook is active
        headers:
          type: object
          additionalProperties:
            type: string
          nullable: true
          example:
            X-Custom-Header: custom-value
          description: Custom headers to include in webhook requests
        buffer_enabled:
          type: boolean
          example: false
          description: Whether message buffering is enabled for batch delivery
        buffer_window_seconds:
          type: integer
          minimum: 1
          maximum: 60
          example: 5
          description: Time window in seconds to buffer messages before sending as batch
        max_buffer_size:
          type: integer
          minimum: 1
          maximum: 100
          example: 50
          description: Maximum number of messages to include in a single batch
        buffer_events:
          type: array
          items:
            type: string
          example:
            - whatsapp.message.received
          description: >-
            List of events that should be buffered (currently only supports
            whatsapp.message.received)
        inactivity_minutes:
          type: integer
          minimum: 1
          maximum: 1440
          example: 60
          description: >-
            Time in minutes to wait with no messages before triggering
            whatsapp.conversation.inactive event (1-1440 minutes, default 60)
        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

````