Webhooks push status-change events for sessions, agents, deployments, and more to a callback URL. This page describes delivery behavior, supported events, the callback request contract, and the signature verification algorithm.
A Webhook is a workspace-level resource, on par with sessions, agents, and environments. After you create an endpoint and subscribe to named events, the platform delivers a notification to the configured callback URL whenever an event occurs. For management endpoints, see Create Webhook and related pages.
The platform sends a POST request to an HTTP or HTTPS address that passes the security check, and does not follow redirects. A public IP entered directly is allowed for delivery; private, loopback, link-local, and reserved addresses are refused.
Each delivery regenerates
A regular event:
Thread events additionally carry
Vault Credential events additionally carry
Signed content and algorithm:
The receiver does not need to return a response body and should return a status code within 5 seconds.
After the first request for a business event fails, it is retried up to 3 more times, with wait intervals of 10s, 30s, and 1min — up to 4 actual network requests in total. If the 4th attempt still fails, a final failure is recorded. By default, a Webhook is auto-disabled after 20 consecutive business events ultimately fail.
Delivery behavior
| Property | Description |
|---|---|
| Event content | Contains only the event type, resource identifiers, and essential context; query the latest resource state via data.id |
| Subscription scope | Only named events that were subscribed at the time the event occurred are delivered; new subscriptions do not backfill historical events |
| No ordering guarantee | Events may arrive out of order; sort by created_at, and treat the resource query result as the source of truth for final state |
| Possible duplicates | The same event may be delivered multiple times, always with the same event.id; deduplicate idempotently by that identifier |
| Retry on failure | 408, 425, 429, 5xx, and network errors are retried up to 3 times with 10s, 30s, and 1min intervals; only 2xx counts as success, and 3xx redirects are not followed |
| Auto-disable | By default, a Webhook is auto-disabled after 20 consecutive business events ultimately fail; 3xx, address security check failures, and HTTPS verification failures disable it immediately |
| Query retention | Delivered events are retained for 7 days, after which they can no longer be queried |
| Quota | Up to 20 Webhooks per workspace |
Supported events
events supports the following 32 named events. Wildcard subscriptions such as * are not supported.
| Category | Events |
|---|---|
| Session management plane | session.created, session.updated, session.archived, session.deleted |
| Session run status | session.status_run_started, session.status_idled, session.status_terminated |
| Session Thread | session.thread_created, session.thread_run_started, session.thread_idled, session.thread_terminated |
| Agent | agent.created, agent.updated, agent.archived |
| Deployment | deployment.created, deployment.updated, deployment.archived, deployment.paused, deployment.unpaused |
| Deployment Run | deployment_run.started, deployment_run.failed, deployment_run.succeeded |
| Environment | environment.created, environment.updated, environment.archived, environment.deleted |
| Vault | vault.created, vault.archived, vault.deleted |
| Vault Credential | vault_credential.created, vault_credential.archived, vault_credential.deleted |
Callback request
The platform sends a POST request to an HTTP or HTTPS address that passes the security check, and does not follow redirects. A public IP entered directly is allowed for delivery; private, loopback, link-local, and reserved addresses are refused.
Each delivery regenerates webhook-timestamp and computes the signature using the current signing secret. On retries, the event body, outer id, and created_at remain unchanged.
Request headers
Request body
A regular event:
session_thread_id: data.id is the session identifier, and data.session_thread_id is the specific thread identifier. session.thread_created, session.thread_run_started, session.thread_idled, and session.thread_terminated all use this structure:
vault_id in data. The event body does not carry the full resource content; the receiver queries the latest resource by calling the corresponding GET endpoint with data.id.
Signature verification
Signed content and algorithm:
- The value of
webhook-idis the outerevent.id, not thewebhook_idof the Webhook configuration. signing_secretiswhsec_plus standard Base64 text. When verifying, strip thewhsec_prefix and decode the remainder with standard Base64; do not use the fullwhsec_...string directly as the HMAC key.- Read the unmodified raw request body to verify the signature first, then perform JSON deserialization.
- Verify that the timestamp is within 5 minutes of the current time, and use a constant-time comparison to verify the signature.
- Deduplicate idempotently by the outer
id; repeated deliveries of the same event use the sameid. - When ordering is required, use
created_at; do not rely on the receive order to infer the final resource state.
Response
The receiver does not need to return a response body and should return a status code within 5 seconds.
| Receiver response or error | Platform behavior |
|---|---|
| 200–299 | Delivery succeeded; no retry |
| 300–399 | Redirects are not followed; no retry; the current Webhook is disabled immediately |
| 408, 425, 429 | Current request failed; enters retry |
| Other 400–499 statuses | Current delivery ultimately failed; no retry |
| 500–599 | Current request failed; enters retry |
| DNS resolution, connection, write, or read timeout | Current request failed; enters retry |
| HTTPS certificate or hostname verification failure | No retry; the current Webhook is disabled immediately |
| Domain resolves to a private or reserved address | Connection is refused; the current Webhook is disabled immediately |
webhook.test sends a single synchronous request only, is not retried, and does not affect the consecutive-failure count.