> Source: https://wexa.ai/docs/automation/flow-versions

# flow-versions

List a process flow's promoted versions, newest first, with which one is live. Needs the `fabric:orchestrate.read` grant.

**List a process flow's versions**

**Wexa MCP server**

```bash
curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"flow-versions","arguments":{"process_flow_id":"6ab1945e7566f41b5c28e308"}}}'
```

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000180\",\"result\":{\"live_version\":1,\"process_flow_id\":\"6ab1945e7566f41b5c28e308\",\"versions\":[{\"id\":\"fver_c9593de3-f85c-48bb-bf39-32c923cf467e\",\"version\":1,\"status\":\"promoted\",\"agentCount\":0,\"promotedAt\":\"2026-09-21T20:32:39.381Z\"}]}}"
    }
  ],
  "isError": false
}
```

**REST API**

```bash
curl -sS https://fabric.wexa.ai/v1/flow-versions \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"process_flow_id":"6ab1945e7566f41b5c28e308"}'
```

```json
{
  "lifecycle_id": "qlc_000180",
  "result": {
    "live_version": 1,
    "process_flow_id": "6ab1945e7566f41b5c28e308",
    "versions": [
      {
        "id": "fver_c9593de3-f85c-48bb-bf39-32c923cf467e",
        "version": 1,
        "status": "promoted",
        "agentCount": 0,
        "promotedAt": "2026-09-21T20:32:39.381Z"
      }
    ]
  }
}
```

**TypeScript SDK**

```ts
import { Fabric } from '@wexa-fabric/sdk'

const fabric = new Fabric()
const result = await fabric.flowVersions({
  process_flow_id: '6ab1945e7566f41b5c28e308'
})
```

```ts
// result is the payload itself, with no `.result` to read
{
  live_version: 1,
  process_flow_id: '6ab1945e7566f41b5c28e308',
  versions: [
    {
      id: 'fver_c9593de3-f85c-48bb-bf39-32c923cf467e',
      version: 1,
      status: 'promoted',
      agentCount: 0,
      promotedAt: '2026-09-21T20:32:39.381Z'
    }
  ]
}
```

**Python SDK**

```python
from wexa import Fabric

fabric = Fabric()
out = fabric.flow_versions(
    process_flow_id="6ab1945e7566f41b5c28e308",
)
```

```python
# out is the result, already unwrapped
{
    "live_version": 1,
    "process_flow_id": "6ab1945e7566f41b5c28e308",
    "versions": [
        {
            "id": "fver_c9593de3-f85c-48bb-bf39-32c923cf467e",
            "version": 1,
            "status": "promoted",
            "agentCount": 0,
            "promotedAt": "2026-09-21T20:32:39.381Z"
        }
    ]
}
```

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `process_flow_id` | string | Required | Process flow id. A process flow in this project. |
| `include_snapshot` | boolean | Optional | Include each version's full process flow snapshot (large). Default false: the list is for choosing a version, not reading one. |

**Errors**

- `NotFound` (404): the process flow has no version history yet.

**Show full response**

A real response, captured from a live call to `flow-versions`:

**Result of flow-versions**

**REST API**

```json
{
  "lifecycle_id": "qlc_000180",
  "result": {
    "live_version": 1,
    "process_flow_id": "6ab1945e7566f41b5c28e308",
    "versions": [
      {
        "id": "fver_c9593de3-f85c-48bb-bf39-32c923cf467e",
        "agentflowId": "6ab1945e7566f41b5c28e308",
        "version": 1,
        "status": "promoted",
        "agentCount": 0,
        "promotedBy": "6a79a770b6c128ccc24bfca7",
        "promotedAt": "2026-09-21T20:32:39.381Z"
      }
    ]
  }
}
```

**TypeScript SDK**

```ts
// the object you get back IS the result — there is no `.result` to read
{
  live_version: 1,
  process_flow_id: '6ab1945e7566f41b5c28e308',
  versions: [
    {
      id: 'fver_c9593de3-f85c-48bb-bf39-32c923cf467e',
      agentflowId: '6ab1945e7566f41b5c28e308',
      version: 1,
      status: 'promoted',
      agentCount: 0,
      promotedBy: '6a79a770b6c128ccc24bfca7',
      promotedAt: '2026-09-21T20:32:39.381Z'
    }
  ]
}

// The TS SDK names these camelCase — lifecycleId, traceId — where Python uses
// lifecycle_id and trace_id. Both are non-enumerable: readable, but omitted by
// Object.keys() and JSON.stringify(). `result.lifecycleId` here is undefined.
result.lifecycleId // 'qlc_000180'
```

**Python SDK**

```python
# a dict subclass; `result` is already unwrapped
{
 "live_version": 1,
 "process_flow_id": "6ab1945e7566f41b5c28e308",
 "versions": [
  {
   "id": "fver_c9593de3-f85c-48bb-bf39-32c923cf467e",
   "agentflowId": "6ab1945e7566f41b5c28e308",
   "version": 1,
   "status": "promoted",
   "agentCount": 0,
   "promotedBy": "6a79a770b6c128ccc24bfca7",
   "promotedAt": "2026-09-21T20:32:39.381Z"
  }
 ]
}

out.lifecycle_id  # 'qlc_000180' — an attribute, not a key
```

**More details**

Each version is a snapshot of the whole process flow taken when it was promoted: every agent, its config, and the wiring. It captures structural changes (agents added, rewired, removed) that per-agent versions cannot. A process flow and the agents it names have their own histories, promoted and rolled back independently. See [agent versions](/docs/agents/agent-versions).

Status is `promoted`, `superseded` or `rolled_back`. `live_version` is authoritative and is not necessarily the highest number, because a rollback makes an earlier version live again without renumbering.

Promote with [`promote-flow`](/docs/automation/promote-flow); change which version is live with [`rollback-flow-version`](/docs/automation/rollback-flow-version).

Not marked consequential: it is audited lightly and the project's write gate never holds it.

Every tool call works the same way: [How every tool call works](/docs/sdks-and-apis/how-every-tool-call-works).
