| Method | Scope | Use case |
|---|---|---|
| Subscriptions | All runs in your org | Pipelines, logging, CRM sync |
Per-run callbackUrl | Single run | One-off jobs, per-request routing |
callbackUrl, both endpoints get a delivery.
For async basics (fire-and-forget, polling with
client.wait()), see Runs.Webhook Subscriptions
Subscribe to events across all runs in your org. You can manage subscriptions through the API or the dashboard.Create a Subscription
secret. This is the only time you’ll see it, so store it for HMAC verification.
Event Types
| Event | Fires when |
|---|---|
job.succeeded | Run completed successfully |
job.failed | Run failed or timed out |
Enable / Disable
Subscriptions have anenabled toggle. Disabling a subscription skips delivery but keeps the config and history around. Events that fire while disabled aren’t retroactively sent when you re-enable.
Toggle in the dashboard or through the API:
Signing & Verification
If you set asecret, every delivery includes HMAC-SHA256 headers:
| Header | Value |
|---|---|
X-Webhook-Signature | HMAC-SHA256 hex digest of the payload |
X-Webhook-Timestamp | Unix timestamp of the delivery |
X-Webhook-Delivery-Id | Unique delivery identifier |
Per-Run Callbacks
For one-off deliveries, passcallbackUrl on the run request:
runId. We POST the result to your URL when the run finishes.
Webhook Payload
Subscriptions and per-run callbacks use the same payload format:| Field | Description |
|---|---|
runId | The run’s unique ID |
status | succeeded, failed, timed_out, or canceled |
result | Contains fullResponse, a JSON string with reasoning steps and answer |
error | Error details when failed, otherwise null |
tokens | Token counts (inputTokens, outputTokens) and costCents |
startedAt | When processing started, null if it hasn’t yet |
metadata | Passed through from input.metadata if you set it |
Webhook Handler
Your endpoint needs to be publicly accessible. For local dev, use ngrok or similar.
Delivery Guarantees
- SQS-backed: all deliveries go through a durable queue with retries and exponential backoff
- Timeout: we wait up to 30 seconds for your 2xx response
- Dead-letter queue: exhausted retries are stored for inspection
- Delivery log: check delivery history and payloads in the dashboard
Dashboard
Manage webhooks at subconscious.dev/platform/webhooks:- Create, enable/disable, and delete subscriptions
- Send test webhooks
- View delivery log with status, timestamps, and expandable payloads
- Reveal signing secret
Related
Runs
Async patterns and polling
Error Handling
Handle failed runs