x-api-key: gsk_your_api_key_here and the base URL https://openapi.enginy.ai. The list id 55762, campaign id 8842, and workflow id 4021 are placeholders — resolve real ids with get_lists and get_campaigns.
1. Simplest linear flow
Import a contact list → check email deliverability → add to a campaign. One straight line, no input needed at run time.1
Create and publish in one call
2
Confirm the run contract
EMPTY means the entry list is baked in — run it with no input.3
Run it
4
Poll until it finishes
status until it’s a terminal value (SUCCEEDED, FAILED, CANCELLED).2. Conditional branching
Only campaign the contacts that have an email; send the rest to a review list. ACONDITIONAL node splits the stream.
The condition node has one condition and therefore two next slots: the target for the matched condition, then the fallback last.
gate.next has conditions.length + 1 = 2 entries. next[0] (campaign) runs for contacts matching the
condition; next[1] (review) is the fallback. Discover valid field / operator values with GET /v1/workflows/condition-fields.3. Webhook-triggered workflow with declared inputs
Push a set of contact ids into a workflow from your own system. TheWEBHOOK trigger declares a typed input; delivering a payload to the webhook URL starts a run seeded with those contacts.
How declared inputs bind. An entity input type (
leadIds or companyIds) seeds the entry block through
the "__MANUAL_INPUT" sentinel — set it on the entry step’s entity id, as above. A scalar/array input type
instead binds to a specific node field with { "webhookInputKey": "<key>" } in that field’s place.1
Create and publish
Publishing arms the webhook.
2
Read the live webhook URL
3
Deliver a payload to start a run
Send the declared key (
contacts) to the webhook URL:4. Scheduled workflow
Run a list on a recurring schedule. ASCHEDULE trigger fires the workflow on its own; you never call run.
Patterns worth reusing
Edit incrementally instead of resubmitting the whole plan
Edit incrementally instead of resubmitting the whole plan
Once a workflow exists,
PATCH /v1/workflow/{id}/draft with an ops array changes just what you touch —
e.g. { "kind": "updateStepInputs", "id": "campaign", "inputs": { "campaignId": 9001, "excludeContactedLeads": true } }
— and returns the new revision. Pass that revision on the next write to catch concurrent edits (409).Make a workflow accept ids at run time
Make a workflow accept ids at run time
Set the entry step’s entity input to
"__MANUAL_INPUT" (instead of a fixed id). GET then reports
runtimeInputContract.status: "SUPPORTED", and you run it with one key from acceptedKeys, e.g.
{ "input": { "leadIds": [101, 102] } } or { "input": { "contactListId": 55762 } }.Cap spend per run
Cap spend per run
Add
"maxCreditsPerRun": 5000 to the create or PATCH …/draft body. Enrichment and AI steps consume credits;
a run stops once it reaches the ceiling.Endpoints
Every request and response shape, generated from the OpenAPI spec.
MCP agent guide
Drive these same flows from an AI agent.