webhooks

Set a webhook signing secret

Changed on

Store the signing secret or public key the provider issued for this endpoint, such as the whsec_ secret Stripe returns when you create a webhook endpoint. It replaces the existing secret. Pass previousSecretTtlSeconds to keep accepting the old secret for a while, for example while the provider rolls its secret.

put/api/v1/webhooks/endpoints/{endpointId}/secret

Request

Request body

secretstring required

The signing secret or public key. Leading and trailing whitespace is trimmed.

previousSecretTtlSecondsinteger

How long, in seconds, the secret being replaced keeps verifying deliveries (at most 7 days). Omit it or pass 0 to replace the secret immediately, for example when it leaked.

Example request

{
  "secret": "whsec_5f2b...",
  "previousSecretTtlSeconds": 3600
}

Response

Successful request

idstring required

The endpoint's wh_ id.

secretSettrue required
previousSecretExpiresAtstring date-time

When the replaced secret stops verifying deliveries. Absent when it was replaced immediately.

Example response

{
  "id": "wh_cm1a2b3c4d5e6f",
  "previousSecretExpiresAt": "2026-10-21T12:00:00.000Z"
}

Changes