Skip to main content
POST
Check a saved workflow
Requires agents:update. This is read-only validation: it does not save a document, publish a version, execute a provider action or start a call.
string
required
Local agent UUID.
integer
required
Exact saved draft version.
200 returns valid: true, content_hash, empty issues and warnings. A draft with issues answers 422 WORKFLOW_VALIDATION_FAILED, exactly as publish does, with every issue in the one answer — and with warnings[] beside it: strict_off_guidance when strict mode is off, and every advisory about a binding or an input (binding_channel_unsupported, stored_context_has_no_writer, missing_request_field, input_constant_placeholder, tool_values_missing), so those are never held back until the refusal beside them is fixed. The compiler’s own advisories — during_output_advisory, sequence_branch_advisory, before_reference_missing_fallback, override_needs_strict and the three about endings and timing, after_ending_coverage, after_any_end_waits and before_budget_inbound — are read from a document it compiles: when the compiler itself refuses the draft, they arrive on the next Check once the document compiles. The last three never change the published workflow or its content_hash; Check is the only place they appear. Each warning carries a safe code and its message — the sentence from the table below — and nothing else, except an advisory about a binding, which adds path (the pointer to that binding), node_id and label (the step that uses it, when a step does — the step’s own label, never the tool’s) and tool_name (the tool it runs). stored_context_has_no_writer, missing_request_field and input_constant_placeholder point one level deeper — path is the input itself, /bindings/{n}/inputs/{field} with the field name RFC 6901 escaped — and add field, the input’s name: A request without expected_version is 400 WORKFLOW_REQUEST_INVALID with issues[0].path /expected_version, and a draft naming a tool revision this workspace cannot use is 422 WORKFLOW_REFERENCE_INVALID with one issue per binding at /bindings/<n>/tool_revision_id — see Save workflow draft. A binding to an archived tool is tool_archived there, with the step in node_id and label and the tool in tool_name: restore the tool, or remove the step. 422 returns safe issues with code, JSON path and message. On every code, label is the step’s own label and comes only with node_id; an issue about a binding adds tool_name, the tool it runs, and an issue about one input adds field, the input’s name — missing_input_source says both in its message too. path is a JSON pointer into the document by position — the style a refused save uses: /bindings/0/inputs/order_id, /conversation/nodes/2, /after/0/steps/0. A problem with an input a step reads is at that input on the binding the step runs, /bindings/<n>/inputs/<field>, with the step’s id in node_id and its label in label. A problem with a binding itself — a required input with no source, an input its tool does not have — names the first step that runs or offers that binding the same way (a before-call step, a conversation step, a follow-up, or a step inside a sequence); only a binding no step uses has no node_id. Every binding and every step is checked before Check answers, so two bindings at fault — one naming an input its tool does not have, one reading a path no schema declares — are named in the one answer. An issue that belongs to one conversation step also carries node_id (that step’s conversation.nodes[].id) and label (its label in the document), so you can point the author straight at the step instead of at a JSON pointer:
Both fields are optional and absent on an issue that belongs to no single step; treat them as additive. A part of the document that does not match the workflow schema is named by the same pointer, with field_required (a member it needs is missing), field_unknown (a member it does not take) or field_invalid (a value of the wrong shape — a fallback sent as a bare string instead of {"value": …}, for one). A save refuses a malformed fallback itself.

Request fields a step reads

A request source reads a call variable — what variables on POST /calls carries. request_schema is where the workflow declares which ones it reads. A required tool input reading a path request_schema does not declare, with no fallback, is refused: missing_request_field, at the input, with its step in node_id and label, the tool in tool_name and the input in field. Declare the path under request_schema.properties (or open the schema with "additionalProperties": true), or give the source a fallback. A save keeps the draft; Check and publish refuse it. An optional input reading such a path is the same code as an advisory in warnings[], at the input and named the same way, and blocks nothing — the rule saved context follows.
409 means the draft changed. 503 WORKFLOW_COMPILER_UNAVAILABLE must not be treated as a successful check. 413 WORKFLOW_SETTINGS_TOO_LARGE requires smaller saved technical/post-call settings, then another check; saved values are not deleted. Checking uses current authorized references, but does not reserve them against future changes. Publication rechecks the complete fingerprint atomically.

Bindings wired where the tool cannot run

Every tool revision carries the channels and the phases it can run on, and a binding outside them used to check and publish in silence. The two halves are answered differently, because only one of them is always wrong. A wrong phase is refused. A transfer tool is ["during"] always — nothing before a call starts or after it ends is holding a line to hand over — so a transfer in a before-call or after-call step cannot run in any configuration of any agent. Check and publish both answer 422 WORKFLOW_VALIDATION_FAILED with binding_phase_unsupported, carrying node_id (the step to open), label (that step’s label) and tool_name (the tool). The message is written from the two phases in hand — the phases the tool declares, and the one the step it was wired into runs in — so it fires in either direction: a tool declared ["before"] and bound in the conversation is told that, not the reverse. The example below is a ["during"] tool in a before-call step:
Move the binding to a step the tool can run in, or take it out. A wrong channel is an advisory. ["phone","web"] is what a new workflow is created with, and agents published that way are answering calls today, so refusing it would lock them out of their own Publish button. Check reports it in warnings[] and publishes anyway. Decide with the caller in mind — a browser caller reaching a transfer step gets nothing, and a shared browser link is a browser caller, so a transfer can never be exercised through one. node_id on the advisory is the step that will do nothing on the other channel, so you can name it to the author rather than handing them a binding index. The two shapes that cannot work on any channel the agent answers on are refused rather than reported — a phone-only tool on a ["web"] agent is unsupported_channel, and a transfer outside a during-call step of a phone workflow is transfer_placement, both in the table under Conversation graph issues.
Read workflow tool catalog lists the channels and phases of every tool in the workspace, so a picker can rule a tool out before it is bound.

Sequence branching issues

Checking and publishing raise these issues[] codes for a sequence that uses conditions or routes. path is the JSON pointer into the document, so it names the step — and, for a condition, the part of the condition — that must change. See Branching inside a sequence for the rules themselves. All five branching advisories arrive as the single sequence_branch_advisory code above and block nothing: a step no route can reach, a condition that can never be true, a step that depends on one that may be skipped, a condition that reads a step allowed to fail and continue, and a condition whose source schema declares no type to check against.

Tool input issues

Raised for a binding’s inputs — where each argument of a tool comes from on this agent. path is the pointer to the exact input, so it names the binding and the field. The rules are on How a tool gets its arguments. Both extracted_field_* codes are read against the extraction parameters the agent has now — the same settings the version would be published with — and carry node_id and label (the step that runs the binding), tool_name (the tool) and field (the input). Check and publish both refuse with 422 WORKFLOW_VALIDATION_FAILED — Check used to answer them as 200 with valid: false, so a pipeline gating on the status passed a broken binding — and any issue in the graph itself arrives in the same answer:

Conversation graph issues

Raised for the During graph — the nodes, their branches, and the bindings they use. A when on a result edge is also held to the condition rules of a sequence step, at the same path inside the when: condition_depth, condition_size, condition_value_required, condition_value_unexpected, condition_value_type and condition_type_mismatch, listed under Sequence branching issues. A path the step’s tool’s output schema rules out is unknown_source_path: a field a closed shape ("additionalProperties": false) does not list, a field below a value that is not an object or a list, or a step into a list with anything but a position. An open shape is not checked, and a comparison the call cannot make while it runs is false. A path may step into a list by position, optional lists included (/data/trips/0/distance). The rules themselves are in Routing on what a tool answered.

Phase and lifecycle issues

These come from the Before and After phases rather than from a sequence. path names the step, the route or the field to change. The rules behind them are on Save workflow draft.

A follow-up’s “Only if”

These come from the when on an After trigger — see Running a follow-up only for some calls. path names the part of the condition to change, /after/<trigger id>/when/....

Before-call references in step instructions

Raised for {{before.…}} written into instructions. path is the pointer to the field carrying the reference.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Headers

x-company-id
string<uuid>

Explicit active workspace. Optional; when sent it must be the API key's own workspace — any other value is refused with 403 WORKSPACE_MISMATCH.

Path Parameters

id
string<uuid>
required

Body

application/json
expected_version
integer
required
Required range: 1 <= x <= 9007199254740991

Response

Valid saved draft and safe advisories.

valid
boolean
required

True on the 200. A draft with issues answers 422 WORKFLOW_VALIDATION_FAILED instead, exactly as publish does - including binding_phase_unsupported and the extracted_field_* refusals, which are raised beside the compiler rather than by it and used to arrive as valid false on a 200. That 422 carries valid false too, and the same warnings[] a passing Check carries.

issues
object[]
required

Empty when valid is true. Otherwise the refusals, in the same shape publish sends them in, so one renderer serves both.

Maximum array length: 100
warnings
object[]
required
content_hash
string

The compiled artifact's hash. Present only when valid is true.

Pattern: ^[a-f0-9]{64}$