mailmoo_campaign_update_step
Change a step in a campaign's sequence
Changes one step of a paused campaign's sequence: its text or subject, a wait's length, where a move_to_campaign step sends leads (targetCampaign), a message step's sendCondition, stopIfSkipped and emailThreading, how a message step is delivered (voiceNote: written, AI voice note, or pre-recorded), whether it is split into several messages and what the last one is (split; null for one message again), the file a single message carries (attachment), a condition's settings (is_connected: waitForAcceptanceSeconds, withdrawRequest; has_engaged: signal, channel, withinDays; filter_leads: rules, which replace all rules, and match; filter_lead_fit: leadFit), or an update_tag step's tag; see campaign_add_step. Only what you pass changes. For message variants, use campaign_update_message; a split message cannot have them. Pass applyToWaitingLeads: true in the same call as a new waitTimeSeconds, or a new waitForAcceptanceSeconds on an Is connected check, to also move leads already waiting on that step. The new wait is counted from when they arrived, and if it has already passed they continue as soon as the campaign is running. Without it, the new wait applies only to leads who reach the step later. If the new length is already saved, set the previous length first without this flag, then set the new length with it. THE CAMPAIGN MUST BE PAUSED. Checked like a new step before it is saved. Returns the sequence and its readiness, and when the flag was set, how many leads already waiting were moved.
Effect: Write. See Effects.
Permissions: Read campaigns, Write campaigns.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
campaign | string | Yes | The campaign, by name or id. |
stepId | string | Yes | The step, from campaign_get_context. |
content | string | No | |
subject | string | No | |
waitTimeSeconds | integer | No | |
applyToWaitingLeads | boolean | No | Also move leads already waiting on this step when this call changes a wait's length (waitTimeSeconds, or waitForAcceptanceSeconds on an Is connected check). The new wait is counted from when they arrived. If it has already passed, they continue as soon as the campaign is running. Without this, only leads who reach the step later get the new wait. If the new length is already saved, set the previous length first without this flag, then set the new length with it. |
targetCampaign | string | No | move_to_campaign steps: the campaign the lead starts next, by name or id. Required when adding one. |
sendCondition | noReply, always, noPrevMessages, notOpened, noPrevEmails | No | |
stopIfSkipped | boolean | No | |
emailThreading | replyToThread, newEmail | No | |
voiceNote | object | No | Message steps only. Ask the user which they want when it is not clear: a written message, an AI voice note (say whose voice: each sender's own clone, or one named clone), or a pre-recorded voice note (say which recording). With prerecorded, content is optional and is sent as text only if the recording cannot be loaded. |
tag | string | No | update_tag: the tag set on the lead when it reaches the step, by name or id. Required when adding update_tag. |
waitForAcceptanceSeconds | integer or null | No | is_connected: how long to wait for a pending connection request to be accepted before deciding, in seconds (21 days is 1814400; 15 minutes to 90 days). Null decides at once. Use a wait on the check after a request, null on the opening check before one. Required when adding is_connected. |
withdrawRequest | boolean | No | is_connected: withdraw the request when the wait runs out without an acceptance. Defaults to on for a check that waits. |
signal | replied, opened | No | has_engaged: replied (the default) is Yes once the lead has replied; opened is Yes once they opened the last message. |
channel | any, social, email | No | has_engaged with replied: where a reply counts. Defaults to any. |
withinDays | integer or null | No | has_engaged: only count replies from the last N days (1 to 3650). Null or left out counts any time. |
rules | array of object | No | filter_leads: the rules on the campaign's columns. Leads that match go down Yes, the rest down No. Required when adding filter_leads; on edit it replaces every rule. |
match | all, any | No | filter_leads: all (the default) needs every rule to match, any needs one. |
leadFit | object | No | filter_lead_fit: one of atLeast, atMost or equals, on the 0 to 4 Lead Fit score. Required when adding filter_lead_fit; the campaign needs a Lead Fit column. |
split | object or null | No | Message steps only: send the message as several messages in a row, which reads more naturally. null sends it as one message again. A voice note step (voiceNote ai or prerecorded) cannot be split: make the last part the voice note instead. A split message cannot have variants: remove them first. |
attachment | object | No | Message steps sent as one message: a file that goes with it. A split message sends its file as its last part instead (see split). |

