Skip to content
Esc
↑↓navigate↵open⌘Jpreview

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
Authorization
AuthorizationBearer token · headerrequired

A BillionSend API key (bs_…).

Path parameters
idstring<uuid>required
Request body
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.

min 0 · max 72
Responses
200

The new secret and when the previous one stops signing

objectstringrequired
Allowed:webhook
idstring<uuid>required
signing_secretstringrequired
previous_secret_expires_atstring | nullrequired
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequired
namestringrequired
messagestringrequired
404

Not found

statusCodenumberrequired
namestringrequired
messagestringrequired
422

Validation error

statusCodenumberrequired
namestringrequired
messagestringrequired
429

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

statusCodenumberrequired
namestringrequired
messagestringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
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
}'
Response
{
  "object": "webhook",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "signing_secret": "string",
  "previous_secret_expires_at": "string"
}

Was this page helpful?