---
title: "Fetch Workflow Structure"
method: GET
path: "/workflows/{id}/structure"
tags: ["Workflow"]
---

# Fetch Workflow Structure

`GET /workflows/{id}/structure`

Returns the workflow's complete tree in a single call: the workflow header,
its active triggers (summary shape), and the ordered list of visible steps with
branching inlined. Internal container nodes are spliced out.

Split steps carry their child branches or variants directly in the response:
- `conditional_split_step`: `branches` — always `[{branch: "matched", steps: [...]}, {branch: "unmatched", steps: [...]}]`
- `split_test_step`: `variants` — each entry has `weight` and `steps`.

Walk the `steps` array in order to follow execution flow. `sort_order` is
container-local and is not globally unique across the tree.

## Path parameters

- `id` string, required

## Response `200`

OK

- WorkflowStructureAttributes — A complete tree view of a workflow — its header, triggers, and the ordered list of visible steps. Internal container nodes (sequence steps, end-step markers) are spliced out. Split steps expose their child branches or variants inline. Step entries share a common shape (`id`, `public_id`, `step_type`, `name`, `sort_order`, `state`, `step_type_settings`) and gain type-specific fields: - **`conditional_split_step`**: `convergence_step_id` + `branches` array (`matched` / `unmatched`), each branch carrying its own `steps`. - **`split_test_step`**: `convergence_step_id` + `variants` array (each with `weight` and `steps`). - All other step types: no extra branching fields.
  - `workflow` object — Summary header of the workflow.
    - `id` integer
    - `public_id` string
    - `name` string
    - `status` 'draft' | 'live' | 'archived'
    - `disabled` boolean
    - `archived` boolean
    - `run_type` string
  - `triggers` object[] — Active triggers attached to the workflow (summary shape).
    - `id` integer
    - `public_id` string
    - `event_type_key` string
    - `active` boolean
    - `allow_anonymous_contacts` boolean
  - `steps` object[] — Ordered visible steps. Splits are inlined with their child steps. Walk this array top-to-bottom to follow the execution order.
    - `id` integer
    - `public_id` string
    - `step_type` string — The step class key, e.g. `send_email_step`, `delay_step`, `conditional_split_step`.
    - `name` string
    - `sort_order` integer — Position within its own container — not globally unique across the tree.
    - `state` 'active' | 'notSetup' | 'notDefined'
    - `step_type_settings` object — One-key map whose key is the step type. See Workflows::Step for the per-type shape.
    - `convergence_step_id` integer, nullable — Split steps only. Id of the step where this split's branches reconverge — the first step that runs after the split, which every branch continues to. Example: a conditional_split_step (id 203) whose matched/unmatched branches both lead to the same next step (id 206) → convergence_step_id: 206. null when nothing follows the split (it ends the flow). The referenced step always appears in this tree.
    - `branches` object[] — conditional_split_step only. Always `[matched, unmatched]`.
      - `branch` 'matched' | 'unmatched'
      - `steps` object[]
    - `variants` object[] — split_test_step only.
      - `weight` integer
      - `steps` object[]

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/myclickfunnels/apis/clickfunnels-api.md) · [All operations](https://skmtc.net/myclickfunnels/apis/clickfunnels-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myclickfunnels/clickfunnels-api/revisions/ae6313eaa176/schema)
