Skip to main content
POST
/
v1
/
workflows
/
blocks
/
{block_id}
/
validate-config
import os
import requests

response = requests.post(
    "https://api.retab.com/v1/workflows/blocks/extract-1/validate-config",
    headers={"Api-Key": os.environ["RETAB_API_KEY"]},
    json={
        "config": {
            "model": "retab-small",
            "json_schema": {"type": "object", "properties": {}},
        },
        "config_mode": "replace",
    },
)
response.raise_for_status()
print(response.json()["config_hash"])
{
  "workflow_id": "<string>",
  "block_id": "<string>",
  "block_type": "<string>",
  "config_hash": "<string>",
  "ok": true
}

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.

Dry-run an assembled block config against the target block without mutating the workflow draft. Use this before pushing a locally edited block config bundle when you want the backend to apply the same validation policy used by block updates.
import os
import requests

response = requests.post(
    "https://api.retab.com/v1/workflows/blocks/extract-1/validate-config",
    headers={"Api-Key": os.environ["RETAB_API_KEY"]},
    json={
        "config": {
            "model": "retab-small",
            "json_schema": {"type": "object", "properties": {}},
        },
        "config_mode": "replace",
    },
)
response.raise_for_status()
print(response.json()["config_hash"])

Authorizations

Api-Key
string
header
required

Path Parameters

block_id
string
required

Query Parameters

workflow_id
string | null

Workflow ID to disambiguate legacy duplicate block IDs. Omit for normal server-generated block IDs.

Body

application/json

Dry-run validation for an assembled workflow block config.

config
Config · object
required

Assembled block config to validate.

config_mode
enum<string> | null
default:replace

How to apply the config before validation. 'replace' validates the config as the full block config; 'merge' validates the result of merging it into the existing block config.

Available options:
merge,
replace

Response

Successful Response

workflow_id
string
required
block_id
string
required
block_type
string
required
config_hash
string
required
ok
boolean
default:true