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

# List flows

> List every flow on a branch, including each flow's steps, step conditions, and transition functions.



## OpenAPI

````yaml api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/flows
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/branches/{branchId}/flows:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: branchId
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Flows
      summary: List flows
      description: >-
        List every flow on a branch, including each flow's steps, step
        conditions, and transition functions.
      operationId: listFlows
      responses:
        '200':
          description: List of flows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFlowsPublicResponse'
              example:
                - id: flow_8f2c1a7e
                  name: Book a table
                  description: >-
                    Collects party size, date, and time, then checks
                    availability and confirms the booking.
                  startStepId: step_collect_details
                  steps:
                    - id: step_collect_details
                      type: default_step
                      name: Collect booking details
                      prompt: >-
                        Ask the caller for their party size, preferred date, and
                        preferred time.
                      position:
                        x: 0
                        'y': 0
                      conditions:
                        - id: cond_details_collected
                          type: stepCondition
                          label: Details collected
                          description: The caller has provided party size, date, and time.
                          childStepId: step_check_availability
                          requiredEntities:
                            - party_size
                            - booking_date
                            - booking_time
                      references:
                        entities:
                          party_size: true
                          booking_date: true
                          booking_time: true
                    - id: step_check_availability
                      type: function_step
                      name: Check availability
                      position:
                        x: 0
                        'y': 200
                      conditions:
                        - id: cond_exit
                          type: exitFlowCondition
                          label: Booking complete
                      function:
                        id: fn_check_availability
                        name: check_availability
                        code: |
                          def check_availability(conv: Conversation):
                              return {"available": True}
                        latencyControl:
                          enabled: false
                  transitionFunctions:
                    - id: tf_confirm_booking
                      name: confirm_booking
                      description: Confirms the booking once the caller agrees.
                      code: >
                        def confirm_booking(conv: Conversation, party_size:
                        int):
                            return {"confirmed": True}
                      parameters:
                        - id: param_party_size
                          name: party_size
                          type: integer
                          description: Number of guests in the booking.
                      references:
                        flowSteps:
                          step_check_availability: true
components:
  schemas:
    ListFlowsPublicResponse:
      title: ListFlowsPublicResponse
      type: array
      items:
        $ref: '#/components/schemas/CreateFlowPublicResponse'
    CreateFlowPublicResponse:
      title: CreateFlowPublicResponse
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        startStepId:
          type: string
        steps:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
                enum:
                  - default_step
                  - advanced_step
                  - function_step
              name:
                type: string
              prompt:
                type: string
              position:
                type: object
                properties:
                  x:
                    type: number
                  'y':
                    type: number
                required:
                  - x
                  - 'y'
                additionalProperties: false
              conditions:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    type:
                      type: string
                      enum:
                        - exitFlowCondition
                        - noCodeStepCondition
                        - stepCondition
                        - functionStepCondition
                    label:
                      type: string
                    description:
                      type: string
                    childStepId:
                      type: string
                    requiredEntities:
                      type: array
                      items:
                        type: string
                  required:
                    - id
                    - type
                    - label
                  additionalProperties: false
              references:
                type: object
                properties:
                  entities:
                    type: object
                    additionalProperties:
                      type: boolean
                  attributes:
                    type: object
                    additionalProperties:
                      type: boolean
                  variables:
                    type: object
                    additionalProperties:
                      type: boolean
                  extractedEntities:
                    type: object
                    additionalProperties:
                      type: boolean
                  transitionFunctions:
                    type: object
                    additionalProperties:
                      type: boolean
                  globalFunctions:
                    type: object
                    additionalProperties:
                      type: boolean
                  sms:
                    type: object
                    additionalProperties:
                      type: boolean
                  handoff:
                    type: object
                    additionalProperties:
                      type: boolean
                additionalProperties: false
              function:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  code:
                    type: string
                  latencyControl:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                      randomize:
                        type: boolean
                      initialDelay:
                        type: number
                      interval:
                        type: number
                    required:
                      - enabled
                    additionalProperties: false
                required:
                  - id
                  - name
                  - code
                additionalProperties: false
            required:
              - id
              - type
              - name
            additionalProperties: false
        transitionFunctions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              code:
                type: string
              description:
                type: string
              parameters:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    type:
                      type: string
                    description:
                      type: string
                  required:
                    - id
                    - name
                    - type
                  additionalProperties: false
              references:
                type: object
                properties:
                  flowSteps:
                    type: object
                    additionalProperties:
                      type: boolean
                  variables:
                    type: object
                    additionalProperties:
                      type: boolean
                additionalProperties: false
            required:
              - id
              - name
              - code
            additionalProperties: false
      required:
        - id
        - name
        - description
        - startStepId
        - steps
        - transitionFunctions
      additionalProperties: false
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````