Rotate signing secret
POST/api/v1/account/rotateSigningSecret
Make a new signing secret current at once. The old secret keeps signing alongside the new one for previousSecretValidForSeconds seconds, so a receiver that knows either secret accepts the call while you switch. Set it to 0 if the secret has leaked, and the old secret stops signing immediately.
Only one old secret is kept. Rotating again during an overlap ends the earlier overlap.
A rotate that comes less than a minute after the previous one changes nothing, 0 included, and the answer returns the current secret with the statusText shown in the second 200 example. After a leak, wait a minute and rotate again with 0.
If you send no body, or a body that isn't JSON, the default of 86400 seconds is used.
See Verifying webhooks and callbacks for how to switch without dropping calls.
Request
- application/json
- Body
- Keep the old secret for 24 hours
- The secret has leaked
Body
How many seconds the old secret keeps signing next to the new one. 0 stops it at once. At most 604800 (7 days).
Possible values: >= 0 and <= 604800
86400{
"previousSecretValidForSeconds": 86400
}
{
"previousSecretValidForSeconds": 0
}
Responses
- 200
- 400
- 401
- 500
The signing secret was rotated, or it was already rotated less than a minute ago.
Bad Request.
Unauthorized.
The secret can't be rotated right now. Try again later.