Delivery is powered by Svix: automatic retries,
HMAC-SHA256 signatures, and delivery logging included.
Configure a webhook
Pass awebhook object when starting a model run or workflow run.
webhook object in POST /v1/nodes/{nodeType}/run.
Supported events
Model runs and workflow runs support different event sets.| Event | Model run | Workflow run | Description |
|---|---|---|---|
run.started | Yes | Yes | The run started |
run.completed | Yes | Yes | The run completed successfully |
run.failed | Yes | Yes | The run failed |
run.canceled | No | Yes | The workflow run was canceled |
node.completed | No | Yes | One workflow node completed |
node.failed | No | Yes | One workflow node failed |
events, Magica sends every event supported by that run type.
Event payload
| Field | Type | Description |
|---|---|---|
success | boolean | true for success events, false for failures |
type | string | Event type, such as run.completed |
runId | string | Execution run ID |
workflowId | string | Workflow definition ID for workflow runs; node type for standalone model runs |
data | object | Event-specific data |
metadata | object | null | Custom metadata echoed back by the execution surface |
error | string | null | Error message for failure events |
createdAt | string | ISO 8601 timestamp |
Event types
run.started
A run begins executing.
run.completed
All requested work finished successfully.
run.failed
One or more steps failed.
run.canceled
The run was canceled.
node.completed
A single node finished successfully.
node.failed
A single node failed.
Handler pattern
Always respond200 OK immediately and process asynchronously. If your handler takes too long, Svix will retry and you may receive duplicate deliveries.
- Node.js
- Python
Security
Every webhook is signed with HMAC-SHA256 via Svix. Verify signatures before trusting the payload:- Node.js
- Python