Add a journey step
add_journey_stepInsert a step into a journey using an existing anchor from get_journey. position defaults to after; before inserts before it, and path_start inserts at a named split path. After a split, insert into its shared continuation below the paths. Supports email/SMS messages, waits, condition splits, A/B splits, contact updates, webhooks, goals and stops. Sending SMS requires a connected verified sender, billing and consent when sending. Removing A/B variants or adding a terminal step can discard or stop downstream paths, so review the confirmation carefully.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Plain message body. Required for SMS; use body_html for email HTML. | |
| tags | No | Contact update: full replacement tag list | |
| label | No | Optional step label | |
| stage | No | Contact update: pipeline stage | |
| channel | No | Message step: email or SMS. Sending SMS requires a connected, verified sender, billing, and consent when sending. | |
| site_id | Yes | The site, from list_sites | |
| subject | No | Email step: subject line | |
| path_key | No | ||
| position | No | ||
| template | No | Message step: optional template name | |
| body_html | No | Email step: body HTML; one unsubscribe link is added at send time | |
| condition | No | Advanced JSONLogic condition, exclusive with condition_field/operator/value; primitive booleans are valid | |
| goal_name | No | Goal step: goal name | |
| step_type | Yes | ||
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| ab_weights | No | A/B step: complete replacement variant map. Removed keys discard their path steps; new keys add empty paths. Weights may be relative. | |
| journey_id | Yes | The journey, by id from list_journeys | |
| lead_score | No | Contact update: score; null clears it | |
| contact_set | No | Contact update: complete advanced attribute map, exclusive with tags/stage/lead_score | |
| exit_reason | No | Exit step: reason | |
| webhook_url | No | Webhook step: destination URL | |
| wait_minutes | No | Wait step: minutes (1440 = a day); new waits default to one minute | |
| after_step_id | Yes | A step id exactly as get_journey shows it, e.g. n_email_1 | |
| webhook_method | No | Webhook step: HTTP method | |
| condition_field | No | Simple condition split: field; use condition for advanced JSONLogic instead | |
| condition_value | No | Simple condition split: comparison value | |
| webhook_payload | No | Webhook step: JSON payload; null clears it | |
| condition_operator | No | Simple condition split: operator | |
| webhook_fail_on_error | No | Webhook step: stop the journey if the request fails | |
| translate_to_contact_language | No | Email step: send each contact the email translated into their language; contacts without one get the original |