Rotate Webhook Signing Key
Webhooks
Rotate Webhook Signing Key
Generate a new API key for webhook signature verification
POST
Rotate Webhook Signing Key
Rotate Webhook Signing Key
POST https://api.baanx.com/v1/webhooks/{id}/rotate-key Generates a new API key for webhook signature verification and immediately invalidates the old one.Overview
Use this endpoint when you need to rotate your webhook signing key — for example, if the key has been compromised or as part of a routine key rotation policy.Authentication
This endpoint requires authentication via Bearer token:Request
Headers
Bearer token for authentication
Path Parameters
Unique identifier of the webhook configuration
Request Example
Response
200 Success
Indicates the key was rotated successfully
New full API key — store securely and update your webhook receiver immediately. The old key is now invalid.
Full webhook configuration. See Get Webhook for all field descriptions.
Error Responses
Key Rotation Checklist
Before Rotating
Before Rotating
- Ensure you have a secure place to store the new key (e.g., a secrets manager)
- Notify your team that a rotation is occurring
- Be prepared to update your webhook receiver immediately after rotation
After Rotating
After Rotating
- Immediately store the new
apiKeyfrom the response in your secrets manager - Deploy the new key to your webhook receiver
- Verify incoming webhooks are being verified correctly with the new key
- Monitor your delivery logs for any signature failures
Related Endpoints
GET /v1/webhooks/{id}- Get current webhook configurationGET /v1/webhooks/{id}/logs- Monitor delivery success after key rotationPOST /v1/webhooks- Create a new webhook (also returns a full key)