You can add, change, and remove individual steps in an existing scenario or campaign by sending an actions array to update_scenario or update_campaign (over the API or MCP). The array you send is the complete, authoritative list of actions: anything you leave out is removed. That gives you full, predictable control over the structure in a single call.
How it works
Each action in your payload follows one of three patterns:
{ "id": 123 }keeps that action exactly as it is. Nothing changes.{ "id": 124, "content": "New message" }updates only the fields you provide. Everything else stays the same.No
idcreates a brand-new action. It must include anaction_keyand reference a parent withparent_keyorparent_id.
Any existing action whose id is not in the list is destroyed. The same rule applies to triggers: include every trigger you want to keep.
Reference parent actions
Every non-root action declares its parent, in one of two ways:
parent_iduses the database ID of an action that already exists (and is in the list via itsid). Best when the parent is already there.parent_keyuses theaction_keyof another action in the same payload. Best when the parent is a new action you're creating in the same call.
parent_id and parent_key are mutually exclusive. Both are validated before anything is saved, so if a reference doesn't resolve, the whole update is rejected and nothing changes.
Example: add a follow-up step
{ "actions": [ { "id": 123 }, { "action_type": "message", "action_key": "followup", "parent_id": 123, "content": "Thanks for your reply!" } ]}
Action 123 is kept unchanged. A new "followup" message is created as its child. Any other actions that were in the scenario are removed.
Example: update one field
{ "actions": [ { "id": 123, "content": "Updated message text" }, { "id": 124 } ]}
Only the content of action 123 changes. Action 124 is kept as-is. All other existing actions are removed.
🐾 Netsuke's Tips
Always include every action you want to keep, even the ones you're not changing. Omitting an action deletes it.
Call
get_scenarioorget_campaignfirst to pull the current action IDs, then build your update from that. It's the safest way to avoid deleting something by accident.Over MCP, the same complete-list rule applies, but a few inline objects are API-only. See Build and Update Automations Programmatically via API & MCP for the inline
survey/folderlimits.
What's next?
Build and Update Automations Programmatically via API & MCP for creating whole scenarios and campaigns from JSON.
Connect Your AI Agent to Inrō with the MCP Server to edit actions by chatting with Claude or ChatGPT.
