On this page

promote-flow

Snapshot a process flow exactly as it stands now and record that snapshot as its next version, becoming the live one. Use this when a flow's structure is where you want it — editing a flow records nothing on its own, so without a promote there is no history to return to. The previous live version becomes superseded; version numbers only ever increase. Admin role required.

What it is called on each surface

The wire name is promote-flow everywhere: it is what the Wexa MCP server advertises, the REST path is POST /v1/promote-flow, and each SDK exposes it under its own language's naming convention.

SurfaceName
Wexa MCP serverpromote-flow
REST APIPOST /v1/promote-flow
TypeScript SDKfabric.promoteFlow()
Python SDKfabric.promote_flow()

Arguments

1 of the 1 argument is required. Omitting a required one is refused before the tool runs, at the validation stage, so it costs nothing and changes nothing.

ArgumentTypeRequiredNotes
process_flow_idstringRequiredProcess flow id. Required.

project_id, projectID, organization_id and executed_by are not arguments you pass: the platform binds all four from the credential you authenticated with, and both SDKs refuse them before the request leaves your process — see server-bound arguments.

What it returns

The three surfaces wrap this differently, and code written against one will not read another correctly — see return shape.

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

snapshot came back populated and is shown as … here, because the real value runs to thousands of characters. Read it from your own call rather than from this page.

{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000181\",\"result\":{\"id\":\"fver_9f3fc6a6-4f55-44d6-b7ba-c2329a8e0461\",\"agentflowId\":\"6ab1945e7566f41b5c28e308\",\"version\":2,\"status\":\"promoted\",\"snapshot\":\"\\u2026\",\"agentCount\":1,\"promotedBy\":\"6a79a770b6c128ccc24bfca7\",\"promotedAt\":\"2026-09-21T20:41:37.225918542Z\",\"parentVersion\":1}}"
    }
  ],
  "isError": false
}

Keeping the lifecycle_id is what lets you ask later why a call was allowed, refused or held.

Calling it

The same call on all four surfaces. Pick a tab once and every code block in the documentation follows it.

The ids in this example are real: they resolve against the project the documentation is written against, so the call runs as written once you point it at your own deployment. Swap them for the ids of your own objects.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "promote-flow",
    "arguments": {
      "process_flow_id": "6ab1945e7566f41b5c28e308"
    }
  }
}

Errors

Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its HTTP status second. promote-flow checks the fabric:orchestrate.write grant, and reaches the seven classes every tool reaches — listed under the common set. These are the ones specific to it:

ErrorStatusRaised when
NotFound404process_flow_id matches no process flow in this project.
ApprovalRequired202A policy held this call for a person to approve. The error carries the approval id; see below.
ConfigurationError5xxpromote-flow is not available to you. Retrying will not help.

Governance

Every call to promote-flow runs through the same ten-stage lifecycle as every other Wexa tool: the credential is resolved to a scope, the fabric:orchestrate.write grant is checked, quota is drawn down, the arguments are validated, policy rules are evaluated, the call is executed, the result is shaped and redacted, and an audit record is written. The lifecycle_id in the response is the handle to that record.

promote-flow is marked consequential, which means it changes something rather than only reading. Two things follow. It is audited in full rather than lightly, and a policy rule may hold it for human approval — in which case the call returns 202 and an ApprovalRequired error carrying the approval id, and the SDKs can wait for the decision and resume rather than making you call again.

See also

The tool index, errors, and which identifier goes where.