create_release
Create an immutable release (versioned snapshot) of a draft workflow. The current draft graph is snapshotted server-side; the draft stays editable. The draft must pass validation — fix any errors (see update_workflow with preview: true) before releasing.
Run a release via run_workflow with target="production" or the release id.
Parameters#
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workflow_id | string | yes | The draft workflow id (agent_…) | |
name | string | no | Name for the snapshot (defaults to the workflow name) | |
notes | string | no | "" | Release notes |
set_production | boolean | no | false | If true, also promote this release to production |
Returns#
json
{
"release_id": "release_abc",
"snapshot_id": "agent_snap_123",
"name": "Enrich Contact",
"notes": "Switch to Fable 5",
"is_production": true,
"created_at": "2026-06-09T12:00:00Z"
}Errors#
error_type | When |
|---|---|
auth_error | Missing / invalid API key |
not_found | Workflow id doesn’t exist or is outside your org |
validation_error | The draft graph doesn’t currently pass validation |
See also#
list_releases— see all versionsset_production_release— promote later instead of at create time