You can create and update scenarios and campaigns by sending a complete JSON definition through the Inrō public API or the MCP tools. Instead of cloning a template or generating from a prompt, you describe the whole structure yourself: triggers, actions, and rules, all in one request.
That makes it possible to build automations from your own code, duplicate or migrate them between accounts, and export and re-import your entire setup.
Before you start
You'll need a Pro or Trial account and your API token or an MCP connection. See The Inrō Private API: Getting Started for auth, and Connect Your AI Agent to Inrō with the MCP Server for the AI path. For what scenarios are and how they run, see What Are Scenarios? Overview & Concepts.
Create and update scenarios
Create a scenario from JSON by passing triggers and actions directly to POST /api/v1/scenarios (or the create_scenario MCP tool):
POST /api/v1/scenarios{ "title": "Welcome flow", "triggers": [{ "trigger_type": "contact_create" }], "actions": [ { "action_key": "msg1", "action_type": "message", "content": "Hey, thanks for connecting!" } ]}
Update a scenario with PATCH /api/v1/scenarios/:id (or the update_scenario tool). You can change the title and active state, or fully replace its triggers and actions.
A scenario can be created in one of three modes: clone a template_id, generate from a prompt, or pass triggers/actions directly. These are mutually exclusive, so use one at a time. To look up which trigger_type values exist and what options each takes, call get_trigger_types.
Create and update campaigns
Create a campaign from JSON by passing actions and campaign_rules to POST /api/v1/campaigns (or create_campaign):
POST /api/v1/campaigns{ "title": "Spring promo", "actions": [ { "action_key": "msg1", "action_type": "message", "content": "Our spring sale is live!" } ], "campaign_rules": [ { "list_type": "folder", "rule_type": "inclusion", "destination_id": 123 } ]}
Each campaign rule sets list_type (folder or segment), rule_type (inclusion or exclusion), and destination_id (the folder or segment to include or exclude).
Update a campaign with PATCH /api/v1/campaigns/:id to change the title, scheduling, or reply handling, or to rebuild the action tree. As with scenarios, template_id and direct JSON (actions / campaign_rules) are mutually exclusive. You can only edit a campaign while it's still a draft.
Define the action tree
Actions are passed as a flat array and linked into a tree with action_key and parent_key. Each child names its parent and which branch it sits under:
{ "actions": [ { "action_key": "q1", "action_type": "ask_question", "content": "Are you interested?" }, { "action_key": "yes", "parent_key": "q1", "parent_branch": "option_0", "action_type": "message", "content": "Great!" }, { "action_key": "no", "parent_key": "q1", "parent_branch": "option_1", "action_type": "message", "content": "No problem." } ]}
Branch labels depend on the action. An ask_question produces option_0, option_1, and so on (one per answer), plus option_replied and option_expired. A condition produces option_true / option_false. Call get_action_types to see every action's branch labels, content field, and options before you build.
Build via your AI agent (MCP)
Everything above also works through the MCP Server. Ask Claude or ChatGPT to:
Create a scenario with specific triggers and actions
Update an existing scenario: change its title, toggle it on or off, or replace its content
Build a campaign from scratch with a full action tree
⚠️ The MCP tools cover the common cases, but a few inline objects are API-only. Over MCP, scenario actions can carry inline media_file and conversion_link, but not survey or folder, and campaign actions carry no inline objects at all. For those, use the REST API, or reference an existing record by its id.
🐾 Netsuke's Tips
Build a small scenario in the app first, then call
GET /api/v1/scenarios/:id(orget_scenario) to see its exact JSON. It's the fastest way to learn the action shape before you write your own.When you
PATCHwithtriggersoractions, the array is the complete list: anything you leave out is removed. See Updating Scenario & Campaign Actions via API & MCP for the full rules.Generating from a
promptruns in the background. Poll the scenario and watch itsgeneration_datato know when it's ready.
What's next?
Updating Scenario & Campaign Actions via API & MCP for editing individual steps in an existing automation.
Connect Your AI Agent to Inrō with the MCP Server to build automations by chatting with Claude or ChatGPT.
