/api/v2/workflows/{workflowId}/stateReplace the draft graph in one write. Requires workspace write access. Concurrent row-locked writes are last-write-wins; IDs owned by another workflow return 409. Deployments, schedules, and webhook registrations are unchanged. Deploy to serve the edits.
Lint is advisory. Use dryRun=true to validate without saving, auditing, or notifying collaborators. 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
OAuth scope: api:write.
Path parameters
Unique workflow identifier.
- minLength
- 1
Query parameters
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
RequiredA complete replacement draft graph for a workflow.
A complete replacement draft graph for a workflow.
5 fields
Blocks keyed by block id.
Schema details
One node of a workflow graph and its configuration.
15 fields
Block identifier, unique within the workflow.
- minLength
- 1
Registered block type.
- minLength
- 1
Block display name; must be unique within the workflow.
- minLength
- 1
- maxLength
- 255
Canvas coordinates of a block.
2 fields
Canvas x coordinate.
Canvas y coordinate.
Configured inputs keyed by sub-block id.
Schema details
One configurable input on a block.
3 fields
Sub-block identifier.
- minLength
- 1
Sub-block input type.
- minLength
- 1
Configured value; shape depends on the sub-block type.
Declared output shape keyed by output name.
Schema details
Declared shape of one output; depends on the block type.
Whether the block runs.
Whether edge handles render horizontally.
Rendered block height.