replace_journey
Replace (update) a journey draft. Full document replacement — include all nodes and properties in the body, the trigger included; anything omitted is deleted. The journey stays a draft; making the change live is a separate step this tool cannot perform. This is where send, delay, branch and exit nodes are added, and send node template IDs must already be scoped to this journey. The result carries a "verification" object read back from the server after the write — check it every time. verified:true means what you asked for is what saved. verified:false names what did not: "fieldMismatches" for node fields that failed to land, "nodeCountMismatch" for a node dropped or added, and "unknownTemplateReferences" for a send node pointing at a template id this journey does not have — almost always a mistyped id, so re-copy it from the create_journey_template or get_journey response it came from. Fix the specific thing named and send the corrected document. Re-sending an identical call changes nothing, and every replace_journey overwrites the whole draft again. An "errorKind" of "unauthorized" means the write itself succeeded and only the read-back was refused: report that as unconfirmed, never as a failed write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Journey display name | |
| nodes | Yes | Complete array of journey nodes: the trigger first, a terminal exit last, and everything else between them. Use server-assigned node ids from get_journey — do NOT invent new ids. Send node example: { type: "send", channel: "email", message: { template: "nt_journey_1" } } — the template goes inside message, never at node level, and the id is a journey-scoped one returned by create_journey_template rather than a workspace template id. Copy that id character-for-character from the create_journey_template or get_journey response you got it from — never retype or reconstruct it from memory, since a single dropped or altered character produces a different, non-existent id and the reference silently fails to resolve. channel must always be set to one of "email", "sms", "push", "inbox", "slack", or "msteams" on every send node — do not omit it even though the field is optional. An unset channel makes Studio silently render the node as email: for sms, push, and inbox sends this means the wrong title, an Email Address field shown instead of the real recipient field, no provider picker, and a hard-blocked "+Create message" button, with nothing shown to warn the user. The stored recipient data is not lost and delivery is not affected — this only breaks how the journey looks and works for a human editing it in Studio. Delay node example: { type: "delay", mode: "duration", duration: "PT1H" }. Branch node example: { type: "branch", paths: [{ conditions: ["data.plan", "is equal", "pro"], nodes: [] }], default: { nodes: [] } } — paths and default are both required, and the key inside a path is "conditions", not "condition". | |
| state | No | Must be "DRAFT". These tools cannot publish. | |
| enabled | No | Whether the journey is active. | |
| journey_id | Yes | The journey template ID to update |