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

# Per-device Chatwoot webhook endpoint

> Per-device variant of the Chatwoot webhook: configure each device's Chatwoot
inbox to POST here (the URL is returned as `webhook_url` by the device config
endpoints) so agent replies route deterministically to that device.
Route-by-config: in addition to the optional secret, the payload's
account and inbox must match the device's stored config or the request is
rejected with 401. Unknown device ids and non-message events are acknowledged
with 200 and ignored.
The request is authenticated like `/chatwoot/webhook`, with the device
config's `webhook_secret` when it has one and CHATWOOT_WEBHOOK_SECRET
otherwise.




## OpenAPI

````yaml /openapi.yml post /chatwoot/webhook/{device_id}
openapi: 3.0.0
info:
  title: WhatsApp API MultiDevice
  version: 9.7.0
  description: |
    This API is used for sending whatsapp via API.

    The web dashboard is a separate project (gowa-ui); the server downloads its
    latest release asset and serves it at `/` (or returns a JSON banner when
    APP_UI_ENABLED=false).

    Device scoping:
    - Send `X-Device-Id` on all device-scoped REST calls.
    - WebSocket: connect to `/ws?device_id=<id>`.
    - WebSocket auth (when basic auth is enabled): browsers cannot set an
      Authorization header on WebSocket connections, so also pass
      `&authorization=<base64(user:pass)>` in the query string. Use TLS in
      production since the credential is visible in the URL.
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: Initial Connection to Whatsapp server
  - name: device
    description: Device management for multi-device support
  - name: user
    description: Getting information
  - name: send
    description: Send Message (Text/Image/File/Video).
  - name: message
    description: Message manipulation (revoke/react/update).
  - name: call
    description: Call management (reject incoming calls)
  - name: chat
    description: Chat conversations and messaging
  - name: group
    description: Group setting
  - name: newsletter
    description: newsletter setting
  - name: chatwoot
    description: Chatwoot integration for customer support
paths:
  /chatwoot/webhook/{device_id}:
    post:
      tags:
        - chatwoot
      summary: Per-device Chatwoot webhook endpoint
      description: >
        Per-device variant of the Chatwoot webhook: configure each device's
        Chatwoot

        inbox to POST here (the URL is returned as `webhook_url` by the device
        config

        endpoints) so agent replies route deterministically to that device.

        Route-by-config: in addition to the optional secret, the payload's

        account and inbox must match the device's stored config or the request
        is

        rejected with 401. Unknown device ids and non-message events are
        acknowledged

        with 200 and ignored.

        The request is authenticated like `/chatwoot/webhook`, with the device

        config's `webhook_secret` when it has one and CHATWOOT_WEBHOOK_SECRET

        otherwise.
      operationId: chatwootDeviceWebhook
      parameters:
        - name: device_id
          in: path
          required: true
          description: Device ID (or WhatsApp JID) the webhook is bound to
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Chatwoot webhook payload (see Chatwoot documentation)
      responses:
        '200':
          description: Webhook processed (or acknowledged and ignored)
        '401':
          description: >-
            Invalid secret or signature, or payload account/inbox does not match
            the device's config
        '503':
          description: >-
            The device's config could not be read, so the request could not be
            authenticated, or an identical signed request is still being handled
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

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