Skip to content

Workflows

Apply workflow operations

Apply draft edits and block enablement changes in one write. Requires workspace write access. The live deployment is unchanged; lint is advisory. Inspect `skipped` and `inputValidationErrors` for edits that did not apply. Deferred edges apply when their targets exist; do not resubmit them. With `atomic=true`, declined operations or dropped inputs return `409` (`OPERATIONS_NOT_APPLIED`) without saving. Use returned `mintedBlockIds` in later requests. `dryRun=true` evaluates without saving, auditing, or notifying. Workspace API keys return `403`; use a personal API key or scoped OAuth token. OAuth scope: `api:write`.

POST/api/v2/workflows/{workflowId}/operations

Apply draft edits and block enablement changes in one write. Requires workspace write access. The live deployment is unchanged; lint is advisory.

Inspect skipped and inputValidationErrors for edits that did not apply. Deferred edges apply when their targets exist; do not resubmit them. With atomic=true, declined operations or dropped inputs return 409 (OPERATIONS_NOT_APPLIED) without saving. Use returned mintedBlockIds in later requests. dryRun=true evaluates without saving, auditing, or notifying. Workspace API keys return 403; use a personal API key or scoped OAuth token.

OAuth scope: api:write.

Authentication

Send a personal or workspace API key in X-API-Key. See key types and access; operations that reject workspace keys say so in their description.

Send X-API-Key in the request header.

Alternatively

Send a Sim OAuth access token in Authorization: Bearer. See OAuth authentication and scopes.

Authorization: Bearer YOUR_ACCESS_TOKEN

Required scopes: api:write

OAuth flows
json
{
  "authorizationCode": {
    "authorizationUrl": "https://www.sim.ai/api/auth/oauth2/authorize",
    "tokenUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "refreshUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "scopes": {
      "api:read": "Read your workspaces, workflows, files, tables, and logs",
      "api:write": "Read, create, change, run, and delete resources in your workspaces",
      "offline_access": "Stay signed in without asking again"
    }
  }
}

OAuth scope: api:write.

Path parameters

workflowIdstringRequired

Unique workflow identifier.

minLength
1

Query parameters

dryRunboolean

Validate and lint without writing, auditing, or notifying collaborators. Returns the same validation, preparation warnings, lint findings, and ID-ownership conflicts (409) as a committed write. needsRedeployment describes the pre-write state. For semantic operations, mintedBlockIds is empty; previewBlockIds contains provisional IDs with a warning, since committing mints new IDs.

Request body

Required

A batch of semantic edits against a workflow graph.

object

A batch of semantic edits against a workflow graph.

4 fields
operationsarrayRequired

Edits to apply, in a single batch.

minItems
1
maxItems
200
Schema details
Array itemWorkflowEditOperation

One semantic edit against a workflow graph.

Schema details

Exactly one of

Option 1object
3 fields
operation_typestringRequired

Create a new block.

const
add
block_idstringRequired

Block the operation targets. For add, the id the new block will be given.

minLength
1
paramsobjectRequired

Block type, name, and optional inputs, connections, retry, triggerMode, or advancedMode. inputs maps sub-block ids directly to values, never through subBlocks. Keep retry, triggerMode, and advancedMode beside inputs. connections maps source handles to target ids, { block, handle }, or arrays; success aliases source.

3 fields
typestringRequired

Registered block type.

minLength
1
namestringRequired

Block display name.

minLength
1
inputsvalue

Block configuration keyed by sub-block id.

Schema details

All of

Option 1object
1 field
toolsarray

Agent tools configuration. Applies to a tool-input field; other block inputs remain catalog-defined.

maxItems
100
Schema details
Array itemAgentTool

A catalog integration operation, workspace custom tool, or MCP tool available to an Agent.

Schema details

Exactly one of

Option 1object

A catalog integration operation the Agent may call. Resolve valid block and operation ids through the block catalog.

5 fields
typestringRequired

Catalog block id, such as cloudwatch or slack. Use the block id, never an underlying tool id.

minLength
1
maxLength
255
pattern
^(?!(?:custom-tool|mcp|mcp-server-advanced)$).+$
operationstring

Operation ID from Get Block. Required when the block exposes multiple operations; it may differ from the tool ID.

minLength
1
maxLength
255
usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
paramsobject

Parameters fixed by the workflow author. Parameters left out remain available for the model to supply when the tool declares them.

Schema details
Additional propertiesvalue

One tool parameter value.

Additional propertiesvalue

Forward-compatible integration tool metadata preserved by the workflow editor.

Option 2AgentCustomTool

A workspace custom tool. Prefer customToolId; inline declarations are also accepted.

Schema details

Any of

Option 1object
4 fields
typestringRequired

Custom-tool discriminator.

const
custom-tool
customToolIdstringRequired

Custom tool ID from List Custom Tools.

minLength
1
maxLength
255
usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible custom tool metadata preserved by the workflow editor.

Option 2object
5 fields
typestringRequired

Custom-tool discriminator.

const
custom-tool
schemaobjectRequired

Inline OpenAI-style function declaration.

2 fields
typestring

Function declaration discriminator.

const
function
functionobjectRequired

OpenAI-style function definition.

3 fields
namestringRequired

Function name presented to the model.

minLength
1
maxLength
64
descriptionstring

What the inline custom tool does.

parametersobjectRequired

JSON Schema describing the function arguments.

Schema details
Additional propertiesvalue

One JSON Schema keyword on the function parameters.

Additional propertiesvalue

Additional function declaration metadata.

Additional propertiesvalue

Additional custom tool declaration metadata.

codestringRequired

Inline tool implementation executed by the Function runtime.

usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible custom tool metadata preserved by the workflow editor.

Option 3object

One tool discovered from a workspace MCP server.

4 fields
typestringRequired

MCP-tool discriminator.

const
mcp
paramsvalueRequired

MCP server and tool identity plus any tool arguments fixed by the workflow author.

Schema details

All of

Option 1object
2 fields
serverIdstringRequired

MCP server id returned by GET /api/v2/mcp-servers.

minLength
1
maxLength
128
toolNamestringRequired

Tool name returned by the MCP server’s tools endpoint.

minLength
1
maxLength
256
Additional propertiesvalue

One parameter fixed by the workflow author.

Option 2object
Schema details
Additional propertiesvalue

One parameter fixed by the workflow author.

usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible MCP tool metadata preserved by the workflow editor.

Option 4object

Dynamically discovered operations permitted by the authorized credential and saved block policy.

5 fields
typestringRequired

Server-wide MCP binding discriminator.

const
mcp-server-advanced
operationPolicyvalue

Saved workflow operation restrictions that can only narrow authorized credential access.

Schema details

Exactly one of

Option 1object
1 field
modestringRequired

Allow all operations available to the authorized credential.

const
all

Additional properties are not allowed.

Option 2object
2 fields
modestringRequired

Allow only the selected exact operations.

const
allow
operationsarrayRequired

Allowed exact MCP tool names; an empty list grants no access.

maxItems
1000
Schema details
Array itemstring

Exact MCP tool name on the resolved connection, without a Sim server prefix.

minLength
1
maxLength
256

Additional properties are not allowed.

Option 3object
2 fields
modestringRequired

Exclude the selected exact operations.

const
deny
operationsarrayRequired

Denied exact MCP tool names; an empty list allows otherwise permitted tools.

maxItems
1000
Schema details
Array itemstring

Exact MCP tool name on the resolved connection, without a Sim server prefix.

minLength
1
maxLength
256

Additional properties are not allowed.

paramsobjectRequired

Executable server or connection identity for authorized operation discovery and execution.

1 field
serverIdstringRequired

Workspace MCP server ID or explicit credential-group managed MCP connection ID.

minLength
1
maxLength
128

Additional properties are not allowed.

usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible MCP server metadata preserved by the workflow editor.

Additional propertiesvalue

One block-specific input whose accepted shape is published by the block catalog.

Option 2object
Schema details
Additional propertiesvalue

One block-specific input whose accepted shape is published by the block catalog.

Additional propertiesvalue

One block-specific input or connection descriptor.

Additional properties are not allowed.

Option 2object
3 fields
operation_typestringRequired

Change an existing block: its inputs, name, or connections.

const
edit
block_idstringRequired

Block the operation targets. For add, the id the new block will be given.

minLength
1
paramsvalueRequired

Patch only supplied fields: inputs, name, connections, removeEdges, nestedNodes, retry, triggerMode, and advancedMode. inputs maps sub-block ids directly to values, never through subBlocks. Keep retry, triggerMode, and advancedMode beside inputs. connections maps source handles to target ids, { block, handle }, or arrays; success aliases source. Re-sending connections replaces outgoing edges; use removeEdges to delete selected edges.

Schema details

All of

Option 1object
1 field
inputsvalue

Block configuration keyed by sub-block id.

Schema details

All of

Option 1object
1 field
toolsarray

Agent tools configuration. Applies to a tool-input field; other block inputs remain catalog-defined.

maxItems
100
Schema details
Array itemAgentTool

A catalog integration operation, workspace custom tool, or MCP tool available to an Agent.

Schema details

Exactly one of

Option 1object

A catalog integration operation the Agent may call. Resolve valid block and operation ids through the block catalog.

5 fields
typestringRequired

Catalog block id, such as cloudwatch or slack. Use the block id, never an underlying tool id.

minLength
1
maxLength
255
pattern
^(?!(?:custom-tool|mcp|mcp-server-advanced)$).+$
operationstring

Operation ID from Get Block. Required when the block exposes multiple operations; it may differ from the tool ID.

minLength
1
maxLength
255
usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
paramsobject

Parameters fixed by the workflow author. Parameters left out remain available for the model to supply when the tool declares them.

Schema details
Additional propertiesvalue

One tool parameter value.

Additional propertiesvalue

Forward-compatible integration tool metadata preserved by the workflow editor.

Option 2AgentCustomTool

A workspace custom tool. Prefer customToolId; inline declarations are also accepted.

Schema details

Any of

Option 1object
4 fields
typestringRequired

Custom-tool discriminator.

const
custom-tool
customToolIdstringRequired

Custom tool ID from List Custom Tools.

minLength
1
maxLength
255
usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible custom tool metadata preserved by the workflow editor.

Option 2object
5 fields
typestringRequired

Custom-tool discriminator.

const
custom-tool
schemaobjectRequired

Inline OpenAI-style function declaration.

2 fields
typestring

Function declaration discriminator.

const
function
functionobjectRequired

OpenAI-style function definition.

3 fields
namestringRequired

Function name presented to the model.

minLength
1
maxLength
64
descriptionstring

What the inline custom tool does.

parametersobjectRequired

JSON Schema describing the function arguments.

Schema details
Additional propertiesvalue

One JSON Schema keyword on the function parameters.

Additional propertiesvalue

Additional function declaration metadata.

Additional propertiesvalue

Additional custom tool declaration metadata.

codestringRequired

Inline tool implementation executed by the Function runtime.

usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible custom tool metadata preserved by the workflow editor.

Option 3object

One tool discovered from a workspace MCP server.

4 fields
typestringRequired

MCP-tool discriminator.

const
mcp
paramsvalueRequired

MCP server and tool identity plus any tool arguments fixed by the workflow author.

Schema details

All of

Option 1object
2 fields
serverIdstringRequired

MCP server id returned by GET /api/v2/mcp-servers.

minLength
1
maxLength
128
toolNamestringRequired

Tool name returned by the MCP server’s tools endpoint.

minLength
1
maxLength
256
Additional propertiesvalue

One parameter fixed by the workflow author.

Option 2object
Schema details
Additional propertiesvalue

One parameter fixed by the workflow author.

usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible MCP tool metadata preserved by the workflow editor.

Option 4object

Dynamically discovered operations permitted by the authorized credential and saved block policy.

5 fields
typestringRequired

Server-wide MCP binding discriminator.

const
mcp-server-advanced
operationPolicyvalue

Saved workflow operation restrictions that can only narrow authorized credential access.

Schema details

Exactly one of

Option 1object
1 field
modestringRequired

Allow all operations available to the authorized credential.

const
all

Additional properties are not allowed.

Option 2object
2 fields
modestringRequired

Allow only the selected exact operations.

const
allow
operationsarrayRequired

Allowed exact MCP tool names; an empty list grants no access.

maxItems
1000
Schema details
Array itemstring

Exact MCP tool name on the resolved connection, without a Sim server prefix.

minLength
1
maxLength
256

Additional properties are not allowed.

Option 3object
2 fields
modestringRequired

Exclude the selected exact operations.

const
deny
operationsarrayRequired

Denied exact MCP tool names; an empty list allows otherwise permitted tools.

maxItems
1000
Schema details
Array itemstring

Exact MCP tool name on the resolved connection, without a Sim server prefix.

minLength
1
maxLength
256

Additional properties are not allowed.

paramsobjectRequired

Executable server or connection identity for authorized operation discovery and execution.

1 field
serverIdstringRequired

Workspace MCP server ID or explicit credential-group managed MCP connection ID.

minLength
1
maxLength
128

Additional properties are not allowed.

usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible MCP server metadata preserved by the workflow editor.

Additional propertiesvalue

One block-specific input whose accepted shape is published by the block catalog.

Option 2object
Schema details
Additional propertiesvalue

One block-specific input whose accepted shape is published by the block catalog.

Additional propertiesvalue

One operation parameter; see the description for the accepted keys.

Option 2object
Schema details
Additional propertiesvalue

One operation parameter; see the description for the accepted keys.

Additional properties are not allowed.

Option 3object
2 fields
operation_typestringRequired

Remove a block and every edge touching it.

const
delete
block_idstringRequired

Block the operation targets. For add, the id the new block will be given.

minLength
1

Additional properties are not allowed.

Option 4object
3 fields
operation_typestringRequired

Create a block inside a loop or parallel container.

const
insert_into_subflow
block_idstringRequired

Block the operation targets. For add, the id the new block will be given.

minLength
1
paramsobjectRequired

Container, block type, name, and the same optional fields as add. inputs maps sub-block ids directly to values, never through subBlocks. Keep retry, triggerMode, and advancedMode beside inputs. connections maps source handles to target ids, { block, handle }, or arrays; success aliases source.

4 fields
subflowIdstringRequired

Loop or parallel container to insert the block into.

minLength
1
typestringRequired

Registered block type.

minLength
1
namestringRequired

Block display name.

minLength
1
inputsvalue

Block configuration keyed by sub-block id.

Schema details

All of

Option 1object
1 field
toolsarray

Agent tools configuration. Applies to a tool-input field; other block inputs remain catalog-defined.

maxItems
100
Schema details
Array itemAgentTool

A catalog integration operation, workspace custom tool, or MCP tool available to an Agent.

Schema details

Exactly one of

Option 1object

A catalog integration operation the Agent may call. Resolve valid block and operation ids through the block catalog.

5 fields
typestringRequired

Catalog block id, such as cloudwatch or slack. Use the block id, never an underlying tool id.

minLength
1
maxLength
255
pattern
^(?!(?:custom-tool|mcp|mcp-server-advanced)$).+$
operationstring

Operation ID from Get Block. Required when the block exposes multiple operations; it may differ from the tool ID.

minLength
1
maxLength
255
usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
paramsobject

Parameters fixed by the workflow author. Parameters left out remain available for the model to supply when the tool declares them.

Schema details
Additional propertiesvalue

One tool parameter value.

Additional propertiesvalue

Forward-compatible integration tool metadata preserved by the workflow editor.

Option 2AgentCustomTool

A workspace custom tool. Prefer customToolId; inline declarations are also accepted.

Schema details

Any of

Option 1object
4 fields
typestringRequired

Custom-tool discriminator.

const
custom-tool
customToolIdstringRequired

Custom tool ID from List Custom Tools.

minLength
1
maxLength
255
usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible custom tool metadata preserved by the workflow editor.

Option 2object
5 fields
typestringRequired

Custom-tool discriminator.

const
custom-tool
schemaobjectRequired

Inline OpenAI-style function declaration.

2 fields
typestring

Function declaration discriminator.

const
function
functionobjectRequired

OpenAI-style function definition.

3 fields
namestringRequired

Function name presented to the model.

minLength
1
maxLength
64
descriptionstring

What the inline custom tool does.

parametersobjectRequired

JSON Schema describing the function arguments.

Schema details
Additional propertiesvalue

One JSON Schema keyword on the function parameters.

Additional propertiesvalue

Additional function declaration metadata.

Additional propertiesvalue

Additional custom tool declaration metadata.

codestringRequired

Inline tool implementation executed by the Function runtime.

usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible custom tool metadata preserved by the workflow editor.

Option 3object

One tool discovered from a workspace MCP server.

4 fields
typestringRequired

MCP-tool discriminator.

const
mcp
paramsvalueRequired

MCP server and tool identity plus any tool arguments fixed by the workflow author.

Schema details

All of

Option 1object
2 fields
serverIdstringRequired

MCP server id returned by GET /api/v2/mcp-servers.

minLength
1
maxLength
128
toolNamestringRequired

Tool name returned by the MCP server’s tools endpoint.

minLength
1
maxLength
256
Additional propertiesvalue

One parameter fixed by the workflow author.

Option 2object
Schema details
Additional propertiesvalue

One parameter fixed by the workflow author.

usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible MCP tool metadata preserved by the workflow editor.

Option 4object

Dynamically discovered operations permitted by the authorized credential and saved block policy.

5 fields
typestringRequired

Server-wide MCP binding discriminator.

const
mcp-server-advanced
operationPolicyvalue

Saved workflow operation restrictions that can only narrow authorized credential access.

Schema details

Exactly one of

Option 1object
1 field
modestringRequired

Allow all operations available to the authorized credential.

const
all

Additional properties are not allowed.

Option 2object
2 fields
modestringRequired

Allow only the selected exact operations.

const
allow
operationsarrayRequired

Allowed exact MCP tool names; an empty list grants no access.

maxItems
1000
Schema details
Array itemstring

Exact MCP tool name on the resolved connection, without a Sim server prefix.

minLength
1
maxLength
256

Additional properties are not allowed.

Option 3object
2 fields
modestringRequired

Exclude the selected exact operations.

const
deny
operationsarrayRequired

Denied exact MCP tool names; an empty list allows otherwise permitted tools.

maxItems
1000
Schema details
Array itemstring

Exact MCP tool name on the resolved connection, without a Sim server prefix.

minLength
1
maxLength
256

Additional properties are not allowed.

paramsobjectRequired

Executable server or connection identity for authorized operation discovery and execution.

1 field
serverIdstringRequired

Workspace MCP server ID or explicit credential-group managed MCP connection ID.

minLength
1
maxLength
128

Additional properties are not allowed.

usageControlstring

Selector Permission Mode: auto lets the model decide, force requires a call, and none disables it. Supply this property and omit usageControlExpression to select or switch to Selector mode; do not send null or set canonicalModes or block-level advancedMode. With neither property, the default is auto.

enum
["auto","force","none"]
usageControlExpressionstring

Variable Permission Mode: a reference such as <start.toolMode> or a literal such as none, resolving to auto, force, or none at execution time. Supply this property and omit usageControl to select or switch to Variable mode; do not send null or set canonicalModes or block-level advancedMode.

maxLength
2048
Additional propertiesvalue

Forward-compatible MCP server metadata preserved by the workflow editor.

Additional propertiesvalue

One block-specific input whose accepted shape is published by the block catalog.

Option 2object
Schema details
Additional propertiesvalue

One block-specific input whose accepted shape is published by the block catalog.

Additional propertiesvalue

One block-specific input or connection descriptor.

Additional properties are not allowed.

Option 5object
3 fields
operation_typestringRequired

Move a block out of its loop or parallel container.

const
extract_from_subflow
block_idstringRequired

Block the operation targets. For add, the id the new block will be given.

minLength
1
paramsobjectRequired

Container identifier, plus any block-specific inputs.

1 field
subflowIdstringRequired

Loop or parallel container the block moves into or out of.

minLength
1
Additional propertiesvalue

One block-specific input.

Additional properties are not allowed.

atomicboolean

Fail the whole batch when any operation is declined or any block input would be dropped. The default applies what it can and reports the rest in skipped and inputValidationErrors; true writes nothing and answers 409 instead.

default
false
layoutstring

Whether to reposition blocks the batch touched. targeted (default) nudges only the affected subgraph; none leaves every position exactly as supplied.

default
targeted
enum
["targeted","none"]
setBlockEnabledarray

Blocks to enable or disable, applied after operations. Disabling a loop or parallel cascades to its unlocked descendants; enabling a block whose container is disabled is declined.

maxItems
200
Schema details
Array itemobject
2 fields
block_idstringRequired

Block the operation targets. For add, the id the new block will be given.

minLength
1
enabledbooleanRequired

Whether the block should run.

Additional properties are not allowed.

Additional properties are not allowed.

Request example 1

json
{
  "operations": [
    {
      "operation_type": "add",
      "block_id": "agent-1",
      "params": {
        "type": "agent",
        "name": "Triage",
        "inputs": {
          "tools": [
            {
              "type": "cloudwatch",
              "operation": "describe_alarm_history",
              "usageControl": "auto",
              "params": {}
            }
          ]
        }
      }
    }
  ]
}

Responses

200

The batch was applied.

object

Outcome of a batch of semantic edits.

1 field
dataobjectRequired

Response data.

11 fields
idstringRequired

Identifier of the workflow whose draft graph was written.

warningsarrayRequired

Non-fatal notes about blocks and edges that were normalized or dropped before persistence and, when lint has findings, one line counting them by category, so a caller that reads only warnings still learns they exist. The findings themselves are in lint. Empty when there is nothing to report.

Schema details
Array itemstring
needsRedeploymentbooleanRequired

Whether the live deployment differs from the draft. A graph write never changes what the deployed endpoint serves; deploy to publish it. On a dry run, this describes the state before the proposed write.

appliedintegerRequired

Operations the engine applied.

minimum
0
maximum
9007199254740991
skippedarrayRequired

Operations the engine declined. Empty when everything applied.

Schema details
Array itemobject

One operation the edit engine did not apply.

5 fields
typestringRequired

Machine-readable reason the engine declined an operation.

enum
["block_not_found","invalid_block_type","block_not_allowed","model_not_allowed","block_locked","tool_not_allowed","invalid_edge_target","invalid_edge_source","invalid_edge_scope","invalid_source_handle","invalid_target_handle","invalid_subblock_field","missing_required_params","invalid_subflow_parent","nested_subflow_not_allowed","duplicate_block_name","reserved_block_name","retry_not_supported","duplicate_trigger","duplicate_single_instance_block","disabled_ancestor"]
operationTypestringRequired

The operation_type that was declined.

blockIdstringRequired

Block the declined operation targeted.

reasonstringRequired

Human-readable explanation.

detailsobject

Additional context for the reason; keys depend on type.

Schema details
Additional propertiesvalue

One piece of engine-supplied context for the reason.

Additional properties are not allowed.

deferredarrayRequired

Edges waiting for target blocks. They apply automatically when their targets exist, in this batch or a later one. Do not resubmit them.

Schema details
Array itemobject

One operation the edit engine did not apply.

5 fields
typestringRequired

Machine-readable reason the engine declined an operation.

enum
["block_not_found","invalid_block_type","block_not_allowed","model_not_allowed","block_locked","tool_not_allowed","invalid_edge_target","invalid_edge_source","invalid_edge_scope","invalid_source_handle","invalid_target_handle","invalid_subblock_field","missing_required_params","invalid_subflow_parent","nested_subflow_not_allowed","duplicate_block_name","reserved_block_name","retry_not_supported","duplicate_trigger","duplicate_single_instance_block","disabled_ancestor"]
operationTypestringRequired

The operation_type that was declined.

blockIdstringRequired

Block the declined operation targeted.

reasonstringRequired

Human-readable explanation.

detailsobject

Additional context for the reason; keys depend on type.

Schema details
Additional propertiesvalue

One piece of engine-supplied context for the reason.

Additional properties are not allowed.

inputValidationErrorsarrayRequired

Block inputs that were dropped rather than persisted, and only those. The rest of the operation still applied. References that merely fail to resolve stay persisted and are reported in lint.unresolvedReferences instead.

Schema details
Array itemobject

One block input that was dropped rather than persisted.

4 fields
blockIdstringRequired

Block whose input was rejected.

blockTypestringRequired

Type of the block whose input was rejected.

fieldstringRequired

Sub-block field that was rejected.

errorstringRequired

Why the value was rejected.

Additional properties are not allowed.

mintedBlockIdsobjectRequired

Assigned IDs keyed by requested block_id, including only changed IDs. add and insert_into_subflow replace non-UUID labels with minted UUIDs. References within the batch are remapped automatically; later requests must use the minted IDs. Supply UUIDs to preserve your chosen IDs. Empty on dry runs, which return provisional IDs in previewBlockIds instead.

Schema details
Additional propertiesstring

The id the block was actually given.

previewBlockIdsobject

Dry run only: the provisional id the evaluation assigned to each block whose block_id was not already a UUID, keyed by the block_id you asked for. These are not the ids a committed apply produces — the real apply mints new ones — so never wire a later request against them. Wire edges by block_id within one batch, or by the mintedBlockIds the real apply returns.

Schema details
Additional propertiesstring

The provisional id the dry run assigned.

lintobjectRequired

Advisory findings about a saved graph. Findings never block a write or a deploy; they tell a caller what will misbehave at run time.

11 fields
sourcesarrayRequired

Blocks with no incoming edge. A trigger block is naturally a source; anything else here is unreachable.

Schema details
Array itemobject
3 fields
blockIdstringRequired

Block the finding is about.

blockNamevalueRequired

Display name of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
blockTypevalueRequired

Registered type of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null

Additional properties are not allowed.

sinksarrayRequired

Blocks with no outgoing edge.

Schema details
Array itemobject
3 fields
blockIdstringRequired

Block the finding is about.

blockNamevalueRequired

Display name of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
blockTypevalueRequired

Registered type of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null

Additional properties are not allowed.

orphanBlocksarrayRequired

Blocks with neither an incoming nor an outgoing edge.

Schema details
Array itemobject
3 fields
blockIdstringRequired

Block the finding is about.

blockNamevalueRequired

Display name of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
blockTypevalueRequired

Registered type of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null

Additional properties are not allowed.

emptyOutgoingPortsarrayRequired

Branch and container ports that lead nowhere.

Schema details
Array itemobject
5 fields
blockIdstringRequired

Block the finding is about.

blockNamevalueRequired

Display name of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
blockTypevalueRequired

Registered type of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
handlestringRequired

Source handle with nothing connected to it.

labelstringRequired

Human-readable name of the port.

Additional properties are not allowed.

invalidBranchPortsarrayRequired

Condition and router edges whose source handle names no real branch.

Schema details
Array itemobject
5 fields
blockIdstringRequired

Block the finding is about.

blockNamevalueRequired

Display name of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
blockTypevalueRequired

Registered type of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
sourceHandlestringRequired

Source handle that does not match the block.

reasonstringRequired

Why the handle is not valid for this block.

Additional properties are not allowed.

invalidConnectionTargetsarrayRequired

Edges pointing at a block that cannot legally receive them.

Schema details
Array itemobject
5 fields
sourceBlockIdstringRequired

Block the edge leaves.

sourceBlockNamevalueRequired

Display name of the source block.

Schema details

Any of

Option 1string
Option 2null
sourceHandlevalueRequired

Handle the edge leaves from.

Schema details

Any of

Option 1string
Option 2null
targetBlockIdstringRequired

Block the edge points at.

reasonstringRequired

Why the target is not a legal destination.

Additional properties are not allowed.

fieldIssuesarrayRequired

Per-block configuration problems. The most actionable part of the report for a headless graph builder: a block missing a required field will fail at run time.

Schema details
Array itemobject
5 fields
blockIdstringRequired

Block the finding is about.

blockNamevalueRequired

Display name of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
blockTypevalueRequired

Registered type of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
missingRequiredFieldsarrayRequired

Required sub-block fields that resolve empty in the active mode.

Schema details
Array itemstring
inactiveModeValuesarrayRequired

Values stranded on the inactive member of a canonical pair.

Schema details
Array itemobject
4 fields
canonicalIdstringRequired

Canonical parameter the two sub-block modes share.

activeMemberIdvalueRequired

Sub-block the runtime reads, where the value should live.

Schema details

Any of

Option 1string
Option 2null
inactiveMemberIdstringRequired

Sub-block holding the stranded value, which the runtime ignores.

kindstringRequired

What kind of value is stranded.

enum
["credential","resource","other"]

Additional properties are not allowed.

Additional properties are not allowed.

unresolvedReferencesarrayRequired

Credential, resource, tool, and skill references that do not resolve; block-output references that will not work as written: a block that does not exist, or an output field the block does not have (reason unknown-field); and text outputs written unquoted in a JSON field (reason unquoted-json-string), which leave the field invalid JSON at run time unless the text is itself JSON. These values are still persisted; they are reported, not dropped.

Schema details
Array itemobject
7 fields
blockIdstringRequired

Block the finding is about.

blockNamevalueRequired

Display name of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
blockTypevalueRequired

Registered type of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
fieldstringRequired

Sub-block field holding the reference.

valuevalueRequired

The reference, or references, that did not resolve.

Schema details

Any of

Option 1string
Option 2array
Schema details
Array itemstring
kindstringRequired

What kind of entity the reference was expected to name.

enum
["credential","resource","custom-tool","mcp-tool","skill","block-output"]
reasonstringRequired

Why the reference does not resolve.

Additional properties are not allowed.

tableFieldIssuesarrayRequired

Table block filter and order fields checked against the bound table's live schema that name no column (nor the implicit id, createdAt, updatedAt). Such a run fails inside the block's error edge. A filter holding a <block.output> reference, or one that is not JSON, is not checked.

Schema details
Array itemobject
5 fields
blockIdstringRequired

Block the finding is about.

blockNamevalueRequired

Display name of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
blockTypevalueRequired

Registered type of the block, when it has one.

Schema details

Any of

Option 1string
Option 2null
fieldstringRequired

The filter or sort field that names no column.

tableNamestringRequired

Display name of the table the block is bound to.

Additional properties are not allowed.

manualRunIssuevalueRequired

Why a manual run from the editor's Run button would be refused before it starts: no enabled trigger it can start from, more than one API trigger, or a selected trigger with no outgoing connection. The API run endpoints do not apply these checks. null when no manual-run issue is reported: the run can begin, only a chat trigger can start the workflow, or the graph is empty (reported in notes instead).

Schema details

Any of

Option 1object
5 fields
reasonstringRequired

Why the run is refused.

enum
["no-trigger","multiple-api-triggers","trigger-not-connected"]
messagestringRequired

The error the manual run raises.

blockIdvalueRequired

Trigger the run would start from, when the problem is that trigger.

Schema details

Any of

Option 1string
Option 2null
blockNamevalueRequired

Display name of that trigger.

Schema details

Any of

Option 1string
Option 2null
blockTypevalueRequired

Registered type of that trigger.

Schema details

Any of

Option 1string
Option 2null

Additional properties are not allowed.

Option 2null
notesarrayRequired

Advisory notes about the report itself.

Schema details
Array itemstring

Additional properties are not allowed.

dryRunbooleanRequired

Whether this request only evaluated. true means nothing was persisted; the outcome describes what a committed apply of the same body would produce.

Additional properties are not allowed.

Additional properties are not allowed.

Response example 1

json
{
  "data": {
    "id": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
    "applied": 1,
    "skipped": [],
    "deferred": [],
    "inputValidationErrors": [],
    "mintedBlockIds": {
      "agent-1": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77"
    },
    "lint": {
      "sources": [
        {
          "blockId": "start-1",
          "blockName": "Start",
          "blockType": "start_trigger"
        }
      ],
      "sinks": [
        {
          "blockId": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77",
          "blockName": "Triage",
          "blockType": "agent"
        }
      ],
      "orphanBlocks": [],
      "emptyOutgoingPorts": [],
      "invalidBranchPorts": [],
      "invalidConnectionTargets": [],
      "fieldIssues": [
        {
          "blockId": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77",
          "blockName": "Triage",
          "blockType": "agent",
          "missingRequiredFields": [
            "systemPrompt"
          ],
          "inactiveModeValues": []
        }
      ],
      "unresolvedReferences": [],
      "tableFieldIssues": [],
      "manualRunIssue": null,
      "notes": []
    },
    "warnings": [
      "Workflow lint found issues (Blocks missing required fields: 1). The findings are in `lint`."
    ],
    "needsRedeployment": true,
    "dryRun": false
  }
}

Response headers

X-RateLimit-Limitinteger

Maximum requests allowed in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Remaininginteger

Requests remaining in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Resetstring

ISO 8601 timestamp when the current rate-limit window resets.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Was this helpful?
Suggest an edit