Create a journey from steps
create_journeyCreate a journey from steps (permission: edit)
Create a saved journey on a website test from steps you write, without the recorder. The target decides the project, so an organization key sends no projectId. The journey starts on the test's URL (there is no url field); to start elsewhere, make a navigate the first step. Steps are validated strictly: unknown fields are refused and every problem is reported at once in error.details[] as { path, message, code } (e.g. steps[3].selector); nothing is saved then. Typed values are never echoed. No consent action is added: record the banner click as a step when the journey needs it. The answer is the journey document (as GET /journeys/{id} returns it, with its ETag and Location) plus scan: the baseline replay, which starts right away (poll scan.pollUrl); scan is null with scanError when it could not be queued. A click inside an iframe names the iframes in iframeChain (CSS, outermost first); typing inside iframes is not supported yet. The Idempotency-Key also derives the journey id, so a retry after a lost slot answers the original journey. idempotencyKey (sent as the Idempotency-Key header): retrying the same call with the same value replays the original answer; the same value with different arguments is 422 idempotency_conflict, and 409 idempotent_in_progress means wait error.meta.retryAfter seconds and retry.
To change an existing journey use replace_journey (every step, a new baseline) or patch_journey (name or status only).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"targetId": "<targetId>",
"name": "<name>",
"steps": "<steps>"
},
"name": "create_journey"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The journey name. | |
| steps | Yes | Replayed in order from the test's URL (`steps[i]` is stored as step i); to start elsewhere, make a `navigate` the first step. | |
| targetId | Yes | A website test of a project the key reaches; it decides the project (no `projectId`). | |
| viewport | No | Browser viewport of the replay; default desktop. | |
| idempotencyKey | No | Optional Idempotency-Key: reuse the same value when retrying this exact call so it is applied once. |