Rotate a webhook's signing secret

Makes a new secret, answered this once.

POST/v1/webhooks/{webhook_id}/rotate

Makes a new secret, answered this once. The old one keeps signing beside it for overlap_s (a day by default, a week at most, 0 to stop it at once), so every delivery carries two signatures and a receiver switches without dropping one. Rotating again during an overlap drops the oldest secret at once: at most two sign. A repeat with the same Idempotency-Key answers conflict.

A key with the webhooks:write scope.

Request

curl -X POST "https://api.pod.mapier.ai/v1/webhooks/whk_3ahrz6dmv29gqy5ckt18fp/rotate" \
  -H "Authorization: Bearer $POD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"overlap_s":86400}'

Parameters

NameInTypeRequiredWhat it is
webhook_idpathstringYes
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Body

FieldTypeRequiredWhat it is
overlap_sintegerNoHow long the old secret keeps signing beside the new one. Default 86400. From 0 to 604800.

Answer

200. The webhook and its new secret, shown this once.

200
{
  "webhook": {
    "id": "whk_3ahrz6dmv29gqy5ckt18fp",
    "project": "prj_3ahrz6dmv29gqy5ckt18fp",
    "url": "https://app.example.com",
    "types": ["sandbox.creating"],
    "description": null,
    "enabled": false,
    "disabled_reason": null,
    "secret_rotation_ends_at": null,
    "created_by": "example",
    "created_at": "2026-11-23T12:00:00.000Z",
    "updated_at": "2026-11-23T12:00:00.000Z"
  },
  "secret": "example"
}
FieldTypeAlwaysWhat it is
webhookWebhookYes
secretstringYeswhsec_ and the base64 of 32 random bytes. Shown once; Pod keeps it only encrypted for its cells. Check deliveries with it (Standard Webhooks v1; the SDKs' verifyWebhook).

Errors

The refusals this call is known for: invalid, forbidden, not_found. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.webhooks.rotateSecret(id)
Pythonpod.webhooks.rotate_secret(id)