跳到内容
Esc
↑↓导航↵打开⌘J预览

Create a webhook

POST/webhooks
授权
AuthorizationBearer 令牌 · header必填

A BillionSend API key (bs_…).

请求体
必填application/json
endpointstring<uri>必填
最大长度 2048
eventsstring[]必填
最少 1 项
inbox_idsstring<uuid>[] | null

BillionSend extension: inbox events and email.received reach this endpoint only for these inboxes of the team (at most 100). null means every inbox. Omitted: every inbox.

最多 100 项
signing_secretstring

Signing secret to use instead of minting one: whsec_ followed by base64 of 24-64 bytes (the Standard Webhooks format). An existing secret carried over keeps the receiver verifying unchanged; when omitted, a new one is generated.

响应
200

Webhook created; signing_secret is also retrievable via GET /webhooks/{id}

objectstring必填
允许值:webhook
idstring<uuid>必填
signing_secretstring必填
401

Missing, malformed, unknown or revoked API key

statusCodenumber必填
namestring必填
messagestring必填
403

Plan webhook endpoint limit reached

statusCodenumber必填
namestring必填
messagestring必填
422

Validation error

statusCodenumber必填
namestring必填
messagestring必填
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumber必填
namestring必填
messagestring必填
试一试
服务器
授权
请求体application/json
请求
curl -X POST 'https://api.billionsend.com/webhooks' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "endpoint": "http://example.com",
  "events": [
    "email.scheduled"
  ],
  "inbox_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "signing_secret": "string"
}'
响应
{
  "object": "webhook",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "signing_secret": "string"
}

这个页面有帮助吗?