Topolo Docs Topolo Platform
Open workspace

Create journey from blueprint

Create a DRAFT journey from a blueprint. Pass requestKey (a retry with the same key returns the same draft and templates, replayed true), topicKey (an active subscription topic), optional name, purpose (marketing or outreach), segmentId (required for win_back, where entering it enrolls; otherwise an audience filter), delays {delayStepId: minutes} and templateIds {sendStepId: templateId}. Send steps without a template id need createStarterTemplates true: each gets a new template holding only bracketed placeholders ([Subject], [Heading], [Write your message here]) for a person to replace. Nothing is published, enrolled or sent; publish with app_topolo_nurture.journeys.publish after editing.

Outcome

Create a DRAFT journey from a blueprint. Pass requestKey (a retry with the same key returns the same draft and templates, replayed true), topicKey (an active subscription topic), optional name, purpose (marketing or outreach), segmentId (required for win_back, where entering it enrolls; otherwise an audience filter), delays {delayStepId: minutes} and templateIds {sendStepId: templateId}. Send steps without a template id need createStarterTemplates true: each gets a new template holding only bracketed placeholders ([Subject], [Heading], [Write your message here]) for a person to replace. Nothing is published, enrolled or sent; publish with app_topolo_nurture.journeys.publish after editing.

Before you start

  • Verify identity and pin the intended organization and environment before discovering the action.
  • Discover a granted Nurture workspace. The application permission is workspace:write; required workspace access is read_write. A permission alone does not supply a workspace grant.
  • Organization and workspace come from verified context. Select resourceType/resourceId separately from action input; body fields cannot grant a different organization or workspace. The first authorized product action can initialize an identity-only workspace mirror.
  • Obtain authorization for the documented effect or personal-data export before supplying CLI --confirm or MCP confirm:true.

Discover the target

topolo whoami --json
topolo actions get app_topolo_nurture.journeys.create_from_blueprint --detail --json
topolo resources topolo-nurture --json
topolo workspaces list topolo-nurture --json
topolo actions get app_topolo_nurture.journey_blueprints.list --detail --json
topolo actions get app_topolo_nurture.segments.list --detail --json
  • id: Journey blueprint id from the blueprint catalog.
  • segmentId: Nurture segment id in the selected workspace.

Request

POST /api/journey-blueprints/{id}/journeys

Save action input as payload.json. The reviewed plan separates path identifiers, query fields and HTTP body. Set NURTURE_WORKSPACE_ID from granted resource discovery; it is separate from action input.

Inspect and test this action in the signed action console. A test response still requires the verification below.

Input fields

FieldRequiredTypeConstraints
idRequiredstringJourney blueprint id from the blueprint catalog. {"enum":["welcome_series","trial_onboarding_14d","re_engagement","win_back","not_now_90d"]}
requestKeyRequiredstring{"minLength":8,"maxLength":128}
nameOptionalstring{"minLength":1,"maxLength":120}
topicKeyRequiredstring{"pattern":"^[a-z0-9][a-z0-9_-]{0,62}$"}
purposeOptionalstring{"enum":["marketing","outreach"]}
segmentIdOptionalstringNurture segment id in the selected workspace. {"minLength":1,"maxLength":64}
delaysOptionalobject{}
templateIdsOptionalobject{}
createStarterTemplatesOptionalboolean{}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "enum": [
        "welcome_series",
        "trial_onboarding_14d",
        "re_engagement",
        "win_back",
        "not_now_90d"
      ]
    },
    "requestKey": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "topicKey": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
    },
    "purpose": {
      "type": "string",
      "enum": [
        "marketing",
        "outreach"
      ]
    },
    "segmentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "delays": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9_-]{0,31}$"
      },
      "additionalProperties": {
        "type": "integer",
        "minimum": 1,
        "maximum": 129600
      }
    },
    "templateIds": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9_-]{0,31}$"
      },
      "additionalProperties": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    "createStarterTemplates": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "requestKey",
    "topicKey"
  ],
  "additionalProperties": false
}

Effects

  • Creates one draft journey and, with createStarterTemplates, one placeholder email template per send step without a templateId. Records the requestKey so a retry creates nothing new.

Interpret the response

The returned identifier path is $.journey.id for journey. Empty lists do not discover a target.

Call app_topolo_nurture.journeys.get (status draft) and app_topolo_nurture.journeys.validate; edit each created template with app_topolo_nurture.templates.update before app_topolo_nurture.journeys.publish.

Exact success schema:

{
  "type": "object",
  "required": [
    "journey",
    "templates",
    "problems",
    "replayed"
  ],
  "properties": {
    "journey": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "definition": {
          "type": "object"
        },
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "published",
            "archived"
          ]
        },
        "currentVersion": {
          "type": [
            "integer",
            "null"
          ]
        },
        "hasUnpublishedChanges": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      }
    },
    "templates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "stepId",
          "templateId",
          "created"
        ],
        "properties": {
          "stepId": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "created": {
            "type": "boolean"
          }
        }
      }
    },
    "problems": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "replayed": {
      "type": "boolean"
    }
  }
}

Worked examples

Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Replace synthetic identifiers using credential-scoped discovery. A local success is not evidence of a deployed effect, configured provider or delivered message.

Successful request

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "welcome_series",
  "requestKey": "welcome-once",
  "name": "Welcome A",
  "topicKey": "news",
  "createStarterTemplates": true
}

CLI:

topolo actions validate app_topolo_nurture.journeys.create_from_blueprint --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.create_from_blueprint --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.journeys.create_from_blueprint --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_nurture.journeys.create_from_blueprint",
    "input": {
      "id": "welcome_series",
      "requestKey": "welcome-once",
      "name": "Welcome A",
      "topicKey": "news",
      "createStarterTemplates": true
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "journey": {
    "id": "jny_659c519a653942ca8d00dc51d9a0ecfb",
    "name": "Welcome A",
    "description": "Three emails over five days after signup; a purchase ends the journey as converted.",
    "definition": {
      "trigger": {
        "eventTypes": [
          "signup"
        ],
        "segmentIds": []
      },
      "entryNodeId": "email_1",
      "nodes": [
        {
          "id": "email_1",
          "kind": "send",
          "templateRef": "tpl_117cdeb419df44af86644078d084572d",
          "purpose": "marketing",
          "topicKey": "news",
          "next": "wait_1"
        },
        {
          "id": "wait_1",
          "kind": "delay",
          "delay": {
            "mode": "duration",
            "minutes": 2880
          },
          "next": "email_2"
        },
        {
          "id": "email_2",
          "kind": "send",
          "templateRef": "tpl_16650b9b60a941328ca26cc405fc7da9",
          "purpose": "marketing",
          "topicKey": "news",
          "next": "wait_2"
        },
        {
          "id": "wait_2",
          "kind": "delay",
          "delay": {
            "mode": "duration",
            "minutes": 4320
          },
          "next": "email_3"
        },
        {
          "id": "email_3",
          "kind": "send",
          "templateRef": "tpl_999fd538c46c43e081906966ef9b4936",
          "purpose": "marketing",
          "topicKey": "news",
          "next": "done"
        },
        {
          "id": "goal",
          "kind": "goal",
          "eventType": "purchase"
        },
        {
          "id": "done",
          "kind": "exit"
        }
      ]
    },
    "status": "draft",
    "currentVersion": null,
    "hasUnpublishedChanges": true,
    "createdAt": "2026-10-04T00:32:36.452Z",
    "updatedAt": "2026-10-04T00:32:36.452Z"
  },
  "templates": [
    {
      "stepId": "email_1",
      "templateId": "tpl_117cdeb419df44af86644078d084572d",
      "created": true
    },
    {
      "stepId": "email_2",
      "templateId": "tpl_16650b9b60a941328ca26cc405fc7da9",
      "created": true
    },
    {
      "stepId": "email_3",
      "templateId": "tpl_999fd538c46c43e081906966ef9b4936",
      "created": true
    }
  ],
  "problems": [
    "Subscription topic \"news\" is missing or archived."
  ],
  "replayed": false
}

HTTP 201. Call app_topolo_nurture.journeys.get (status draft) and app_topolo_nurture.journeys.validate; edit each created template with app_topolo_nurture.templates.update before app_topolo_nurture.journeys.publish.

Another supported request

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "welcome_series",
  "requestKey": "welcome-once",
  "name": "Welcome A",
  "topicKey": "news",
  "createStarterTemplates": true
}

CLI:

topolo actions validate app_topolo_nurture.journeys.create_from_blueprint --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.create_from_blueprint --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.journeys.create_from_blueprint --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_nurture.journeys.create_from_blueprint",
    "input": {
      "id": "welcome_series",
      "requestKey": "welcome-once",
      "name": "Welcome A",
      "topicKey": "news",
      "createStarterTemplates": true
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "journey": {
    "id": "jny_d0f3c411b8734591b78e563f8f8f2c6e",
    "name": "Welcome A",
    "description": "Three emails over five days after signup; a purchase ends the journey as converted.",
    "definition": {
      "trigger": {
        "eventTypes": [
          "signup"
        ],
        "segmentIds": []
      },
      "entryNodeId": "email_1",
      "nodes": [
        {
          "id": "email_1",
          "kind": "send",
          "templateRef": "tpl_359f9f635ea44556a7cdf39092c00021",
          "purpose": "marketing",
          "topicKey": "news",
          "next": "wait_1"
        },
        {
          "id": "wait_1",
          "kind": "delay",
          "delay": {
            "mode": "duration",
            "minutes": 2880
          },
          "next": "email_2"
        },
        {
          "id": "email_2",
          "kind": "send",
          "templateRef": "tpl_76e99d77a8244d90a501d61006f49d60",
          "purpose": "marketing",
          "topicKey": "news",
          "next": "wait_2"
        },
        {
          "id": "wait_2",
          "kind": "delay",
          "delay": {
            "mode": "duration",
            "minutes": 4320
          },
          "next": "email_3"
        },
        {
          "id": "email_3",
          "kind": "send",
          "templateRef": "tpl_02f090373e29426193ff9fcc7b0ad84f",
          "purpose": "marketing",
          "topicKey": "news",
          "next": "done"
        },
        {
          "id": "goal",
          "kind": "goal",
          "eventType": "purchase"
        },
        {
          "id": "done",
          "kind": "exit"
        }
      ]
    },
    "status": "draft",
    "currentVersion": null,
    "hasUnpublishedChanges": true,
    "createdAt": "2026-10-04T00:32:36.449Z",
    "updatedAt": "2026-10-04T00:32:36.449Z"
  },
  "templates": [
    {
      "stepId": "email_1",
      "templateId": "tpl_359f9f635ea44556a7cdf39092c00021",
      "created": true
    },
    {
      "stepId": "email_2",
      "templateId": "tpl_76e99d77a8244d90a501d61006f49d60",
      "created": true
    },
    {
      "stepId": "email_3",
      "templateId": "tpl_02f090373e29426193ff9fcc7b0ad84f",
      "created": true
    }
  ],
  "problems": [],
  "replayed": false
}

HTTP 201. Call app_topolo_nurture.journeys.get (status draft) and app_topolo_nurture.journeys.validate; edit each created template with app_topolo_nurture.templates.update before app_topolo_nurture.journeys.publish.

Refused request · request_key_conflict

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "win_back",
  "requestKey": "welcome-once",
  "name": "Welcome A",
  "topicKey": "news",
  "segmentId": "seg_31883600465f40d287331b4ffd6b5661",
  "createStarterTemplates": true
}

CLI:

topolo actions validate app_topolo_nurture.journeys.create_from_blueprint --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.create_from_blueprint --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 409:

{
  "error": {
    "code": "request_key_conflict",
    "message": "requestKey was already used for blueprint welcome_series."
  }
}

HTTP 409. Preserve the refusal details and do not claim success.

Refused request · permission_denied

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "welcome_series",
  "requestKey": "reader-key",
  "topicKey": "news",
  "createStarterTemplates": true
}

CLI:

topolo actions validate app_topolo_nurture.journeys.create_from_blueprint --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.create_from_blueprint --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 403:

{
  "error": {
    "code": "permission_denied",
    "message": "The credential lacks workspace:write.",
    "details": {
      "requiredPermission": "workspace:write"
    }
  }
}

HTTP 403. Preserve the refusal details and do not claim success.

Refused request · segment_required

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "win_back",
  "requestKey": "bad-params",
  "topicKey": "news",
  "createStarterTemplates": true
}

CLI:

topolo actions validate app_topolo_nurture.journeys.create_from_blueprint --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.create_from_blueprint --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 422:

{
  "error": {
    "code": "segment_required",
    "message": "Win-back enrolls contacts entering a segment; pass segmentId."
  }
}

HTTP 422. Preserve the refusal details and do not claim success.

Verify the result

  • Call app_topolo_nurture.journeys.get (status draft) and app_topolo_nurture.journeys.validate; edit each created template with app_topolo_nurture.templates.update before app_topolo_nurture.journeys.publish.

Errors and recovery

  • organization_required (HTTP 403): Select an organization available to the verified caller before choosing a Nurture workspace.
  • permission_denied (HTTP 403): Grant the credential the required Nurture workspace permission.
  • workspace_required (HTTP 409): Create a Nurture workspace, or pass the workspace resource context.
  • invalid_input (HTTP 422): Correct the fields named in error.details using inputSchema, then retry.
  • invalid_input (HTTP 422): Use an id from app_topolo_nurture.journey_blueprints.list.
  • unknown_delay_step (HTTP 422): Use delay step ids from app_topolo_nurture.journey_blueprints.get.
  • unknown_send_step (HTTP 422): Use send step ids from app_topolo_nurture.journey_blueprints.get.
  • templates_required (HTTP 422): Pass a templateId for each listed step or set createStarterTemplates true.
  • segment_required (HTTP 422): Pass segmentId (an active segment) for a segment-entry blueprint.
  • template_unavailable (HTTP 422): Pick active templates from app_topolo_nurture.templates.list.
  • request_key_conflict (HTTP 409): Use a new requestKey for a different blueprint.

Auth or gateway failures may precede this handler. Preserve the exact response shape, error string/code, request id and credential context; no synthetic fixture establishes live credential access.

Recovery boundary

Archive the draft journey and archive each created template (templates[].created true) with app_topolo_nurture.templates.archive.

  • Update email template: Change a template. Renaming changes it in place; any subject, preheader or blocks change appends a new immutable version and makes it current, so earlier versions stay readable. blocks is an ordered list of typed blocks: heading {text, level 1-3}, text {text with bold, italic and label only}, image {src https, alt, width?, href?}, button {label, href https or mailto}, divider, spacer {height}, columns {2-3 columns of the other leaf blocks}, and exactly one footer {text?} as the LAST block, which always renders the unsubscribe and preference links plus the brand footer and postal address. Raw HTML is never accepted; every value is escaped. Merge tags {{contact.firstName|fallback}}, {{contact.lastName}} and {{contact.email}} are allowed in the subject, preheader and text.
  • Simulate journey: Walk the draft (or a published version) for one real contact (contactId) or an inline sample { fields, timezone, events[], segmentIds[] } on a simulated clock from startAt (default now), jumping over delays, and return the path with timings. Side-effect free: nothing is enrolled, reserved or recorded; for a real contact each send asks eligibility.check what would happen at that simulated time (intended, deferred, blocked). Stops at exit, goal conversion or maxSteps (truncated true).
  • Publish journey version: Freeze the current draft as the next immutable version and make it live: new trigger matches and manual enrollments use it from now on. Existing enrollments stay pinned to the version they entered on. Refused when the draft is invalid or unchanged since the last publish.
  • Archive journey: Archive a journey: it stops enrolling contacts, every active enrollment exits with reason journey_archived, and the draft can no longer change. Versions, enrollment history and intended sends are kept.

Evidence

Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Test scenario and capture digests are retained with each fixture.