> ## Documentation Index
> Fetch the complete documentation index at: https://developer.instantly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a customer journey

> Updates a journey name or its draft design. A design sent for an active journey is refused with 409: pause it first. A paused journey takes any design, goal included; it applies on the next activation. The design replaces the whole draft.


Requires one of the following scopes: `email_marketing_journeys:update`, `email_marketing_journeys:all`, `all:update`, `all:all`



## OpenAPI

````yaml https://api.instantly.ai/openapi/api_v2.json patch /api/v2/email-marketing/journeys/{id}
openapi: 3.1.0
info:
  title: API Explorer
  description: >-
    The entire API V2 documentation is interactive and can be tested here. To
    the right side of every endpoint you will see a box with an example request.
    You can click on the "Try it" button to send a request to the server right
    from the docs. You will need to provide an API key by clicking the
    `ApiKeyAuth_token` blue text.
  version: 2.0.0
servers:
  - url: https://api.instantly.ai
    description: Instantly API Server
security:
  - ApiKeyAuth: []
tags:
  - name: Analytics
    description: Endpoints related to analytics
    x-group: Analytics
  - name: OAuth
    description: >-
      OAuth authentication endpoints for connecting Google and Microsoft email
      accounts
    x-group: OAuth
  - name: Account
    description: An email account that can be used to send campaigns
    x-group: Account
  - name: Campaign
    description: A campaign that can be sent to a list of recipients
    x-group: Campaign
  - name: Email
    description: >-
      A campaign email, a reply, a manually sent email, or any other email
      that's visible in the Unibox
    x-group: Email
  - name: EmailVerification
    description: A single email verification
    x-group: Email Verification
  - name: LeadList
    description: A list used to store leads
    x-group: Lead List
  - name: InboxPlacementTest
    description: An inbox placement test
    x-group: Inbox Placement Test
  - name: InboxPlacementAnalytics
    description: Analytics data for individual emails in inbox placement tests
    x-group: Inbox Placement Analytics
  - name: InboxPlacementBlacklistAndSpamAssassinReport
    description: Report data for an inbox placement test
    x-group: Inbox Placement Blacklist And SpamAssassin Report
  - name: AIInboxManager
    description: An AI Inbox Manager agent
    x-group: AI Inbox Manager
  - name: AIDeliverabilityAgent
    description: An AI Deliverability Agent
    x-group: AI Deliverability Agent
  - name: AILeadFinderAgent
    description: An AI Lead Finder Agent
    x-group: AI Lead Finder Agent
  - name: LocalBusiness
    description: >-
      A local business found by the Local businesses search. Search businesses
      by category and location, then convert them into leads with a verified
      email in a lead list or a campaign.
    x-group: Local Business
  - name: Creator
    description: >-
      A social media creator found by the Creators search. Search creators by
      platform, niche, audience and location, then convert them into leads with
      their email.
    x-group: Creator
  - name: APIKey
    description: API Key
    x-group: API Key
  - name: AccountCampaignMapping
    description: Account Campaign Mapping
    x-group: Account Campaign Mapping
  - name: Lead
    description: A lead entity representing an individual lead
    x-group: Lead
  - name: BackgroundJob
    description: A background job that can be used to perform long-running tasks
    x-group: Background Job
  - name: CustomTag
    description: >-
      A custom tag for organizing and categorizing accounts and campaigns. You
      can use them as filters in apis that list accounts and campaigns.
    x-group: Custom Tag
  - name: CustomTagMapping
    description: >-
      This entity represents a tag being assigned to a specific campaign or
      email account. When an email account is assigned a tag, a new custom tag
      mapping entry is created, which connects the tag (`tag_id` field) with the
      email account (`resource_id` field). You can use it to see which tag si
      connected to which resource.
    x-group: Custom Tag Mapping
  - name: BlockListEntry
    description: A blocked email or domain
    x-group: Block List Entry
  - name: LeadLabel
    description: A custom label for categorizing and managing leads
    x-group: Lead Label
  - name: Workspace
    description: A workspace entity representing a workspace
    x-group: Workspace
  - name: Workflow
    description: >-
      Defines an automation workflow with its configuration, status, and
      associated meta data.
    x-group: Workflow
  - name: SuperSearchEnrichment
    description: >-
      An enrichment can take different forms, such as email enrichment or
      LinkedIn enrichment. Leads may be imported from SuperSearch using the
      dedicated endpoint, or enriched directly within a list or campaign by
      attaching an enrichment to it.
    x-group: SuperSearch Enrichment
  - name: WorkspaceGroupMember
    description: >-
      A member of a workspace group. You can use the endpoints within this
      entity to manage the members of a workspace group.
    x-group: Workspace Group Member
  - name: WorkspaceMember
    description: A member of a workspace with associated user details
    x-group: Workspace Member
  - name: CampaignSubsequence
    description: A subsequence entity representing a follow-up sequence
    x-group: Campaign Subsequence
  - name: AuditLog
    description: Audit log records for tracking system activities
    x-group: Audit Log
  - name: AISalesAgent
    description: >-
      An AI Sales Development Representative that autonomously manages outreach
      campaigns
    x-group: AI Sales Agent
  - name: Webhook
    description: A webhook subscription for receiving event notifications
    x-group: Webhook
  - name: WebhookEvent
    description: A webhook event that was sent or attempted to be sent
    x-group: Webhook Event
  - name: DFYEmailAccountOrder
    description: A Done-For-You email account order
    x-group: DFY Email Account Order
  - name: DomainForwarding
    description: Web forwarding configuration for a domain ordered through Instantly
    x-group: Domain Forwarding
  - name: CustomPromptTemplate
    description: Custom prompt templates for creating custom prompts
    x-group: Custom Prompt Template
  - name: SalesFlow
    description: >-
      Manages how sales users view and interact with campaign and lead lists
      within the sales flow.
    x-group: Sales Flow
  - name: EmailTemplate
    description: A campaign email template
    x-group: Email Template
  - name: WorkspaceBilling
    description: Workspace Billing
    x-group: Workspace Billing
  - name: CRMActions
    description: CRM related actions
    x-group: CRM Actions
  - name: SubscriberGroup
    description: >-
      A group of email marketing subscribers. Optional fields with no value are
      left out of responses. Lists page with `starting_after`: pass the previous
      page's `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Subscriber Group'
  - name: SubscriberGroupImport
    description: >-
      A CSV import into a subscriber group. Emails already in the group are
      skipped, not updated. Optional fields with no value are left out of
      responses. Lists page with `starting_after`: pass the previous page's
      `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Subscriber Group Import'
  - name: Subscriber
    description: >-
      An individual contact within a subscriber group. Optional fields with no
      value are left out of responses. Lists page with `starting_after`: pass
      the previous page's `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Subscriber'
  - name: Segment
    description: >-
      A saved set of rules that selects contacts. Membership is worked out each
      time the segment is used. Optional fields with no value are left out of
      responses. Lists page with `cursor`: pass the previous page's
      `next_cursor` until there is none.
    x-group: 'Inbound & Lifecycle: Segment'
  - name: Broadcast
    description: >-
      An email marketing broadcast campaign. Optional fields with no value are
      left out of responses. Lists page with `starting_after`: pass the previous
      page's `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Broadcast'
  - name: Domain
    description: >-
      An email sending domain. Optional fields with no value are left out of
      responses. Lists page with `starting_after`: pass the previous page's
      `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Domain'
  - name: Journey
    description: >-
      A customer journey, triggered by an event or by membership of a segment.
      Optional fields with no value are left out of responses. Lists page with
      `starting_after`: pass the previous page's `next_starting_after` until
      there is none. Step contacts page with `cursor` and `next_cursor` instead.
    x-group: 'Inbound & Lifecycle: Journey'
  - name: EventCatalogEntry
    description: >-
      An event type seen in this workspace, which journey triggers and
      conversions can use. Optional fields with no value are left out of
      responses. Lists page with `starting_after`: pass the previous page's
      `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Event Catalog Entry'
  - name: Template
    description: >-
      An email marketing template. Optional fields with no value are left out of
      responses. Lists page with `starting_after`: pass the previous page's
      `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Template'
  - name: TemplateAsset
    description: >-
      An image or file uploaded for use in email templates. Optional fields with
      no value are left out of responses. Lists page with `starting_after`: pass
      the previous page's `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Template Asset'
  - name: EmailMetrics
    description: >-
      Aggregated email marketing metrics including totals, time-series data, and
      metadata.
    x-group: 'Inbound & Lifecycle: Email Metrics'
  - name: Conversion
    description: >-
      A conversion event received for a person, credited to the emails they got
      before it.
    x-group: 'Inbound & Lifecycle: Conversion'
  - name: EngageItem
    description: >-
      A unified Engage item representing a campaign, AI agent, automation
      workflow, broadcast, or journey.
    x-group: Engage Item
paths:
  /api/v2/email-marketing/journeys/{id}:
    patch:
      tags:
        - Journey
      summary: Update a customer journey
      description: >-
        Updates a journey name or its draft design. A design sent for an active
        journey is refused with 409: pause it first. A paused journey takes any
        design, goal included; it applies on the next activation. The design
        replaces the whole draft.



        Requires one of the following scopes: `email_marketing_journeys:update`,
        `email_marketing_journeys:all`, `all:update`, `all:all`
      operationId: updateJourney
      parameters:
        - schema:
            type: string
            format: uuid
            example: 01234567-89ab-cdef-0123-456789abcdef
          example: 01234567-89ab-cdef-0123-456789abcdef
          in: path
          name: id
          required: true
          description: The ID of the customer journey
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                revision:
                  type: integer
                  minimum: 1
                  description: The last revision observed by the caller
                  example: 1
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: Journey name.
                  example: Welcome journey
                draft_design:
                  type: object
                  properties:
                    trigger:
                      type: object
                      description: What enrols people. Required to activate.
                      properties:
                        type:
                          type: string
                          enum:
                            - event
                            - segment
                          description: >-
                            `event` enrols on a matching event; `segment` enrols
                            the members of `segment_id`. A draft may omit it for
                            an event trigger, but activation requires it.
                          example: event
                        source:
                          type: string
                          enum:
                            - instantly
                            - api
                            - calendly
                            - typeform
                            - shopify
                            - woocommerce
                            - wix
                            - jotform
                            - intercom
                            - pipedrive
                            - salesforce
                            - hubspot
                            - highlevel
                            - leadconnector
                            - zoho_crm
                            - attio
                          description: >-
                            Event triggers only. Where the trigger event comes
                            from: `api` for events you send, `instantly` for
                            Instantly events, or a connected app.
                          example: instantly
                        event_name:
                          type: string
                          maxLength: 60
                          description: Event triggers only. The event that enrols a person.
                          example: form.submitted
                        segment_id:
                          type: string
                          maxLength: 128
                          description: Segment triggers only. Required to activate.
                          example: 01a20d6a-b926-792a-9ea6-49ff701cb2a0
                        entry_mode:
                          type: string
                          enum:
                            - ongoing
                            - at_activation
                          description: >-
                            Segment triggers only. `ongoing` also enrols people
                            who match later; `at_activation` only those matching
                            when the journey is activated. Required to activate.
                          example: ongoing
                        conditions:
                          type: object
                          description: >-
                            Entry conditions. The triggering event only enrols
                            someone when they match; a person who does not match
                            may still enter on a later matching event.
                          properties:
                            evaluator_version:
                              type: integer
                              description: >-
                                Evaluator the block is compiled for. Optional:
                                the API sets it from the clauses. A value other
                                than `1`, `2` or `3` is rejected wherever the
                                conditions are fully validated: on save for a
                                broadcast goal, at activation for a journey.
                              example: 1
                            groups:
                              type: array
                              maxItems: 5
                              description: >-
                                Condition groups. The block matches when any
                                group matches.
                              items:
                                type: object
                                properties:
                                  clauses:
                                    type: array
                                    maxItems: 5
                                    description: >-
                                      Clauses of the group. The group matches
                                      when every clause matches.
                                    items:
                                      type: object
                                      properties:
                                        operand:
                                          type: object
                                          description: >-
                                            What the clause reads. `subscriber` with
                                            field `email`, `first_name` or
                                            `last_name` reads a built-in field,
                                            `subscriber` with field
                                            `custom_attribute` reads the attribute
                                            named by `key`, and `event` with field
                                            `property` reads the trigger event
                                            property named by `key`. `event_history`
                                            with field `count` reads how many times
                                            the person has performed the event named
                                            by `source` and `event_name`, and
                                            compares it as a whole number with
                                            `equals`, `not_equals`, `greater_than`
                                            or `less_than`. Field `last_at` reads
                                            when the person last performed it and
                                            takes `more_than_days_ago` (0-365) or
                                            `less_than_days_ago` (1-365) with a
                                            whole number of days; a person who never
                                            performed the event matches neither.
                                          properties:
                                            namespace:
                                              type: string
                                              maxLength: 32
                                              description: >-
                                                One of `subscriber`, `event` or
                                                `event_history`
                                              example: subscriber
                                            field:
                                              type: string
                                              maxLength: 64
                                              description: Field within the namespace
                                              example: custom_attribute
                                            key:
                                              type: string
                                              maxLength: 100
                                              description: Custom attribute or event property name
                                              example: plan
                                            source:
                                              type: string
                                              maxLength: 32
                                              description: >-
                                                Source of the event. `event_history`
                                                only
                                              example: instantly
                                            event_name:
                                              type: string
                                              maxLength: 60
                                              description: Name of the event. `event_history` only
                                              example: email_account_connected
                                          propertyNames:
                                            enum:
                                              - namespace
                                              - field
                                              - key
                                              - source
                                              - event_name
                                          additionalProperties: false
                                        operator:
                                          type: string
                                          maxLength: 32
                                          description: >-
                                            One of `equals`, `not_equals`,
                                            `contains`, `not_contains`,
                                            `greater_than`, `less_than`, `exists`,
                                            `not_exists`, `more_than_days_ago` or
                                            `less_than_days_ago`
                                          example: equals
                                        value:
                                          type:
                                            - string
                                            - number
                                            - boolean
                                          maxLength: 256
                                          description: >-
                                            Comparison value. Omitted by `exists`
                                            and `not_exists`
                                          example: enterprise
                                      propertyNames:
                                        enum:
                                          - operand
                                          - operator
                                          - value
                                      additionalProperties: false
                                required:
                                  - clauses
                                propertyNames:
                                  enum:
                                    - clauses
                                additionalProperties: false
                          propertyNames:
                            enum:
                              - evaluator_version
                              - groups
                          additionalProperties: false
                      propertyNames:
                        enum:
                          - type
                          - source
                          - event_name
                          - segment_id
                          - entry_mode
                          - conditions
                      additionalProperties: false
                      if:
                        properties:
                          type:
                            enum:
                              - segment
                        required:
                          - type
                      then:
                        not:
                          anyOf:
                            - required:
                                - source
                            - required:
                                - event_name
                      else:
                        not:
                          anyOf:
                            - required:
                                - segment_id
                            - required:
                                - entry_mode
                    sender:
                      type: object
                      description: Who the emails come from. Required to activate.
                      properties:
                        domain_id:
                          type: string
                          maxLength: 128
                          description: >-
                            The sending domain. Activation checks that it
                            exists, not that it is verified.
                          example: 01a20d6a-b926-792a-9ea6-4a00e6088c2e
                        from:
                          type: string
                          maxLength: 320
                          description: From address. Must be on the sending domain.
                          example: welcome@acme.com
                        reply_to:
                          type: string
                          maxLength: 320
                          description: Reply-to address. Optional.
                          example: support@acme.com
                      propertyNames:
                        enum:
                          - domain_id
                          - from
                          - reply_to
                      additionalProperties: false
                    goal:
                      type: object
                      properties:
                        source:
                          type: string
                          enum:
                            - instantly
                            - api
                            - calendly
                            - typeform
                            - shopify
                            - woocommerce
                            - wix
                            - jotform
                            - intercom
                            - pipedrive
                            - salesforce
                            - hubspot
                            - highlevel
                            - leadconnector
                            - zoho_crm
                            - attio
                          description: Where the goal event comes from.
                          example: api
                        event_name:
                          type: string
                          maxLength: 60
                          description: The event that counts as the goal.
                          example: purchase.completed
                        window_days:
                          type:
                            - number
                            - 'null'
                          not:
                            enum:
                              - null
                          description: >-
                            Days during which the event counts. Drafts accept
                            any number; activation requires a whole number from
                            1 to 365. Null is rejected.
                          example: 30
                        conditions:
                          type: object
                          description: >-
                            Conditions evaluated against the goal event and
                            subscriber at match time.
                          properties:
                            evaluator_version:
                              type: integer
                              description: >-
                                Evaluator the block is compiled for. Optional:
                                the API sets it from the clauses. A value other
                                than `1`, `2` or `3` is rejected wherever the
                                conditions are fully validated: on save for a
                                broadcast goal, at activation for a journey.
                              example: 1
                            groups:
                              type: array
                              maxItems: 5
                              description: >-
                                Condition groups. The block matches when any
                                group matches.
                              items:
                                type: object
                                properties:
                                  clauses:
                                    type: array
                                    maxItems: 5
                                    description: >-
                                      Clauses of the group. The group matches
                                      when every clause matches.
                                    items:
                                      type: object
                                      properties:
                                        operand:
                                          type: object
                                          description: >-
                                            What the clause reads. `subscriber` with
                                            field `email`, `first_name` or
                                            `last_name` reads a built-in field,
                                            `subscriber` with field
                                            `custom_attribute` reads the attribute
                                            named by `key`, and `event` with field
                                            `property` reads the trigger event
                                            property named by `key`. `event_history`
                                            with field `count` reads how many times
                                            the person has performed the event named
                                            by `source` and `event_name`, and
                                            compares it as a whole number with
                                            `equals`, `not_equals`, `greater_than`
                                            or `less_than`. Field `last_at` reads
                                            when the person last performed it and
                                            takes `more_than_days_ago` (0-365) or
                                            `less_than_days_ago` (1-365) with a
                                            whole number of days; a person who never
                                            performed the event matches neither.
                                          properties:
                                            namespace:
                                              type: string
                                              maxLength: 32
                                              description: >-
                                                One of `subscriber`, `event` or
                                                `event_history`
                                              example: subscriber
                                            field:
                                              type: string
                                              maxLength: 64
                                              description: Field within the namespace
                                              example: custom_attribute
                                            key:
                                              type: string
                                              maxLength: 100
                                              description: Custom attribute or event property name
                                              example: plan
                                            source:
                                              type: string
                                              maxLength: 32
                                              description: >-
                                                Source of the event. `event_history`
                                                only
                                              example: instantly
                                            event_name:
                                              type: string
                                              maxLength: 60
                                              description: Name of the event. `event_history` only
                                              example: email_account_connected
                                          propertyNames:
                                            enum:
                                              - namespace
                                              - field
                                              - key
                                              - source
                                              - event_name
                                          additionalProperties: false
                                        operator:
                                          type: string
                                          maxLength: 32
                                          description: >-
                                            One of `equals`, `not_equals`,
                                            `contains`, `not_contains`,
                                            `greater_than`, `less_than`, `exists`,
                                            `not_exists`, `more_than_days_ago` or
                                            `less_than_days_ago`
                                          example: equals
                                        value:
                                          type:
                                            - string
                                            - number
                                            - boolean
                                          maxLength: 256
                                          description: >-
                                            Comparison value. Omitted by `exists`
                                            and `not_exists`
                                          example: enterprise
                                      propertyNames:
                                        enum:
                                          - operand
                                          - operator
                                          - value
                                      additionalProperties: false
                                required:
                                  - clauses
                                propertyNames:
                                  enum:
                                    - clauses
                                additionalProperties: false
                          propertyNames:
                            enum:
                              - evaluator_version
                              - groups
                          additionalProperties: false
                      propertyNames:
                        enum:
                          - source
                          - event_name
                          - window_days
                          - conditions
                      additionalProperties: false
                      description: >-
                        Optional passive success event. Draft fields may be
                        incomplete; activation validates the complete goal. It
                        can change on any activation, including after a pause:
                        each activated version counts its own goal.
                    re_entry:
                      type: object
                      description: >-
                        Whether one person can enter this journey more than
                        once. Omit for `once`. Sources whose events always
                        re-enter, such as store orders, enrol on every event and
                        ignore this.
                      properties:
                        mode:
                          type: string
                          enum:
                            - once
                            - every_time
                            - after_cooldown
                          description: >-
                            Re-entry policy. `once` enrols a person at most one
                            time, ever. `every_time` enrols them on every
                            matching event, even while an earlier run is still
                            in progress. `after_cooldown` enrols them again once
                            `cooldown_days` have passed since their previous
                            entry.
                          example: once
                        cooldown_days:
                          type:
                            - number
                            - 'null'
                          not:
                            enum:
                              - null
                          description: >-
                            Days since the person previously entered. Drafts
                            accept any number; activation requires a whole
                            number from 1 to 365 whenever it is set, and
                            requires it when `mode` is `after_cooldown`. Null is
                            rejected.
                          example: 30
                      propertyNames:
                        enum:
                          - mode
                          - cooldown_days
                      additionalProperties: false
                    exit_rules:
                      type: array
                      maxItems: 5
                      description: >-
                        Events that remove a person from the journey. When any
                        rule's event arrives after someone entered and its
                        conditions match, they leave the journey and no further
                        steps start for them. Rules can change on any activation
                        and then apply to everyone still in the journey, and
                        they keep applying while it is paused. Rules never block
                        entry. Omit or send an empty list for none. Drafts may
                        be incomplete; activation requires an event on every
                        rule and no two identical rules.
                      items:
                        type: object
                        properties:
                          source:
                            type: string
                            enum:
                              - instantly
                              - api
                              - calendly
                              - typeform
                              - shopify
                              - woocommerce
                              - wix
                              - jotform
                              - intercom
                              - pipedrive
                              - salesforce
                              - hubspot
                              - highlevel
                              - leadconnector
                              - zoho_crm
                              - attio
                            description: Where the exit event comes from.
                            example: instantly
                          event_name:
                            type: string
                            maxLength: 60
                            description: The event that removes the person.
                            example: subscription_started
                          conditions:
                            type: object
                            description: >-
                              Conditions evaluated against the exit event and
                              the subscriber once the event is applied.
                            properties:
                              evaluator_version:
                                type: integer
                                description: >-
                                  Evaluator the block is compiled for. Optional:
                                  the API sets it from the clauses. A value
                                  other than `1`, `2` or `3` is rejected
                                  wherever the conditions are fully validated:
                                  on save for a broadcast goal, at activation
                                  for a journey.
                                example: 1
                              groups:
                                type: array
                                maxItems: 5
                                description: >-
                                  Condition groups. The block matches when any
                                  group matches.
                                items:
                                  type: object
                                  properties:
                                    clauses:
                                      type: array
                                      maxItems: 5
                                      description: >-
                                        Clauses of the group. The group matches
                                        when every clause matches.
                                      items:
                                        type: object
                                        properties:
                                          operand:
                                            type: object
                                            description: >-
                                              What the clause reads. `subscriber` with
                                              field `email`, `first_name` or
                                              `last_name` reads a built-in field,
                                              `subscriber` with field
                                              `custom_attribute` reads the attribute
                                              named by `key`, and `event` with field
                                              `property` reads the trigger event
                                              property named by `key`. `event_history`
                                              with field `count` reads how many times
                                              the person has performed the event named
                                              by `source` and `event_name`, and
                                              compares it as a whole number with
                                              `equals`, `not_equals`, `greater_than`
                                              or `less_than`. Field `last_at` reads
                                              when the person last performed it and
                                              takes `more_than_days_ago` (0-365) or
                                              `less_than_days_ago` (1-365) with a
                                              whole number of days; a person who never
                                              performed the event matches neither.
                                            properties:
                                              namespace:
                                                type: string
                                                maxLength: 32
                                                description: >-
                                                  One of `subscriber`, `event` or
                                                  `event_history`
                                                example: subscriber
                                              field:
                                                type: string
                                                maxLength: 64
                                                description: Field within the namespace
                                                example: custom_attribute
                                              key:
                                                type: string
                                                maxLength: 100
                                                description: Custom attribute or event property name
                                                example: plan
                                              source:
                                                type: string
                                                maxLength: 32
                                                description: >-
                                                  Source of the event. `event_history`
                                                  only
                                                example: instantly
                                              event_name:
                                                type: string
                                                maxLength: 60
                                                description: Name of the event. `event_history` only
                                                example: email_account_connected
                                            propertyNames:
                                              enum:
                                                - namespace
                                                - field
                                                - key
                                                - source
                                                - event_name
                                            additionalProperties: false
                                          operator:
                                            type: string
                                            maxLength: 32
                                            description: >-
                                              One of `equals`, `not_equals`,
                                              `contains`, `not_contains`,
                                              `greater_than`, `less_than`, `exists`,
                                              `not_exists`, `more_than_days_ago` or
                                              `less_than_days_ago`
                                            example: equals
                                          value:
                                            type:
                                              - string
                                              - number
                                              - boolean
                                            maxLength: 256
                                            description: >-
                                              Comparison value. Omitted by `exists`
                                              and `not_exists`
                                            example: enterprise
                                        propertyNames:
                                          enum:
                                            - operand
                                            - operator
                                            - value
                                        additionalProperties: false
                                  required:
                                    - clauses
                                  propertyNames:
                                    enum:
                                      - clauses
                                  additionalProperties: false
                            propertyNames:
                              enum:
                                - evaluator_version
                                - groups
                            additionalProperties: false
                        propertyNames:
                          enum:
                            - source
                            - event_name
                            - conditions
                        additionalProperties: false
                    priority:
                      type: string
                      enum:
                        - high
                        - medium
                        - low
                        - none
                      description: >-
                        Frequency cap priority for every email step that sets
                        none. Omit for `medium`.
                      example: medium
                    steps:
                      type: array
                      maxItems: 101
                      description: >-
                        Ordered steps, up to 100 plus a closing go-to. A split
                        ends the list it belongs to; everything that runs after
                        the fork lives inside its branches. A go-to also ends
                        its list, continuing at its target so two branches can
                        share the steps after it.
                      items:
                        $ref: '#/components/schemas/journeyDraftStep'
                  propertyNames:
                    enum:
                      - trigger
                      - sender
                      - goal
                      - re_entry
                      - exit_rules
                      - priority
                      - steps
                  additionalProperties: false
                  description: >-
                    The new draft design. It replaces the whole draft, so send
                    every part you want to keep.
              required:
                - revision
              minProperties: 2
              additionalProperties: false
        required: true
      responses:
        '200':
          description: The requested Journey
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Journey'
        '400':
          description: >-
            The request is invalid. `message` names the field and the problem.
            `code` is `FST_ERR_VALIDATION` when the request does not match this
            schema and `VALIDATION_ERROR` when a value is refused after that. A
            request the resource's current state does not allow, such as pausing
            a broadcast that is not sending, has its own `code` named on that
            operation. `code` is absent on a few request-level checks.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  The request is invalid. `message` names the field and the
                  problem. `code` is `FST_ERR_VALIDATION` when the request does
                  not match this schema and `VALIDATION_ERROR` when a value is
                  refused after that. A request the resource's current state
                  does not allow, such as pausing a broadcast that is not
                  sending, has its own `code` named on that operation. `code` is
                  absent on a few request-level checks.
                properties:
                  statusCode:
                    type: number
                    example: 400
                  error:
                    type: string
                    example: Bad Request
                  message:
                    type: string
                    example: 'limit: must be at most 50'
                  code:
                    type: string
                    description: >-
                      Machine-readable error code. Branch on this, not on the
                      message.
                    example: VALIDATION_ERROR
        '401':
          description: >-
            This request is unauthorized (either the Authorization header is
            missing or invalid, or the API key has been revoked)
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 401
                    examples:
                      - 401
                    example: 401
                  error:
                    type: string
                    enum:
                      - Unauthorized
                    examples:
                      - Unauthorized
                    example: Unauthorized
                  message:
                    type: string
                    examples:
                      - Missing Authorization header
                    example: Missing Authorization header
                required:
                  - statusCode
                  - error
                  - message
        '402':
          description: >-
            This request cannot be fulfilled because the workspace does not have
            an active paid plan
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 402
                    examples:
                      - 402
                    example: 402
                  error:
                    type: string
                    enum:
                      - Payment Required
                    examples:
                      - Payment Required
                    example: Payment Required
                  message:
                    type: string
                    examples:
                      - Workspace does not have an active paid plan
                    example: Workspace does not have an active paid plan
                required:
                  - statusCode
                  - error
                  - message
        '403':
          description: >-
            The workspace may not perform this action, for example while it is
            suspended. A key without the required scope gets a 401.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  The workspace may not perform this action, for example while
                  it is suspended. A key without the required scope gets a 401.
                properties:
                  statusCode:
                    type: number
                    example: 403
                  error:
                    type: string
                    example: Forbidden
                  message:
                    type: string
                    example: >-
                      Workspace suspended due to a high bounce or spam complaint
                      rate. Please contact support.
                  code:
                    type: string
                    description: >-
                      Machine-readable error code. Branch on this, not on the
                      message.
                    example: WORKSPACE_SUSPENDED
        '404':
          description: The resource does not exist in this workspace.
          content:
            application/json:
              schema:
                type: object
                description: The resource does not exist in this workspace.
                properties:
                  statusCode:
                    type: number
                    example: 404
                  error:
                    type: string
                    example: Not Found
                  message:
                    type: string
                    example: Not found
                  code:
                    type: string
                    description: >-
                      Machine-readable error code. Branch on this, not on the
                      message.
                    example: NOT_FOUND
        '408':
          description: >-
            The request timed out. The outcome is unknown: a write may or may
            not have been applied. Read the resource back before retrying.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  The request timed out. The outcome is unknown: a write may or
                  may not have been applied. Read the resource back before
                  retrying.
                properties:
                  statusCode:
                    type: number
                    example: 408
                  error:
                    type: string
                    example: Request Timeout
                  message:
                    type: string
                    example: An internal error occurred
        '409':
          description: >-
            `revision` is stale: another change was saved since you read the
            journey. Get it again and retry. Or a design was sent for an active
            journey: pause it first.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  `revision` is stale: another change was saved since you read
                  the journey. Get it again and retry. Or a design was sent for
                  an active journey: pause it first.
                properties:
                  statusCode:
                    type: number
                    example: 409
                  error:
                    type: string
                    example: Conflict
                  message:
                    type: string
                    example: The resource has changed. Reload it and try again.
                  code:
                    type: string
                    description: >-
                      Machine-readable error code. Branch on this, not on the
                      message.
                    example: CONFLICT
        '429':
          description: >-
            You have exceeded the rate limit. Please check the rate limit docs
            for more information.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 429
                    examples:
                      - 429
                    example: 429
                  error:
                    type: string
                    enum:
                      - Too Many Requests
                    examples:
                      - Too Many Requests
                    example: Too Many Requests
                  message:
                    type: string
                    examples:
                      - Rate limit exceeded
                    example: Rate limit exceeded
                required:
                  - statusCode
                  - error
                  - message
        '500':
          description: >-
            An internal error occurred. The outcome is unknown: a write may or
            may not have been applied. Read the resource back before retrying.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  An internal error occurred. The outcome is unknown: a write
                  may or may not have been applied. Read the resource back
                  before retrying.
                properties:
                  statusCode:
                    type: number
                    example: 500
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An internal error occurred
components:
  schemas:
    journeyDraftStep:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 64
          description: >-
            Step ID, unique across the whole design, branches included. `end` is
            reserved. A duplicate or `end` is rejected when the design is saved.
          example: step-email
        type:
          type: string
          enum:
            - delay
            - email
            - split
            - tag
            - slack
            - go_to
          description: What the step does. Each type takes only its own fields.
          example: email
        target_step_id:
          type: string
          minLength: 1
          maxLength: 64
          description: >-
            Step a go-to continues at. It must be the last step of its list and
            target another step that is not a go-to, without creating a loop. A
            draft may omit it or name a step that no longer exists; activation
            requires an existing one. Go-to steps only.
          example: step-email
        name:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            Optional display label for the builder and analytics, 1-100
            characters after trimming. Omit it for no name; a blank or `null`
            name is rejected. Sending and routing ignore it. Not allowed on
            go-to steps, which are labelled from their target.
          example: Welcome email
        delay:
          type: object
          description: >-
            How long the step waits. Without `mode` it waits a fixed `value` of
            `unit`, at most 30 days. With `mode` `until_date` it waits until the
            date read from `date`, moved by `offset`, and the wait follows the
            date while the person waits. Activation also requires that no path
            ends with a delay step and that the fixed delays along any path add
            up to at most 365 days. Delay steps only.
          properties:
            mode:
              type: string
              enum:
                - until_date
              description: >-
                Omit for a fixed delay. `until_date` waits until a date on the
                person or the trigger event.
              example: until_date
            value:
              type:
                - number
                - 'null'
              not:
                enum:
                  - null
              description: >-
                How many `unit`s a fixed delay waits. Activation requires a
                whole number of at least 1.
              example: 1
            unit:
              type: string
              enum:
                - minutes
                - hours
                - days
              description: The unit of `value`.
              example: hours
            date:
              type: object
              description: >-
                `subscriber` with field `custom_attribute` reads the person
                attribute named by `key`; `event` with field `property` reads
                the trigger event property named by `key`, which only an
                event-triggered journey can activate with. Omit it until a date
                is chosen: when present, `namespace`, `field` and `key` are all
                required.
              properties:
                namespace:
                  type: string
                  enum:
                    - subscriber
                    - event
                  description: >-
                    Where the date comes from: the person (`subscriber`) or the
                    trigger event (`event`).
                  example: subscriber
                field:
                  type: string
                  enum:
                    - custom_attribute
                    - property
                  description: >-
                    `custom_attribute` with `subscriber`, `property` with
                    `event`.
                  example: custom_attribute
                key:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: The attribute or event property that holds the date.
                  example: free_trial_ends_at
              required:
                - namespace
                - field
                - key
              propertyNames:
                enum:
                  - namespace
                  - field
                  - key
              additionalProperties: false
            offset:
              type: object
              description: >-
                How far from the date the wait ends. Omit it to wait until the
                date itself. A whole number of at least 1, at most 365 days in
                total. Date delays only.
              properties:
                direction:
                  type: string
                  enum:
                    - before
                    - after
                  description: Before or after the date.
                  example: before
                value:
                  type:
                    - number
                    - 'null'
                  not:
                    enum:
                      - null
                  description: How many `unit`s from the date.
                  example: 3
                unit:
                  type: string
                  enum:
                    - minutes
                    - hours
                    - days
                  description: The unit of `value`.
                  example: hours
              propertyNames:
                enum:
                  - direction
                  - value
                  - unit
              additionalProperties: false
            time_of_day:
              type: object
              description: >-
                Wall-clock time the wait ends at on the computed day. Omit it to
                keep the time the date carries. Allowed with no offset or an
                offset in days. Date delays only.
              properties:
                time:
                  type: string
                  maxLength: 5
                  description: 24-hour `HH:MM`, from `00:00` to `23:59`.
                  example: '09:00'
                timezone:
                  type: string
                  maxLength: 64
                  description: IANA timezone name. UTC offsets are not accepted.
                  example: Europe/Zurich
              propertyNames:
                enum:
                  - time
                  - timezone
              additionalProperties: false
            if_missing:
              type: string
              enum:
                - continue
                - exit
              description: >-
                What happens when the person has no usable date: `continue` to
                the next step or `exit` the journey. Required at activation.
                Date delays only.
              example: exit
            if_passed:
              type: string
              enum:
                - continue
                - exit
              description: >-
                What happens when the computed time is already past when the
                person reaches the step, or the date moves into the past while
                they wait: `continue` to the next step or `exit` the journey.
                Required at activation. Date delays only.
              example: continue
          propertyNames:
            enum:
              - mode
              - value
              - unit
              - date
              - offset
              - time_of_day
              - if_missing
              - if_passed
          additionalProperties: false
        email:
          type: object
          description: >-
            The email the step sends. Email steps only. A draft may leave it
            incomplete.
          properties:
            template_id:
              type: string
              maxLength: 128
              description: The template the email sends.
              example: 01a20d6a-b926-792a-9ea6-49fe9e72098b
            subject:
              type: string
              maxLength: 100
              description: Subject line. Required to activate.
              example: Welcome!
            from_name:
              type: string
              minLength: 1
              maxLength: 100
              pattern: ^(?=[\s\S]*\S)(?![\s\S]*=\?)[^<>"\\\u0000-\u001F\u007F]+$
              description: >-
                Display name for this email's From header. Omit it to use the
                journey sender name. Cannot be blank or contain quotes,
                backslashes, angle brackets, control characters or "=?".
              example: Acme Sales
            preview_text:
              type: string
              maxLength: 150
              description: >-
                Inbox preview text shown after the subject. Supports the same
                variables as the subject; activation rejects invalid variable
                syntax.
              example: Your first steps start here
          propertyNames:
            enum:
              - template_id
              - subject
              - from_name
              - preview_text
          additionalProperties: false
        tag:
          type: object
          description: >-
            Subscriber tags the step applies or removes as a run passes through
            it. Tag steps only. A draft may leave this incomplete; activation
            requires a direction and at least one tag.
          properties:
            action:
              type: string
              enum:
                - add
                - remove
              description: >-
                Whether the step adds the tags to the subscriber or takes them
                off.
              example: add
            tag_ids:
              type: array
              maxItems: 10
              items:
                type: string
                maxLength: 128
                example: 0198a123-4567-7890-abcd-ef0123456789
              description: >-
                Subscriber tag IDs the step applies or removes. Repeating a tag
                the subscriber already has, or removing one they do not have,
                changes nothing.
          propertyNames:
            enum:
              - action
              - tag_ids
          additionalProperties: false
        slack:
          type: object
          description: >-
            Slack message the step posts as a run passes through it. Slack steps
            only. A draft may leave this incomplete; activation requires a
            connection, a channel and a message with valid merge tags. A failed
            post is counted and the run continues.
          properties:
            app_connection_id:
              type: string
              maxLength: 128
              description: >-
                Slack app connection of this workspace the message is posted
                through.
              example: 0198a123-4567-7890-abcd-ef0123456789
            channel_id:
              type: string
              maxLength: 128
              description: >-
                Slack channel ID the message is posted to. The bot joins the
                channel if it can.
              example: C0123ABCD
            channel_name:
              type: string
              maxLength: 128
              description: Display-only copy of the channel name. Never used to send.
              example: general
            message:
              type: string
              maxLength: 3000
              description: >-
                Slack mrkdwn text with merge tags: `{{email}}`,
                `{{first_name}}`, `{{last_name}}`, `{{attributes.<key>}}` and,
                for event-triggered journeys, `{{event.<key>}}` from the trigger
                event. Write `{{attributes.[my key]}}` for keys that are not
                plain identifiers. Missing values render empty.
              example: >-
                New signup: {{first_name}} {{last_name}} ({{email}}) on plan
                {{attributes.plan}}
          propertyNames:
            enum:
              - app_connection_id
              - channel_id
              - channel_name
              - message
          additionalProperties: false
        conditions:
          type: object
          description: >-
            Conditions checked when the step runs. A run that does not match
            leaves the journey at this step instead of continuing. Email steps
            only.
          properties:
            evaluator_version:
              type: integer
              description: >-
                Evaluator the block is compiled for. Optional: the API sets it
                from the clauses. A value other than `1`, `2` or `3` is rejected
                wherever the conditions are fully validated: on save for a
                broadcast goal, at activation for a journey.
              example: 1
            groups:
              type: array
              maxItems: 5
              description: Condition groups. The block matches when any group matches.
              items:
                type: object
                properties:
                  clauses:
                    type: array
                    maxItems: 5
                    description: >-
                      Clauses of the group. The group matches when every clause
                      matches.
                    items:
                      type: object
                      properties:
                        operand:
                          type: object
                          description: >-
                            What the clause reads. `subscriber` with field
                            `email`, `first_name` or `last_name` reads a
                            built-in field, `subscriber` with field
                            `custom_attribute` reads the attribute named by
                            `key`, and `event` with field `property` reads the
                            trigger event property named by `key`.
                            `event_history` with field `count` reads how many
                            times the person has performed the event named by
                            `source` and `event_name`, and compares it as a
                            whole number with `equals`, `not_equals`,
                            `greater_than` or `less_than`. Field `last_at` reads
                            when the person last performed it and takes
                            `more_than_days_ago` (0-365) or `less_than_days_ago`
                            (1-365) with a whole number of days; a person who
                            never performed the event matches neither.
                          properties:
                            namespace:
                              type: string
                              maxLength: 32
                              description: One of `subscriber`, `event` or `event_history`
                              example: subscriber
                            field:
                              type: string
                              maxLength: 64
                              description: Field within the namespace
                              example: custom_attribute
                            key:
                              type: string
                              maxLength: 100
                              description: Custom attribute or event property name
                              example: plan
                            source:
                              type: string
                              maxLength: 32
                              description: Source of the event. `event_history` only
                              example: instantly
                            event_name:
                              type: string
                              maxLength: 60
                              description: Name of the event. `event_history` only
                              example: email_account_connected
                          propertyNames:
                            enum:
                              - namespace
                              - field
                              - key
                              - source
                              - event_name
                          additionalProperties: false
                        operator:
                          type: string
                          maxLength: 32
                          description: >-
                            One of `equals`, `not_equals`, `contains`,
                            `not_contains`, `greater_than`, `less_than`,
                            `exists`, `not_exists`, `more_than_days_ago` or
                            `less_than_days_ago`
                          example: equals
                        value:
                          type:
                            - string
                            - number
                            - boolean
                          maxLength: 256
                          description: >-
                            Comparison value. Omitted by `exists` and
                            `not_exists`
                          example: enterprise
                      propertyNames:
                        enum:
                          - operand
                          - operator
                          - value
                      additionalProperties: false
                required:
                  - clauses
                propertyNames:
                  enum:
                    - clauses
                additionalProperties: false
          propertyNames:
            enum:
              - evaluator_version
              - groups
          additionalProperties: false
        send_window:
          type: object
          description: >-
            When this email may send. Someone who reaches the step inside the
            window is sent the email at once; anyone else waits for the next
            opening. The email still sends once per journey entry. Omit to send
            anytime. Drafts may be incomplete; activation requires every field.
            Email steps only.
          properties:
            days:
              type: array
              maxItems: 7
              items:
                type: string
                enum:
                  - monday
                  - tuesday
                  - wednesday
                  - thursday
                  - friday
                  - saturday
                  - sunday
                example: monday
              description: >-
                Weekdays the window opens on. Activation requires one to seven
                different days.
              example:
                - monday
                - thursday
            start_time:
              type: string
              maxLength: 5
              description: >-
                Opening time as 24-hour `HH:MM`, from `00:00` to `23:59`.
                Inclusive.
              example: '16:00'
            end_time:
              type: string
              maxLength: 5
              description: >-
                Closing time as 24-hour `HH:MM`, or `24:00` for midnight.
                Exclusive, and later than `start_time` on the same day.
              example: '20:00'
            timezone:
              type: string
              maxLength: 64
              description: >-
                IANA timezone name shared by everyone reaching the step. UTC
                offsets are not accepted.
              example: Europe/Zurich
          propertyNames:
            enum:
              - days
              - start_time
              - end_time
              - timezone
          additionalProperties: false
        goal:
          type: object
          properties:
            source:
              type: string
              enum:
                - instantly
                - api
                - calendly
                - typeform
                - shopify
                - woocommerce
                - wix
                - jotform
                - intercom
                - pipedrive
                - salesforce
                - hubspot
                - highlevel
                - leadconnector
                - zoho_crm
                - attio
              description: Where the goal event comes from.
              example: api
            event_name:
              type: string
              maxLength: 60
              description: The event that counts as the goal.
              example: purchase.completed
            window_days:
              type:
                - number
                - 'null'
              not:
                enum:
                  - null
              description: >-
                Days during which the event counts. Drafts accept any number;
                activation requires a whole number from 1 to 365. Null is
                rejected.
              example: 30
            conditions:
              type: object
              description: >-
                Conditions evaluated against the goal event and subscriber at
                match time.
              properties:
                evaluator_version:
                  type: integer
                  description: >-
                    Evaluator the block is compiled for. Optional: the API sets
                    it from the clauses. A value other than `1`, `2` or `3` is
                    rejected wherever the conditions are fully validated: on
                    save for a broadcast goal, at activation for a journey.
                  example: 1
                groups:
                  type: array
                  maxItems: 5
                  description: Condition groups. The block matches when any group matches.
                  items:
                    type: object
                    properties:
                      clauses:
                        type: array
                        maxItems: 5
                        description: >-
                          Clauses of the group. The group matches when every
                          clause matches.
                        items:
                          type: object
                          properties:
                            operand:
                              type: object
                              description: >-
                                What the clause reads. `subscriber` with field
                                `email`, `first_name` or `last_name` reads a
                                built-in field, `subscriber` with field
                                `custom_attribute` reads the attribute named by
                                `key`, and `event` with field `property` reads
                                the trigger event property named by `key`.
                                `event_history` with field `count` reads how
                                many times the person has performed the event
                                named by `source` and `event_name`, and compares
                                it as a whole number with `equals`,
                                `not_equals`, `greater_than` or `less_than`.
                                Field `last_at` reads when the person last
                                performed it and takes `more_than_days_ago`
                                (0-365) or `less_than_days_ago` (1-365) with a
                                whole number of days; a person who never
                                performed the event matches neither.
                              properties:
                                namespace:
                                  type: string
                                  maxLength: 32
                                  description: >-
                                    One of `subscriber`, `event` or
                                    `event_history`
                                  example: subscriber
                                field:
                                  type: string
                                  maxLength: 64
                                  description: Field within the namespace
                                  example: custom_attribute
                                key:
                                  type: string
                                  maxLength: 100
                                  description: Custom attribute or event property name
                                  example: plan
                                source:
                                  type: string
                                  maxLength: 32
                                  description: Source of the event. `event_history` only
                                  example: instantly
                                event_name:
                                  type: string
                                  maxLength: 60
                                  description: Name of the event. `event_history` only
                                  example: email_account_connected
                              propertyNames:
                                enum:
                                  - namespace
                                  - field
                                  - key
                                  - source
                                  - event_name
                              additionalProperties: false
                            operator:
                              type: string
                              maxLength: 32
                              description: >-
                                One of `equals`, `not_equals`, `contains`,
                                `not_contains`, `greater_than`, `less_than`,
                                `exists`, `not_exists`, `more_than_days_ago` or
                                `less_than_days_ago`
                              example: equals
                            value:
                              type:
                                - string
                                - number
                                - boolean
                              maxLength: 256
                              description: >-
                                Comparison value. Omitted by `exists` and
                                `not_exists`
                              example: enterprise
                          propertyNames:
                            enum:
                              - operand
                              - operator
                              - value
                          additionalProperties: false
                    required:
                      - clauses
                    propertyNames:
                      enum:
                        - clauses
                    additionalProperties: false
              propertyNames:
                enum:
                  - evaluator_version
                  - groups
              additionalProperties: false
          propertyNames:
            enum:
              - source
              - event_name
              - window_days
              - conditions
          additionalProperties: false
          description: >-
            Optional conversion goal for this email. Counts recipients whose
            goal event arrives within `window_days` of this email being sent to
            them. It only measures: it never delays, stops, or changes the
            journey. Independent of the journey goal, and may change between
            activated versions. Omit for no goal; drafts may be incomplete.
            Email steps only.
        utm_enabled:
          type: boolean
          description: >-
            Whether this email's links get the `utm_params` added at activation.
            Tracking applies only when this is `true` and at least one param
            remains; `utm_params` is kept while it is off. Email steps only.
          example: true
        utm_params:
          type: array
          maxItems: 15
          items:
            type: object
            properties:
              key:
                type: string
                maxLength: 50
                description: Query parameter name added to each link, at most 50 characters
                example: utm_source
              value:
                type: string
                maxLength: 200
                description: Query parameter value, at most 200 characters
                example: newsletter
            required:
              - key
              - value
            additionalProperties: false
            propertyNames:
              enum:
                - key
                - value
          description: >-
            Ordered campaign-tracking parameters for this email's links. Keys
            and values are trimmed, rows with an empty key are dropped, and a
            repeated key keeps its last value. A value already written into a
            link wins. Email steps only.
        priority:
          type: string
          enum:
            - high
            - medium
            - low
            - none
          description: >-
            Frequency cap priority for this email, overriding the journey
            `priority`. When the workspace has frequency caps enabled and a
            person's emails in the last 24 hours or 7 days reach this priority's
            limit, the email is skipped and the person moves on to the next
            step. `none` is never capped. Email steps only.
          example: medium
        split_type:
          type: string
          enum:
            - condition
            - attribute
            - ab_test
          description: >-
            Split variant. `condition` forks the journey into two to ten
            branches; the first whose conditions match wins. `attribute` forks
            it into one branch per value of `operand`, plus a default branch.
            `ab_test` deals every run into one of two to five versions by
            `percent`.
          example: condition
        operand:
          type: object
          description: >-
            The attribute every branch value is compared against. Attribute
            splits only. Text is compared without regard to capitalization and
            values are never coerced, so a missing attribute or a different type
            takes the default branch.
          properties:
            namespace:
              type: string
              maxLength: 32
              description: Either `subscriber` or `event`
              example: subscriber
            field:
              type: string
              maxLength: 64
              description: Field within the namespace
              example: custom_attribute
            key:
              type: string
              maxLength: 100
              description: Custom attribute or event property name
              example: plan
          propertyNames:
            enum:
              - namespace
              - field
              - key
          additionalProperties: false
        branches:
          type: array
          maxItems: 10
          description: >-
            The paths out of a split. A condition split activates with two to
            ten: every branch except the last carries the conditions people must
            match, checked in order with the first match winning, and the last
            is the default everyone else takes. An attribute split activates
            with two to ten: every branch except the last carries the `value`
            that routes someone down it, and the last is the default. An A/B
            test activates with two to five, each carrying the `percent` of runs
            dealt into it.
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
                maxLength: 64
                description: Branch ID, unique within its split.
                example: 'yes'
              name:
                type: string
                minLength: 1
                maxLength: 100
                description: >-
                  Optional display label for this path, 1-100 characters after
                  trimming. Omit it for no name.
                example: Paid plan
              conditions:
                type: object
                description: >-
                  Conditions someone must match to take this branch. The default
                  branch carries none, so a run that matches nothing is routed
                  rather than exited. Condition splits only.
                properties:
                  evaluator_version:
                    type: integer
                    description: >-
                      Evaluator the block is compiled for. Optional: the API
                      sets it from the clauses. A value other than `1`, `2` or
                      `3` is rejected wherever the conditions are fully
                      validated: on save for a broadcast goal, at activation for
                      a journey.
                    example: 1
                  groups:
                    type: array
                    maxItems: 5
                    description: >-
                      Condition groups. The block matches when any group
                      matches.
                    items:
                      type: object
                      properties:
                        clauses:
                          type: array
                          maxItems: 5
                          description: >-
                            Clauses of the group. The group matches when every
                            clause matches.
                          items:
                            type: object
                            properties:
                              operand:
                                type: object
                                description: >-
                                  What the clause reads. `subscriber` with field
                                  `email`, `first_name` or `last_name` reads a
                                  built-in field, `subscriber` with field
                                  `custom_attribute` reads the attribute named
                                  by `key`, and `event` with field `property`
                                  reads the trigger event property named by
                                  `key`. `event_history` with field `count`
                                  reads how many times the person has performed
                                  the event named by `source` and `event_name`,
                                  and compares it as a whole number with
                                  `equals`, `not_equals`, `greater_than` or
                                  `less_than`. Field `last_at` reads when the
                                  person last performed it and takes
                                  `more_than_days_ago` (0-365) or
                                  `less_than_days_ago` (1-365) with a whole
                                  number of days; a person who never performed
                                  the event matches neither.
                                properties:
                                  namespace:
                                    type: string
                                    maxLength: 32
                                    description: >-
                                      One of `subscriber`, `event` or
                                      `event_history`
                                    example: subscriber
                                  field:
                                    type: string
                                    maxLength: 64
                                    description: Field within the namespace
                                    example: custom_attribute
                                  key:
                                    type: string
                                    maxLength: 100
                                    description: Custom attribute or event property name
                                    example: plan
                                  source:
                                    type: string
                                    maxLength: 32
                                    description: Source of the event. `event_history` only
                                    example: instantly
                                  event_name:
                                    type: string
                                    maxLength: 60
                                    description: Name of the event. `event_history` only
                                    example: email_account_connected
                                propertyNames:
                                  enum:
                                    - namespace
                                    - field
                                    - key
                                    - source
                                    - event_name
                                additionalProperties: false
                              operator:
                                type: string
                                maxLength: 32
                                description: >-
                                  One of `equals`, `not_equals`, `contains`,
                                  `not_contains`, `greater_than`, `less_than`,
                                  `exists`, `not_exists`, `more_than_days_ago`
                                  or `less_than_days_ago`
                                example: equals
                              value:
                                type:
                                  - string
                                  - number
                                  - boolean
                                maxLength: 256
                                description: >-
                                  Comparison value. Omitted by `exists` and
                                  `not_exists`
                                example: enterprise
                            propertyNames:
                              enum:
                                - operand
                                - operator
                                - value
                            additionalProperties: false
                      required:
                        - clauses
                      propertyNames:
                        enum:
                          - clauses
                      additionalProperties: false
                propertyNames:
                  enum:
                    - evaluator_version
                    - groups
                additionalProperties: false
              value:
                type:
                  - string
                  - number
                  - boolean
                maxLength: 256
                description: >-
                  Value of the split `operand` that routes someone down this
                  branch. Every branch except the last carries one, and all of
                  them share a single type. Attribute splits only.
                example: enterprise
              percent:
                type: integer
                minimum: 1
                maximum: 99
                description: >-
                  Share of runs dealt into this branch. Every branch carries one
                  and they add up to exactly 100 at activation. Branch order
                  defines the ranges, so reordering versions changes who gets
                  what. A/B tests only.
                example: 50
              steps:
                type: array
                maxItems: 101
                description: >-
                  Steps that run on this branch, up to 100 plus a closing go-to.
                  An empty branch routes straight to the end of the journey.
                items:
                  $ref: '#/components/schemas/journeyDraftStep'
            required:
              - id
            propertyNames:
              enum:
                - id
                - name
                - conditions
                - value
                - percent
                - steps
            additionalProperties: false
      required:
        - id
        - type
      propertyNames:
        enum:
          - id
          - type
          - name
          - delay
          - email
          - tag
          - slack
          - conditions
          - send_window
          - goal
          - utm_enabled
          - utm_params
          - priority
          - split_type
          - operand
          - branches
          - target_step_id
      additionalProperties: false
      allOf:
        - if:
            type: object
            properties:
              type:
                enum:
                  - delay
            required:
              - type
          then:
            type: object
            not:
              type: object
              anyOf:
                - required:
                    - email
                - required:
                    - tag
                - required:
                    - slack
                - required:
                    - conditions
                - required:
                    - send_window
                - required:
                    - goal
                - required:
                    - utm_enabled
                - required:
                    - priority
                - required:
                    - utm_params
                - required:
                    - split_type
                - required:
                    - operand
                - required:
                    - branches
                - required:
                    - target_step_id
        - if:
            type: object
            properties:
              type:
                enum:
                  - email
            required:
              - type
          then:
            type: object
            not:
              type: object
              anyOf:
                - required:
                    - delay
                - required:
                    - tag
                - required:
                    - slack
                - required:
                    - split_type
                - required:
                    - operand
                - required:
                    - branches
                - required:
                    - target_step_id
        - if:
            type: object
            properties:
              type:
                enum:
                  - tag
            required:
              - type
          then:
            type: object
            not:
              type: object
              anyOf:
                - required:
                    - delay
                - required:
                    - email
                - required:
                    - slack
                - required:
                    - conditions
                - required:
                    - send_window
                - required:
                    - goal
                - required:
                    - utm_enabled
                - required:
                    - priority
                - required:
                    - utm_params
                - required:
                    - split_type
                - required:
                    - operand
                - required:
                    - branches
                - required:
                    - target_step_id
        - if:
            type: object
            properties:
              type:
                enum:
                  - slack
            required:
              - type
          then:
            type: object
            not:
              type: object
              anyOf:
                - required:
                    - delay
                - required:
                    - email
                - required:
                    - tag
                - required:
                    - conditions
                - required:
                    - send_window
                - required:
                    - goal
                - required:
                    - utm_enabled
                - required:
                    - priority
                - required:
                    - utm_params
                - required:
                    - split_type
                - required:
                    - operand
                - required:
                    - branches
                - required:
                    - target_step_id
        - if:
            type: object
            properties:
              type:
                enum:
                  - go_to
            required:
              - type
          then:
            type: object
            not:
              type: object
              anyOf:
                - required:
                    - name
                - required:
                    - delay
                - required:
                    - email
                - required:
                    - tag
                - required:
                    - slack
                - required:
                    - conditions
                - required:
                    - send_window
                - required:
                    - goal
                - required:
                    - utm_enabled
                - required:
                    - priority
                - required:
                    - utm_params
                - required:
                    - split_type
                - required:
                    - operand
                - required:
                    - branches
        - if:
            type: object
            properties:
              type:
                enum:
                  - split
            required:
              - type
          then:
            type: object
            not:
              type: object
              anyOf:
                - required:
                    - delay
                - required:
                    - email
                - required:
                    - tag
                - required:
                    - slack
                - required:
                    - conditions
                - required:
                    - send_window
                - required:
                    - goal
                - required:
                    - utm_enabled
                - required:
                    - priority
                - required:
                    - utm_params
                - required:
                    - target_step_id
        - if:
            type: object
            properties:
              type:
                enum:
                  - split
              split_type:
                enum:
                  - ab_test
            required:
              - type
              - split_type
          then:
            type: object
            not:
              type: object
              properties:
                branches:
                  type: array
                  minItems: 6
              required:
                - branches
    Journey:
      title: Journey
      description: >-
        A customer journey, triggered by an event or by membership of a segment.
        Optional fields with no value are left out of responses. Lists page with
        `starting_after`: pass the previous page's `next_starting_after` until
        there is none. Step contacts page with `cursor` and `next_cursor`
        instead.
      x-tags:
        - Schemas
        - Journey
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the journey
          readOnly: true
          format: uuid
          example: 01a20d6a-b928-7b01-bc78-8a5df1921326
        name:
          type: string
          description: Journey name
          minLength: 1
          maxLength: 100
          example: Welcome journey
        status:
          type: string
          description: Journey lifecycle status
          readOnly: true
          enum:
            - draft
            - active
            - paused
          example: draft
        revision:
          type: integer
          description: >-
            Changes on every write. Send it back as `revision` on update,
            activate, pause and send preview: a stale value gets 409.
          readOnly: true
          example: 1
        latest_version:
          type: integer
          description: Latest immutable runtime version, or zero before first activation
          readOnly: true
          example: 0
        connection_id:
          type:
            - 'null'
            - string
          description: >-
            Connection the journey was last activated with. Left out of the
            response when the journey enrols on every connection of its trigger
            source.
          readOnly: true
          format: uuid
          example: 01a20d6a-b928-7b01-bc78-8a5e59b281ca
        draft_design:
          type: object
          description: >-
            Editable, structurally strict journey draft that may be incomplete.
            At most 256 KB as JSON. Not returned by the list.
          properties:
            trigger:
              type: object
              description: What enrols people. Required to activate.
              properties:
                type:
                  type: string
                  enum:
                    - event
                    - segment
                  description: >-
                    `event` enrols on a matching event; `segment` enrols the
                    members of `segment_id`. A draft may omit it for an event
                    trigger, but activation requires it.
                  example: event
                source:
                  type: string
                  enum:
                    - instantly
                    - api
                    - calendly
                    - typeform
                    - shopify
                    - woocommerce
                    - wix
                    - jotform
                    - intercom
                    - pipedrive
                    - salesforce
                    - hubspot
                    - highlevel
                    - leadconnector
                    - zoho_crm
                    - attio
                  description: >-
                    Event triggers only. Where the trigger event comes from:
                    `api` for events you send, `instantly` for Instantly events,
                    or a connected app.
                  example: instantly
                event_name:
                  type: string
                  maxLength: 60
                  description: Event triggers only. The event that enrols a person.
                  example: form.submitted
                segment_id:
                  type: string
                  maxLength: 128
                  description: Segment triggers only. Required to activate.
                  example: 01a20d6a-b926-792a-9ea6-49ff701cb2a0
                entry_mode:
                  type: string
                  enum:
                    - ongoing
                    - at_activation
                  description: >-
                    Segment triggers only. `ongoing` also enrols people who
                    match later; `at_activation` only those matching when the
                    journey is activated. Required to activate.
                  example: ongoing
                conditions:
                  type: object
                  description: >-
                    Entry conditions. The triggering event only enrols someone
                    when they match; a person who does not match may still enter
                    on a later matching event.
                  properties:
                    evaluator_version:
                      type: integer
                      description: >-
                        Evaluator the block is compiled for. Optional: the API
                        sets it from the clauses. A value other than `1`, `2` or
                        `3` is rejected wherever the conditions are fully
                        validated: on save for a broadcast goal, at activation
                        for a journey.
                      example: 1
                    groups:
                      type: array
                      maxItems: 5
                      description: >-
                        Condition groups. The block matches when any group
                        matches.
                      items:
                        type: object
                        properties:
                          clauses:
                            type: array
                            maxItems: 5
                            description: >-
                              Clauses of the group. The group matches when every
                              clause matches.
                            items:
                              type: object
                              properties:
                                operand:
                                  type: object
                                  description: >-
                                    What the clause reads. `subscriber` with
                                    field `email`, `first_name` or `last_name`
                                    reads a built-in field, `subscriber` with
                                    field `custom_attribute` reads the attribute
                                    named by `key`, and `event` with field
                                    `property` reads the trigger event property
                                    named by `key`. `event_history` with field
                                    `count` reads how many times the person has
                                    performed the event named by `source` and
                                    `event_name`, and compares it as a whole
                                    number with `equals`, `not_equals`,
                                    `greater_than` or `less_than`. Field
                                    `last_at` reads when the person last
                                    performed it and takes `more_than_days_ago`
                                    (0-365) or `less_than_days_ago` (1-365) with
                                    a whole number of days; a person who never
                                    performed the event matches neither.
                                  properties:
                                    namespace:
                                      type: string
                                      maxLength: 32
                                      description: >-
                                        One of `subscriber`, `event` or
                                        `event_history`
                                      example: subscriber
                                    field:
                                      type: string
                                      maxLength: 64
                                      description: Field within the namespace
                                      example: custom_attribute
                                    key:
                                      type: string
                                      maxLength: 100
                                      description: Custom attribute or event property name
                                      example: plan
                                    source:
                                      type: string
                                      maxLength: 32
                                      description: >-
                                        Source of the event. `event_history`
                                        only
                                      example: instantly
                                    event_name:
                                      type: string
                                      maxLength: 60
                                      description: Name of the event. `event_history` only
                                      example: email_account_connected
                                  propertyNames:
                                    enum:
                                      - namespace
                                      - field
                                      - key
                                      - source
                                      - event_name
                                  additionalProperties: false
                                operator:
                                  type: string
                                  maxLength: 32
                                  description: >-
                                    One of `equals`, `not_equals`, `contains`,
                                    `not_contains`, `greater_than`, `less_than`,
                                    `exists`, `not_exists`, `more_than_days_ago`
                                    or `less_than_days_ago`
                                  example: equals
                                value:
                                  type:
                                    - string
                                    - number
                                    - boolean
                                  maxLength: 256
                                  description: >-
                                    Comparison value. Omitted by `exists` and
                                    `not_exists`
                                  example: enterprise
                              propertyNames:
                                enum:
                                  - operand
                                  - operator
                                  - value
                              additionalProperties: false
                        required:
                          - clauses
                        propertyNames:
                          enum:
                            - clauses
                        additionalProperties: false
                  propertyNames:
                    enum:
                      - evaluator_version
                      - groups
                  additionalProperties: false
              propertyNames:
                enum:
                  - type
                  - source
                  - event_name
                  - segment_id
                  - entry_mode
                  - conditions
              additionalProperties: false
            sender:
              type: object
              description: Who the emails come from. Required to activate.
              properties:
                domain_id:
                  type: string
                  maxLength: 128
                  description: >-
                    The sending domain. Activation checks that it exists, not
                    that it is verified.
                  example: 01a20d6a-b926-792a-9ea6-4a00e6088c2e
                from:
                  type: string
                  maxLength: 320
                  description: From address. Must be on the sending domain.
                  example: welcome@acme.com
                reply_to:
                  type: string
                  maxLength: 320
                  description: Reply-to address. Optional.
                  example: support@acme.com
              propertyNames:
                enum:
                  - domain_id
                  - from
                  - reply_to
              additionalProperties: false
            goal:
              type: object
              properties:
                source:
                  type: string
                  enum:
                    - instantly
                    - api
                    - calendly
                    - typeform
                    - shopify
                    - woocommerce
                    - wix
                    - jotform
                    - intercom
                    - pipedrive
                    - salesforce
                    - hubspot
                    - highlevel
                    - leadconnector
                    - zoho_crm
                    - attio
                  description: Where the goal event comes from.
                  example: api
                event_name:
                  type: string
                  maxLength: 60
                  description: The event that counts as the goal.
                  example: purchase.completed
                window_days:
                  type:
                    - 'null'
                    - number
                  not:
                    enum:
                      - null
                  description: >-
                    Days during which the event counts. Drafts accept any
                    number; activation requires a whole number from 1 to 365.
                    Null is rejected.
                  example: 30
                conditions:
                  type: object
                  description: >-
                    Conditions evaluated against the goal event and subscriber
                    at match time.
                  properties:
                    evaluator_version:
                      type: integer
                      description: >-
                        Evaluator the block is compiled for. Optional: the API
                        sets it from the clauses. A value other than `1`, `2` or
                        `3` is rejected wherever the conditions are fully
                        validated: on save for a broadcast goal, at activation
                        for a journey.
                      example: 1
                    groups:
                      type: array
                      maxItems: 5
                      description: >-
                        Condition groups. The block matches when any group
                        matches.
                      items:
                        type: object
                        properties:
                          clauses:
                            type: array
                            maxItems: 5
                            description: >-
                              Clauses of the group. The group matches when every
                              clause matches.
                            items:
                              type: object
                              properties:
                                operand:
                                  type: object
                                  description: >-
                                    What the clause reads. `subscriber` with
                                    field `email`, `first_name` or `last_name`
                                    reads a built-in field, `subscriber` with
                                    field `custom_attribute` reads the attribute
                                    named by `key`, and `event` with field
                                    `property` reads the trigger event property
                                    named by `key`. `event_history` with field
                                    `count` reads how many times the person has
                                    performed the event named by `source` and
                                    `event_name`, and compares it as a whole
                                    number with `equals`, `not_equals`,
                                    `greater_than` or `less_than`. Field
                                    `last_at` reads when the person last
                                    performed it and takes `more_than_days_ago`
                                    (0-365) or `less_than_days_ago` (1-365) with
                                    a whole number of days; a person who never
                                    performed the event matches neither.
                                  properties:
                                    namespace:
                                      type: string
                                      maxLength: 32
                                      description: >-
                                        One of `subscriber`, `event` or
                                        `event_history`
                                      example: subscriber
                                    field:
                                      type: string
                                      maxLength: 64
                                      description: Field within the namespace
                                      example: custom_attribute
                                    key:
                                      type: string
                                      maxLength: 100
                                      description: Custom attribute or event property name
                                      example: plan
                                    source:
                                      type: string
                                      maxLength: 32
                                      description: >-
                                        Source of the event. `event_history`
                                        only
                                      example: instantly
                                    event_name:
                                      type: string
                                      maxLength: 60
                                      description: Name of the event. `event_history` only
                                      example: email_account_connected
                                  propertyNames:
                                    enum:
                                      - namespace
                                      - field
                                      - key
                                      - source
                                      - event_name
                                  additionalProperties: false
                                operator:
                                  type: string
                                  maxLength: 32
                                  description: >-
                                    One of `equals`, `not_equals`, `contains`,
                                    `not_contains`, `greater_than`, `less_than`,
                                    `exists`, `not_exists`, `more_than_days_ago`
                                    or `less_than_days_ago`
                                  example: equals
                                value:
                                  type:
                                    - string
                                    - number
                                    - boolean
                                  maxLength: 256
                                  description: >-
                                    Comparison value. Omitted by `exists` and
                                    `not_exists`
                                  example: enterprise
                              propertyNames:
                                enum:
                                  - operand
                                  - operator
                                  - value
                              additionalProperties: false
                        required:
                          - clauses
                        propertyNames:
                          enum:
                            - clauses
                        additionalProperties: false
                  propertyNames:
                    enum:
                      - evaluator_version
                      - groups
                  additionalProperties: false
              propertyNames:
                enum:
                  - source
                  - event_name
                  - window_days
                  - conditions
              additionalProperties: false
              description: >-
                Optional passive success event. Draft fields may be incomplete;
                activation validates the complete goal. It can change on any
                activation, including after a pause: each activated version
                counts its own goal.
            re_entry:
              type: object
              description: >-
                Whether one person can enter this journey more than once. Omit
                for `once`. Sources whose events always re-enter, such as store
                orders, enrol on every event and ignore this.
              properties:
                mode:
                  type: string
                  enum:
                    - once
                    - every_time
                    - after_cooldown
                  description: >-
                    Re-entry policy. `once` enrols a person at most one time,
                    ever. `every_time` enrols them on every matching event, even
                    while an earlier run is still in progress. `after_cooldown`
                    enrols them again once `cooldown_days` have passed since
                    their previous entry.
                  example: once
                cooldown_days:
                  type:
                    - 'null'
                    - number
                  not:
                    enum:
                      - null
                  description: >-
                    Days since the person previously entered. Drafts accept any
                    number; activation requires a whole number from 1 to 365
                    whenever it is set, and requires it when `mode` is
                    `after_cooldown`. Null is rejected.
                  example: 30
              propertyNames:
                enum:
                  - mode
                  - cooldown_days
              additionalProperties: false
            exit_rules:
              type: array
              maxItems: 5
              description: >-
                Events that remove a person from the journey. When any rule's
                event arrives after someone entered and its conditions match,
                they leave the journey and no further steps start for them.
                Rules can change on any activation and then apply to everyone
                still in the journey, and they keep applying while it is paused.
                Rules never block entry. Omit or send an empty list for none.
                Drafts may be incomplete; activation requires an event on every
                rule and no two identical rules.
              items:
                type: object
                properties:
                  source:
                    type: string
                    enum:
                      - instantly
                      - api
                      - calendly
                      - typeform
                      - shopify
                      - woocommerce
                      - wix
                      - jotform
                      - intercom
                      - pipedrive
                      - salesforce
                      - hubspot
                      - highlevel
                      - leadconnector
                      - zoho_crm
                      - attio
                    description: Where the exit event comes from.
                    example: instantly
                  event_name:
                    type: string
                    maxLength: 60
                    description: The event that removes the person.
                    example: subscription_started
                  conditions:
                    type: object
                    description: >-
                      Conditions evaluated against the exit event and the
                      subscriber once the event is applied.
                    properties:
                      evaluator_version:
                        type: integer
                        description: >-
                          Evaluator the block is compiled for. Optional: the API
                          sets it from the clauses. A value other than `1`, `2`
                          or `3` is rejected wherever the conditions are fully
                          validated: on save for a broadcast goal, at activation
                          for a journey.
                        example: 1
                      groups:
                        type: array
                        maxItems: 5
                        description: >-
                          Condition groups. The block matches when any group
                          matches.
                        items:
                          type: object
                          properties:
                            clauses:
                              type: array
                              maxItems: 5
                              description: >-
                                Clauses of the group. The group matches when
                                every clause matches.
                              items:
                                type: object
                                properties:
                                  operand:
                                    type: object
                                    description: >-
                                      What the clause reads. `subscriber` with
                                      field `email`, `first_name` or `last_name`
                                      reads a built-in field, `subscriber` with
                                      field `custom_attribute` reads the
                                      attribute named by `key`, and `event` with
                                      field `property` reads the trigger event
                                      property named by `key`. `event_history`
                                      with field `count` reads how many times
                                      the person has performed the event named
                                      by `source` and `event_name`, and compares
                                      it as a whole number with `equals`,
                                      `not_equals`, `greater_than` or
                                      `less_than`. Field `last_at` reads when
                                      the person last performed it and takes
                                      `more_than_days_ago` (0-365) or
                                      `less_than_days_ago` (1-365) with a whole
                                      number of days; a person who never
                                      performed the event matches neither.
                                    properties:
                                      namespace:
                                        type: string
                                        maxLength: 32
                                        description: >-
                                          One of `subscriber`, `event` or
                                          `event_history`
                                        example: subscriber
                                      field:
                                        type: string
                                        maxLength: 64
                                        description: Field within the namespace
                                        example: custom_attribute
                                      key:
                                        type: string
                                        maxLength: 100
                                        description: Custom attribute or event property name
                                        example: plan
                                      source:
                                        type: string
                                        maxLength: 32
                                        description: >-
                                          Source of the event. `event_history`
                                          only
                                        example: instantly
                                      event_name:
                                        type: string
                                        maxLength: 60
                                        description: Name of the event. `event_history` only
                                        example: email_account_connected
                                    propertyNames:
                                      enum:
                                        - namespace
                                        - field
                                        - key
                                        - source
                                        - event_name
                                    additionalProperties: false
                                  operator:
                                    type: string
                                    maxLength: 32
                                    description: >-
                                      One of `equals`, `not_equals`, `contains`,
                                      `not_contains`, `greater_than`,
                                      `less_than`, `exists`, `not_exists`,
                                      `more_than_days_ago` or
                                      `less_than_days_ago`
                                    example: equals
                                  value:
                                    type:
                                      - string
                                      - number
                                      - boolean
                                    maxLength: 256
                                    description: >-
                                      Comparison value. Omitted by `exists` and
                                      `not_exists`
                                    example: enterprise
                                propertyNames:
                                  enum:
                                    - operand
                                    - operator
                                    - value
                                additionalProperties: false
                          required:
                            - clauses
                          propertyNames:
                            enum:
                              - clauses
                          additionalProperties: false
                    propertyNames:
                      enum:
                        - evaluator_version
                        - groups
                    additionalProperties: false
                propertyNames:
                  enum:
                    - source
                    - event_name
                    - conditions
                additionalProperties: false
            priority:
              type: string
              enum:
                - high
                - medium
                - low
                - none
              description: >-
                Frequency cap priority for every email step that sets none. Omit
                for `medium`.
              example: medium
            steps:
              type: array
              maxItems: 101
              description: >-
                Ordered steps, up to 100 plus a closing go-to. A split ends the
                list it belongs to; everything that runs after the fork lives
                inside its branches. A go-to also ends its list, continuing at
                its target so two branches can share the steps after it.
              items:
                $ref: '#/components/schemas/journeyDraftStepResponse'
          propertyNames:
            enum:
              - trigger
              - sender
              - goal
              - re_entry
              - exit_rules
              - priority
              - steps
          additionalProperties: false
        timestamp_created:
          type: string
          description: Timestamp when the journey was created
          readOnly: true
          format: date-time
          example: '2026-11-24T11:57:07.752Z'
        timestamp_updated:
          type: string
          description: Timestamp when the journey was last updated
          readOnly: true
          format: date-time
          example: '2026-11-24T11:57:07.752Z'
      required:
        - id
        - name
        - status
        - revision
        - latest_version
        - timestamp_created
        - timestamp_updated
      additionalProperties: false
    journeyDraftStepResponse:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 64
          description: >-
            Step ID, unique across the whole design, branches included. `end` is
            reserved. A duplicate or `end` is rejected when the design is saved.
          example: step-email
        type:
          type: string
          enum:
            - delay
            - email
            - split
            - tag
            - slack
            - go_to
          description: What the step does. Each type takes only its own fields.
          example: email
        target_step_id:
          type: string
          minLength: 1
          maxLength: 64
          description: >-
            Step a go-to continues at. It must be the last step of its list and
            target another step that is not a go-to, without creating a loop. A
            draft may omit it or name a step that no longer exists; activation
            requires an existing one. Go-to steps only.
          example: step-email
        name:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            Optional display label for the builder and analytics, 1-100
            characters after trimming. Omit it for no name; a blank or `null`
            name is rejected. Sending and routing ignore it. Not allowed on
            go-to steps, which are labelled from their target.
          example: Welcome email
        delay:
          type: object
          description: >-
            How long the step waits. Without `mode` it waits a fixed `value` of
            `unit`, at most 30 days. With `mode` `until_date` it waits until the
            date read from `date`, moved by `offset`, and the wait follows the
            date while the person waits. Activation also requires that no path
            ends with a delay step and that the fixed delays along any path add
            up to at most 365 days. Delay steps only.
          properties:
            mode:
              type: string
              enum:
                - until_date
              description: >-
                Omit for a fixed delay. `until_date` waits until a date on the
                person or the trigger event.
              example: until_date
            value:
              type:
                - 'null'
                - number
              not:
                enum:
                  - null
              description: >-
                How many `unit`s a fixed delay waits. Activation requires a
                whole number of at least 1.
              example: 1
            unit:
              type: string
              enum:
                - minutes
                - hours
                - days
              description: The unit of `value`.
              example: hours
            date:
              type: object
              description: >-
                `subscriber` with field `custom_attribute` reads the person
                attribute named by `key`; `event` with field `property` reads
                the trigger event property named by `key`, which only an
                event-triggered journey can activate with. Omit it until a date
                is chosen: when present, `namespace`, `field` and `key` are all
                required.
              properties:
                namespace:
                  type: string
                  enum:
                    - subscriber
                    - event
                  description: >-
                    Where the date comes from: the person (`subscriber`) or the
                    trigger event (`event`).
                  example: subscriber
                field:
                  type: string
                  enum:
                    - custom_attribute
                    - property
                  description: >-
                    `custom_attribute` with `subscriber`, `property` with
                    `event`.
                  example: custom_attribute
                key:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: The attribute or event property that holds the date.
                  example: free_trial_ends_at
              required:
                - namespace
                - field
                - key
              propertyNames:
                enum:
                  - namespace
                  - field
                  - key
              additionalProperties: false
            offset:
              type: object
              description: >-
                How far from the date the wait ends. Omit it to wait until the
                date itself. A whole number of at least 1, at most 365 days in
                total. Date delays only.
              properties:
                direction:
                  type: string
                  enum:
                    - before
                    - after
                  description: Before or after the date.
                  example: before
                value:
                  type:
                    - 'null'
                    - number
                  not:
                    enum:
                      - null
                  description: How many `unit`s from the date.
                  example: 3
                unit:
                  type: string
                  enum:
                    - minutes
                    - hours
                    - days
                  description: The unit of `value`.
                  example: hours
              propertyNames:
                enum:
                  - direction
                  - value
                  - unit
              additionalProperties: false
            time_of_day:
              type: object
              description: >-
                Wall-clock time the wait ends at on the computed day. Omit it to
                keep the time the date carries. Allowed with no offset or an
                offset in days. Date delays only.
              properties:
                time:
                  type: string
                  maxLength: 5
                  description: 24-hour `HH:MM`, from `00:00` to `23:59`.
                  example: '09:00'
                timezone:
                  type: string
                  maxLength: 64
                  description: IANA timezone name. UTC offsets are not accepted.
                  example: Europe/Zurich
              propertyNames:
                enum:
                  - time
                  - timezone
              additionalProperties: false
            if_missing:
              type: string
              enum:
                - continue
                - exit
              description: >-
                What happens when the person has no usable date: `continue` to
                the next step or `exit` the journey. Required at activation.
                Date delays only.
              example: exit
            if_passed:
              type: string
              enum:
                - continue
                - exit
              description: >-
                What happens when the computed time is already past when the
                person reaches the step, or the date moves into the past while
                they wait: `continue` to the next step or `exit` the journey.
                Required at activation. Date delays only.
              example: continue
          propertyNames:
            enum:
              - mode
              - value
              - unit
              - date
              - offset
              - time_of_day
              - if_missing
              - if_passed
          additionalProperties: false
        email:
          type: object
          description: >-
            The email the step sends. Email steps only. A draft may leave it
            incomplete.
          properties:
            template_id:
              type: string
              maxLength: 128
              description: The template the email sends.
              example: 01a20d6a-b926-792a-9ea6-49fe9e72098b
            subject:
              type: string
              maxLength: 100
              description: Subject line. Required to activate.
              example: Welcome!
            from_name:
              type: string
              minLength: 1
              maxLength: 100
              pattern: ^(?=[\s\S]*\S)(?![\s\S]*=\?)[^<>"\\\u0000-\u001F\u007F]+$
              description: >-
                Display name for this email's From header. Omit it to use the
                journey sender name. Cannot be blank or contain quotes,
                backslashes, angle brackets, control characters or "=?".
              example: Acme Sales
            preview_text:
              type: string
              maxLength: 150
              description: >-
                Inbox preview text shown after the subject. Supports the same
                variables as the subject; activation rejects invalid variable
                syntax.
              example: Your first steps start here
          propertyNames:
            enum:
              - template_id
              - subject
              - from_name
              - preview_text
          additionalProperties: false
        tag:
          type: object
          description: >-
            Subscriber tags the step applies or removes as a run passes through
            it. Tag steps only. A draft may leave this incomplete; activation
            requires a direction and at least one tag.
          properties:
            action:
              type: string
              enum:
                - add
                - remove
              description: >-
                Whether the step adds the tags to the subscriber or takes them
                off.
              example: add
            tag_ids:
              type: array
              maxItems: 10
              items:
                type: string
                maxLength: 128
                example: 0198a123-4567-7890-abcd-ef0123456789
              description: >-
                Subscriber tag IDs the step applies or removes. Repeating a tag
                the subscriber already has, or removing one they do not have,
                changes nothing.
          propertyNames:
            enum:
              - action
              - tag_ids
          additionalProperties: false
        slack:
          type: object
          description: >-
            Slack message the step posts as a run passes through it. Slack steps
            only. A draft may leave this incomplete; activation requires a
            connection, a channel and a message with valid merge tags. A failed
            post is counted and the run continues.
          properties:
            app_connection_id:
              type: string
              maxLength: 128
              description: >-
                Slack app connection of this workspace the message is posted
                through.
              example: 0198a123-4567-7890-abcd-ef0123456789
            channel_id:
              type: string
              maxLength: 128
              description: >-
                Slack channel ID the message is posted to. The bot joins the
                channel if it can.
              example: C0123ABCD
            channel_name:
              type: string
              maxLength: 128
              description: Display-only copy of the channel name. Never used to send.
              example: general
            message:
              type: string
              maxLength: 3000
              description: >-
                Slack mrkdwn text with merge tags: `{{email}}`,
                `{{first_name}}`, `{{last_name}}`, `{{attributes.<key>}}` and,
                for event-triggered journeys, `{{event.<key>}}` from the trigger
                event. Write `{{attributes.[my key]}}` for keys that are not
                plain identifiers. Missing values render empty.
              example: >-
                New signup: {{first_name}} {{last_name}} ({{email}}) on plan
                {{attributes.plan}}
          propertyNames:
            enum:
              - app_connection_id
              - channel_id
              - channel_name
              - message
          additionalProperties: false
        conditions:
          type: object
          description: >-
            Conditions checked when the step runs. A run that does not match
            leaves the journey at this step instead of continuing. Email steps
            only.
          properties:
            evaluator_version:
              type: integer
              description: >-
                Evaluator the block is compiled for. Optional: the API sets it
                from the clauses. A value other than `1`, `2` or `3` is rejected
                wherever the conditions are fully validated: on save for a
                broadcast goal, at activation for a journey.
              example: 1
            groups:
              type: array
              maxItems: 5
              description: Condition groups. The block matches when any group matches.
              items:
                type: object
                properties:
                  clauses:
                    type: array
                    maxItems: 5
                    description: >-
                      Clauses of the group. The group matches when every clause
                      matches.
                    items:
                      type: object
                      properties:
                        operand:
                          type: object
                          description: >-
                            What the clause reads. `subscriber` with field
                            `email`, `first_name` or `last_name` reads a
                            built-in field, `subscriber` with field
                            `custom_attribute` reads the attribute named by
                            `key`, and `event` with field `property` reads the
                            trigger event property named by `key`.
                            `event_history` with field `count` reads how many
                            times the person has performed the event named by
                            `source` and `event_name`, and compares it as a
                            whole number with `equals`, `not_equals`,
                            `greater_than` or `less_than`. Field `last_at` reads
                            when the person last performed it and takes
                            `more_than_days_ago` (0-365) or `less_than_days_ago`
                            (1-365) with a whole number of days; a person who
                            never performed the event matches neither.
                          properties:
                            namespace:
                              type: string
                              maxLength: 32
                              description: One of `subscriber`, `event` or `event_history`
                              example: subscriber
                            field:
                              type: string
                              maxLength: 64
                              description: Field within the namespace
                              example: custom_attribute
                            key:
                              type: string
                              maxLength: 100
                              description: Custom attribute or event property name
                              example: plan
                            source:
                              type: string
                              maxLength: 32
                              description: Source of the event. `event_history` only
                              example: instantly
                            event_name:
                              type: string
                              maxLength: 60
                              description: Name of the event. `event_history` only
                              example: email_account_connected
                          propertyNames:
                            enum:
                              - namespace
                              - field
                              - key
                              - source
                              - event_name
                          additionalProperties: false
                        operator:
                          type: string
                          maxLength: 32
                          description: >-
                            One of `equals`, `not_equals`, `contains`,
                            `not_contains`, `greater_than`, `less_than`,
                            `exists`, `not_exists`, `more_than_days_ago` or
                            `less_than_days_ago`
                          example: equals
                        value:
                          type:
                            - string
                            - number
                            - boolean
                          maxLength: 256
                          description: >-
                            Comparison value. Omitted by `exists` and
                            `not_exists`
                          example: enterprise
                      propertyNames:
                        enum:
                          - operand
                          - operator
                          - value
                      additionalProperties: false
                required:
                  - clauses
                propertyNames:
                  enum:
                    - clauses
                additionalProperties: false
          propertyNames:
            enum:
              - evaluator_version
              - groups
          additionalProperties: false
        send_window:
          type: object
          description: >-
            When this email may send. Someone who reaches the step inside the
            window is sent the email at once; anyone else waits for the next
            opening. The email still sends once per journey entry. Omit to send
            anytime. Drafts may be incomplete; activation requires every field.
            Email steps only.
          properties:
            days:
              type: array
              maxItems: 7
              items:
                type: string
                enum:
                  - monday
                  - tuesday
                  - wednesday
                  - thursday
                  - friday
                  - saturday
                  - sunday
                example: monday
              description: >-
                Weekdays the window opens on. Activation requires one to seven
                different days.
              example:
                - monday
                - thursday
            start_time:
              type: string
              maxLength: 5
              description: >-
                Opening time as 24-hour `HH:MM`, from `00:00` to `23:59`.
                Inclusive.
              example: '16:00'
            end_time:
              type: string
              maxLength: 5
              description: >-
                Closing time as 24-hour `HH:MM`, or `24:00` for midnight.
                Exclusive, and later than `start_time` on the same day.
              example: '20:00'
            timezone:
              type: string
              maxLength: 64
              description: >-
                IANA timezone name shared by everyone reaching the step. UTC
                offsets are not accepted.
              example: Europe/Zurich
          propertyNames:
            enum:
              - days
              - start_time
              - end_time
              - timezone
          additionalProperties: false
        goal:
          type: object
          properties:
            source:
              type: string
              enum:
                - instantly
                - api
                - calendly
                - typeform
                - shopify
                - woocommerce
                - wix
                - jotform
                - intercom
                - pipedrive
                - salesforce
                - hubspot
                - highlevel
                - leadconnector
                - zoho_crm
                - attio
              description: Where the goal event comes from.
              example: api
            event_name:
              type: string
              maxLength: 60
              description: The event that counts as the goal.
              example: purchase.completed
            window_days:
              type:
                - 'null'
                - number
              not:
                enum:
                  - null
              description: >-
                Days during which the event counts. Drafts accept any number;
                activation requires a whole number from 1 to 365. Null is
                rejected.
              example: 30
            conditions:
              type: object
              description: >-
                Conditions evaluated against the goal event and subscriber at
                match time.
              properties:
                evaluator_version:
                  type: integer
                  description: >-
                    Evaluator the block is compiled for. Optional: the API sets
                    it from the clauses. A value other than `1`, `2` or `3` is
                    rejected wherever the conditions are fully validated: on
                    save for a broadcast goal, at activation for a journey.
                  example: 1
                groups:
                  type: array
                  maxItems: 5
                  description: Condition groups. The block matches when any group matches.
                  items:
                    type: object
                    properties:
                      clauses:
                        type: array
                        maxItems: 5
                        description: >-
                          Clauses of the group. The group matches when every
                          clause matches.
                        items:
                          type: object
                          properties:
                            operand:
                              type: object
                              description: >-
                                What the clause reads. `subscriber` with field
                                `email`, `first_name` or `last_name` reads a
                                built-in field, `subscriber` with field
                                `custom_attribute` reads the attribute named by
                                `key`, and `event` with field `property` reads
                                the trigger event property named by `key`.
                                `event_history` with field `count` reads how
                                many times the person has performed the event
                                named by `source` and `event_name`, and compares
                                it as a whole number with `equals`,
                                `not_equals`, `greater_than` or `less_than`.
                                Field `last_at` reads when the person last
                                performed it and takes `more_than_days_ago`
                                (0-365) or `less_than_days_ago` (1-365) with a
                                whole number of days; a person who never
                                performed the event matches neither.
                              properties:
                                namespace:
                                  type: string
                                  maxLength: 32
                                  description: >-
                                    One of `subscriber`, `event` or
                                    `event_history`
                                  example: subscriber
                                field:
                                  type: string
                                  maxLength: 64
                                  description: Field within the namespace
                                  example: custom_attribute
                                key:
                                  type: string
                                  maxLength: 100
                                  description: Custom attribute or event property name
                                  example: plan
                                source:
                                  type: string
                                  maxLength: 32
                                  description: Source of the event. `event_history` only
                                  example: instantly
                                event_name:
                                  type: string
                                  maxLength: 60
                                  description: Name of the event. `event_history` only
                                  example: email_account_connected
                              propertyNames:
                                enum:
                                  - namespace
                                  - field
                                  - key
                                  - source
                                  - event_name
                              additionalProperties: false
                            operator:
                              type: string
                              maxLength: 32
                              description: >-
                                One of `equals`, `not_equals`, `contains`,
                                `not_contains`, `greater_than`, `less_than`,
                                `exists`, `not_exists`, `more_than_days_ago` or
                                `less_than_days_ago`
                              example: equals
                            value:
                              type:
                                - string
                                - number
                                - boolean
                              maxLength: 256
                              description: >-
                                Comparison value. Omitted by `exists` and
                                `not_exists`
                              example: enterprise
                          propertyNames:
                            enum:
                              - operand
                              - operator
                              - value
                          additionalProperties: false
                    required:
                      - clauses
                    propertyNames:
                      enum:
                        - clauses
                    additionalProperties: false
              propertyNames:
                enum:
                  - evaluator_version
                  - groups
              additionalProperties: false
          propertyNames:
            enum:
              - source
              - event_name
              - window_days
              - conditions
          additionalProperties: false
          description: >-
            Optional conversion goal for this email. Counts recipients whose
            goal event arrives within `window_days` of this email being sent to
            them. It only measures: it never delays, stops, or changes the
            journey. Independent of the journey goal, and may change between
            activated versions. Omit for no goal; drafts may be incomplete.
            Email steps only.
        utm_enabled:
          type: boolean
          description: >-
            Whether this email's links get the `utm_params` added at activation.
            Tracking applies only when this is `true` and at least one param
            remains; `utm_params` is kept while it is off. Email steps only.
          example: true
        utm_params:
          type: array
          maxItems: 15
          items:
            type: object
            properties:
              key:
                type: string
                maxLength: 50
                description: Query parameter name added to each link, at most 50 characters
                example: utm_source
              value:
                type: string
                maxLength: 200
                description: Query parameter value, at most 200 characters
                example: newsletter
            required:
              - key
              - value
            additionalProperties: false
            propertyNames:
              enum:
                - key
                - value
          description: >-
            Ordered campaign-tracking parameters for this email's links. Keys
            and values are trimmed, rows with an empty key are dropped, and a
            repeated key keeps its last value. A value already written into a
            link wins. Email steps only.
        priority:
          type: string
          enum:
            - high
            - medium
            - low
            - none
          description: >-
            Frequency cap priority for this email, overriding the journey
            `priority`. When the workspace has frequency caps enabled and a
            person's emails in the last 24 hours or 7 days reach this priority's
            limit, the email is skipped and the person moves on to the next
            step. `none` is never capped. Email steps only.
          example: medium
        split_type:
          type: string
          enum:
            - condition
            - attribute
            - ab_test
          description: >-
            Split variant. `condition` forks the journey into two to ten
            branches; the first whose conditions match wins. `attribute` forks
            it into one branch per value of `operand`, plus a default branch.
            `ab_test` deals every run into one of two to five versions by
            `percent`.
          example: condition
        operand:
          type: object
          description: >-
            The attribute every branch value is compared against. Attribute
            splits only. Text is compared without regard to capitalization and
            values are never coerced, so a missing attribute or a different type
            takes the default branch.
          properties:
            namespace:
              type: string
              maxLength: 32
              description: Either `subscriber` or `event`
              example: subscriber
            field:
              type: string
              maxLength: 64
              description: Field within the namespace
              example: custom_attribute
            key:
              type: string
              maxLength: 100
              description: Custom attribute or event property name
              example: plan
          propertyNames:
            enum:
              - namespace
              - field
              - key
          additionalProperties: false
        branches:
          type: array
          maxItems: 10
          description: >-
            The paths out of a split. A condition split activates with two to
            ten: every branch except the last carries the conditions people must
            match, checked in order with the first match winning, and the last
            is the default everyone else takes. An attribute split activates
            with two to ten: every branch except the last carries the `value`
            that routes someone down it, and the last is the default. An A/B
            test activates with two to five, each carrying the `percent` of runs
            dealt into it.
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
                maxLength: 64
                description: Branch ID, unique within its split.
                example: 'yes'
              name:
                type: string
                minLength: 1
                maxLength: 100
                description: >-
                  Optional display label for this path, 1-100 characters after
                  trimming. Omit it for no name.
                example: Paid plan
              conditions:
                type: object
                description: >-
                  Conditions someone must match to take this branch. The default
                  branch carries none, so a run that matches nothing is routed
                  rather than exited. Condition splits only.
                properties:
                  evaluator_version:
                    type: integer
                    description: >-
                      Evaluator the block is compiled for. Optional: the API
                      sets it from the clauses. A value other than `1`, `2` or
                      `3` is rejected wherever the conditions are fully
                      validated: on save for a broadcast goal, at activation for
                      a journey.
                    example: 1
                  groups:
                    type: array
                    maxItems: 5
                    description: >-
                      Condition groups. The block matches when any group
                      matches.
                    items:
                      type: object
                      properties:
                        clauses:
                          type: array
                          maxItems: 5
                          description: >-
                            Clauses of the group. The group matches when every
                            clause matches.
                          items:
                            type: object
                            properties:
                              operand:
                                type: object
                                description: >-
                                  What the clause reads. `subscriber` with field
                                  `email`, `first_name` or `last_name` reads a
                                  built-in field, `subscriber` with field
                                  `custom_attribute` reads the attribute named
                                  by `key`, and `event` with field `property`
                                  reads the trigger event property named by
                                  `key`. `event_history` with field `count`
                                  reads how many times the person has performed
                                  the event named by `source` and `event_name`,
                                  and compares it as a whole number with
                                  `equals`, `not_equals`, `greater_than` or
                                  `less_than`. Field `last_at` reads when the
                                  person last performed it and takes
                                  `more_than_days_ago` (0-365) or
                                  `less_than_days_ago` (1-365) with a whole
                                  number of days; a person who never performed
                                  the event matches neither.
                                properties:
                                  namespace:
                                    type: string
                                    maxLength: 32
                                    description: >-
                                      One of `subscriber`, `event` or
                                      `event_history`
                                    example: subscriber
                                  field:
                                    type: string
                                    maxLength: 64
                                    description: Field within the namespace
                                    example: custom_attribute
                                  key:
                                    type: string
                                    maxLength: 100
                                    description: Custom attribute or event property name
                                    example: plan
                                  source:
                                    type: string
                                    maxLength: 32
                                    description: Source of the event. `event_history` only
                                    example: instantly
                                  event_name:
                                    type: string
                                    maxLength: 60
                                    description: Name of the event. `event_history` only
                                    example: email_account_connected
                                propertyNames:
                                  enum:
                                    - namespace
                                    - field
                                    - key
                                    - source
                                    - event_name
                                additionalProperties: false
                              operator:
                                type: string
                                maxLength: 32
                                description: >-
                                  One of `equals`, `not_equals`, `contains`,
                                  `not_contains`, `greater_than`, `less_than`,
                                  `exists`, `not_exists`, `more_than_days_ago`
                                  or `less_than_days_ago`
                                example: equals
                              value:
                                type:
                                  - string
                                  - number
                                  - boolean
                                maxLength: 256
                                description: >-
                                  Comparison value. Omitted by `exists` and
                                  `not_exists`
                                example: enterprise
                            propertyNames:
                              enum:
                                - operand
                                - operator
                                - value
                            additionalProperties: false
                      required:
                        - clauses
                      propertyNames:
                        enum:
                          - clauses
                      additionalProperties: false
                propertyNames:
                  enum:
                    - evaluator_version
                    - groups
                additionalProperties: false
              value:
                type:
                  - string
                  - number
                  - boolean
                maxLength: 256
                description: >-
                  Value of the split `operand` that routes someone down this
                  branch. Every branch except the last carries one, and all of
                  them share a single type. Attribute splits only.
                example: enterprise
              percent:
                type: integer
                minimum: 1
                maximum: 99
                description: >-
                  Share of runs dealt into this branch. Every branch carries one
                  and they add up to exactly 100 at activation. Branch order
                  defines the ranges, so reordering versions changes who gets
                  what. A/B tests only.
                example: 50
              steps:
                type: array
                maxItems: 101
                description: >-
                  Steps that run on this branch, up to 100 plus a closing go-to.
                  An empty branch routes straight to the end of the journey.
                items:
                  $ref: '#/components/schemas/journeyDraftStepResponse'
            required:
              - id
            propertyNames:
              enum:
                - id
                - name
                - conditions
                - value
                - percent
                - steps
            additionalProperties: false
      required:
        - id
        - type
      propertyNames:
        enum:
          - id
          - type
          - name
          - delay
          - email
          - tag
          - slack
          - conditions
          - send_window
          - goal
          - utm_enabled
          - utm_params
          - priority
          - split_type
          - operand
          - branches
          - target_step_id
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.