from retab import Retab
client = Retab()
workflow = client.workflows.create(
name="Invoice Processing",
description="Extract invoice fields and route for review",
project_id="project_abc",
)
print(workflow.id)
print(workflow.published) # None — newly created workflows are unpublished
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const workflow = await client.workflows.create("Invoice Processing", "Extract invoice fields and route for review");
console.log(workflow.id);
console.log(workflow.published);
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.Create(ctx, &retab.WorkflowsCreateParams{
Name: ptr("Invoice Processing"),
Description: ptr("Extract invoice fields and route for review"),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(workflow.ID)
fmt.Println(workflow.Published)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
workflow = client.workflows.create(
name: 'Invoice Processing',
description: 'Extract invoice fields and route for review',
)
puts workflow.id
puts workflow.published
use retab::models::CreateWorkflowRequest;
use retab::resources::workflows::CreateParams;
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()
.create(CreateParams::new(CreateWorkflowRequest {
name: Some("Invoice Processing".into()),
description: Some("Extract invoice fields and route for review".into()),
project_id: "project_abc".into(),
}))
.await?;
println!("{}", workflow.id);
println!("{:?}", workflow.published);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->create();
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.CreateAsync(new WorkflowsCreateOptions());
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().create("Invoice Processing", "Extract invoice fields", null);
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"name": "Invoice Processing",
"description": "Extract invoice fields and route for review"
}'
{
"id": "wf_abc123xyz",
"name": "Invoice Processing",
"description": "Extract invoice fields and route for review",
"published": null,
"created_at": "2026-05-01T14:30:00Z",
"updated_at": "2026-05-01T14:30:00Z"
}
Workflows
Create Workflow
Create a new workflow.
The workflow starts unpublished with a default “Document” input block.
POST
/
v1
/
workflows
from retab import Retab
client = Retab()
workflow = client.workflows.create(
name="Invoice Processing",
description="Extract invoice fields and route for review",
project_id="project_abc",
)
print(workflow.id)
print(workflow.published) # None — newly created workflows are unpublished
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const workflow = await client.workflows.create("Invoice Processing", "Extract invoice fields and route for review");
console.log(workflow.id);
console.log(workflow.published);
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.Create(ctx, &retab.WorkflowsCreateParams{
Name: ptr("Invoice Processing"),
Description: ptr("Extract invoice fields and route for review"),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(workflow.ID)
fmt.Println(workflow.Published)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
workflow = client.workflows.create(
name: 'Invoice Processing',
description: 'Extract invoice fields and route for review',
)
puts workflow.id
puts workflow.published
use retab::models::CreateWorkflowRequest;
use retab::resources::workflows::CreateParams;
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()
.create(CreateParams::new(CreateWorkflowRequest {
name: Some("Invoice Processing".into()),
description: Some("Extract invoice fields and route for review".into()),
project_id: "project_abc".into(),
}))
.await?;
println!("{}", workflow.id);
println!("{:?}", workflow.published);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->create();
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.CreateAsync(new WorkflowsCreateOptions());
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().create("Invoice Processing", "Extract invoice fields", null);
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"name": "Invoice Processing",
"description": "Extract invoice fields and route for review"
}'
{
"id": "wf_abc123xyz",
"name": "Invoice Processing",
"description": "Extract invoice fields and route for review",
"published": null,
"created_at": "2026-05-01T14:30:00Z",
"updated_at": "2026-05-01T14:30:00Z"
}
Create a new workflow. The workflow is created unpublished, with a default
start_document block at canvas position (0, 0). Use the Blocks and Edges endpoints to build out the graph, then Publish when you’re ready to run it.
from retab import Retab
client = Retab()
workflow = client.workflows.create(
name="Invoice Processing",
description="Extract invoice fields and route for review",
project_id="project_abc",
)
print(workflow.id)
print(workflow.published) # None — newly created workflows are unpublished
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const workflow = await client.workflows.create("Invoice Processing", "Extract invoice fields and route for review");
console.log(workflow.id);
console.log(workflow.published);
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.Create(ctx, &retab.WorkflowsCreateParams{
Name: ptr("Invoice Processing"),
Description: ptr("Extract invoice fields and route for review"),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(workflow.ID)
fmt.Println(workflow.Published)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
workflow = client.workflows.create(
name: 'Invoice Processing',
description: 'Extract invoice fields and route for review',
)
puts workflow.id
puts workflow.published
use retab::models::CreateWorkflowRequest;
use retab::resources::workflows::CreateParams;
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()
.create(CreateParams::new(CreateWorkflowRequest {
name: Some("Invoice Processing".into()),
description: Some("Extract invoice fields and route for review".into()),
project_id: "project_abc".into(),
}))
.await?;
println!("{}", workflow.id);
println!("{:?}", workflow.published);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->create();
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.CreateAsync(new WorkflowsCreateOptions());
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().create("Invoice Processing", "Extract invoice fields", null);
System.out.println(result);
}
}
curl -X 'POST' \
'https://api.retab.com/v1/workflows' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"name": "Invoice Processing",
"description": "Extract invoice fields and route for review"
}'
{
"id": "wf_abc123xyz",
"name": "Invoice Processing",
"description": "Extract invoice fields and route for review",
"published": null,
"created_at": "2026-05-01T14:30:00Z",
"updated_at": "2026-05-01T14:30:00Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Body for creating a workflow. Supply a name and optional description; the workflow starts empty.
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
⌘I