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

Rotate signing secret

BillionSend extension. Mints a new signing secret (or takes the one in signing_secret) and returns it. For overlap_hours the previous secret keeps signing too: every delivery in that window carries both signatures, space-separated in webhook-signature, so the receiver can switch at any point without a gap. A second rotation inside the window replaces the previous secret.

POST/webhooks/{id}/rotate
授权
AuthorizationBearer 令牌 · header必填

A BillionSend API key (bs_…).

路径参数
idstring<uuid>必填
请求体
application/json
signing_secretstring

New secret to sign with: whsec_ followed by base64 of 24-64 bytes. Omit to mint one.

overlap_hoursinteger

Hours the previous secret keeps signing alongside the new one (default 24, max 72). Every delivery in the window carries both signatures, so a receiver holding either verifies; 0 drops the old secret at once.

最小值 0 · 最大值 72
响应
200

The new secret and when the previous one stops signing

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

Missing, malformed, unknown or revoked API key

statusCodenumber必填
namestring必填
messagestring必填
404

Not found

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/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "signing_secret": "string",
  "overlap_hours": 0
}'
响应
{
  "object": "webhook",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "signing_secret": "string",
  "previous_secret_expires_at": "string"
}

这个页面有帮助吗?