# Retrieve a flow definition

Retrieves a specific flow definition (A/B/n test or personalization) on a page, including the structure, variants, and configuration details.

Endpoint: GET /api/v1/flows/{flowId}
Version: v2.0
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer JWT

## Path parameters:

  - `flowId` (string, required)
    The unique identifier of the A/B/n test or personalization to retrieve. To get this ID, you can use the [List flow definitions](#/operation/flows-list_flow_definitions_by_page) endpoint for the page and use the flow `ref` value.

## Header parameters:

  - `x-sc-job-id` (any)
    A unique identifier for the job, used to trace, audit, and revert actions performed by an AI agent through the Agent API.

## Response 200:

  - `200` (unknown)
    Successful response

## Response 200 fields (application/json):

  - `clientKey` (string)
    The client key associated with the flow definition (A/B/n test or personalization).
    Example: pers12345

  - `href` (any)
    The URL of the flow definition (A/B/n test or personalization).
    Example: https://www.example.com/flow-definition

  - `ref` (string)
    A reference identifier for the flow definition (A/B/n test or personalization).
    Example: FlowDefinition-12345

  - `name` (string)
    The name of the flow definition (A/B/n test or personalization).
    Example: User Registration Flow

  - `modifiedByRef` (any)
    A reference identifier for the user who last modified the flow definition (A/B/n test or personalization).
    Example: User-67890

  - `modifiedAt` (any)
    The timestamp when the flow definition (A/B/n test or personalization) was last modified.
    Example: 2025-01-15T10:30:00Z

  - `revision` (any)
    The revision number of the flow definition (A/B/n test or personalization).
    Example: 2

  - `archived` (boolean)
    Whether the flow definition (A/B/n test or personalization) is archived.
    Example: false

  - `friendlyId` (string)
    A user-friendly identifier for the flow definition (A/B/n test or personalization).
    Example: user_registration_flow

  - `type` (string)
    The type of the flow definition (A/B/n test or personalization).
    Example: COMPONENT

  - `channels` (any)
    A list of channels associated with the flow definition (A/B/n test or personalization), such as web or mobile.

  - `triggers` (any)
    A list of triggers for the flow definition (A/B/n test or personalization), or null if none.

  - `tags` (any)
    A list of tags associated with the flow definition (A/B/n test or personalization), or null if none.

  - `businessProcess` (any)
    The business process associated with the flow definition (A/B/n test or personalization).
    Example: user_registration

  - `siteId` (string)
    The unique identifier of the site associated with the A/B/n test or personalization.
    Example: site_123

  - `transpiledVariants` (any)
    A list of transpiled variants for the flow definition (A/B/n test or personalization), or null if none.

  - `variants` (any)
    A list of variants for the experiment (A/B/n test or personalization), or null if none.

  - `variants.ref` (string)
    A reference identifier for the variant.
    Example: variant-abc

  - `variants.name` (string)
    The name of the variant.
    Example: Variant A

  - `variants.isControl` (boolean)
    Whether this is the control variant (baseline) for comparison in the A/B/n test.
    Example: false

  - `variants.tasks` (array)
    A list of tasks associated with the variant.

  - `variants.tasks.implementation` (string)
    The implementation type of the task.
    Example: TemplateRenderTask

  - `variants.tasks.input` (object)

  - `variants.tasks.input.inputType` (string)
    The type of task input.
    Example: templateRenderTaskInput

  - `variants.tasks.input.type` (string)
    The MIME type of the task input payload.
    Example: swap

  - `variants.tasks.input.template` (string)
    A serialized JSON payload for the task template. For experiments, this typically includes a variantId value.
    Example: {"variantId":"6cc729784bee4851a7bc3352f90448bf_default"}

  - `status` (string)
    The current status of the flow definition (A/B/n test or personalization).
    Example: DRAFT

  - `schedule` (any)
    The schedule configuration for the flow definition (A/B/n test or personalization).

  - `schedule.type` (string)
    The type of schedule for the flow definition (A/B/n test or personalization).
    Example: simpleSchedule

  - `schedule.startDate` (any)
    The start date of the schedule.
    Example: 2023-01-01T00:00:00Z

  - `revisions` (any)
    Links to the revisions of the flow definition (A/B/n test or personalization).

  - `revisions.href` (any)
    The URL to access the revisions of the flow definition (A/B/n test or personalization).
    Example: https://www.example.com/flow-definition/revisions

  - `sampleSizeConfig` (any)
    The sample size configuration for the flow definition (A/B/n test or personalization).

  - `sampleSizeConfig.baseValue` (number)
    The base value used for sample size calculation.
    Example: 0.5

  - `sampleSizeConfig.minimumDetectableDifference` (number)
    The minimum detectable difference for the sample size calculation.
    Example: 0.1

  - `sampleSizeConfig.confidenceLevel` (number)
    The confidence level for the sample size calculation.
    Example: 0.95

  - `sampleSizeConfig.sampleSize` (any)
    The calculated sample size, or null if not yet computed.

  - `notificationEnabled` (any)
    Whether notifications are enabled for the flow definition (A/B/n test or personalization).

  - `subtype` (string)
    The subtype of the flow definition (A/B/n test or personalization), identifying it as an A/B experiment.
    Example: EXPERIMENT

  - `traffic` (object)

  - `traffic.type` (string)
    The type of traffic distribution for the flow definition (A/B/n test or personalization).
    Example: simpleTraffic

  - `traffic.weightingAlgorithm` (string)
    The algorithm used for weighting traffic. Either 'USER_DEFINED' or 'AUTO'.
    Enum: "USER_DEFINED", "AUTO"

  - `traffic.modifiedAt` (any)
    The timestamp when the traffic distribution was last modified.
    Example: 2023-01-01T00:00:00Z

  - `traffic.allocation` (integer)
    The total traffic allocation percentage for the A/B/n test.
    Example: 100

  - `traffic.coupled` (boolean)
    Whether the traffic splits are coupled and adjusted together.
    Example: false

  - `traffic.splits` (array)
    A list of traffic splits for each A/B/n test variant.

  - `traffic.splits.ref` (string)
    A reference identifier for the experiment variant.
    Example: variant-abc

  - `traffic.splits.split` (integer)
    The traffic allocation percentage for this experiment variant.
    Example: 50

  - `goals` (any)
    The goals tracked for the experiment, keyed by goal identifier.

  - `modifiedAt` (any)
    The timestamp when the flow definition was last modified (A/B/n test or personalization).
    Example: 2025-01-15T10:30:00Z

  - `siteId` (string)
    The unique identifier of the site associated with A/B/n test or personalization.
    Example: site_123

  - `transpiledVariants` (any)
    A list of transpiled variants for the flow definition (A/B/n test or personalization), or null if none. `variantId` is typically in `transpiledVariants[].tasks[].input.template` as serialized JSON.

  - `variants` (any)
    A list of variants for the flow definition (A/B/n test or personalization), or null if none.

  - `revisions` (any)
    Links to the revisions of the flow definition.

  - `sampleSizeConfig` (any)
    The sample size configuration for the flow definition.

  - `subtype` (string)
    The subtype of the flow definition (A/B/n test or personalization), identifying it as a personalization experience.
    Example: EXPERIENCE

  - `dashboardLinks` (any)
    A list of dashboard links for the experience, or null if none.

## Response 422:

  - `422` (unknown)
    Unprocessable entity

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array)
    The location of the error in the request.

  - `detail.msg` (string)
    The error message.

  - `detail.type` (string)
    The type of error.

  - `detail.input` (any)
    The input that caused the error.

  - `detail.ctx` (object)
    The context in which the error occurred.

