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

# 每台设备聊天woot webhook 端点

> Chatwoot webhook的每个设备变量：在这里配置每个设备的聊天woot
收件箱到POST (设备配置
endpoint时以 `webhook_url` 格式返回URL)，所以代理人对该设备的回复路径可确定性。
按配置：除可选秘密外， 有效载荷的
帐户和收件箱必须与设备存储的配置匹配，或者请求被拒绝了
与 401。 未知设备 id 和 non-message 事件被接受
，且被忽略。
请求的身份验证方式与 `/chatwoot/webhook` 相同：如果设备
配置中设置了 `webhook_secret`，则使用该密钥；否则使用 CHATWOOT_WEBHOOK_SECRET
进行验证。




## OpenAPI

````yaml /zh/openapi.yml post /chatwoot/webhook/{device_id}
openapi: 3.0.0
info:
  title: WhatsApp API 多设备
  version: 9.7.0
  description: |
    此 API 用于通过 API 发送什么应用。

    Web 仪表板是一个单独的项目(gowa-ui)； 服务器下载它的
    最新版本资产并在 `/` 处服务(或在
    APP_UI_ENABLED=false时返回一个 JSON 横幅)。

    设备范围：
    - 在所有设备范围的REST 调用上发送 `X-Device-Id` 。
    - WebSocket: 连接到"/w?device_id=<id>`.
    - WebSocket 身份验证（启用基本身份验证时）：浏览器无法为
      WebSocket 连接设置 Authorization 请求头，因此还需在
      查询字符串中传入 `&authorization=<base64(user:pass)>`。 在
      生产中使用TLS ，因为凭据在 URL 中可见。
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: 初始连接到 Whatsapp 服务器
  - name: device
    description: 多设备支持的设备管理
  - name: user
    description: 获取信息
  - name: send
    description: 发送消息 (Text/Image/File/Video)。
  - name: message
    description: 消息操作 (撤销/react/update)。
  - name: call
    description: 通话管理 (拒绝来电)
  - name: chat
    description: 聊天对话和消息
  - name: group
    description: 组设置
  - name: newsletter
    description: 通讯设置
  - name: chatwoot
    description: 客户支持的聊天窗口集成
paths:
  /chatwoot/webhook/{device_id}:
    post:
      tags:
        - chatwoot
      summary: 每台设备聊天woot webhook 端点
      description: |
        Chatwoot webhook的每个设备变量：在这里配置每个设备的聊天woot
        收件箱到POST (设备配置
        endpoint时以 `webhook_url` 格式返回URL)，所以代理人对该设备的回复路径可确定性。
        按配置：除可选秘密外， 有效载荷的
        帐户和收件箱必须与设备存储的配置匹配，或者请求被拒绝了
        与 401。 未知设备 id 和 non-message 事件被接受
        ，且被忽略。
        请求的身份验证方式与 `/chatwoot/webhook` 相同：如果设备
        配置中设置了 `webhook_secret`，则使用该密钥；否则使用 CHATWOOT_WEBHOOK_SECRET
        进行验证。
      operationId: chatwootDeviceWebhook
      parameters:
        - name: device_id
          in: path
          required: true
          description: Web 钩子绑定的设备 ID (or WhatsApp JID)
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Chatwoot webhook payload (见Chatwoot 文档)
      responses:
        '200':
          description: Webhook 已处理(或已确认和忽略)
        '401':
          description: 无效的密钥或签名，或payload帐户/收件箱与设备的配置不匹配
        '503':
          description: 设备的配置无法读取，所以请求无法被验证或相同的签名请求仍在处理
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [聊天woot 集成](https://gowa-docs.mintlify.site/zh/integrations/chatwoot.md)
- [列出每台设备的Chatwoot 配置](https://gowa-docs.mintlify.site/zh/api-reference/chatwoot/列出每台设备的chatwoot-配置.md)
- [Webhooks](https://gowa-docs.mintlify.site/zh/concepts/webhooks.md)
- [Chatwoot webhook 端点](https://gowa-docs.mintlify.site/zh/api-reference/chatwoot/chatwoot-webhook-端点.md)
- [API 参考](https://gowa-docs.mintlify.site/zh/api-reference/introduction.md)


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