跳转到主要内容
PUT
创建或更新设备的聊天窗口配置

授权

Authorization
string
header
必填

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

路径参数

device_id
string
必填

已处理聊天窗口配置的设备 ID (或WhatsApp JID)

示例:

"my-device-id"

请求体

application/json
chatwoot_url
string
必填
示例:

"https://chatwoot.example.com"

account_id
integer
必填
示例:

1

inbox_id
integer
必填
示例:

5

api_token
string

Chatwoot 代理/bot API 令牌。 创建时需要填写;空(或遮罩值)将保存存储的令牌在更新。

webhook_secret
string

此收件箱的 API 频道的 Webhook 秘密。 设置后,它会取代 CHATWOOT_WEBHOOK_SECRET,保护路由到此设备的所有 Webhook(包括 /chatwoot/webhook/{device_id} 和 共享的 /chatwoot/webhook 路由)。 省略以保留存储的值;发送一个空的 字符串以删除它。 API从未返回.

enabled
boolean
默认值:true

响应

配置已保存

code
string
示例:

"SUCCESS"

message
string
示例:

"Chatwoot device config saved"

results
object

每次读取时都遮盖了设备聊天路由配置 (API 令牌)