Only Webhook V2 is supported. Webhook V1 is deprecated and no longer accepted by the API.
Overview
Real-time Notifications
Get updates as execution events happen
Secure Delivery
Every request includes an RSA signature in
X-Asteroid-SignatureEvent Coverage
Subscribe to status, step, action, file, message, workflow, and batch events
Filterable Notifications
Filter by event type, payload fields, and execution metadata
Configuration
Setting Up Your Webhook
Create a Webhook Integration
In Asteroid, go to Integrations → Add Integration → Webhook, then set:
- URL: The endpoint that will receive execution events
- Headers: Optional custom headers Asteroid should include
Webhook requests are always
POST with a JSON body in the V2 format documented below.Attach the Integration to an Agent
Attach the webhook integration to each agent you want notifications from. You can configure:
- Event rules: choose which event types should trigger notifications
- Field filters: filter by payload fields for specific event types
- Metadata filter: only trigger when execution metadata key/value pairs match
- Unwrap result (optional): for
ExecutionCompleted, send onlypayload.resultinstead of the full envelope
V2 Payload Structure
Each webhook request body is a JSON object with this top-level shape:Top-Level Fields
The category of the notification. Currently only
"execution" is supported.Unique identifier generated for this specific webhook notification payload.
ISO 8601 timestamp when the event occurred.
Execution event context and event-specific payload. See Execution Info.
Execution Info Structure
info contains execution context plus an event-specific payload.
Event name. See Execution Events for supported values.
Execution UUID.
URL to view this execution (or batch for batch events) in Asteroid.
Agent UUID.
Agent display name.
Optional execution metadata map. Included when metadata was supplied at execution creation time.
Event-specific data. The schema depends on
info.event.Execution Events
Asteroid currently emits the following webhook events:Core execution status
EXECUTION_STARTED-> payload:{}EXECUTION_COMPLETED-> payload:{ result: object, reasoning: string, outcome: string }EXECUTION_FAILED-> payload:{ reason: string }EXECUTION_CANCELLED-> payload:{ reason: string, cancelled_by: string }EXECUTION_PAUSED-> payload:{ reason: string, paused_by: string }EXECUTION_RESUMED-> payload:{ reason: string }EXECUTION_AWAITING_CONFIRMATION-> payload:{ reason: string }
Action and step events
EXECUTION_ACTION_STARTED->{ action_id, action_name, arguments, step_number }EXECUTION_ACTION_COMPLETED->{ action_id, action_name, output, step_number, duration? }EXECUTION_ACTION_FAILED->{ action_id, action_name, failure, step_number, duration?, os_error? }EXECUTION_STEP_STARTED->{ step }EXECUTION_STEP_PROCESSED->{ step }
Execution detail events
EXECUTION_MESSAGE_ADDED->{ message }EXECUTION_REASONING_ADDED->{ reasoning }EXECUTION_FILE_ADDED->{ file_id, file_name, mime_type, file_size, source, presigned_url }EXECUTION_PLAYWRIGHT_SCRIPT_GENERATED->{ node_id, node_name, script, context, generated_at }EXECUTION_TRANSITIONED->{ to_node, from_node_duration?, transition_type? }EXECUTION_WORKFLOW_UPDATED->{ workflow_update: [...] }USER_MESSAGE_RECEIVED->{ user_id, message, execution_was, injected_into }
Batch and test events
BATCH_STARTED->{ batch_id, batch_name, item_count }BATCH_COMPLETED->{ batch_id, batch_name, triggered_count, cancelled_count }EXECUTION_TEST->{ message }(used when testing integration connectivity)
For batch events,
info.execution_url points to the agent batch page (/agents/{agent_id}/batch) rather than an execution page.Example: EXECUTION_ACTION_FAILED
Security & Signature Verification
Asteroid signs every webhook body using:- SHA-256 digest of the raw body bytes
- RSA PKCS#1 v1.5 signing
- Base64-encoded signature in the header
Signature Header
Public Key
Use the webhook verification public key provided for your Asteroid environment/workspace.JavaScript (Node.js) verification example
Best Practices
Respond quickly with 2xx
Respond quickly with 2xx
Return a
2xx response as quickly as possible, then process asynchronously in your own job queue.Design for at-least-once delivery
Design for at-least-once delivery
Duplicate deliveries can happen. Use your own idempotency key strategy based on stable business identifiers.
event_id is generated per notification payload and can change across retries/redeliveries, so do not rely on it as the only dedupe key.Verify signatures before processing
Verify signatures before processing
Validate
X-Asteroid-Signature against the raw body and reject invalid requests with 401.Handle retries safely
Handle retries safely
Asteroid performs up to 3 send attempts with short backoff in the notification worker before marking a delivery failed.
Log execution context
Log execution context
Log at least
info.event, info.execution_id, info.agent_id, and your own processing result for observability.Testing Your Webhooks
Test Integration Event Example
Using “Test integration” in Asteroid sends anEXECUTION_TEST payload:
Troubleshooting
Webhook Not Receiving Events
Webhook Not Receiving Events
- Verify your endpoint is reachable from Asteroid and accepts
POST - Ensure your notification rule configuration matches the events you expect
- Confirm metadata filter values exactly match execution metadata values
Signature Verification Failing
Signature Verification Failing
- Verify against raw request bytes, not parsed JSON
- Ensure you use RSA PKCS#1 v1.5 with SHA-256
- Confirm you’re using the correct environment public key
Receiving Duplicate Events
Receiving Duplicate Events
- Handle at-least-once semantics in your endpoint logic
- Use stable execution fields for idempotency (not only
event_id) - Return
2xxonce a duplicate is safely recognized

