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

# Retrieve a flow

> Retrieve detailed information about a specific flow, including its configuration, execution logic, conditions, destinations, and execution metrics. Returns complete flow data in the requested language.



## OpenAPI

````yaml /en/api-reference/openapi.en-v1.json get /v1/organizations/{organization_id}/flows/{flow_id}
openapi: 3.0.3
info:
  title: Public Portal API
  version: 1.0.0
  description: Public REST API for portal
servers:
  - url: https://api.staging.flxwvdexternal.com
    description: Staging API server.
security:
  - bearerAuth: []
tags: []
paths:
  /v1/organizations/{organization_id}/flows/{flow_id}:
    get:
      tags:
        - Flows
      summary: Retrieve a flow
      description: >-
        Retrieve detailed information about a specific flow, including its
        configuration, execution logic, conditions, destinations, and execution
        metrics. Returns complete flow data in the requested language.
      operationId: getFlowById
      parameters:
        - name: organization id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: The unique identifier of the organization
          example: 507f1f77bcf86cd799439011
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: Unique identifier for the flow
          example: 507f1f77bcf86cd799439012
        - name: Accept-Language
          in: header
          required: false
          schema:
            type: string
            enum:
              - en-EN
              - es-ES
              - pt-BR
              - ca-ES
              - eu-ES
            default: es-ES
          description: >-
            Language code for text fields supporting multiple languages. When
            creating or updating resources, this specifies the language for the
            provided text values. When retrieving resources, this determines
            which language variant the multilingual text fields return. Accepted
            values: 'en-EN' (English), 'es-ES' (Spanish), 'pt-BR' (Portuguese),
            'ca-ES' (Catalan), 'eu-ES' (Basque). The default is 'es-ES' if not
            provided.
      responses:
        '200':
          description: >-
            Flow details successfully retrieved. The response includes complete
            flow configuration, conditions, destinations, and execution metrics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowV1'
        '400':
          $ref: '#/components/responses/BadRequest'
          description: Invalid request - Invalid flow ID
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: Unauthorized - authentication required
        '404':
          $ref: '#/components/responses/NotFound'
          description: Flow not found
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    FlowV1:
      type: object
      description: >-
        Flow detail as returned by GET flow by id. Organization is implied by
        the route `/v1/organizations/{organization_id}/flows/{flow_id}`. Target
        workspaces/groups are normalized in target.ids (hexadecimal strings of
        MongoDB ObjectId).
      properties:
        id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
        created_at:
          type: string
          format: date-time
        name:
          type: string
          description: Resolved to Accept-Language when multilingual
        description:
          type: string
          description: Resolved to Accept-Language when multilingual
        type:
          type: string
          enum:
            - session
            - workspace
        version:
          type: number
        detection_only:
          type: boolean
        cooldown_minutes:
          type: number
          description: Waiting time in minutes
        enabled:
          type: boolean
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FlowConditionV1'
          description: Omitted or empty when the flow has no conditions
        trigger:
          type: string
          nullable: true
        target:
          $ref: '#/components/schemas/FlowTargetSelectorV1'
          description: >-
            Execution destination: type selects the scope; ids list Workspace
            _id values, Workspace group _id values, or Reporting Group _id
            (empty when type is ALL_WORKSPACES)
        microservice_id:
          type: string
          nullable: true
          description: Linked microservice ID when present
        init_text:
          type: string
          nullable: true
          description: Resolved to Accept-Language when multilingual
        ok_text:
          type: string
          nullable: true
          description: Resolved to Accept-Language when multilingual
        ko_text:
          type: string
          nullable: true
          description: Resolved to Accept-Language when multilingual
        execution_metrics:
          $ref: '#/components/schemas/FlowExecutionMetricsV1'
          nullable: true
          description: Present when metrics are calculated for this flow
      required:
        - id
        - created_at
        - name
        - description
        - type
        - version
        - detection_only
        - cooldown_minutes
        - enabled
        - target
    FlowConditionV1:
      type: object
      properties:
        condition_type_id:
          type: string
        metric:
          type: string
        operator:
          type: string
        compare_to:
          type: string
        period:
          type: number
          nullable: true
        check_every:
          type: number
      required:
        - condition_type_id
        - metric
        - operator
        - compare_to
        - check_every
    FlowTargetSelectorV1:
      type: object
      properties:
        type:
          type: string
          enum:
            - all_workspaces
            - workspaces
            - workspace_groups
            - reporting_groups
          description: >-
            ALL_WORKSPACES: ids are always []. WORKSPACES: ids are Workspace
            document _id (24 hex). WORKSPACE_GROUPS / REPORTING_GROUPS: ids are
            group _id values.
        ids:
          type: array
          items:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
      required:
        - type
        - ids
    FlowExecutionMetricsV1:
      type: object
      properties:
        targeted_workspaces:
          type: number
        evaluations_per_day:
          type: number
        possible_executions_per_day:
          type: number
        total_possible_executions_per_day:
          type: number
      required:
        - targeted_workspaces
        - evaluations_per_day
        - possible_executions_per_day
        - total_possible_executions_per_day
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````