workflows

Validate workflow

Stateless dry-run of the FULL publish validator over a step document. Two modes, exactly one per call: draft_steps inline (pre-create authoring - ids optional, none assigned, nothing saved) or sid (validate the saved draft in place; item = the workflow row, null in stateless mode). Free and read-only: no writes, no events, no version minted.

An invalid DOCUMENT is a successful validation: 200 with valid:false + ALL errors at once (never fail-fast) in result.errors keyed steps[id=N].{field} (array position for id-less new steps), each with rule + received + fix hint; result.warnings = non-blocking domain lints; result.preview = deterministic ASCII render of every execution path - paste it to the user instead of narrating the graph. The error envelope is reserved for transport/input failures (malformed request, unknown sid). Checks are IDENTICAL to publish_workflow (see its description): document caps (100 steps incl. nested, depth <= 3, 512 KB), end-last, id rules, duration ranges 1m..365d, plus the sender-pool / schedule / template-variable / when-AST / output_key (ask_ai and api_call, one key space) / api_call rules.

The canonical authoring loop: validate {draft_steps} → fix by result.errors → repeat (<=3) → create → update iterations (carry ids) → publish once → resume. Exists because every publish of a changed draft mints a version - this is its free dry-run twin; a validate-then-publish loop is never surprised.

Contract:

  • MCP tool validate_workflow, registry package mcp.playtables/workflows, mount playtables.workflows.
  • Operation action, response envelope action.
  • Flags: read only.
post/api/workflows/validate

Request

  • Base URL
    https://beta.getsales.io/playtables/v1
  • Auth
    HTTP bearer and API key in header Team-SID

Request body

sidstring

Sid mode: validate the SAVED draft of this workflow in place.

Response

action success envelope.

successtrue required
operation'action' required
actionstring required

kebab-case verb; matches the route segment.

Changes

No recorded changes to this operation across all 1 revision of this API.