跳转到主要内容
POST
添加新设备

授权

Authorization
string
header
必填

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

请求体

application/json
device_id
string

可选自定义设备 ID。 如果没有提供,将产生一个。

示例:

"my-custom-device-id"

webhook_url
string

可选设备特定的 webhook URL。 如果设置,此设备的事件将会被发送到这里而不是全局Webhook。

示例:

"https://device-webhook.example.com/handler"

webhook_secret
string

可选的秘密用于签名特定设备的 webhook payload (HMAC)。

示例:

"super-secret-key"

webhook_events
string

可选的逗号分隔事件名称列表以转发到特定设备的 webhook。 空意味着所有事件。

示例:

"message,message.ack"

webhook_insecure_skip_verify
boolean

可选的。 发送到特定设备的 Web 钩子时跳过 TLS 证书验证。

示例:

false

响应

好的

code
string
示例:

"SUCCESS"

message
string
示例:

"Device added"

status
integer
示例:

200

results
object