Rotate webhook signing secret
Generates a new signing secret for the specified webhook. The old secret is immediately invalidated.
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://api.sent.dm/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-03-31T15:21:51.9770882+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/docs/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-31T15:21:51.9770899+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/docs/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-31T15:21:51.9770904+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/docs/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-31T15:21:51.9770909+00:00",
"version": "v3"
}
}