from retab import Retab
client = Retab()
client.workflows.blocks.delete(
"extract-1",
)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
await client.workflows.blocks.delete("extract-1");
package main
import (
"context"
"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)
}
if err := client.Workflows.Blocks.Delete(ctx, "extract-1", nil); err != nil {
log.Fatal(err)
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
client.workflows.blocks.delete(block_id: 'extract-1')
use retab::resources::workflow_blocks::DeleteParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
client
.workflows().blocks()
.delete("extract-1", DeleteParams::default())
.await?;
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$client->workflows()->blocks()->delete(
blockId: 'blk_extract_1',
);
echo "Deleted\n";
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
await client.Workflows.Blocks.DeleteAsync("blk_extract_1", new WorkflowBlocksDeleteOptions());
Console.WriteLine("Deleted");
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().delete("block_abc123", "wf_abc123");
System.out.println(result);
}
}
curl -X 'DELETE' \
'https://api.retab.com/v1/workflows/blocks/extract-1' \
-H 'Authorization: Bearer <your-api-key>'
(empty body)
{
"detail": "Block not found"
}
Blocks
Delete Block
Delete a block from a workflow.
This also deletes any edges connected to this block.
DELETE
/
v1
/
workflows
/
blocks
/
{block_id}
from retab import Retab
client = Retab()
client.workflows.blocks.delete(
"extract-1",
)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
await client.workflows.blocks.delete("extract-1");
package main
import (
"context"
"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)
}
if err := client.Workflows.Blocks.Delete(ctx, "extract-1", nil); err != nil {
log.Fatal(err)
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
client.workflows.blocks.delete(block_id: 'extract-1')
use retab::resources::workflow_blocks::DeleteParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
client
.workflows().blocks()
.delete("extract-1", DeleteParams::default())
.await?;
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$client->workflows()->blocks()->delete(
blockId: 'blk_extract_1',
);
echo "Deleted\n";
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
await client.Workflows.Blocks.DeleteAsync("blk_extract_1", new WorkflowBlocksDeleteOptions());
Console.WriteLine("Deleted");
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().delete("block_abc123", "wf_abc123");
System.out.println(result);
}
}
curl -X 'DELETE' \
'https://api.retab.com/v1/workflows/blocks/extract-1' \
-H 'Authorization: Bearer <your-api-key>'
(empty body)
{
"detail": "Block not found"
}
Delete a block from a workflow’s draft. Every edge connected to the block (incoming or outgoing) is deleted with it — you don’t need to clean those up first.
If the block is a container (
while_loop, for_each), its child blocks become orphaned (their parent_id is reset to null) but are otherwise preserved.
from retab import Retab
client = Retab()
client.workflows.blocks.delete(
"extract-1",
)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
await client.workflows.blocks.delete("extract-1");
package main
import (
"context"
"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)
}
if err := client.Workflows.Blocks.Delete(ctx, "extract-1", nil); err != nil {
log.Fatal(err)
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
client.workflows.blocks.delete(block_id: 'extract-1')
use retab::resources::workflow_blocks::DeleteParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
client
.workflows().blocks()
.delete("extract-1", DeleteParams::default())
.await?;
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$client->workflows()->blocks()->delete(
blockId: 'blk_extract_1',
);
echo "Deleted\n";
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
await client.Workflows.Blocks.DeleteAsync("blk_extract_1", new WorkflowBlocksDeleteOptions());
Console.WriteLine("Deleted");
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().delete("block_abc123", "wf_abc123");
System.out.println(result);
}
}
curl -X 'DELETE' \
'https://api.retab.com/v1/workflows/blocks/extract-1' \
-H 'Authorization: Bearer <your-api-key>'
(empty body)
{
"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.
Response
Successful Response
⌘I