Update workflow draft
Update a workflow draft. Provide either a full plan OR an ordered ops array (edit operations applied to the current draft plan) — not both. Optionally change name, trigger, or maxCreditsPerRun. Pass revision (from GET /v1/workflow/{workflowId}) for optimistic concurrency.
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 and the new revision. 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
Path Parameters
Body
Replace the whole draft plan. Mutually exclusive with ops.
Ordered edit operations applied to the current draft plan. Mutually exclusive with plan.
11 - 120Trigger configuration. SCHEDULE requires definition and startsAt; INTENT requires signal; WEBHOOK may declare inputs.
- WorkflowTrigger
- WorkflowTrigger
- WorkflowTrigger
- WorkflowTrigger
- WorkflowTrigger
Assign the workflow to a workflow folder (see GET /v1/workflows/folders), or null to remove it from any folder. Assignment is organizational only — a folderId-only update does not change the plan or advance the revision.
Optimistic concurrency token (the revision from GET /v1/workflow/{workflowId}). 409 on mismatch.