Replace a webhook endpoint
Replaces url, description, events and enabled. This is the only way to disable or enable an endpoint. enabled false on an enabled endpoint makes it disabled, and its pending deliveries are held (they make no attempt). enabled true on a disabled or disabled_failing endpoint makes it enabled, clears failing_since and the failure count, and releases held deliveries; a held delivery whose event is older than 30 days is cancelled (cancel_reason event_expired). enabled false on a disabled_failing endpoint keeps disabled_failing. A change of url runs the destination guard again (422 outbound_destination_refused, nothing changes). Removing an event type cancels the pending deliveries of that type (cancel_reason event_unsubscribed). A pending delivery always uses the current url and signing secrets at its next attempt; an attempt already in flight is not recalled. A replace that changes nothing answers 200 with the same revision. A replay of the same Idempotency-Key, body and If-Match returns the original status (200) and body; its url has any query masked as ?… (scheme, host and path kept). In a suspended workspace the answer is workspace_unavailable. Idempotency fingerprint: method, path, the canonical body and the original If-Match.
Authentication
Create and manage workspace-owned keys through the existing app session routes, outside this public API. Creator and manager identities are audit actors only. Key validity follows workspace policy, expiry and explicit revocation, independently of creator membership. Do not include a workspace-selection header.
Path parameters
Headers
Strong ETag from the resource being changed. Draft/tool/variable/publication operations use the complete agent draft ETag; number operations use the number ETag; MCP update uses its own ETag. Never retry a stale edit by blindly using a fresh ETag. Agent identity edits use the identity ETag; knowledge-source reingest uses the source ETag. A stale revision returns 409: draft_conflict for agent, draft, variable, tool, MCP server and publication-token checks; conflict with details.reason=stale_revision for phone numbers and knowledge sources. A missing header returns 428 revision_required. Same-intent replay uses the original If-Match and returns its receipt before checking current revision.
Stable key per logical intent, 1–255 printable characters. Persist it before sending. Retry the same key/body after an uncertain result for 24 hours. A changed body conflicts. Beyond retention, reconcile the resource before retrying; this is not permanent deduplication. Current authorization is rechecked on replay. Evaluation order: authenticate and check current authorization; look up intent; replay its stored receipt before checking the current revision; only a new intent evaluates If-Match and executes. Fingerprint includes method, path, body and original If-Match. A changed request returns idempotency_key_reused. The server stores only a keyed (HMAC) fingerprint, and no error or response ever returns a fingerprint or hash of a request. In-flight intent returns 409 idempotency_in_progress with Retry-After; retry the same intent after reconciliation. Receipts describe that attempt, not current resource state. A replay returns the original status code and body, with the response header Idempotent-Replayed: true.
Request
An absolute https URL with a host, at most 2,048 characters. User information (user:password@) and a fragment are refused with 400 invalid_request, details.field url. A query string is allowed and sent exactly as written, so a receiver that signs its URL in the query (for example a Power Automate or Logic Apps HTTP trigger) works; every workspace member who can read the endpoint sees the whole URL. The answer of an idempotent replay is the exception: its url shows any query masked as ?… (scheme, host and path kept). A scheme other than https, or a host that does not resolve only to public addresses (private, loopback, link-local, reserved, multicast, unspecified and metadata addresses are refused, also in a mixed answer, and also a name that does not resolve), is refused with 422 outbound_destination_refused, which names no host. The same guard runs again before each attempt; redirects are never followed.
true enables (and resets the failure streak of a disabled_failing endpoint). false disables; a disabled_failing endpoint stays disabled_failing.
Optional label, trimmed. Blank becomes null. Control characters are refused with 400 invalid_request, details.field description.
Response headers
Strong endpoint revision, equal to the revision field. Send it as If-Match to replace, delete or rotate. It changes with url, description, events, state and the signing secret, not with delivery results.
true when this response replays a stored Idempotency-Key result. The status and body equal the original, except that a secret is null and any query of a webhook endpoint url is masked as ?… (the stored record keeps no credential).
Response
Opaque endpoint identifier (prefix wep_). Do not parse it.
enabled: receives deliveries. disabled: a person disabled it. disabled_failing: Rasen disabled it after at least 72 hours and at least 10 failed call-event attempts with no success. Both disabled states hold pending deliveries. Open response vocabulary; treat an unknown value as not enabled.
End of the rotation grace period while the previous secret is still valid; null otherwise.
First failed call-event attempt after the last success, creation or enable; null when the last attempt succeeded.