Create workflow
Create a workflow from a plan. Creates a draft by default; set publish: true to publish immediately (strict validation applies).
Call GET /v1/workflows/blocks and GET /v1/workflows/blocks/{blockId} first to discover valid blockIds and inputs.
A workflow is a DAG of nodes described by the plan object: { name?, nodes: [] }.
Each node has a stable string id and a next array of node ids it points to (an empty string "" marks an unwired slot). There are three node kinds:
BLOCK— one workflow step.{ id, kind: "BLOCK", blockId, inputs: {}, next: [] }.blockIdcomes fromGET /v1/workflows/blocks;inputsare the block’s configurable inputs (discover them withGET /v1/workflows/blocks/{blockId}). A BLOCK has exactly onenextslot, except theWAIT_FOR_APPROVALblock which has two:[approvedTargetId, rejectedTargetId].CONDITIONAL— branches the stream.{ id, kind: "CONDITIONAL", conditions: [], fallbackName?, next: [] }. Each condition is EITHER a field predicate{ field, operator, value? }(lead/company/AI-variable fields — discover them withGET /v1/workflows/condition-fields) OR a random-split branch{ type: "RANDOM_SPLIT", percentage }(deterministic A/B split; integer 1-100, percentages must sum to ≤ 100 across the node, the remainder falls through to the fallback).nexthas exactlyconditions.length + 1entries: one target per matched condition (in order) then the fallback target LAST.KING— dedupes/groups the stream.{ id, kind: "KING", groupBy, orderBy, checkAnyDomain?, limit?, next: [] }.nextis[leftTargetId, rightTargetId].
The first node (the one no other node points to) should be a selector/import entry block. A plan may hold at most 60 nodes and no cycles. An empty plan (nodes: []) is valid for a brand-new draft.
Field/entity prefixes used inside conditions: company., anyLead., and webhookInput. for webhook-triggered workflows.
Responses include direct Enginy app URLs when available. The response includes an appUrl to the workflow editor. MCP agents should return those URLs to users whenever they are present in the response.
Required scope:
WORKFLOWS_WRITERate limit: 30 requests per minute
Authorizations
Body
Workflow name.
1 - 120The workflow DAG. See the endpoint description for the plan format.
Trigger config. Defaults to MANUAL.
- WorkflowTrigger
- WorkflowTrigger
- WorkflowTrigger
- WorkflowTrigger
- WorkflowTrigger
Optional per-run credit ceiling.
When true, publish immediately after creating the draft (strict validation applies). Default false.