Skip to content

Rotate a webhook signing secret

On this page
POST/v1/webhook-endpoints/{endpoint_id}/rotate-secretrotate_webhook_secret
Riskwrite
AuthenticationAPI key or OAuth access token
Scopeswebhooks:write
Idempotencysupported: send an Idempotency-Key header to make retries safe
Dry runnot applicable
Success status200
Response typeapplication/json

What it does#

  • Use when: A secret may have leaked or you rotate secrets on a schedule.
  • Do not use when: you only changed the address (call update_webhook_endpoint).
  • Side effects: Issues a new secret, returned once; The old secret keeps signing beside the new one for 24 hours.
  • Reversible: No.
  • Required scope: webhooks:write.
  • Idempotency: supported (Idempotency-Key header).
  • Typical next step: deploy the new secret to your receiver within 24 hours, then call send_test_webhook.

Scopes#

  • webhooks:write: Create, change and delete webhook endpoints.

Side effects#

  • Issues a new secret, returned once
  • The old secret keeps signing beside the new one for 24 hours

Request#

Path parameters#

FieldTypeDescription
endpoint_idstring

Query parameters#

None.

Response#

FieldTypeRequiredDescription
idstringyes
secretstringyeswhsec_... Shown only in this response.
previous_secret_expires_atstringyesRFC 3339 UTC timestamp.

Examples#

rotated#

Request:

curl -X POST 'https://api.seemly.com/v1/webhook-endpoints/whe_4d8x2p0q7r3m9k1v5t6w8y0z/rotate-secret' \
  -H "Authorization: Bearer $SEEMLY_API_KEY"

Response: 200:

JSON
{
  "id": "whe_4d8x2p0q7r3m9k1v5t6w8y0z",
  "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
  "previous_secret_expires_at": "2026-12-03T09:30:00Z"
}

Errors#

Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.

Typical next steps#

View this page as MarkdownReport a problem with this page

Type to search. Try a method and path, an operation name or an error code.