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

# Get a Flow Builder flow

> Returns a flow with its draft definition and, when published, its published version. Administrator access is required.



## OpenAPI

````yaml /openapi/application.json get /api/v1/accounts/{account_id}/flow_builder/flows/{id}
openapi: 3.1.0
info:
  title: WiseApp API — Aplicação
  description: >-
    Referência completa da API do WiseApp: plataforma (provisionamento),
    aplicação (conta), cliente (canais públicos) e MCP.
  version: 1.1.0
servers:
  - url: https://chat.wiseapp360.com
    description: Sua instalação WiseApp
security: []
paths:
  /api/v1/accounts/{account_id}/flow_builder/flows/{id}:
    parameters:
      - $ref: '#/components/parameters/account_id'
        schema:
          type: string
        example: sample
      - name: id
        in: path
        required: true
        description: Flow identifier.
        schema:
          type: integer
        example: 12
    get:
      tags:
        - Flow Builder
      summary: Get a Flow Builder flow
      description: >-
        Returns a flow with its draft definition and, when published, its
        published version. Administrator access is required.
      operationId: get-flow-builder-flow
      responses:
        '200':
          description: Flow details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flow_builder_flow'
              example:
                id: 12
                name: Welcome new customers
                status: published
                trigger_type: message_created
                definition:
                  nodes:
                    - id: trigger_1
                      type: trigger
                      position:
                        x: 120
                        'y': 220
                      data:
                        mode: event
                        label: Message received
                        event: message_created
                        once_per_conversation: true
                    - id: message_1
                      type: message
                      position:
                        x: 420
                        'y': 220
                      data:
                        label: Welcome
                        body: >-
                          Hi {{contact.name}}, thanks for writing to us. An
                          agent will reply shortly.
                  edges:
                    - id: edge_trigger_1_message_1
                      source: trigger_1
                      sourceHandle: right
                      target: message_1
                  metadata:
                    schema_version: 1
                created_at: '2026-10-20T09:30:00Z'
                updated_at: '2026-10-27T14:05:00Z'
                description: Greets every new conversation and hands it to the sales team.
                published_at: '2026-10-27T14:05:00Z'
                published_version_id: 31
                published_version:
                  id: 31
                  version_number: 4
                  published_at: '2026-10-27T14:05:00Z'
        '401':
          description: >-
            Unauthenticated, not a member of the account, or not an account
            administrator (Flow Builder is administrator-only).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flow_builder_error'
              example:
                error: You are not authorized to do this action
        '403':
          description: The Flow Builder feature is not enabled for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flow_builder_error'
              example:
                error: Flow Builder is not enabled for this account
        '404':
          description: Resource not found in the account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flow_builder_error'
              example:
                error: Resource could not be found
      security:
        - userApiKey: []
components:
  parameters:
    account_id:
      in: path
      name: account_id
      schema:
        type: integer
      required: true
      description: The numeric ID of the account
  schemas:
    flow_builder_flow:
      type: object
      required:
        - id
        - name
        - status
        - trigger_type
        - definition
        - created_at
        - updated_at
      properties:
        id:
          type: integer
          description: Flow identifier.
          example: 12
        name:
          type: string
          description: Flow name, unique within the account.
          example: Welcome new customers
        description:
          type:
            - string
            - 'null'
          description: Optional description of what the flow does.
          example: Greets every new conversation and hands it to the sales team.
        status:
          type: string
          enum:
            - draft
            - published
            - paused
          description: Lifecycle status. Only published flows run on live events.
          example: published
        trigger_type:
          type: string
          description: >-
            Event of the trigger node, derived from the draft definition when
            the flow is saved (`message_received` is stored as
            `message_created`; a `schedule` start, which has no event, is stored
            as `schedule`). Read-only.
          example: message_created
        definition:
          $ref: '#/components/schemas/flow_builder_definition'
        published_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the flow was last published.
          example: '2026-10-27T14:05:00Z'
        published_version_id:
          type:
            - integer
            - 'null'
          description: ID of the version that runs on live events.
          example: 31
        published_version:
          type: object
          description: Present only when the flow has a published version.
          properties:
            id:
              type: integer
              example: 31
            version_number:
              type: integer
              example: 4
            published_at:
              type: string
              format: date-time
              example: '2026-10-27T14:05:00Z'
        created_at:
          type: string
          format: date-time
          example: '2026-10-20T09:30:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-10-27T14:05:00Z'
    flow_builder_error:
      type: object
      description: >-
        Error returned by Flow Builder endpoints when the feature is disabled,
        the user is not authorized or the resource is missing.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: Flow Builder is not enabled for this account
    flow_builder_definition:
      type: object
      description: >
        Flow graph edited in the Flow Builder canvas. `nodes` holds the blocks
        (exactly one `trigger` node is required to publish),

        `edges` connects the output handle of one block to another block, and
        `metadata` carries the schema version.

        A flow may hold up to 100 nodes. Each block type reads its own keys from
        `data`.
      required:
        - nodes
        - edges
      properties:
        nodes:
          type: array
          maxItems: 100
          items:
            type: object
            required:
              - id
              - type
            properties:
              id:
                type: string
                description: Node identifier, unique within the flow.
                example: trigger_1
              type:
                type: string
                description: Block type.
                enum:
                  - trigger
                  - message
                  - question
                  - condition
                  - switch
                  - set
                  - loop
                  - code
                  - action
                  - handoff
                  - wait
                  - webhook
                  - end
                  - random_split
                  - captain
                  - business_hours
                  - agents_available
                  - kanban
                  - kanban_stage
                  - ai_condition
                  - update_fields
                  - macro
                  - task
                  - calendar_event
                  - http_request
                  - schedule_message
                  - cancel_scheduled
                  - csat
                  - company
                  - contact_lookup
                  - task_condition
                  - task_update
                  - calendar_update
                  - ai_router
                  - ai_classify
                  - ai_summary
                  - ai_translate
                  - custom_tool
                  - ai_extract
                  - stripe_lookup
                  - bot_handoff
                  - team_chat_message
                  - dyte_meeting
                  - account_action
                  - notify_agent
                  - go_to
                  - kanban_search
                  - run_flow
                example: trigger
              position:
                type: object
                description: Canvas coordinates of the block.
                properties:
                  x:
                    type: number
                    example: 120
                  'y':
                    type: number
                    example: 220
              data:
                type: object
                additionalProperties: true
                description: >
                  Block configuration. For a `trigger` node: `mode`, the start
                  type (`event`, `agent_bot` or `schedule`).

                  An `event` or `agent_bot` start takes `event`
                  (`conversation_created`, `conversation_updated`,

                  `message_created`, `message_received`, `message_sent`,
                  `social_comment_received`, `kanban_item_updated`;

                  the legacy `conversation_opened` and `conversation_resolved`
                  keep running for flows that use them), optional

                  `inbox_ids`, `label`, `once_per_conversation`, `ignore_groups`
                  and `ignored_targets` (identifiers or phone

                  numbers the flow does not start for; the editor picks them by
                  contact). A `social_comment_received` start

                  still filters with its saved legacy `comment_platforms`,
                  `comment_post_url`, `comment_keywords` and

                  `comment_top_level_only`, but new flows filter with a
                  `condition` right after the start on

                  `{{ comment.platform }}`, `{{ comment.permalink }}`, `{{
                  comment.post_id }}`, `{{ comment.is_reply }}` and

                  `{{ comment.text }}` (the editor's "Mover a una Condición"
                  does that and clears the keys). `message_sent` starts on a
                  public message a human agent sent (not a

                  bot, flow or campaign message). `kanban_item_updated` starts
                  on a new card, a stage or funnel change and a

                  status change, with `{{ kanban.change }}` (`created`, `stage`,
                  `status`); it takes no card filters (use a

                  `condition` or `switch` block on `{{ kanban.* }}`). Optional
                  `start_on_flow_changes` (default `false`) also

                  starts the flow on events another flow caused, up to 3 hops.
                  Optional `one_run_per_contact` (default

                  `false`) runs the flow once at a time per contact: a start
                  that finds another run of it working for the same

                  contact is retried every 5 seconds and dropped after about one
                  minute. A `schedule` start takes no `event`

                  and runs without a conversation on `schedule`: `{ mode:
                  interval, every, unit: minutes|hours|days|weeks, at,

                  weekdays }` or `{ mode: cron, expression }` (5 fields), never
                  more often than every 5 minutes, in the

                  account's reports time zone; it takes no `inbox_ids`, and the
                  flow may only hold `http_request`, `code`,

                  `condition`, `switch`, `loop`, `account_action` (responsible
                  agent or rotation), `kanban` (with `card_id`, no

                  `create`), `kanban_search`, `run_flow`, `end`, `random_split`
                  and `go_to` blocks. A `run_flow` block starts

                  another published flow of the account (event `flow_called`) at
                  the block after its trigger, ignoring that

                  start's settings except `one_run_per_contact`, with `{{
                  inputs.<key> }}`, up to 3 hops deep. For a `message`

                  node: `body`, attachments, template or interactive options. A
                  block with `result_name` keeps its result for

                  the next blocks as `{{ vars.<result_name>.<key> }}` (and in
                  `run_data.vars`); it is optional on `kanban`

                  (the card: `id`, `title`, `funnel_id`, `stage`, `status`,
                  `labels`, ...), `task` (`id`, `title`, `due_at`,

                  `status`, `priority`, `assignee_id`), `calendar_event` (`id`,
                  `title`, `starts_at`, `ends_at`, `meet_url`),

                  `ai_router` (`option`, `label`), `ai_classify` (`applied`,
                  `target`), `dyte_meeting` (`meeting_id`,

                  `message_id`) and `company` (`id`, `name`, `domain`,
                  `created`). A `condition` or `switch` block also

                  compares values only it computes, when one of its expressions
                  names them: `{{ inbox.working_now }}`,

                  `{{ inbox.online_agents }}`, `{{ teams.<team id>.online_agents
                  }}`, `{{ conversation.tasks.<status> }}`,

                  `{{ conversation.tasks_by_type.<activity type id>.<status> }}`
                  and `{{ card.<key> }}`, the block's card

                  (`card_id`, else the conversation's card, in `card_funnel_id`
                  when set; keys as on `kanban` plus

                  `funnel_stage` `"<funnel id>:<stage>"` and `agents`). The
                  legacy `business_hours`, `agents_available`,

                  `kanban_stage` and `task_condition` blocks keep running; the
                  editor turns them into those `condition` rows.

                  A `task` block takes `operation` (`create` by default,
                  `complete`, `cancel`, `reopen`; the latter three with

                  `target` `flow` or `conversation` and `outcome_summary`,
                  leaving by `right` or `not_found`), and with

                  `link_card` links the new task to the card the Kanban card
                  keys pick. A `calendar_event` block takes

                  `operation` (`create` by default, `reschedule`, `cancel`,
                  leaving by `right` or `not_found`) and `start`

                  `{ amount, unit }` or `{ mode: at_specified_time, run_at }` (a
                  date in the account's time zone, or a variable).

                  The legacy `task_update` and `calendar_update` blocks keep
                  running; the editor turns them into those

                  operations. A `schedule_message` block ("Programar mensaje")
                  reads `when.run_at` in `when.time_zone` (an

                  IANA name; absent, in UTC as before) and leaves by `error`
                  when it cannot schedule (a past date, nobody to

                  send it); without that edge the step fails, as before. A
                  `csat` block takes `resolve_first` ("Resolver

                  antes"); after `not_sent`, `{{ input.reason }}` tells why. An
                  `ai_extract` block in `attributes` mode takes

                  `attribute_keys` (a closed list of contact attribute keys, the
                  only ones kept) and `save_to_contact`

                  (writes them to the contact; needs the list). An
                  `ai_translate` block takes `target_language`

                  `conversation_language` for the language detected in the
                  conversation. A `custom_tool` block leaves by

                  `error` without calling the tool when a required parameter is
                  empty. A `kanban` block takes `mode` (`create`,

                  `move`, `status`, `assign`, `note`, `checklist_add`,
                  `checklist_complete`, `labels` with `labels` and

                  `label_action` add, remove or replace, or `delete`); every
                  mode but `create` works on the card `card_id` names

                  (for example `{{ kanban.id }}` under a `kanban_item_updated`
                  start or `{{ loop.item.id }}` in a loop over

                  `kanban_search` results), else on the conversation's card,
                  leaves by `no_card` when it finds no card, picks the

                  conversation's card with `card_funnel_id`, `card_stage`,
                  `card_status` and `card_labels`, and needs

                  `confirm_loop_delete` to delete inside a loop; `kanban_search`
                  leaves by `none` without cards. Without an

                  edge on `no_card` or `none` they go on by `right`, as blocks
                  saved before. A `notify_agent` block

                  ("Avisar al equipo") takes `mode` (`notification` by default,
                  or `room` with `chat_room_id` to post the text in

                  a chat room as the responsible, behind the `chat_rooms`
                  feature); the legacy `team_chat_message` block keeps

                  running and the editor turns it into that `room` mode. A
                  `handoff` block takes `to` (`inbox` by default,

                  `team` with `team_id`, `agent` with `agent_id`, who must be
                  assignable in the inbox) and `end_flow` (`true`

                  ends the run after the handoff; absent or `false` goes on by
                  `right`, as blocks saved before). An `end` block

                  does not resolve the conversation. An `action` block
                  ("Acciones") runs every action and leaves by `error`

                  when one failed and that edge exists; without it, it goes on
                  by `right` as blocks saved before. Its Kanban,

                  `send_message`, `send_attachment` and comment actions keep
                  running in saved blocks, but the editor offers the

                  `kanban`, `message` and comment blocks for them; a `message`
                  with `send_as` set to a comment reply is legacy

                  the same way. A block that acts on the starting comment under
                  a start that never receives comments is a

                  warning (`comment_without_comment_start`). An `account_action`
                  block ("Leer datos de la cuenta (avanzado)")

                  takes `{{ contact.id }}` or `{{ conversation.id }}` (the
                  run's) as its path id; the editor offers

                  `contacts_conversations`, `contact_notes_list`,
                  `conversations_get`, `messages_list`, `labels_list`,

                  `canned_responses_list` and `companies_search`, and the other
                  allowed reads keep running in saved blocks.

                  The `code`, `http_request`, AI (`ai_router`, `ai_classify`,
                  `ai_summary`, `ai_translate`, `ai_extract`),

                  `custom_tool`, `stripe_lookup`, `dyte_meeting`,
                  `account_action` and `schedule_message` blocks leave by
                  `error`

                  when they fail: the step is kept as an `error` (in the
                  execution's `failed_steps`) and the run goes on there;

                  without that edge the run fails at that step. An
                  `http_request` block with `redact_response` keeps its answer
                  for the next blocks during the run and stores

                  its body as `[redacted]` in the execution history once the run
                  ends.

                  Every key per block: `GET
                  /flow_builder/block_reference?types=`.
                example:
                  mode: event
                  event: message_created
                  label: Message received
                  once_per_conversation: true
        edges:
          type: array
          items:
            type: object
            required:
              - source
              - target
            properties:
              id:
                type: string
                description: Edge identifier.
                example: edge_trigger_1_message_1
              source:
                type: string
                description: Node ID the connection leaves from.
                example: trigger_1
              sourceHandle:
                type: string
                description: >-
                  Output handle of the source node (`right` for the default
                  output; blocks with several outputs use their route names).
                example: right
              target:
                type: string
                description: Node ID the connection goes to. It must differ from `source`.
                example: message_1
        metadata:
          type: object
          additionalProperties: true
          properties:
            schema_version:
              type: integer
              example: 1
      example:
        nodes:
          - id: trigger_1
            type: trigger
            position:
              x: 120
              'y': 220
            data:
              mode: event
              label: Message received
              event: message_created
              once_per_conversation: true
          - id: message_1
            type: message
            position:
              x: 420
              'y': 220
            data:
              label: Welcome
              body: >-
                Hi {{contact.name}}, thanks for writing to us. An agent will
                reply shortly.
        edges:
          - id: edge_trigger_1_message_1
            source: trigger_1
            sourceHandle: right
            target: message_1
        metadata:
          schema_version: 1
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: api_access_token
      description: >-
        Token de acesso do usuário (Perfil → Token de acesso). Dá acesso
        conforme o papel do usuário e age em nome dele.

````

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