Webhooks

Rotate the secret

POST
/v1/workspaces/{workspace_id}/webhooks/{webhook_id}/rotate-secret

A new signing secret, shown this once. For 24 hours each delivery is signed with both, so X-Signature holds two v1= values, the new one first. Send an Idempotency-Key: the same key returns the same answer for 24 hours.

Authorization

bearer
headerAuthorizationBearer <token>

An access token from /v1/auth/token, or a personal token: opaque, beginning s2a_.

Path Parameters

workspace_id*string

wsp_…, from GET /v1/me

Lengthlength <= 40
webhook_id*string
Lengthlength <= 40

Header Parameters

idempotency-key*string

A UUID of your own (ADR 0071 §5)

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

Rotated

application/json
  1. response

Rotated

secret*string
previous_valid_until*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Formatdate-time
curl -X POST 'https://api.sign2approve.com/v1/workspaces/string/webhooks/string/rotate-secret' \  -H 'idempotency-key: 497f6eca-6276-4993-bfeb-53cbbbba6f08'
{  "secret": "whsec_…",  "previous_valid_until": "2026-10-25T09:30:00Z"}