Webhooks
Rotate webhook secret
POST
Returns a new whsec_ signing secret exactly once and invalidates the prior secret for future sends.
bearerAuthheader
AuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
id*stringFormat
uuidIf-Match?stringOptional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource.
Idempotency-Key*stringRequired. Reuse the same key to retry this write safely. Retries and idempotency.
Match
^[A-Za-z0-9!#$%&'*+.^_`|~-]+$Length
1 <= length <= 255Secret rotated and shown once.
application/json- response
id*stringFormat
uuidname*stringLength
1 <= length <= 120url*stringMatch
^https://Format
urievents*array<>Items
1 <= items <= 7active*booleanhas_secret*booleanlast_delivery_at*|Format
date-timelast_delivery_status*|nullarchived_at*|Format
date-timecreated_at*stringFormat
date-timeupdated_at*stringFormat
date-timesecret*stringOne-time HMAC-SHA256 signing secret. Store it securely; later GET/list responses omit it.
Match
^whsec_[A-Za-z0-9_-]{43}$Length
49 <= length <= 49curl -X POST 'https://api.kejue.co/v1/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate-secret' \ -H 'Idempotency-Key: string'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "url": "http://example.com", "events": [ "call.completed" ], "active": true, "has_secret": true, "last_delivery_at": "2019-08-24T14:15:22Z", "last_delivery_status": "pending", "archived_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "secret": "stringstringstringstringstringstringstringstrings"}