Workflow promotion records an operator release decision for a single workflow target. Its state reports the assigned version per environment and promotion history; a promotion records the candidate version, source, destination, note, and actor.
Targets are stable; versions move
The workflow target identifies the deployable system, while a workflow version is the candidate artifact. Promotion changes the environment's selected version and appends history rather than editing old releases.
Gate evidence is part of the decision
to_environment is validated as development, staging, or production. from_environment is only normalized and recorded as descriptive history, defaulting to the target's current environment; the endpoint does not validate a transition or enforce an eval result.
Before you begin
A signed-in browser session with a selected workspace backed by an active membership is required; an archived workspace remains readable but rejects mutations. Every /api/v1/operator endpoint rejects API credentials and bearer tokens, regardless of their scopes.
Any role on an active membership can read promotion state. Only owners and admins can promote; members and auditors cannot. The target and version must belong to the selected workspace.
Run and review the relevant eval suite before promoting a candidate, especially when it is configured as a release gate; this endpoint does not evaluate that evidence for you.
How it works
Read current state
Open the target in /app/evals/targets, copy its canonical ID, and read promotions. Confirm the source environment currently points to the intended version and inspect prior notes and actors.
Promote and reconcile
Submit the exact workflow_version_id, optional from_environment, required to_environment, and a concise note through the CSRF-protected session. Re-read state and verify environment_versions plus the appended promotion_history.
Examples
These examples are illustrative. Replace the sample values with your own.
Keep credentials in environment variables or a secret manager, never in client-side code.
Read a target's promotion state
Paste a workflow target UUID from the operator console; the request is read-only and remains same-origin.
javascript
const id = window.prompt("Workflow target UUID");
if (!id) throw new Error("A UUID is required");
const path = "/api/v1/operator/workflow_targets/ID/promotions".replace("ID", encodeURIComponent(id));
const response = await fetch(path, {
credentials: "same-origin",
headers: {"Accept": "application/json"}
});
const body = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${body.detail}`);
console.log(body);
What to expect
200 OK. The response has a top-level promotion_state object with target_id, target_slug, active_environment, environment_versions, resolved_versions, and promotion_history; a foreign target returns 404.
Troubleshooting
Promotion is rejected with 400
Check that the nested promotion body names workflow_version_id and to_environment, with optional from_environment, and that the candidate version belongs to this target.
Promotion is forbidden
Only owners and admins may promote; members and auditors are rejected even though they can read the state. Archived workspaces also reject every mutation.
Endpoint reference
Ready to integrate? Open an endpoint for its required permissions, request fields,
response format, and status codes. The examples above explain the workflow;
these details define each individual request.
GET
/api/v1/operator/workflow_targets/:workflow_target_id/promotions
Web Session
Get workflow promotion state
Description
Returns environment-to-version assignments and recent promotion history for a workflow target.
Auth
Web Session
Parameters
Name
In
Type
Required
Description
workflow_target_id
path
string
Yes
Workflow target UUID
Responses
200
Promotion state for workflow target
Returns: WorkflowPromotionState
404
Workflow target not found
POST
/api/v1/operator/workflow_targets/:workflow_target_id/promotions
Web Session
Promote workflow version
Description
Promotes a workflow version to a target environment and records promotion history.
Auth
Web Session
Request Body
Field
Type
Required
Description
promotion
object
Yes
Promotion attributes
promotion.note
string
No
Promotion note
promotion.workflow_version_id
string
Yes
Workflow version UUID to promote
promotion.from_environment
string
No
Arbitrary source environment label retained as descriptive metadata; omitted when unknown.