Skip to main content
POST
/
v1
/
workflows
/
{workflow_id}
/
publish
from retab import Retab

client = Retab()

workflow = client.workflows.publish(
    "wf_abc123xyz",
    description="Add vendor-name normalization step",
)

print(workflow.published.version_id)
print(workflow.published.published_at)
{
  "id": "wf_abc123xyz",
  "name": "Invoice Processing",
  "description": "Extract invoice fields and route for review",
  "published": {
    "version_id": "ver_8zJfV7T9qK2mP4xN6bR1cD3eF5gH7iJ9",
    "published_at": "2026-05-01T14:30:00Z"
  },
  "created_at": "2026-04-30T17:00:00Z",
  "updated_at": "2026-05-01T14:30:00Z"
}
Publish the workflow’s current draft as a new immutable version. New runs created via Run Workflow, schedules, or webhooks always execute against the latest published version — edits to the draft after publish do not affect in-flight or future runs until you publish again. Pass an optional description to record what changed in this version.
Publishing happens inside one environment. A test workflow publishes to the test environment; a production workflow publishes to production. To move a workflow from test to production, see Promotion.
from retab import Retab

client = Retab()

workflow = client.workflows.publish(
    "wf_abc123xyz",
    description="Add vendor-name normalization step",
)

print(workflow.published.version_id)
print(workflow.published.published_at)
{
  "id": "wf_abc123xyz",
  "name": "Invoice Processing",
  "description": "Extract invoice fields and route for review",
  "published": {
    "version_id": "ver_8zJfV7T9qK2mP4xN6bR1cD3eF5gH7iJ9",
    "published_at": "2026-05-01T14:30:00Z"
  },
  "created_at": "2026-04-30T17:00:00Z",
  "updated_at": "2026-05-01T14:30:00Z"
}

Authorizations

Api-Key
string
header
required

Path Parameters

workflow_id
string
required

Body

application/json

Optional request body for publishing a workflow.

description
string
default:""

Optional description for this published version

Response

Successful Response

A workflow and its current configuration.

id
string
required

Unique ID for this workflow

created_at
string<date-time>
required
updated_at
string<date-time>
required
name
string
default:Untitled Workflow

The name of the workflow

description
string
default:""

Description of the workflow

project_id
string | null

Project that owns this workflow. Null means the organization's shared workflows project.

published
WorkflowPublished · object

Published workflow metadata when a published version exists

capabilities
enum<string>[] | null

Server-derived permissions for the current actor.

Available options:
workflow:view,
workflow:edit,
workflow:run,
workflow:delete,
workflow:publish,
workflow:review,
workflow:manage
authz_status
enum<string> | null

Provisioning state of this workflow's WorkOS authorization resource.

Available options:
provisioning,
ready,
failed,
deleting,
deleted