Skip to main content
POST
Rotate a webhook secret

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Scopes

webhooks_manage
bearer_auth
webhooks_manage
api_key

Headers

X-Workspace-Id
string<uuid>

The workspace the request acts in. An API key bound to a workspace implies it: omit the header, or send that same id (another id answers 403 WORKSPACE_SCOPE_MISMATCH). A member session must send it (400 MISSING_WORKSPACE without it).

Idempotency-Key
string
required

Required for every caller (1 to 255 bytes; missing or empty is 400 IDEMPOTENCY_KEY_REQUIRED). The same key within 24 hours replays the stored 200 without rotating again: secret is null and secretShownOnce true. A new key rotates again. Reuse with a different request is 409 IDEMPOTENCY_CONFLICT.

Path Parameters

workspaceId
string
required

Workspace ID

webhookId
string
required

Webhook ID

Response

Secret rotated, or stored rotation replayed (secret null on replay)

Response after rotating a webhook secret: the new whsec_<base64> secret, shown once. The previous key keeps signing for 24 hours: webhook-signature then contains two space-separated v1,<base64> signatures. A Standard Webhooks verifier accepts either.

secret
string | null
required

Present only on the first response; receipts and replays contain null.

secretShownOnce
boolean
required

True even when the secret has been withheld on replay.