from retab import Retab
client = Retab()
# Move + rename
block = client.workflows.blocks.update(
block_id="extract-1",
label="Extract Invoice Fields v2",
position_x=480,
position_y=160,
)
# Replace the config (e.g. tighten the schema, switch model)
block = client.workflows.blocks.update(
block_id="extract-1",
config={
"model": "gpt-5-mini",
"json_schema": {
"type": "object",
"properties": {
"invoice_number": {"type": "string"},
"total": {"type": "number"},
"vendor": {
"type": "object",
"properties": {"name": {"type": "string"}}
}
},
},
},
)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const block = await client.workflows.blocks.update("extract-1", "Extract Invoice Fields v2", 480, 160);
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)
}
label := "Extract Invoice Fields v2"
positionX := 480.0
positionY := 160.0
block, err := client.Workflows.Blocks.Update(ctx, "extract-1", &retab.WorkflowBlocksUpdateParams{
Label: &label,
PositionX: &positionX,
PositionY: &positionY,
})
if err != nil {
log.Fatal(err)
}
fmt.Println(block.ID, block.Label)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
block = client.workflows.blocks.update(
block_id: 'extract-1',
label: 'Extract Invoice Fields v2',
position_x: 480,
position_y: 160,
)
puts "#{block.id} #{block.label}"
use retab::models::UpdateWorkflowBlockRequest;
use retab::resources::workflow_blocks::UpdateParams;
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 block = client
.workflows().blocks()
.update(
"extract-1",
UpdateParams::new(UpdateWorkflowBlockRequest {
label: Some("Extract Invoice Fields v2".into()),
position_x: Some(480.0),
position_y: Some(160.0),
..Default::default()
}),
)
.await?;
println!("{} {}", block.id, block.label.as_deref().unwrap_or(""));
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->blocks()->update(
blockId: 'blk_extract_1',
);
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.Blocks.UpdateAsync("blk_extract_1", new WorkflowBlocksUpdateOptions());
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().blocks().update("block_abc123", "wf_abc123", null, null, null, null, null, null, null, null);
System.out.println(result);
}
}
curl -X 'PATCH' \
'https://api.retab.com/v1/workflows/blocks/extract-1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"label": "Extract Invoice Fields v2",
"position_x": 480,
"position_y": 160
}'
{
"id": "extract-1",
"workflow_id": "wf_abc123xyz",
"type": "extract",
"label": "Extract Invoice Fields v2",
"position_x": 480,
"position_y": 160,
"width": null,
"height": null,
"config": {
"model": "gpt-5",
"json_schema": {
"type": "object",
"properties": { "total": { "type": "number" } }
}
},
"parent_id": null,
"updated_at": "2026-05-01T14:30:00Z"
}
{
"detail": "Block not found"
}
Update Block
Update a block with partial data.
Only the provided fields are updated. This enables targeted updates like position changes without affecting other block properties.
from retab import Retab
client = Retab()
# Move + rename
block = client.workflows.blocks.update(
block_id="extract-1",
label="Extract Invoice Fields v2",
position_x=480,
position_y=160,
)
# Replace the config (e.g. tighten the schema, switch model)
block = client.workflows.blocks.update(
block_id="extract-1",
config={
"model": "gpt-5-mini",
"json_schema": {
"type": "object",
"properties": {
"invoice_number": {"type": "string"},
"total": {"type": "number"},
"vendor": {
"type": "object",
"properties": {"name": {"type": "string"}}
}
},
},
},
)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const block = await client.workflows.blocks.update("extract-1", "Extract Invoice Fields v2", 480, 160);
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)
}
label := "Extract Invoice Fields v2"
positionX := 480.0
positionY := 160.0
block, err := client.Workflows.Blocks.Update(ctx, "extract-1", &retab.WorkflowBlocksUpdateParams{
Label: &label,
PositionX: &positionX,
PositionY: &positionY,
})
if err != nil {
log.Fatal(err)
}
fmt.Println(block.ID, block.Label)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
block = client.workflows.blocks.update(
block_id: 'extract-1',
label: 'Extract Invoice Fields v2',
position_x: 480,
position_y: 160,
)
puts "#{block.id} #{block.label}"
use retab::models::UpdateWorkflowBlockRequest;
use retab::resources::workflow_blocks::UpdateParams;
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 block = client
.workflows().blocks()
.update(
"extract-1",
UpdateParams::new(UpdateWorkflowBlockRequest {
label: Some("Extract Invoice Fields v2".into()),
position_x: Some(480.0),
position_y: Some(160.0),
..Default::default()
}),
)
.await?;
println!("{} {}", block.id, block.label.as_deref().unwrap_or(""));
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->blocks()->update(
blockId: 'blk_extract_1',
);
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.Blocks.UpdateAsync("blk_extract_1", new WorkflowBlocksUpdateOptions());
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().blocks().update("block_abc123", "wf_abc123", null, null, null, null, null, null, null, null);
System.out.println(result);
}
}
curl -X 'PATCH' \
'https://api.retab.com/v1/workflows/blocks/extract-1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"label": "Extract Invoice Fields v2",
"position_x": 480,
"position_y": 160
}'
{
"id": "extract-1",
"workflow_id": "wf_abc123xyz",
"type": "extract",
"label": "Extract Invoice Fields v2",
"position_x": 480,
"position_y": 160,
"width": null,
"height": null,
"config": {
"model": "gpt-5",
"json_schema": {
"type": "object",
"properties": { "total": { "type": "number" } }
}
},
"parent_id": null,
"updated_at": "2026-05-01T14:30:00Z"
}
{
"detail": "Block not found"
}
- Reposition on the canvas —
position_x/position_y/width/height - Rename the block —
label - Reconfigure the block —
config(replaces the existing config; merge it client-side first if you want a partial change) - Reparent into or out of a container —
parent_id
type is intentionally not patchable. To change a block’s type, delete it and create a new one with the same id.
from retab import Retab
client = Retab()
# Move + rename
block = client.workflows.blocks.update(
block_id="extract-1",
label="Extract Invoice Fields v2",
position_x=480,
position_y=160,
)
# Replace the config (e.g. tighten the schema, switch model)
block = client.workflows.blocks.update(
block_id="extract-1",
config={
"model": "gpt-5-mini",
"json_schema": {
"type": "object",
"properties": {
"invoice_number": {"type": "string"},
"total": {"type": "number"},
"vendor": {
"type": "object",
"properties": {"name": {"type": "string"}}
}
},
},
},
)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const block = await client.workflows.blocks.update("extract-1", "Extract Invoice Fields v2", 480, 160);
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)
}
label := "Extract Invoice Fields v2"
positionX := 480.0
positionY := 160.0
block, err := client.Workflows.Blocks.Update(ctx, "extract-1", &retab.WorkflowBlocksUpdateParams{
Label: &label,
PositionX: &positionX,
PositionY: &positionY,
})
if err != nil {
log.Fatal(err)
}
fmt.Println(block.ID, block.Label)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
block = client.workflows.blocks.update(
block_id: 'extract-1',
label: 'Extract Invoice Fields v2',
position_x: 480,
position_y: 160,
)
puts "#{block.id} #{block.label}"
use retab::models::UpdateWorkflowBlockRequest;
use retab::resources::workflow_blocks::UpdateParams;
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 block = client
.workflows().blocks()
.update(
"extract-1",
UpdateParams::new(UpdateWorkflowBlockRequest {
label: Some("Extract Invoice Fields v2".into()),
position_x: Some(480.0),
position_y: Some(160.0),
..Default::default()
}),
)
.await?;
println!("{} {}", block.id, block.label.as_deref().unwrap_or(""));
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflows()->blocks()->update(
blockId: 'blk_extract_1',
);
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.Blocks.UpdateAsync("blk_extract_1", new WorkflowBlocksUpdateOptions());
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().blocks().update("block_abc123", "wf_abc123", null, null, null, null, null, null, null, null);
System.out.println(result);
}
}
curl -X 'PATCH' \
'https://api.retab.com/v1/workflows/blocks/extract-1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"label": "Extract Invoice Fields v2",
"position_x": 480,
"position_y": 160
}'
{
"id": "extract-1",
"workflow_id": "wf_abc123xyz",
"type": "extract",
"label": "Extract Invoice Fields v2",
"position_x": 480,
"position_y": 160,
"width": null,
"height": null,
"config": {
"model": "gpt-5",
"json_schema": {
"type": "object",
"properties": { "total": { "type": "number" } }
}
},
"parent_id": null,
"updated_at": "2026-05-01T14:30:00Z"
}
{
"detail": "Block not found"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Disambiguates a block id that is shared by more than one workflow. Required only when the block id is not unique within your organization.
Body
Update a block. Only the fields you provide are changed.
config_mode controls how config is applied:
"merge"(default): the givenconfigis merged into the existing one — nested objects are combined, and anullvalue deletes a key."replace": the givenconfigreplaces the existing one entirely.
200How to apply the config field. 'merge' (default) deep-merges the patch into the existing config with null-as-delete; 'replace' uses the patch as the full new config.
merge, replace Response
Successful Response
Public live workflow block object.
Foreign key to workflow
Block type (extract, parse, classifier, etc.)
start_document, start_json, note, parse, edit, extract, split, classifier, conditional, api_call, function, while_loop, for_each, merge_dicts, while_loop_sentinel_start, while_loop_sentinel_end, for_each_sentinel_start, for_each_sentinel_end Display label for the block
X position on canvas
Y position on canvas
Block width for resizable blocks
Block height for resizable blocks
Block-specific configuration
ID of parent container (while_loop, for_each)
Canonical declarative block path used to reconcile imported specs.
Authored declarative block id before import-time id regeneration.
Schemas resolved for this block from the workflow graph.