Rotate the signing secret
POST/v1/webhooks/{id}/rotate-secret
Issues a new secret, shown once. The old secret keeps signing alongside the new one for 24 hours so you can switch over without dropping events.
Required scope: webhooks:manage
Parameters
| Name | In | Description |
|---|---|---|
idrequired | path | The webhook endpoint id. |
Example
curl -X POST 'https://api.sendsend.email/v1/webhooks/ID/rotate-secret' \
-H "Authorization: Bearer $SENDSEND_API_KEY"Response 200
{
"id": "whe_3Hq…",
"secret": "whsec_…",
"previous_secret_valid_for_hours": 24
}Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | No such resource in this project. |
| 401 | unauthorized | The API key is missing, invalid or revoked. |
| 403 | forbidden | The key does not have the scope this endpoint needs. |
Every error has the same shape. See Errors.