Webhooks
Promote signing key
Make a secondary key the primary. The previous primary is retired at once, so update your receiver to the new secret first.
POST
https://api.sndr.sh/api/cranl/v1/webhooks/{id}/signing-keys/{key_id}/promotePromote signing key
curl -X POST 'https://api.sndr.sh/api/cranl/v1/webhooks/wh_2a7d4e9c-6b1/signing-keys/whk_61d0a9c7-5e4/promote' \
-H 'Authorization: Bearer sndr_your_access_token'200OK
{
"id": "whk_61d0a9c7-5e4",
"status": "primary"
}Authorization
AuthorizationstringheaderrequiredBearer followed by an access token. Needs the send scope.
Path parameters
idstringrequiredWebhook ID (wh_...).
key_idstringrequiredSecondary key ID (whk_...) from the stage call.
Errors
401
unauthenticatedMissing or invalid Bearer token.401
token_expiredAccess token expired — exchange the refresh token for a new pair.401
token_revokedToken was explicitly revoked.403
insufficient_scopeToken is missing the send scope.404
not_foundResource does not exist or belongs to a different account.409
conflictThe key is not a secondary key.