This guide walks through the five steps to get an approval flow running. Each step links to the full API reference for request and response details.Documentation Index
Fetch the complete documentation index at: https://docs.velt.dev/llms.txt
Use this file to discover all available pages before exploring further.
Step 1: Define the workflow
A definition is the static blueprint: nodes (work units), edges (connections), and optional parallel groups with quorum policies. Definitions are linted at write time. Cycles, dangling edges, unreachable nodes, and quorum misconfiguration all fail before you ever dispatch. You write one definition per workflow type (marketing copy approval, contract sign-off, etc.) and reuse it across many dispatches. → Create DefinitionStep 2: Dispatch an execution
Dispatching creates a live run of a definition. The engine pins the current definition version, stamps a correlation ID, and enqueues the first step. Always supply anidempotencyKey. Replays with the same key return the original executionId instead of spawning a duplicate. This makes dispatch safe to retry from clients, queues, and event handlers.
Supply webhookUrl and webhookSecret here if you want real-time event delivery (covered in the next step).
→ Dispatch Execution
Step 3: Configure your webhook receiver
When dispatch supplieswebhookUrl and webhookSecret, every externally-visible state change is POSTed to your receiver.
Delivery: POST, JSON body, 10s timeout, no redirects.
Headers your receiver sees:
| Header | What it is |
|---|---|
x-velt-signature | sha256=<hex>. HMAC-SHA256 of the raw request body. |
x-velt-event-id | Stable event ID, unchanged across retries. |
x-velt-attempt | 0-based attempt counter. |
Verify the signature
Hash the raw request body bytes. Do not re-serialize the parsed JSON object.Node.js
eventId and seq appear on retries. Make your receiver idempotent on (executionId, seq).
For the full event catalog, see Customize Behavior, Event reference.
Step 4: Record decisions
When a human step parks inwaiting, the engine emits step.awaiting-approval. Drive the workflow forward by recording each reviewer’s decision.
When all mandatory reviewers approve (or any reviewer rejects), the step’s aggregator transitions terminal and the step resumes.
→ Record Reviewer Decision
For blocking agent steps, use Record Agent Resolution instead.
→ Record Agent Resolution
Step 5: Monitor and reconcile
Pull the current state of any execution at any time. → Get Execution If your receiver missed events during an outage, reconcile by calling Get Execution Events withsinceSeq set to the last seq you durably stored. Returns every event after that seq, in order.
→ Get Execution Events
Only externally-visible event types are returned. Internal-only events fill
seq gaps but are filtered out, so your stream may have non-contiguous seq values.End-to-end flows
Happy path with joinOnQuorum
Happy path with joinOnQuorum
Marketing copy approval: agent drafts, legal and brand approve in parallel, publish agent ships once both approve.
joinOnQuorum fires one shared downstream step instead of firing it once per approver.Stop-bothering-reviewers with cancelOnQuorum
Stop-bothering-reviewers with cancelOnQuorum
Group with 3 reviewers, The two approvers’ downstream paths still fan out per edge. The cancelled third reviewer’s edges do not fire.
quorum: 2, onQuorumMet: cancelOnQuorum:Next steps
Customize Behavior
Node configuration, edge expressions, parallel groups, SLAs, linter rules, the event catalog, and the error vocabulary.
REST API Reference
All endpoints organized into Definitions, Executions, and Steps, with full request and response schemas.

