Add actions to an outcome
The normal way to add steps. Append one or more nodes to the end of an outcome’s action chain. Prefer this over the whole-graph PUT for ordinary edits. You describe what should happen; the server derives the node ids, the edge ids, the branch handles and the canvas coordinates, which are the parts the PUT expects you to invent correctly.
Applied atomically: if any node in the list is rejected, nothing is written. Appending an action the chain already performs is a no-op rather than a duplicate, so a retry is safe.
Each entry is discriminated on type. Most types are { type, config }. A switch router is { type: "switch", cases: [{ condition, actions }], default } because one router produces a branch node plus a chain per case.
Unlike the PUT, per-node config IS required here — an action you are adding on purpose should be complete. Use the PUT if you want to save an unconfigured draft. A chain that already ends in a branch cannot be appended to; edit it in the builder.
Send an Idempotency-Key header if you may retry. This is the only operation here that creates, so a request that timed out is genuinely ambiguous. A repeat with the same key and the same body returns the original result instead of appending again; a repeat with the same key and a different body is rejected with 409.
Required API key scope: campaign_workflows:write.
Authorizations
Send your API key as Authorization: Bearer YOUR_API_KEY.
Headers
Optional retry key for create-style operations. Reusing the same key with the same request returns the original result; reusing it with a different request returns 409.
1 - 255Path Parameters
Agent id.
1The call outcome whose chain to append to. Accepts the raw disposition (SUCCESS), any case (success), or the label the dashboard shows (On callback). Rejected with 400 if the agent's type can never emit it — see dispositions from GET /api/v2/projects/systems.
1Query Parameters
Pair with campaignId; omit both for primary campaign.
1Pair with locationId; omit both for primary campaign.
1Body
Request payload. Detailed schema pending — see the route handler.
Appended in order to the end of the outcome chain, as one atomic write.
1A router to add. One router produces a branch node plus a linear chain per case, which is why the cases carry their own actions rather than being wired separately.
- Option 1
- Option 2
Optimistic-concurrency guard: rejected with 409 if the stored version has moved on.
x >= 03
Response
The updated workflow.
