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)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const workflow = await client.workflows.publish("wf_abc123xyz", "Add vendor-name normalization step");
console.log(workflow.published.versionId);
console.log(workflow.published.publishedAt);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
workflow, err := client.Workflows.Publish(ctx, "wf_abc123xyz", &retab.WorkflowsPublishParams{
Body: retab.PublishWorkflowRequest{
Description: ptr("Add vendor-name normalization step"),
},
})
if err != nil {
log.Fatal(err)
}
if workflow.Published != nil {
fmt.Println(workflow.Published.VersionID)
fmt.Println(workflow.Published.PublishedAt)
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
workflow = client.workflows.publish(
workflow_id: 'wf_abc123xyz',
description: 'Add vendor-name normalization step',
)
puts workflow.published.version_id
puts workflow.published.published_at
use retab::models::PublishWorkflowRequest;
use retab::resources::workflows::PublishParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let workflow = client
.workflows()
.publish(
"wf_abc123xyz",
PublishParams {
body: Some(PublishWorkflowRequest {
description: Some("Add vendor-name normalization step".into()),
}),
},
)
.await?;
if let Some(published) = &workflow.published {
println!("{}", published.version_id.as_deref().unwrap_or(""));
println!("{}", published.published_at.as_deref().unwrap_or(""));
}
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->publish(
workflowId: 'wf_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.PublishAsync("wf_abc123", new WorkflowsPublishOptions());
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.workflows().publish("wf_abc123");
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows/wf_abc123xyz/publish' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"description": "Add vendor-name normalization step"
}'
{
"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"
}
{
"detail": "Workflow has structural errors and cannot be published"
}
{
"detail": "Workflow not found"
}
Publish Workflow
Publish a workflow.
This creates an immutable snapshot of the workflow configuration, making it available for workflow runs. The live entities remain unchanged so users can continue editing.
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)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const workflow = await client.workflows.publish("wf_abc123xyz", "Add vendor-name normalization step");
console.log(workflow.published.versionId);
console.log(workflow.published.publishedAt);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
workflow, err := client.Workflows.Publish(ctx, "wf_abc123xyz", &retab.WorkflowsPublishParams{
Body: retab.PublishWorkflowRequest{
Description: ptr("Add vendor-name normalization step"),
},
})
if err != nil {
log.Fatal(err)
}
if workflow.Published != nil {
fmt.Println(workflow.Published.VersionID)
fmt.Println(workflow.Published.PublishedAt)
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
workflow = client.workflows.publish(
workflow_id: 'wf_abc123xyz',
description: 'Add vendor-name normalization step',
)
puts workflow.published.version_id
puts workflow.published.published_at
use retab::models::PublishWorkflowRequest;
use retab::resources::workflows::PublishParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let workflow = client
.workflows()
.publish(
"wf_abc123xyz",
PublishParams {
body: Some(PublishWorkflowRequest {
description: Some("Add vendor-name normalization step".into()),
}),
},
)
.await?;
if let Some(published) = &workflow.published {
println!("{}", published.version_id.as_deref().unwrap_or(""));
println!("{}", published.published_at.as_deref().unwrap_or(""));
}
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->publish(
workflowId: 'wf_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.PublishAsync("wf_abc123", new WorkflowsPublishOptions());
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.workflows().publish("wf_abc123");
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows/wf_abc123xyz/publish' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"description": "Add vendor-name normalization step"
}'
{
"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"
}
{
"detail": "Workflow has structural errors and cannot be published"
}
{
"detail": "Workflow not found"
}
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.version_id)
print(workflow.published.published_at)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const workflow = await client.workflows.publish("wf_abc123xyz", "Add vendor-name normalization step");
console.log(workflow.published.versionId);
console.log(workflow.published.publishedAt);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
workflow, err := client.Workflows.Publish(ctx, "wf_abc123xyz", &retab.WorkflowsPublishParams{
Body: retab.PublishWorkflowRequest{
Description: ptr("Add vendor-name normalization step"),
},
})
if err != nil {
log.Fatal(err)
}
if workflow.Published != nil {
fmt.Println(workflow.Published.VersionID)
fmt.Println(workflow.Published.PublishedAt)
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
workflow = client.workflows.publish(
workflow_id: 'wf_abc123xyz',
description: 'Add vendor-name normalization step',
)
puts workflow.published.version_id
puts workflow.published.published_at
use retab::models::PublishWorkflowRequest;
use retab::resources::workflows::PublishParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let workflow = client
.workflows()
.publish(
"wf_abc123xyz",
PublishParams {
body: Some(PublishWorkflowRequest {
description: Some("Add vendor-name normalization step".into()),
}),
},
)
.await?;
if let Some(published) = &workflow.published {
println!("{}", published.version_id.as_deref().unwrap_or(""));
println!("{}", published.published_at.as_deref().unwrap_or(""));
}
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->publish(
workflowId: 'wf_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.PublishAsync("wf_abc123", new WorkflowsPublishOptions());
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.workflows().publish("wf_abc123");
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows/wf_abc123xyz/publish' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"description": "Add vendor-name normalization step"
}'
{
"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"
}
{
"detail": "Workflow has structural errors and cannot be published"
}
{
"detail": "Workflow not found"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Optional request body for publishing a workflow.
Optional description for this published version
Response
Successful Response
A workflow and its current configuration.
Unique ID for this workflow
The name of the workflow
Description of the workflow
Project that owns this workflow. Null only on legacy rows that predate the project backfill.
Published workflow metadata when a published version exists
Show child attributes
Show child attributes
Server-derived permissions for the current actor.
workflow:view, workflow:edit, workflow:run, workflow:delete, workflow:publish, workflow:review, workflow:manage Provisioning state of this workflow's WorkOS authorization resource.
provisioning, ready, failed, deleting, deleted