Update a webhook endpoint
Changes the url, the events or the status. Fields left out stay as they are. The secret does not change: use rotate-secret.
Changes the url, the events or the status. Fields left out stay as they are. The secret does not change: use rotate-secret.
The organization API key, sent as Authorization: Bearer <key>.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The events this endpoint receives. One or more of: sale.won, sale.updated.
1 <= itemsValue in
- "enabled"
- "disabled"
Where the events are POSTed. Must be https:// on a public host.
length <= 2048Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/webhooks/string" \ -H "Content-Type: application/json" \ -d '{}'{ "createdAt": "2019-08-24T14:15:22Z", "eventTypes": [ "sale.won" ], "id": "string", "previousSecretExpiresAt": "2019-08-24T14:15:22Z", "status": "enabled", "updatedAt": "2019-08-24T14:15:22Z", "url": "string"}Get a webhook endpoint GET
One endpoint of the organization. The secret is not included.
Rotate a webhook endpoint's secret POST
Generates a new signing secret and returns it, ONCE. For the next 24 hours (`previousSecretExpiresAt`) the replaced secret stays active too: every delivery carries one `v1` signature per active secret, so it verifies with either while you update your configuration. After that, only the new secret signs. Rotating again within that window drops the secret in grace, so send an `Idempotency-Key` to retry safely: a retry with the same key within 10 minutes answers the same secret instead of rotating again (409 `WEBHOOK_SECRET_ROTATION_SUPERSEDED` once another rotation replaced it). After those 10 minutes the same key answers 409 `WEBHOOK_SECRET_REPLAY_EXPIRED` and rotates nothing.