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

# Get the agent flow graph

> Returns the tenant's active flow mode, its routing topology (source agent and
the targets it routes to), standalone agents, and active channels. Each agent
node carries its label, description, provider/model and whether a prompt is
configured. Icons, tones, layout and rendering are left to the client.



## OpenAPI

````yaml get /v1/agent-prompts/flow
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/agent-prompts/flow:
    get:
      tags:
        - AgentPrompt
      summary: Get the agent flow graph
      description: >-
        Returns the tenant's active flow mode, its routing topology (source
        agent and

        the targets it routes to), standalone agents, and active channels. Each
        agent

        node carries its label, description, provider/model and whether a prompt
        is

        configured. Icons, tones, layout and rendering are left to the client.
      operationId: agentPrompt.flow
      parameters:
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    type: object
                    properties:
                      active_mode:
                        type: string
                        enum:
                          - mod2
                          - mod1
                      mode:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: string
                          label:
                            type: string
                          source:
                            type: object
                            properties:
                              type:
                                type: string
                              label:
                                type:
                                  - string
                                  - 'null'
                              description:
                                type:
                                  - string
                                  - 'null'
                              is_configured:
                                type: boolean
                              prompt_id:
                                type:
                                  - string
                                  - 'null'
                              provider:
                                type: object
                                properties:
                                  name:
                                    type: string
                                  model:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  displayModel:
                                    type: string
                                required:
                                  - name
                                  - model
                                  - displayModel
                            required:
                              - type
                              - label
                              - description
                              - is_configured
                              - prompt_id
                              - provider
                          targets:
                            type: array
                            items: {}
                        required:
                          - id
                          - label
                          - source
                          - targets
                      standalone:
                        type: array
                        items: {}
                      channels:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                  const: channel-instagram
                                type:
                                  type: string
                                label:
                                  type: string
                                  enum:
                                    - WhatsApp
                                    - Instagram
                                    - Website
                                    - Telegram
                              required:
                                - id
                                - type
                                - label
                            - type: object
                              properties:
                                id:
                                  type: string
                                  const: channel-whatsapp
                                type:
                                  type: string
                                label:
                                  type: string
                                  enum:
                                    - WhatsApp
                                    - Instagram
                                    - Website
                                    - Telegram
                              required:
                                - id
                                - type
                                - label
                            - type: object
                              properties:
                                id:
                                  type: string
                                  const: channel-telegram
                                type:
                                  type: string
                                label:
                                  type: string
                                  enum:
                                    - WhatsApp
                                    - Instagram
                                    - Website
                                    - Telegram
                              required:
                                - id
                                - type
                                - label
                            - type: object
                              properties:
                                id:
                                  type: string
                                  const: channel-website
                                type:
                                  type: string
                                label:
                                  type: string
                                  enum:
                                    - WhatsApp
                                    - Instagram
                                    - Website
                                    - Telegram
                              required:
                                - id
                                - type
                                - label
                    required:
                      - active_mode
                      - mode
                      - standalone
                      - channels
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '428':
          description: >-
            Mandatory setup is incomplete. Finish the setup wizard first;
            `data.next_step` names the step to continue with.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - false
                  error_code:
                    type: string
                    enum:
                      - SETUP_REQUIRED
                    examples:
                      - SETUP_REQUIRED
                  message:
                    type: string
                    examples:
                      - Complete the required setup steps to continue.
                  data:
                    type: object
                    properties:
                      next_step:
                        type:
                          - string
                          - 'null'
                        examples:
                          - clinic_info
                    required:
                      - next_step
                required:
                  - success
                  - error_code
                  - message
                  - data
components:
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

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