---
title: "Create Version"
method: POST
path: "/v1/journeys/{journey_id}/versions"
tags: ["journeys"]
---

# Create Version

`POST /v1/journeys/{journey_id}/versions`

## Request

- Base URL: `https://api.cybret.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cybret.ai/v1/journeys/{journey_id}/versions`
- Auth: HTTP bearer

## Path parameters

- `journey_id` string, required

## Request body

- CreateJourneyVersionRequest
  - `definition` JourneyDefinition, required: Persisted journey body: metadata only, never live credentials.
    - `steps` union[], required
      - union
        - DeclaredNavigateStep
          - `action` 'navigate'
          - `url` string, nullable
          - `wait_until` 'commit' | 'domcontentloaded' | 'load' | 'networkidle'
        - DeclaredClickStep
          - `action` 'click'
          - `selector` string, required
          - `fallback_selectors` string[]
        - DeclaredFillStep: Fill either a non-secret value or a secret reference — never both.
          - `action` 'fill'
          - `selector` string, required
          - `value` string, nullable
          - `secret_ref` string, nullable
          - `is_secret` boolean
          - `fallback_selectors` string[]
        - DeclaredPressStep
          - `action` 'press'
          - `selector` string, required
          - `key` string, required
          - `fallback_selectors` string[]
        - DeclaredWaitForSelectorStep
          - `action` 'wait_for_selector'
          - `selector` string, required
          - `timeout_ms` number
          - `fallback_selectors` string[]
        - DeclaredWaitForUrlStep
          - `action` 'wait_for_url'
          - `url` string, required
          - `timeout_ms` number
        - DeclaredPauseStep
          - `action` 'pause'
          - `milliseconds` number, required
    - `allowed_domains` string[]
    - `max_duration_ms` integer
    - `login_success` LoginSuccessCriteria: Independent post-login checks (no credential material).
      - `expected_url_substring` string, nullable
      - `success_selector` string, nullable
      - `login_form_absent_selector` string, nullable
    - `allows_state_changing` boolean
  - `source` 'manual' | 'recorder' | 'agent'

## Response `201`

Successful Response

- JourneyVersionRecord
  - `journey_id` string, required
  - `tenant_id` string, required
  - `version` integer, required
  - `name` string, required
  - `definition` JourneyDefinition, required: Persisted journey body: metadata only, never live credentials.
    - `steps` union[], required
      - union
        - DeclaredNavigateStep
          - `action` 'navigate'
          - `url` string, nullable
          - `wait_until` 'commit' | 'domcontentloaded' | 'load' | 'networkidle'
        - DeclaredClickStep
          - `action` 'click'
          - `selector` string, required
          - `fallback_selectors` string[]
        - DeclaredFillStep: Fill either a non-secret value or a secret reference — never both.
          - `action` 'fill'
          - `selector` string, required
          - `value` string, nullable
          - `secret_ref` string, nullable
          - `is_secret` boolean
          - `fallback_selectors` string[]
        - DeclaredPressStep
          - `action` 'press'
          - `selector` string, required
          - `key` string, required
          - `fallback_selectors` string[]
        - DeclaredWaitForSelectorStep
          - `action` 'wait_for_selector'
          - `selector` string, required
          - `timeout_ms` number
          - `fallback_selectors` string[]
        - DeclaredWaitForUrlStep
          - `action` 'wait_for_url'
          - `url` string, required
          - `timeout_ms` number
        - DeclaredPauseStep
          - `action` 'pause'
          - `milliseconds` number, required
    - `allowed_domains` string[]
    - `max_duration_ms` integer
    - `login_success` LoginSuccessCriteria: Independent post-login checks (no credential material).
      - `expected_url_substring` string, nullable
      - `success_selector` string, nullable
      - `login_form_absent_selector` string, nullable
    - `allows_state_changing` boolean
  - `source` 'manual' | 'recorder' | 'agent', required
  - `review_status` 'draft' | 'pending_review' | 'approved' | 'rejected', required
  - `reviewed_by` string, nullable
  - `reviewed_at` string, date-time, nullable
  - `created_by` string, required
  - `created_at` string, date-time, required
  - `is_current` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cybret/apis/api-scanner-control-plane.md) · [All operations](https://skmtc.dev/cybret/apis/api-scanner-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/cybret/apis/api-scanner-control-plane/revisions/4c9b522246af?raw)
