mailmoo_campaign_update_message
Edit a campaign's outreach copy
Rewrites the message on one step of a campaign's sequence, and the variants under it. Get the step id from campaign_get_context, which returns the sequence. THE CAMPAIGN MUST BE PAUSED: editing a running one is refused, so pause it first with campaign_set_state and confirm with the user before turning it back on. Only the fields you send change; the step's send condition, attachments and timing are untouched. 'variants' is the exception: it replaces the whole list, so include every variant you want to keep. To personalize, use a merge field: {{First Name | ""}}, with the variable's exact display name and a fallback. campaign_get_context returns mergeFields, the names this campaign accepts. Use one from that list, because a name that is not on it is rejected. Never write a placeholder as [first name] or <first name>; those are not merge fields and send to the lead literally.
Effect: Write. See Effects.
Permissions: Write campaigns.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
campaignId | string | Yes | ID of the campaign the sequence step belongs to. |
stepId | string | Yes | Id of the sequence step to edit. Read the sequence first to get it. |
text | string | No | New body copy for the step. Merge fields use the variable's display name and MUST carry a fallback: {{First Name | ""}}, not {{firstName}}. A name that does not match a variable on this campaign's leads is not an error: it silently sends as an empty string. Square brackets such as [first name] are not merge fields and send literally. |
subject | string | No | New subject line. Only accepted on step types that have one (SEND_EMAIL, SEND_IN_MAIL). |
variants | array of object | No | Replaces the step's whole variant list, so send every variant you want to keep, not just the changed ones. At most 5. Pass an empty array to remove all variants and go back to a single message. |
variantAssignment | object | No | How a variant is chosen per send: 'default' always uses one, 'bySender' maps each sender profile to a variant, 'abTest' splits by weight. Every id referenced must exist in the resulting variant list. |

