ErgOpsDocs

Webhooks

Webhook subscriptions currently support calculation.succeeded and calculation.failed. Events are environment-isolated. Future event names are not exposed until their producing workflows and public payload contracts are available.

The canonical result commits before delivery is enqueued. Destination failure never rolls back a calculation. Delivery retries with increasing backoff and enters dead_letter after the configured maximum attempts, or cancelled if the destination becomes ineligible first (for example a disabled endpoint). Both states can be retried with redrive — see Webhook retries and failures. Redirects and prohibited private/link-local targets are denied by the SaaS network policy.

Creating a webhook endpoint#

Choose Test or Live when the endpoint is created. That environment cannot be changed in place; create a new endpoint for a different environment. URL and event subscriptions may be updated. Pending deliveries retain their immutable event environment and content, while a later attempt uses the endpoint's current URL.

Organization managers create Test and Live endpoints in ErgOps Embedded → Developers. Live destinations require HTTPS. Choose only the supported events needed by the integration.

The signing secret is shown once. Store it separately from API keys in a server-side secret manager. Endpoint capacity comes from the active contract. Updating a URL or event subscription does not grant any organization permission.

ErgOps rejects credential-bearing URLs, loopback, link-local, private network destinations, unsupported schemes and unsafe ports under the SaaS network policy.

Webhook events#

calculation.succeeded#

Emitted after the canonical calculation and its environment-specific persistence commit. The payload contains the customer-safe calculation result and request correlation ID.

calculation.failed#

Emitted for a handled calculation failure after authentication and request correlation. It contains a stable safe error code and external reference where available; stack traces, SQL and secrets are excluded.

Replay protection#

Deduplicate with X-ErgOps-Webhook-Id, verify the timestamp tolerance and verify the signature over the raw body before parsing JSON. Event IDs remain stable across retry attempts.

Webhook retries and failures#

Non-2xx responses and network timeouts schedule a retry with increasing backoff. Redirects are not followed. Attempt count, safe error category, response status and next attempt time are retained without response bodies. After a finite maximum number of attempts, delivery becomes dead_letter and requires action in ErgOps Embedded → Developers.

Consumers should acknowledge quickly, process asynchronously and use X-ErgOps-Webhook-Id for their own idempotency.

Delivery states#

State Meaning
pending / retrying Delivery is scheduled or in progress.
delivered Your endpoint returned a 2xx response.
dead_letter The maximum number of attempts was reached without success.
cancelled Delivery stopped because the destination is no longer eligible — for example the endpoint was disabled, or the capability it needs is no longer enabled for your organization.

Redrive#

An organization manager can redrive a dead_letter (or cancelled) delivery from ErgOps Embedded → Developers once the underlying issue is fixed — for example after the endpoint is back online. Redrive retries the delivery of the original event only:

  • it does not create a new emission calculation;
  • it does not add another unit to your contract usage;
  • it reuses the event's original, immutable content — the same id, type, environment and payload as the first attempt, signed the same way.