Rotate webhook signing secret
Generates a new signing secret for the specified webhook. A version 1 webhook's old secret stops verifying at once. A version 2 webhook's deliveries are signed with the new secret at once, and with the old one as well for the next 24 hours, so a receiver can switch over without rejecting any; after that the old secret no longer verifies.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
sandbox?boolean
Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v3/webhooks/d4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8/rotate-secret" \ -H "Idempotency-Key: req_abc123_retry1" \ -H "Content-Type: application/json" \ -d '{ "sandbox": false }'{
"success": true,
"data": {
"signing_secret": "whsec_n3wS3cr3tK3yG3n3r4t3d"
},
"error": null,
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-11-05T15:14:26.5560117+00:00",
"version": "v3"
}
}{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_001",
"message": "Invalid webhook ID format.",
"details": null,
"doc_url": "https://docs.sent.dm/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-11-05T15:14:26.5560137+00:00",
"version": "v3"
}
}Empty
Empty
{
"success": false,
"data": null,
"error": {
"code": "RESOURCE_008",
"message": "Webhook not found",
"details": null,
"doc_url": "https://docs.sent.dm/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-11-05T15:14:26.556014+00:00",
"version": "v3"
}
}{
"success": false,
"data": null,
"error": {
"code": "INTERNAL_001",
"message": "An unexpected error occurred while rotating the webhook secret",
"details": null,
"doc_url": "https://docs.sent.dm/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-11-05T15:14:26.5560145+00:00",
"version": "v3"
}
}