Safe changes

Retries that run once, updates that never overwrite someone else's change, dry runs, and approvals for the changes that matter most.

Four things make it safe to let a script or an agent change your workspace through the API. Each is optional for a script that does not need it, and each works the same on every write.

Retries: Idempotency-Key

Send an Idempotency-Key header with any POST: a value you choose, 1 to 255 printable ASCII characters. If the connection drops and you send the same request again with the same value, you get the first answer back, with Idempotent-Replayed: true, instead of a second endpoint or a second replay.

curl -X POST https://app.webhookvault.net/api/v1/endpoints \
  -H "Authorization: Bearer $WEBHOOKVAULT_KEY" \
  -H "Idempotency-Key: create-orders-endpoint-1" \
  -H "Content-Type: application/json" \
  -d '{"name": "orders"}'
  • The same value with a different request answers 422 idempotency_key_reused.
  • While the first request is still running, a repeat answers 409 idempotency_in_progress.
  • A server error does not use up the value, so a retry after a 5xx runs again.
  • Values are kept for 24 hours, separately for each key.

Versions: ETag and If-Match

Every endpoint, action, transformation rule, watchdog and alert channel has a version. A read returns it in the ETag header and as etag in the body. Send it back in If-Match on an update or a delete: if someone changed the resource since you read it, the call answers 412 version_mismatch and changes nothing, with the new version in currentEtag.

curl -X PATCH https://app.webhookvault.net/api/v1/endpoints/$ENDPOINT_ID \
  -H "Authorization: Bearer $WEBHOOKVAULT_KEY" \
  -H 'If-Match: "9f2c4b1e0a7d3c5e8b6a4f2d1c0e9b8a"' \
  -H "Content-Type: application/json" \
  -d '{"name": "orders-prod"}'

The version changes only when the configuration changes. Traffic arriving, deliveries and watchdog checks never move it, so a busy endpoint can still be updated with If-Match. Without If-Match an update applies as it always has.

Dry runs

Add ?dryRun=true to any write to see what it would do without doing it. The operation runs and is then undone: nothing is stored, sent or queued.

  • A call that would be refused answers exactly as it would without dryRun, so a dry run is also a full check of the request.
  • A call that would succeed answers 200 with dryRun, the status it would have returned, a summary in plain words, and the result it would have returned.
{
  "dryRun": true,
  "status": 204,
  "summary": "Delete endpoint 'orders' with 4,210 stored requests and 3 actions and their delivery history. Its capture URL stops working and waiting deliveries are cancelled. It stays in the recycle bin for 7 days, where it can be restored.",
  "result": null
}

Two writes cannot be rehearsed, because their effect leaves WebhookVault at once: sending a test message to an alert channel, and replaying a single request (it is sent straight away). A dry run of deleting an endpoint or clearing its requests checks the target and describes what would go, with result null, rather than running the delete. A dry run takes no Idempotency-Key, so the real request can use the same one afterwards.

Approvals

Some changes can wait for the yes of the person a key acts for:

  • deleting an endpoint, an action, an alert channel, a watchdog, a technical contact, a Library connection or a saved request, including removing an endpoint's forward action by sending forwardUrl empty
  • clearing all of an endpoint's requests
  • switching verification of arrivals off (sending signingSecret, provider or signatureHeader empty or blank)
  • creating an action with duplicate protection off, or switching it off
  • pausing a watchdog, switching an alert channel off or muting it, or stopping a contact
  • replaying more than 50 requests at once
  • changing where something sends or how it authenticates, when anything live depends on it: an action's URL, kind, saved request or channel; an endpoint's forwardUrl; a connection's base URL or authentication; a saved request's method, path or connection; an alert channel's settings; or a watchdog's endpoint
  • switching off something live depends on: an endpoint, an action, a connection, a saved request, a contact's routine notices, or an alert routed to a channel, or removing a watchdog's alert contacts
  • a new action, a new endpoint with forwardUrl and forwarding on, or an action or endpoint switched back on, that would send to a server or channel the workspace has not trusted yet. On chat and automation webhook services, where the recipient is in the path (Slack, Discord, Zapier and the like), a new path counts as a new destination
  • a new alert channel with alerts routed to it, and a new contact whose address is not trusted yet (whoever owns the address confirms it)

A destination is trusted when a person set it up in the app, approved a request that sent there, or it was in use when trusted destinations started; anything switched on that sends there now counts too. People see and remove trusted destinations under Settings. Changes made through an API key never add one, so an agent cannot make a destination trusted by creating it.

Asking for permanent deletion (floor) always needs approval, whatever the key's setting.

What a change reaches

A write to something other things depend on answers with reach: what the change touches, worked out from the workspace as it is now. It is in the dry run, in the approval_required answer, and in GET /api/v1/approvals/{id}, and it is what the person sees when they decide.

"reach": {
  "kind": "connection",
  "targetName": "Acme API",
  "classes": ["routing"],
  "live": true,
  "asks": true,
  "differences": [
    { "field": "base URL", "class": "routing", "before": "https://api.acme.com", "after": "https://api.example.net" }
  ],
  "links": [
    { "kind": "saved request", "total": 1, "liveTotal": 1, "items": [{ "id": "...", "name": "Create ticket", "live": true }] },
    { "kind": "action", "total": 3, "liveTotal": 3, "items": ["..."] }
  ],
  "endpoints": { "total": 3, "liveTotal": 3, "items": [{ "id": "...", "name": "orders", "live": true, "arrivals24h": 1240 }] },
  "arrivals24h": 1410,
  "newDestination": null,
  "text": "Moves base URL from https://api.acme.com to https://api.example.net. It reaches 3 live endpoints: ..."
}
  • live is true when something switched on depends on the change: an action that is on, on an endpoint that is on. A quiet endpoint still counts; traffic is shown, never the deciding factor.
  • arrivals24h counts the requests the endpoints it reaches received in the last 24 hours.
  • classes say what kind of change it is: routing (where it sends), credential (how it authenticates), off (something stops), shaping (what is sent) or cosmetic (a name). Only the first three ask, and only when live is true; asks says whether this one does.
  • URLs show the scheme, host and path only, with token-like path segments shortened. Secrets are named as changed, never shown.
  • A change is judged on how things will be after it: switching an action on and moving it in the same body is a live change.
  • Changing what is sent (templates, bodies, headers, transformation rules) shows the reach but never asks.

Each operation's x-wv-risk in the API reference says whether it can ask (confirm), when (x-wv-risk-when), or that it never does (none). Whether a key asks is set on the key: Agent access keys ask by default, Developer access keys do not, and the person can change either under the key's Settings (Agent access and approvals). Keys that do ask answer such a call with 202 and approval_required, and nothing runs yet:

{
  "code": "approval_required",
  "approvalId": "0195e1c2-7a40-7c55-b63b-1226a969599b",
  "status": "pending",
  "summary": "Delete endpoint 'orders' with 4,210 stored requests. Its capture URL stops working and waiting deliveries are cancelled. It stays in the recycle bin for 7 days, where it can be restored.",
  "approveUrl": "https://app.webhookvault.net/Approvals?id=0195e1c2-7a40-7c55-b63b-1226a969599b",
  "expiresAt": "2026-11-25T10:30:00Z"
}

The person sees a notice at once in the WebhookVault app, on whatever page is open, and approves the request with a passkey or an authenticator code. They have 30 minutes. A yes with a passkey or code opens an hour in which further requests from the same key are one click (decidedVia is window); it ends early when the person signs out, and permanent deletion (floor) always needs the passkey or code. Poll GET /api/v1/approvals/{id} until status is approved, then send exactly the same request again (same method, path, query and body) with the header Approval-Id. It runs once.

  • If the resource changed after the approval was asked, the call answers 412 version_mismatch. Read it again and ask again.
  • If the change now reaches more than the person approved (something else was linked to it since), the call answers 409 reach_changed with the new reach, and nothing changes. Ask again. A reach that became smaller does not stop the call.
  • If the person has neither a passkey nor two-factor authentication, the call answers 403 second_factor_required, because nobody could approve it. They switch on two-factor authentication on their Account page.
  • A dry run never needs approval.

The other answers (approval_pending, approval_declined, approval_expired, approval_used, approval_mismatch) are listed in errors.

On this page