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.snapshot_id)
print(workflow.published.published_at)
{
  "id": "wf_abc123xyz",
  "name": "Invoice Processing",
  "description": "Extract invoice fields and route for review",
  "organization_id": "org_123",
  "published": {
    "snapshot_id": "snap_v3_def456",
    "published_at": "2026-05-01T14:30:00Z"
  },
  "email_trigger": {
    "allowed_senders": [],
    "allowed_domains": ["acme.com"]
  },
  "created_at": "2026-04-30T17:00:00Z",
  "updated_at": "2026-05-01T14:30:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

Use this file to discover all available pages before exploring further.

Publish the workflow’s current draft as a new immutable snapshot. New runs created via Run Workflow, email triggers, schedules, or webhooks always execute against the latest published snapshot — 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.
from retab import Retab

client = Retab()

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

print(workflow.published.snapshot_id)
print(workflow.published.published_at)
{
  "id": "wf_abc123xyz",
  "name": "Invoice Processing",
  "description": "Extract invoice fields and route for review",
  "organization_id": "org_123",
  "published": {
    "snapshot_id": "snap_v3_def456",
    "published_at": "2026-05-01T14:30:00Z"
  },
  "email_trigger": {
    "allowed_senders": [],
    "allowed_domains": ["acme.com"]
  },
  "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

Query Parameters

access_token
string | null

Body

application/json

Optional request body for publishing a workflow.

description
string
default:""

Optional description for this published version

Response

Successful Response

Public workflow resource returned by workflow metadata endpoints.

id
string
required

Unique ID for this workflow

name
string
default:Untitled Workflow

The name of the workflow

description
string
default:""

Description of the workflow

organization_id
string | null

The organization that owns this workflow

published
WorkflowPublished · object

Published workflow metadata when a published snapshot exists

email_trigger
WorkflowEmailTrigger · object

Email trigger allowlist policy

email_senders_whitelist
string[]

Legacy mirror of allowed sender email addresses.

email_domains_whitelist
string[]

Legacy mirror of allowed sender email domains.

created_at
string<date-time>
updated_at
string<date-time>