Save an edited journey document
replace_journeySave an edited journey document (permission: edit)
Send the GET /journeys/{id} document back, edited. Read-only keys are ignored. When the steps, the viewport and the typed values are unchanged (no value supplied), nothing is written and the baseline is kept: 200 with scan: null (a changed name is applied). Otherwise every step is replaced (the same step contract as POST /journeys), the journey starts a new baseline and is replayed right away: poll scan.pollUrl. When the replay is queued behind a running replay of this test's journeys, it starts when that one ends. When the replay cannot be scheduled the steps are still replaced: scan is null and scanError says why (journey_paused for a paused journey: saved, not replayed; resume it with PATCH). scan is non-null exactly when a scan was queued. On a type step, omit value to keep the stored one (the step must keep its index and selector; otherwise 400 value_required); a supplied value always re-records and is never echoed. A journey without a stored start page needs a url on at least one step (otherwise 400 invalid_type on steps[0].url). Every problem is reported at once in error.details[]. No consent action is added: record the banner click as a step when the journey needs it. The answer carries the new ETag. 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.
etag is sent as If-Match: pass the etag of your last get_journey; on precondition_failed call get_journey again and retry.
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": {
"id": "<id>",
"body": "<body>",
"etag": "<etag>"
},
"name": "replace_journey"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Journey id: from GET /journeys or the POST /journeys answer. | |
| body | Yes | The GET /journeys/{id} document. Read-only keys are ignored on input, except `id` (must be the path id) and a `status` change to paused/active (400 read_only: use PATCH). Unknown keys are refused. | |
| etag | Yes | The `etag` returned by get_journey (or by the last write), sent as If-Match. | |
| idempotencyKey | No | Optional Idempotency-Key: reuse the same value when retrying this exact call so it is applied once. |