Skip to main content
POST
/
v2
/
workflow
/
executions
/
dispatch
Dispatch Execution
curl --request POST \
  --url https://api.velt.dev/v2/workflow/executions/dispatch \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "definitionId": "<string>",
    "idempotencyKey": "<string>",
    "correlationId": "<string>",
    "triggerContext": {},
    "organizationId": "<string>",
    "documentId": "<string>",
    "folderId": "<string>",
    "webhookUrl": "<string>",
    "webhookSecret": "<string>"
  }
}
'
{
  "result": {
    "executionId": "exec_1777374504255_xzy43k9q",
    "correlationId": "corr_campaign_42",
    "deduplicated": false
  }
}

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.

Use this API to start a new execution of a workflow definition. Dispatch pins the current definition version, stamps a correlation ID and idempotency key, and enqueues the first step(s).

Endpoint

POST https://api.velt.dev/v2/workflow/executions/dispatch

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required
webhookUrl is validated at the schema boundary and re-checked at delivery time. Scheme must be https://. Literal IP hosts in loopback, private (RFC 1918), link-local, or IPv4-mapped-private ranges are rejected. Forbidden hostnames include localhost, metadata.google.internal, metadata, and any *.internal. At delivery, DNS resolution is repeated; if any resolved address is private, the request is not sent. Redirects are never followed.

Example Requests

Dispatch with idempotency and webhook

{
  "data": {
    "definitionId": "marketing-copy-approval",
    "idempotencyKey": "campaign-42-dispatch",
    "correlationId": "corr_campaign_42",
    "triggerContext": { "assetId": "asset_8f3", "campaign": "Q2 launch" },
    "webhookUrl": "https://hooks.acme.com/velt/approvals",
    "webhookSecret": "whsec_9a8fS2l..."
  }
}

Response

Success Response

{
  "result": {
    "executionId": "exec_1777374504255_xzy43k9q",
    "correlationId": "corr_campaign_42",
    "deduplicated": false
  }
}
deduplicated: true indicates a replay (including in-tx contention) — the returned executionId is the original execution’s id.

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "NOT_FOUND"
  }
}
Errors: NOT_FOUND (no definition or tombstoned) / FAILED_PRECONDITION (tombstoned) / INVALID_ARGUMENT (schema validation).
{
  "result": {
    "executionId": "exec_1777374504255_xzy43k9q",
    "correlationId": "corr_campaign_42",
    "deduplicated": false
  }
}