Rotate a webhook secret
cooper_rotate_webhook_secretUse this when a webhook signing secret should change without breaking receivers that still check the old secret. Requires auth. Inputs: webhook_id (required). Mints a new secret (whsec_…), stores it as the current secret, and keeps the previous secret valid for 24 hours. Returns the webhook with the new secret in full once, previous_secret_expires_at (ISO-8601), and previous_secret_active true. The previous secret value is not returned. For those 24 hours each delivery sends x-cooper-signature as sha256=,sha256= and x-cooper-signature-v2 as v1=,v1=, current secret first. Verify by splitting on the comma and accepting the delivery when any segment matches. Rotating again replaces the previous secret and resets the 24 hour window. A hook with no secret just stores the new one. Needs webhook_write, the same permission as updating a webhook. Fails with 404 webhook_not_found or 403 permission_denied.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"webhook_id": "<webhook_id>"
},
"name": "cooper_rotate_webhook_secret"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| webhook_id | Yes | Webhook id (wh_…) whose signing secret should rotate |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Stable id of the returned object. Pass it to the matching get, update, or delete tool. | |
| url | No | URL that receives POST deliveries. | |
| events | No | Event types this object delivers. | |
| secret | No | Signing secret. Shown in full once on create or rotate, redacted otherwise. | |
| enabled | No | True when the object is active. | |
| headers | No | Extra delivery headers. Values are redacted. | |
| inbox_id | No | Inbox id (inb_…) this object belongs to. Null when it applies to every inbox. | |
| client_id | No | Caller idempotency key stored with the object, or null. | |
| inbox_ids | No | Inbox ids this object is limited to. Empty means every inbox on the account. | |
| created_at | No | ISO-8601 time the object was created. | |
| disabled_at | No | ISO-8601 time Cooper disabled the hook, or null. | |
| disabled_reason | No | Why the hook was disabled, or null. | |
| consecutive_failures | No | Failed deliveries in a row. | |
| previous_secret_active | No | True while deliveries are also signed with the previous secret. | |
| previous_secret_expires_at | No | ISO-8601 time the previous secret stops signing, or null. |