> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goyappr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check workflow

> Validate the exact saved draft with the canonical compiler.

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.

**id** `string` *required*

Local agent UUID.

**expected\_version** `integer` *required*

Exact saved draft version.

```bash theme={null}
curl -X POST 'https://api.goyappr.com/agents/AGENT_ID/workflow/validate' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'x-company-id: COMPANY_ID' \
  -H 'Content-Type: application/json' \
  -d '{"expected_version":3}'
```

`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:

| Code | Meaning |
| - | - |
| `strict_off_guidance` | Step order outside a sequence is a suggestion, not a guarantee. Put anything that must happen in order into a sequence. |
| `during_output_advisory` | A value produced during the call may not be ready when a later step reads it. Put the two steps in one sequence, or give the reader a fallback value. |
| `sequence_branch_advisory` | A step in this sequence may not run every time: it sits behind a condition, nothing leads to it, or a condition compares a value whose type was never declared. Check the conditions, and give any step that reads a result from a conditional step a fallback value. |
| `before_reference_missing_fallback` | A step's instructions read a result from a before-call step that may not produce one, and that reference has no fallback text. If the value is missing when the call starts, the reference is removed and the sentence is spoken without it. Add fallback text after the \| in that reference. |
| `override_needs_strict` | A step's own settings are followed reliably only in Strict mode. With Strict mode off, the agent can still use the agent-wide settings on that step, such as the main calendar. Turn on Strict mode to keep each step on its own settings. |
| `after_ending_coverage` | Every follow-up in this workflow runs only when a call finishes normally. A call that fails, is rejected or is never answered runs none of them. Add a follow-up for those endings (call.no\_answer, call.failed), or set the follow-up to any\_end. |
| `after_any_end_waits` | A follow-up on any\_end lists call data in requires (transcript, analysis, recording, lead or billing). A call nobody answered never has it, so on that call the step is blocked and nothing is sent. Take the entry out of requires, or move the step to a follow-up on analysis.ready. |
| `before_budget_inbound` | These before-call steps can take longer than an incoming call waits to be answered, so on an incoming call the last of them is cut short. Let steps that do not need one another run side by side, or shorten the chain. Outgoing calls wait longer and are not affected. |
| `binding_channel_unsupported` | A tool in this workflow cannot run on every channel this agent answers on — a `transfer` tool is `["phone"]` always, because a browser call has no second leg to hand over — so on the other channel nothing runs: a transfer the agent asks for on a browser call is answered `error_code: "unsupported_transfer_channel"`, and the agent is told to say that transfers work on phone calls. Take that channel out of `channels`, or keep it for browser tests and expect that answer. |
| `stored_context_has_no_writer` | A binding input reads `kind: "stored"`. Nothing in the product writes saved context — `stored_schema` declares the shape, and no endpoint and no step fills it — so that input is missing on every call, or takes its `fallback` for ever. Send the value in `variables` on [`POST /calls`](https://docs.goyappr.com/api-reference/calls/create) and read it with a `request` source, or read it from an `artifact`. This is the advisory for an **optional** input, or one with a `fallback`. A **required** input whose only source is saved context, with no `fallback`, is refused instead: Check and publish answer `422 WORKFLOW_VALIDATION_FAILED` with this code in `issues[]`, at the input, with the step that runs it in `node_id` and `label`, the tool in `tool_name` and the input in `field`. A [save](https://docs.goyappr.com/api-reference/workflows/save.md) still keeps the draft. |
| `missing_request_field` | An **optional** tool input reads a `request` path `request_schema` does not declare, with no `fallback`. Nothing asks a caller of [`POST /calls`](https://docs.goyappr.com/api-reference/calls/create) to send it, so it stays empty unless the caller happens to. Declare the path under `request_schema.properties`, or give the source a `fallback`. A **required** input reading such a path is refused with the same code — see [Request fields a step reads](#request-fields-a-step-reads). |
| `input_constant_placeholder` | A **required** tool input is a `literal` whose text reads as a stand-in (`n/a`, `TBD`, `TODO`, `test`, `xxx`, `-`, `?`, empty, the Hebrew `לא רלוונטי` and `ל"ר`, and the like). It is sent exactly as written on every call. Point the input at where the value is collected, or put the real value in. Optional inputs are never flagged. |
| `tool_values_missing` | A bound HTTP tool has a header saved with no value, or a query parameter written `name=` with nothing after it, so it is sent empty on every call. A tool a [Duplicate with `fork_tools`](https://docs.goyappr.com/api-reference/agents/duplicate) made for the copy starts that way, because values are never copied. `path` is the binding, `node_id` and `label` the step that runs it, `tool_name` the tool, and `header_names` / `query_names` name what is empty (never a value). Send the values with [`PATCH /tools/{id}`](https://docs.goyappr.com/api-reference/tools/update). |
| `workflow_warning` | This workflow has an advisory worth reviewing before you publish it. An advisory with no more specific code in this list arrives under this one, and never carries private diagnostic text. |

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](https://docs.goyappr.com/api-reference/workflows/save.md#refusals-name-the-field).
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](https://docs.goyappr.com/api-reference/workflows/save.md#refusals-name-the-field) 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:

```json theme={null}
{
  "error": "Workflow validation failed.",
  "code": "WORKFLOW_VALIDATION_FAILED",
  "issues": [
    {
      "code": "unreachable_node",
      "path": "/conversation/nodes/2",
      "message": "Every conversation node must be reachable from entry or a global branch.",
      "node_id": "orphan-tool",
      "label": "Webhook lookup"
    }
  ]
}
```

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](https://docs.goyappr.com/schemas/workflow-v1.json) 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](https://docs.goyappr.com/api-reference/workflows/save.md) refuses a malformed `fallback` itself.

## Request fields a step reads

A `request` source reads a call variable — what `variables` on
[`POST /calls`](https://docs.goyappr.com/api-reference/calls/create) 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.

```json theme={null}
{
  "code": "missing_request_field",
  "path": "/bindings/0/inputs/phone",
  "message": "phone is required by \"Case lookup\" and reads /phone from the call request, which request_schema does not declare, so it would arrive empty. Declare /phone under request_schema.properties and send it in variables on POST /calls, or give this source a fallback.",
  "node_id": "lookup",
  "label": "Find the case",
  "tool_name": "Case lookup",
  "field": "phone"
}
```

`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:

```json theme={null}
{
  "error": "Workflow validation failed.",
  "code": "WORKFLOW_VALIDATION_FAILED",
  "issues": [
    {
      "code": "binding_phase_unsupported",
      "path": "/before/steps/0",
      "message": "This tool only works while the call is live, and this step runs before the call starts. Move it to where the tool can run, or use a different tool here.",
      "node_id": "screen_the_caller",
      "label": "Screen the caller",
      "tool_name": "Transfer to reception"
    }
  ]
}
```

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](https://docs.goyappr.com/api-reference/shared-links/create.md) 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](#conversation-graph-issues).

```json theme={null}
{
  "valid": true,
  "content_hash": "8f14e45fceea167a5a36dedd4bea2543a1b1e1f9e0e1e5d9c3c7a1d0b2c4e6f8",
  "issues": [],
  "warnings": [
    {
      "code": "binding_channel_unsupported",
      "message": "A tool in this workflow cannot run on every channel this agent answers on. Transferring a call needs a phone line, so a browser caller reaching that step gets nothing. Take that channel off the agent, or take the tool out.",
      "path": "/bindings/0",
      "node_id": "hand-over-node",
      "label": "Hand the caller over",
      "tool_name": "Transfer to reception"
    }
  ]
}
```

[Read workflow tool catalog](https://docs.goyappr.com/api-reference/workflows/catalog.md) 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](https://docs.goyappr.com/api-reference/workflows/save.md) for the rules
themselves.

| Code | What to change |
| - | - |
| `sequence_route_target` | `on_succeeded`/`on_failed` names something that is not a step of this sequence. Use a step id from the same sequence, or `"#end"`. |
| `entry_step_routed` | A route points back at the sequence's first step. Nothing may re-enter the step the sequence starts with; route to a later step or to `"#end"`. |
| `sequence_cycle` | Dependencies and routes together form a loop, so a step would wait for its own successor. Drop one edge. |
| `failure_route_conflict` | A step declares `on_failed` while `on_failure` is `stop`. Set `"on_failure": "continue"` on that step, or remove the failure route. |
| `condition_depth` | The condition nests more than four levels. Flatten it, or split the decision across two steps. |
| `condition_size` | The condition declares more than 32 parts. Split the decision across two steps. |
| `condition_value_required` | This operator compares against something. Add `value`. |
| `condition_value_unexpected` | This operator takes no `value` — `exists`, `not_exists`, `is_true`, `is_false`, `is_empty`, `is_not_empty`. Remove it. |
| `condition_value_type` | `in` and `not_in` need a list on the `value` side. |
| `condition_type_mismatch` | The declared types disagree, or the operator does not apply to the declared type: ordering is numbers only, `is_true`/`is_false` need a boolean, emptiness needs text, a list or an object, and `contains` needs text or a list. |
| `branch_dependent_source` | A value produced on a branch is read with no stand-in. Declare a `fallback` on that source — or, for a required sequence output, on the mapping — or make the output optional. |
| `transfer_in_sequence` | A sequence that branches cannot contain a transfer step. Move the transfer out of the sequence. |
| `input_dependency` | A step reads another step's output without being downstream of it. Declare the dependency in `depends_on`, or route through that step. |

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](https://docs.goyappr.com/concepts/tool-inputs.md).

| Code | What to change |
| - | - |
| `missing_input_source` | A field the tool declares as required has no source and no default. Add an entry to `inputs` for it, or give the field a `default` in the tool's schema. |
| `unknown_input` | `inputs` names a field the tool's `input_schema` does not declare. Read the tool's contract and use one of its field names. |
| `model_input_unavailable` | A `{"kind":"model"}` source in a before-call step, a follow-up step or a sequence child. Only the conversation can collect a value from the model; a sequence collects its arguments once, as its own `input_schema`. |
| `model_field_path` | A model source's `path` names more than one level — `/patient/name`. A model argument is one top-level name; its value may still be nested. |
| `model_argument_collision` | Two model sources on one binding claim the same argument name. |
| `unknown_source_path` | The `path` is not declared by the schema the source reads — the document's `request_schema` or `stored_schema`, the sequence's `input_schema`, or the producing step's `output_schema`. For a `stored` source, declared means named under `properties` (or the schema opening itself with `additionalProperties: true`): `{"type": "object", "properties": {}}` declares nothing, so `/missing_field` is refused here rather than arriving empty on every call. A `request` source reads the call's `variables`, and a `request_schema` that does not set `additionalProperties: false` admits any of them, so `/count` passes on `{"type": "object", "properties": {}}` and is refused only when the schema closes itself. A `path` may step into a list by position (`/data/trips/0/distance`), also a list declared optional with `"type": ["array", "null"]`; a step into a list with anything but a whole-number position (`/trips/first`, `/trips/-1`, `/trips/01`) is refused, and so is a field below a value that is text, a number or true/false. |
| `sequence_input_unavailable` | `{"kind":"sequence"}` used outside a sequence. A sequence's input is private to its own children. |
| `artifact_phase` | A `{"kind":"artifact"}` source, or a step `requires`, outside an After trigger. Transcript, analysis, recording, lead and billing exist only once the call is over. |
| `artifact_never_produced` | A follow-up step waits for call data its ending never has — in `requires` or through an `{"kind":"artifact"}` source. A call nobody answered (`call.no_answer`) and a request that died before dialling (`request.failed`) have none of the five: transcript, analysis, recording, lead, billing. A call that failed (`call.failed`) is refused for transcript, analysis and recording. The step would never start. Move it under the matching `<result>.ready` event or `call.ended`, or remove what it waits for; the message names them. [Trigger events](https://docs.goyappr.com/api-reference/workflows/events.md#what-each-event-can-have) has the full table. The path is the step, `/after/<n>/steps/<n>`, and `node_id` is its id. Check and publish refuse it; a workflow already published with such a wait keeps running as it did until it is next published. |
| `extract_unavailable_phase` | A `{"kind":"extract"}` source in a before-call step, in a conversation step or in a sequence child. A value can be read from the call by description only after the call ends: move the step under After the call, or fill the input another way. |
| `extract_type_unsupported` | A `{"kind":"extract"}` source on an input a description cannot fill — a list, an object, an input that declares no `type` — or whose `type` the input cannot take (a `datetime` into an integer, a `number` into text). The message names the input. Leave `type` out to follow the input, or fill the input with a fixed value. |
| `extract_missing_policy` | A `{"kind":"extract"}` source carries both `fallback` and `on_missing`: two answers to the same question. Keep one. |
| `extract_instruction_empty` | A `{"kind":"extract"}` source whose `instruction` is blank. Say what to read from the call, for example "the time slot the caller agreed to". |
| `extract_too_many` | The document asks the call for more than 64 different values (distinct description, type and choices). Reuse the same sentence, or fill some inputs another way. |
| `extract_unavailable` | The document uses a `{"kind":"extract"}` source and the voice engine this workspace's calls run on does not read it yet, so nothing was published. Fill the input with a fixed value for now. |
| `future_input` | A step reads a conversation output that cannot exist yet — from a before-call step, or from itself. |
| `missing_output_source` | The step named by a `{"kind":"step"}` source does not exist, or is not an action or sequence node. |
| `extracted_field_unknown` | An `analysis` source reads `/extracted_data/<name>` and the agent collects nothing called `<name>` — or collects nothing at all, or the path goes deeper into a field that holds a single value — so the input would arrive empty on every call. The message lists what the agent does collect. Use one of those names, or add the parameter with [`PATCH /agents/{id}`](https://docs.goyappr.com/api-reference/agents/update). |
| `extracted_field_type_mismatch` | The input's declared `type` cannot take the kind the parameter is collected as, so the tool would refuse it on every call: `text` and `date` arrive as a string, `number` as a number (an `integer` input is accepted), `yes_no` as a boolean, and the whole `/extracted_data` as an object. An input that declares no `type` is not checked. Bind a parameter of the matching kind, or change the parameter's kind or the input's type. |
| `object_schema_required` | An argument list is not an object at its root. Its message is *"Tool inputs must declare an object root."* whichever list it was: the tool's `input_schema`, the document's `request_schema` or `stored_schema`, or a sequence's `input_schema`/`output_schema`. Write an empty one as `{"type":"object","properties":{}}`. |

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:

```json theme={null}
{
  "error": "Workflow validation failed.",
  "code": "WORKFLOW_VALIDATION_FAILED",
  "valid": false,
  "issues": [
    {
      "code": "extracted_field_unknown",
      "path": "/bindings/0/inputs/years_experience",
      "message": "This input reads \"/extracted_data/not_a_param\", and this agent collects nothing called \"not_a_param\", so it would arrive empty on every call. It collects: years_experience, has_drivers_license, start_date, candidate_city. Pick one of those, or add \"not_a_param\" to the agent's extraction parameters.",
      "node_id": "send_answers",
      "label": "Send the answers to the CRM",
      "tool_name": "Send the screening answers",
      "field": "years_experience"
    },
    {
      "code": "extracted_field_type_mismatch",
      "path": "/bindings/0/inputs/has_drivers_license",
      "message": "This input takes true or false, and \"candidate_city\" is collected as text, so the tool would refuse it on every call. Bind a detail collected as the kind this input takes, or change \"candidate_city\"'s kind in the agent's settings, or the input's type.",
      "node_id": "send_answers",
      "label": "Send the answers to the CRM",
      "tool_name": "Send the screening answers",
      "field": "has_drivers_license"
    }
  ],
  "warnings": []
}
```

## Conversation graph issues

Raised for the During graph — the nodes, their branches, and the bindings they
use.

| Code | What to change |
| - | - |
| `unreachable_node` | A node cannot be reached from `entry_node_id` or a global branch. This is what a tool node added to the canvas but never wired produces; the issue names each offending node and its label. |
| `missing_entry` | `entry_node_id` names a node that is not in `nodes`. |
| `intrinsic_end` | The document does not have exactly one End node. |
| `terminal_edge` | An edge leaves the End node. Nothing follows End. |
| `edge_kind` | A conversation node used a `result` edge, or an action/sequence node used a `conversation` edge. Conversation nodes branch on a written `condition`; action and sequence nodes branch on `outcome`. |
| `ambiguous_result_edge` | Two `succeeded` edges without a `when`, or two `failed` edges, leave the same node, so the platform cannot tell which to take. Keep one of them, or give a `succeeded` edge a `when`. Several `succeeded` edges with a `when` are allowed beside one without. |
| `result_guard_outcome` | A `when` on a `failed` result edge. Only a `succeeded` edge can have a condition: a failed edge is taken whenever the tool fails, whatever it answered. Remove the `when`. |
| `result_guard_needs_strict` | A `when` on a result edge while `strict_mode` is off. Only Strict mode holds the conversation to the edge the answer picked. Turn Strict mode on, or remove the `when`. |
| `result_guard_needs_otherwise` | A node has `succeeded` edges with a `when` and none without one, so an answer that matches none of them would stop the call. Add exactly one `succeeded` edge without a `when`: it is taken when no condition holds. The issue names the step in `node_id` and `label`. |
| `result_guard_source` | A result edge's `when` reads something other than fixed values and the answer of the step the edge leaves (`{"kind":"step","scope":"during","step_id":"<the edge's source>","path":"/status"}`): a request, stored or call source, or another step's answer. `path` points at the offending side of the comparison. |
| `result_guard_reader_unavailable` | The voice engine this workspace's calls run does not read a result edge's `when` yet, so nothing was published. One issue for each edge with a `when`. Remove the `when` and keep one `succeeded` edge for now, or publish again once the engine is updated. |
| `missing_edge_node` / `missing_global_target` | An edge names a node that does not exist. |
| `missing_binding` | A step or node names a binding id that is not in `bindings`. |
| `unsupported_channel` | The tool behind the binding has no channel in common with the document's `channels`, so it can never run. A tool that runs on some of them but not all is the advisory above, not this. |
| `unsupported_phase` | The tool behind the binding is not allowed in that phase. Kept here because the compiler still raises it for its own callers; on this route the same document is refused earlier, as `binding_phase_unsupported`, which adds the step's id and the tool's name. |
| `transfer_placement` | A transfer is used outside a during-call step, or the document does not offer the phone channel. |
| `missing_sequence` / `unused_sequence` | A sequence node names a sequence that does not exist, or a declared sequence has no invocation node. |
| `private_sequence_child` / `shared_sequence_child` | A binding used inside a sequence is also used elsewhere, or by a second sequence. A sequence's children are private to it. |
| `duplicate_available_tool` | A conversation node lists the same binding twice in `available_binding_ids`. |
| `hold_line_blank` | An action step's `hold_line` is only spaces. Write the sentence the caller hears while the tool runs, or remove `hold_line`. |
| `hold_line_not_fixed` | An action step's `hold_line` carries `{{` or `}}`. The line is said exactly as written, so it cannot quote a value or vary from call to call. Write the sentence itself. |
| `hold_line_too_long` | An action step's `hold_line` takes longer to say than the agent's next words wait for it — about 2.5 seconds of speech: 28 characters in English, about 25 in Hebrew or Arabic, about 16 in Korean or Japanese kana, about 10 in Chinese characters, a digit counting as about three. Shorten it to one brief sentence, such as "One moment please." |
| `hold_line_on_transfer` | A `hold_line` on a step that runs a transfer. A transfer says the announcement set on its transfer tool. Remove `hold_line` from the step. |

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](#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](https://docs.goyappr.com/api-reference/workflows/save.md#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](https://docs.goyappr.com/api-reference/workflows/save.md).

| Code | What to change |
| - | - |
| `before_budget_exceeded` | The chain of before-call steps cannot finish inside the preparation window of either direction. Shorten the chain, drop `depends_on` so independent steps run together, or move work into the call. |
| `guard_phase` | A before-call or follow-up *step* carries a `when` condition. Conditions on steps belong to a tool sequence; a lifecycle step runs as soon as the steps it declares are done. Remove it, move the step into a sequence, or — to run a whole follow-up for some calls only — put the condition on the trigger instead (see the next table). |
| `route_phase` | A follow-up step declares `on_succeeded` or `on_failed`. Only a before-call step routes its outcome; a follow-up runs on its declared dependencies. Remove the route. |
| `before_route_target` | A before-call step routes to another step. The only target a before-call step may name is `"#decline"`, which refuses the call. |
| `decline_phase` | `"#decline"` is used inside a sequence, where the call is already connected. Only a before-call step can refuse a call. |

### A follow-up's "Only if"

These come from the `when` on an After trigger — see
[Running a follow-up only for some calls](https://docs.goyappr.com/api-reference/workflows/save.md#running-a-follow-up-only-for-some-calls).
`path` names the part of the condition to change, `/after/<trigger id>/when/...`.

| Code | What to change |
| - | - |
| `trigger_filter_unavailable` | The condition reads a fact the trigger's event cannot guarantee: how the call ended on an event that is not an ending, the disposition or a collected field anywhere but `analysis.ready`, or a `path` that is no fact about the call. The message names the field, the event and where it can be read. Move the follow-up to the event that knows it, or filter on something this event knows. |
| `trigger_filter_type` | The fact and the operator or value do not fit: ordering a text fact (`gt` on `/ended_by`), or comparing the duration with text. Use an operator and a value of the fact's kind. |
| `trigger_filter_value` | A fixed value the fact can never have — `/status` compared with `"answered"`. The message lists the values it can have. |
| `trigger_filter_source` | A comparison that is not a call fact on the left and a fixed value on the right: a `request`, `stored` or `step` source, a second call fact on the right, or two fixed values. |
| `trigger_filter_reader_unavailable` | The voice engine this workspace's calls run does not read an "Only if" yet, so nothing was published. Remove the `when`, or publish again once the engine is updated. |
| `call_source_placement` | A `{"kind":"call"}` source in a sequence condition. Only a follow-up's "Only if" reads the call; a sequence condition reads tool inputs and outputs while the call is going. |
| `condition_depth`, `condition_size` | The condition nests deeper than 4 levels or has more than 32 parts, as in a sequence. |
| `condition_value_required`, `condition_value_unexpected` | A comparison needs a `value`, or an operator such as `exists` was given one. |

## Before-call references in step instructions

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

| Code | What to change |
| - | - |
| `placeholder_syntax` | The reference is not written exactly as `{{before.step_id.field}}`, optionally ending with `\|text`. A near miss — `{{Before.`, `{{ before.`, `{{before .` — counts as this, because a near miss is never filled in. |
| `placeholder_unknown_step` | No before-call step has that id. Use an id from `before.steps`. |
| `placeholder_phase` | The id names a conversation step, a follow-up step or a sequence. Only a before-call result exists when the instructions are written. |
| `placeholder_unknown_path` | That field is not declared by the `output_schema` of the tool the step runs. Read the tool's output contract and name a field it returns. |
| `placeholder_unsupported_field` | A reference is written somewhere that is never filled in — a step label, a route condition, or a tool's or sequence's own description. Move it into `global_instructions` or a conversation step's `instructions`. |
| `placeholder_reserved_variable` | The document declares a call variable named `before` alongside a reference. Rename the variable; `before` is reserved. |
| `placeholder_limit` | More than 256 references in one document. |
| `placeholder_too_long` | One reference is over 512 characters, or its fallback text is over 1,000. Shorten it. |


## OpenAPI

````yaml POST /agents/{id}/workflow/validate
openapi: 3.1.0
info:
  title: Yappr API
  description: >
    Create and manage AI voice agents, purchase phone numbers, configure tools,
    and initiate calls — all via REST.
  version: 1.0.0
  contact:
    url: https://goyappr.com
servers:
  - url: https://api.goyappr.com
    description: Production
security:
  - apiKey: []
paths:
  /agents/{id}/workflow/validate:
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          format: uuid
      - in: header
        name: x-company-id
        schema:
          type: string
          format: uuid
        description: >-
          Explicit active workspace. Optional; when sent it must be the API
          key's own workspace — any other value is refused with 403
          WORKSPACE_MISMATCH.
    post:
      tags:
        - Workflows
      summary: Check a saved workflow
      description: >-
        Requires agents:update. Runs the canonical compiler against exactly
        expected_version and current authorized tool/account/settings inputs.
        Read-only validation; does not save or publish. Warnings are stable safe
        codes, never private compiled prompts or connected-app service
        configuration. Unknown compiler advisories project to workflow_warning.
        Two codes come from the binding contracts rather than the compiler, and
        both carry the pointer to the binding and the tool's name.
        binding_channel_unsupported is an advisory on the 200;
        binding_phase_unsupported is a refusal, answered 422
        WORKFLOW_VALIDATION_FAILED like any other. Every warning carries its
        message. Two further advisories come from the document itself and point
        at one input - stored_context_has_no_writer, a stored source, which
        nothing in the product ever populates, and input_constant_placeholder, a
        required input frozen to a stand-in such as n/a. An analysis source
        reading /extracted_data/<name> is read against the agent's extraction
        parameters and refused the same way, pointing at the input -
        extracted_field_unknown when the agent collects nothing by that name,
        extracted_field_type_mismatch when the input's declared type cannot take
        the parameter's kind.
      operationId: validateWorkflow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowExpectedVersion'
      responses:
        '200':
          description: Valid saved draft and safe advisories.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowValidation'
        '400':
          description: >-
            WORKFLOW_REQUEST_INVALID - expected_version is missing or not a
            positive whole number, or another field was sent, or a query
            parameter (the route reads none). issues[] names each one by path
            (/expected_version, /<field>).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowError'
        '401':
          description: >-
            MISSING_KEY, INVALID_KEY or EXPIRED_KEY - the key was not accepted.
            A valid key without the scope this operation needs is 403
            INSUFFICIENT_SCOPE, naming the scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >
            WORKSPACE_MISMATCH — `x-company-id` named a workspace other than the
            one this API key belongs to.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Agent/draft missing, archived or outside this company.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            WORKFLOW_CONFLICT; saved draft changed. The answer names the draft's
            version as current_version, beside issues[0].path /expected_version;
            when it equals the version sent, something the draft pins changed
            instead.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: >-
            WORKFLOW_TOO_LARGE or WORKFLOW_SETTINGS_TOO_LARGE. Save smaller
            settings separately; previous saved data is retained.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >
            WORKFLOW_VALIDATION_FAILED or unavailable references.

            A binding wired onto a channel its tool cannot run on is not
            refused: it is an

            advisory on the 200, `binding_channel_unsupported`. A binding wired
            into a phase

            its tool cannot run in is refused here
            (`binding_phase_unsupported`), and so is an

            input bound to what the agent collected, below; both used to come
            back as

            `valid: false` on a 200. Every issue arrives in the one answer, the
            conversation

            graph's all together.

            An input bound to what the agent collected raises, each with the
            pointer of the input:

            `extracted_field_unknown` — /extracted_data/<name> names nothing the
            agent collects.

            `extracted_field_type_mismatch` — the input's declared type cannot
            take the parameter's kind.

            An input read from the call by description
            (`{"kind":"extract","instruction":…}`, follow-up steps only) raises,
            each with the pointer of the input:

            `extract_unavailable_phase` — the step is not a follow-up step.
            `extract_type_unsupported` — the input is a list, an object,
            declares no type, or cannot take the `type` written.
            `extract_missing_policy` — both `fallback` and `on_missing` were
            written. `extract_instruction_empty` — the `instruction` is blank.
            `extract_too_many` — more than 64 different descriptions.
            `extract_unavailable` — the workspace's voice engine does not read
            it yet; nothing was published.

            `stored_context_has_no_writer` — a required input's only source is
            saved context (kind stored, no fallback), which nothing writes; the
            save keeps the draft. On an optional input, or one with a fallback,
            it stays an advisory on the 200.

            `missing_request_field` — a required input reads a call-request
            field (kind request, no fallback) that request_schema does not
            declare, so it would arrive empty; the save keeps the draft. Declare
            the field under request_schema.properties, or give the source a
            fallback. On an optional input it stays an advisory on the 200,
            naming the path, the field and the tool.

            `tool_archived` / `connection_unavailable` — see
            WORKFLOW_REFERENCE_INVALID: a binding's tool is archived, or its app
            account is no longer connected; restore the tool (or reconnect), or
            remove the step.

            Every 422 carries `warnings[]` - strict_off_guidance and the binding
            and input advisories; the compiler's own graph advisories arrive
            once the document compiles.

            Sequence branching raises these `issues[]` codes, each with the JSON
            pointer of the step or condition part to change:

            `sequence_route_target` — a route names something that is not a step
            of this sequence.

            `entry_step_routed` — a route points back at the sequence's first
            step.

            `sequence_cycle` — declared dependencies and routes together form a
            loop.

            `failure_route_conflict` — on_failed is declared while on_failure is
            stop.

            `condition_depth` — the condition nests more than four levels.

            `condition_size` — the condition declares more than 32 parts.

            `condition_value_required` / `condition_value_unexpected` — this
            operator does, or does not, compare against a value.

            `condition_value_type` — in and not_in need a list on the value
            side.

            `condition_type_mismatch` — the declared types disagree, or the
            operator does not apply to the declared type.

            `branch_dependent_source` — a value produced on a branch is read
            with no declared fallback.

            `transfer_in_sequence` — a branching sequence cannot contain a
            transfer step.

            `input_dependency` — a step reads an output it is neither a declared
            dependant nor a route successor of.

            The Before and After phases raise these `issues[]` codes:

            `before_budget_exceeded` — the chain of before-call steps cannot
            finish inside the preparation window of either direction.

            `guard_phase` — a before-call or follow-up step carries a when
            condition.

            `route_phase` — a follow-up step declares an outcome route.

            `before_route_target` — a before-call step routes to another step
            instead of to "#decline".

            `decline_phase` — "#decline" is used inside a sequence, where the
            call is already connected.

            A follow-up's "Only if" (`when` on an After trigger) raises these
            `issues[]` codes, at path `/after/<trigger id>/when/...`:

            `trigger_filter_unavailable` — the condition reads a call fact the
            trigger's event cannot guarantee (naming the field, the event and
            where to move it).

            `trigger_filter_type` — the fact and the operator or value do not
            fit.

            `trigger_filter_value` — a fixed value the fact can never have.

            `trigger_filter_source` — not a call fact compared with a fixed
            value.

            `trigger_filter_reader_unavailable` — the workspace's voice engine
            does not read an "Only if" yet.

            `call_source_placement` — a call fact read from a sequence
            condition.

            A result route's condition (`when` on a `result` edge, which raises
            the document to compiler level 1.10.0) raises these `issues[]`
            codes:

            `result_guard_outcome` — a condition on a `failed` route; only a
            `succeeded` route can have one.

            `result_guard_needs_strict` — Strict routing is off.

            `result_guard_needs_otherwise` — a step with conditions on its
            `succeeded` routes has no `succeeded` route without one.

            `result_guard_source` — the condition reads something other than
            fixed values and that step's own answer.

            `result_guard_reader_unavailable` — the workspace's voice engine
            does not read a route condition yet; nothing was published.

            `ambiguous_result_edge` — two `succeeded` routes without a
            condition, or two `failed` routes, leave the same step.

            A before-call reference written into instructions raises these
            `issues[]` codes:

            `placeholder_syntax`, `placeholder_unknown_step`,
            `placeholder_phase`, `placeholder_unknown_path`,

            `placeholder_unsupported_field`, `placeholder_reserved_variable`,
            `placeholder_limit`, `placeholder_too_long`.

            The same codes at path `/settings/greeting_message` are about the
            agent's opening line (a workflow

            agent's `greeting_message` may read a Before-call step's result):
            the step it names is not one of

            this document's Before steps, or the field is not one its tool
            returns. Fix the line on

            PATCH /agents/{id}, or the step, and check again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowError'
        '503':
          description: WORKFLOW_COMPILER_UNAVAILABLE; no publication occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WorkflowExpectedVersion:
      type: object
      additionalProperties: false
      required:
        - expected_version
      properties:
        expected_version:
          type: integer
          minimum: 1
          maximum: 9007199254740991
    WorkflowValidation:
      type: object
      required:
        - valid
        - issues
        - warnings
      properties:
        valid:
          type: boolean
          description: >
            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.
        content_hash:
          type: string
          pattern: ^[a-f0-9]{64}$
          description: The compiled artifact's hash. Present only when valid is true.
        issues:
          type: array
          maxItems: 100
          description: >
            Empty when valid is true. Otherwise the refusals, in the same shape
            publish sends them in, so one renderer serves both.
          items:
            type: object
            required:
              - code
              - path
              - message
            properties:
              code:
                type: string
                maxLength: 100
              path:
                type: string
                maxLength: 1000
              message:
                type: string
                maxLength: 2000
              node_id:
                type: string
                maxLength: 64
                description: Present when the refusal belongs to one step; that step's id.
              label:
                type: string
                maxLength: 200
                description: >
                  That step's label, as the workflow document spells it - on
                  every code. Present only with node_id. The tool a binding
                  issue is about is tool_name.
              tool_name:
                type: string
                maxLength: 200
                description: >-
                  On an issue about a binding, the name of the tool it runs.
                  `label` is never the tool's name.
              field:
                type: string
                maxLength: 200
                description: >-
                  On an issue about one input of a binding
                  (`/bindings/{n}/inputs/{field}`), that input's name.
        warnings:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
              - code
              - message
            properties:
              message:
                type: string
                description: >-
                  What the advisory means and what to change, in words. The
                  dashboard writes its own copy from code.
              code:
                type: string
                enum:
                  - strict_off_guidance
                  - during_output_advisory
                  - sequence_branch_advisory
                  - before_reference_missing_fallback
                  - override_needs_strict
                  - after_ending_coverage
                  - after_any_end_waits
                  - before_budget_inbound
                  - workflow_warning
                  - binding_channel_unsupported
                  - binding_phase_unsupported
                  - stored_context_has_no_writer
                  - input_constant_placeholder
                  - missing_request_field
                  - tool_values_missing
              header_names:
                type: array
                items:
                  type: string
                description: >-
                  With tool_values_missing - the bound tool's headers whose
                  value is empty. Names only.
              query_names:
                type: array
                items:
                  type: string
                description: >-
                  With tool_values_missing - the query parameters on its URL
                  written name= with no value. Names only.
              path:
                type: string
                maxLength: 1000
                description: >
                  Pointer to the binding an advisory is about. Sent with
                  binding_channel_unsupported and tool_values_missing, each
                  raised once per binding; absent on every compiler advisory.
                  stored_context_has_no_writer, input_constant_placeholder and
                  missing_request_field (an optional input reading a request
                  path request_schema does not declare) point one level deeper,
                  at the input itself (/bindings/{n}/inputs/{field}, RFC 6901
                  escaped).
              label:
                type: string
                maxLength: 200
                description: >-
                  The label of the step that uses that binding, as on an issue.
                  Present only with node_id.
              tool_name:
                type: string
                maxLength: 200
                description: The name of the tool that binding runs. Present with `path`.
              field:
                type: string
                maxLength: 200
                description: >-
                  On stored_context_has_no_writer, input_constant_placeholder
                  and missing_request_field, the input's name.
              node_id:
                type: string
                maxLength: 64
                description: >
                  On an advisory with `path`, the id of the step that uses the
                  binding - for binding_channel_unsupported, the step a caller
                  on the unsupported channel reaches and gets nothing from - so
                  an editor can open it. Absent when no step uses the binding.
    WorkflowError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          required:
            - code
          properties:
            error:
              type: string
            code:
              type: string
            warnings:
              type: array
              description: >
                On WORKFLOW_VALIDATION_FAILED from Check or publish, the
                advisories beside the issues, in the shape of
                WorkflowValidation's warnings - strict_off_guidance when
                strict_mode is off, and every advisory about a binding or an
                input. The compiler's own graph advisories
                (during_output_advisory, sequence_branch_advisory,
                before_reference_missing_fallback, override_needs_strict,
                after_ending_coverage, after_any_end_waits,
                before_budget_inbound) arrive once the document compiles.
              items:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  path:
                    type: string
                    maxLength: 1000
                  node_id:
                    type: string
                    maxLength: 64
                  label:
                    type: string
                    maxLength: 200
                    description: The step's label. Present only with node_id.
                  tool_name:
                    type: string
                    maxLength: 200
                  field:
                    type: string
                    maxLength: 200
            issues:
              type: array
              maxItems: 100
              items:
                type: object
                required:
                  - code
                  - path
                  - message
                properties:
                  code:
                    type: string
                    maxLength: 100
                  path:
                    type: string
                    maxLength: 1000
                  message:
                    type: string
                    maxLength: 2000
                  node_id:
                    type: string
                    maxLength: 64
                    description: >-
                      The step the issue belongs to - a conversation step, a
                      before-call step, a follow-up or a step inside a sequence,
                      by its `id`. An issue about a binding names the first step
                      that runs or offers it; absent only when no single step is
                      concerned (a binding no step uses, a schema).
                  label:
                    type: string
                    maxLength: 200
                    description: >-
                      That step's label, as the workflow document spells it - on
                      every code. Present only with `node_id`.
                  tool_name:
                    type: string
                    maxLength: 200
                    description: >-
                      On an issue about a binding, the name of the tool it runs.
                      `label` is never the tool's name.
                  field:
                    type: string
                    maxLength: 200
                    description: >-
                      On an issue about one input of a binding
                      (`/bindings/{n}/inputs/{field}`), that input's name.
    Error:
      type: object
      required:
        - error
        - code
      description: >
        Every error response - the secret-key API and the browser data plane
        alike - carries a

        human-readable `error` and a stable machine `code`, and a refusal that
        names what is

        wrong with the request carries `issues[]` too. Branch on `code`, never
        on the `error`

        text. A refusal that names nothing more specific carries the code its
        status means:

        `BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the
        secret-key API

        answers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR`
        (402),

        `FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405),
        `CONFLICT` (409),

        `GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),

        `UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR`
        (500),

        `UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT`
        (504). Some

        refusals add members of their own beside these (a call request's
        `status`, a workflow's

        `current_version`); the operation says which.
      properties:
        error:
          type: string
          description: The refusal, in one sentence for a person. Its wording may change.
        code:
          type: string
          description: The stable code to branch on.
        issues:
          type: array
          description: >
            Each thing at fault, on a 400 or 422 that names them: every query
            parameter or body field, not just the first. `path` is the
            parameter's name or the field's location.
          items:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
                description: >-
                  query_param_unknown, query_param_repeated, query_param_blank,
                  query_param_invalid, field_unknown, field_required,
                  field_invalid, or the route's own word.
              path:
                type: string
              message:
                type: string
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        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`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.