Zum Inhalt springen
Esc
↑↓navigieren↵öffnen⌘Jvorschau

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
Autorisierung
AuthorizationBearer-Token · headererforderlich

A BillionSend API key (bs_…).

Pfadparameter
idstring<uuid>erforderlich
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
Antworten
200

The new secret and when the previous one stops signing

objectstringerforderlich
Erlaubt:webhook
idstring<uuid>erforderlich
signing_secretstringerforderlich
previous_secret_expires_atstring | nullerforderlich
401

Missing, malformed, unknown or revoked API key

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
404

Not found

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
422

Validation error

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
429

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

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
Ausprobieren
Server
Autorisierung
Parameter
Bodyapplication/json
Anfrage
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
}'
Antwort
{
  "object": "webhook",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "signing_secret": "string",
  "previous_secret_expires_at": "string"
}

War diese Seite hilfreich?