withHuman · Schema
RequestApprovalPipelinePreviewRequest
A pipeline document and a sample request to run it against.
CompanyArtificial IntelligenceHuman-in-the-loopApprovalAutomation
Properties
| Name | Type | Description |
|---|---|---|
| blocks | array | The blocks, in the order they should run. |
| default_escalation_path | string | The default escalation path, as in a document. Reported in the result when the outcome is `human`. |
| default_ask_agent_owner | boolean | Whether the default asks the agent's owner first, as in a document. |
| sample | object | The request to run the pipeline against. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/withhuman-ai/json-schema/withhuman-ai-request-approval-pipeline-preview-request-schema.json",
"title": "RequestApprovalPipelinePreviewRequest",
"description": "A pipeline document and a sample request to run it against.",
"x-generated": "2026-11-29",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/withhuman-ai-openapi.yaml#/components/schemas/RequestApprovalPipelinePreviewRequest",
"type": "object",
"additionalProperties": false,
"required": [
"blocks",
"sample"
],
"properties": {
"blocks": {
"type": "array",
"maxItems": 1000,
"description": "The blocks, in the order they should run.",
"items": {
"$ref": "#/$defs/RequestApprovalBlockDefinition"
}
},
"default_escalation_path": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "The default escalation path, as in a document. Reported in the result when the outcome is `human`."
},
"default_ask_agent_owner": {
"type": "boolean",
"description": "Whether the default asks the agent's owner first, as in a document."
},
"sample": {
"type": "object",
"additionalProperties": false,
"description": "The request to run the pipeline against.",
"required": [
"request",
"agent"
],
"properties": {
"request": {
"type": "object",
"additionalProperties": false,
"description": "The tool call.",
"required": [
"tool",
"arguments"
],
"properties": {
"tool": {
"type": "string",
"minLength": 1,
"description": "The tool the sample agent is calling."
},
"server": {
"type": "string",
"description": "The MCP server that defines the tool, as an adapter would report it. Leave it out for a built-in tool."
},
"arguments": {
"type": "object",
"additionalProperties": true,
"description": "The tool's arguments."
},
"agent_reasoning": {
"type": "string",
"description": "The agent's own explanation of the call. Only blocks that include it see it."
},
"context": {
"type": "object",
"additionalProperties": true,
"description": "Runtime metadata, as an adapter would report it. Only blocks that include it see it."
}
}
},
"agent": {
"type": "object",
"additionalProperties": false,
"description": "The agent making the call.",
"required": [
"slug",
"name"
],
"properties": {
"slug": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "The agent's slug."
},
"name": {
"type": "string",
"minLength": 1,
"description": "A name for the sample agent."
}
}
},
"previous_metadata": {
"type": "object",
"description": "Metadata as if earlier blocks had returned it, keyed by pipeline key and then by block key, exactly as conditions read it under `/previous_metadata/<pipeline_key>/<block_key>`.",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": true
},
"description": "Metadata from one pipeline, by block key."
}
}
}
}
},
"$defs": {
"BranchBlockConfig": {
"type": "object",
"additionalProperties": false,
"description": "When the condition matches, the branch's blocks run in order and the first to decide ends the pipeline. If none decides, the request goes to a person with this reason and escalation path. When the condition does not match, the branch is skipped and the request passes to the next block. A condition that cannot be evaluated sends the request to a person on the pipeline's default path. \"If this, then that\" is a branch whose blocks end in an outcome block; such a branch never runs out, so it needs no reason or path.",
"required": [
"when",
"blocks"
],
"properties": {
"when": {
"$ref": "#/$defs/CELCondition"
},
"blocks": {
"type": "array",
"minItems": 1,
"maxItems": 999,
"description": "The branch's blocks, in the order they run. Any type, including further branches. They count toward the pipeline's 1,000 blocks.",
"items": {
"$ref": "#/$defs/RequestApprovalBlockDefinition"
}
},
"reason": {
"type": "string",
"description": "The note recorded when none of the branch's blocks decides; empty when the branch has none."
},
"escalation_path": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "Where the request goes when none of the branch's blocks decides. Defaults to the pipeline's default path. Blocks inside the branch that name no path of their own use the pipeline's default, not this one."
},
"ask_agent_owner": {
"type": "boolean",
"description": "Send the request to the person who owns the agent instance that made it, instead of `escalation_path`. The path, if set, is then the fallback when the request has no owner able to decide it; without one the fallback is the pipeline default."
}
}
},
"BranchBlockDefinition": {
"type": "object",
"additionalProperties": false,
"description": "A block that runs its own blocks for the requests its condition matches and is skipped by every other request. A request that enters a branch is decided inside it, or goes to a person if none of its blocks decides; nothing after the branch runs for that request.",
"required": [
"id",
"name",
"type",
"enabled",
"timeout",
"max_attempts",
"config"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "A key for the block, unique within the pipeline including blocks inside branches."
},
"name": {
"type": "string",
"minLength": 1,
"description": "A display name."
},
"type": {
"type": "string",
"const": "branch",
"description": "Always `branch`."
},
"enabled": {
"type": "boolean",
"const": true,
"description": "Always `true`. Leave disabled blocks out of the document."
},
"timeout": {
"type": "string",
"description": "How long the condition may take, as a duration. At most `1s`."
},
"max_attempts": {
"type": "integer",
"const": 1,
"description": "Always 1."
},
"config": {
"$ref": "#/$defs/BranchBlockConfig"
}
}
},
"CELAllCondition": {
"type": "object",
"additionalProperties": false,
"description": "Holds when every nested condition holds.",
"required": [
"id",
"all"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "An id for the condition, unique within the pipeline."
},
"all": {
"type": "array",
"minItems": 1,
"description": "The conditions that must all hold.",
"items": {
"$ref": "#/$defs/CELCondition"
}
}
}
},
"CELAnyCondition": {
"type": "object",
"additionalProperties": false,
"description": "Holds when at least one nested condition holds.",
"required": [
"id",
"any"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "An id for the condition, unique within the pipeline."
},
"any": {
"type": "array",
"minItems": 1,
"description": "The conditions, of which at least one must hold.",
"items": {
"$ref": "#/$defs/CELCondition"
}
}
}
},
"CELCondition": {
"description": "A condition tree. A leaf tests one field. all and any combine conditions. some and every test the items of a list field.",
"oneOf": [
{
"$ref": "#/$defs/CELLeafCondition"
},
{
"$ref": "#/$defs/CELAllCondition"
},
{
"$ref": "#/$defs/CELAnyCondition"
},
{
"$ref": "#/$defs/CELSomeCondition"
},
{
"$ref": "#/$defs/CELEveryCondition"
}
]
},
"CELEveryCondition": {
"type": "object",
"additionalProperties": false,
"description": "Holds when every item of a list field matches.",
"required": [
"id",
"every"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "An id for the condition, unique within the pipeline."
},
"every": {
"$ref": "#/$defs/CELQuantifier"
}
}
},
"CELLeafCondition": {
"type": "object",
"additionalProperties": false,
"description": "A test of one field.",
"required": [
"id",
"field",
"operator"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "An id for the condition, unique within the pipeline."
},
"field": {
"type": "string",
"description": "A JSON pointer into the request, such as `/request/tool` or `/request/arguments/amount_cents`."
},
"operator": {
"type": "string",
"enum": [
"exists",
"not_exists",
"equals",
"not_equals",
"is_null",
"is_not_null",
"in",
"not_in",
"contains",
"not_contains",
"starts_with",
"ends_with",
"regex",
"greater_than",
"greater_than_or_equal",
"less_than",
"less_than_or_equal",
"is_true",
"is_false",
"contains_any",
"contains_all",
"is_empty",
"is_not_empty"
],
"description": "How to compare the field. `contains`, `contains_any` and `contains_all` test substrings of a string field and elements of an array field. `starts_with` takes an array of prefixes and holds when the field begins with any of them."
},
"value": {
"description": "The value to compare with. Not used by operators that take none, such as `exists`."
}
}
},
"CELQuantifier": {
"type": "object",
"additionalProperties": false,
"description": "A list field and the condition each of its items is tested against.",
"required": [
"field",
"where"
],
"properties": {
"field": {
"type": "string",
"description": "A JSON pointer to a list field."
},
"where": {
"$ref": "#/$defs/CELCondition"
}
}
},
"CELSomeCondition": {
"type": "object",
"additionalProperties": false,
"description": "Holds when at least one item of a list field matches.",
"required": [
"id",
"some"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "An id for the condition, unique within the pipeline."
},
"some": {
"$ref": "#/$defs/CELQuantifier"
}
}
},
"DelegateBlockConfig": {
"type": "object",
"additionalProperties": false,
"description": "When the condition matches, the request continues in the named pipeline's active revision and is settled there. When it does not match, the delegate is skipped and the request passes to the next block. A condition that cannot be evaluated sends the request to a person on the default path of the pipeline holding the block. The named pipeline must exist when the revision is created and be active when it is activated; it can never be `entry`, and the activation refuses a delegation that would loop.",
"required": [
"when",
"pipeline_key"
],
"properties": {
"when": {
"$ref": "#/$defs/CELCondition"
},
"pipeline_key": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "The pipeline that takes matching requests."
}
}
},
"DelegateBlockDefinition": {
"type": "object",
"additionalProperties": false,
"description": "A block that hands the requests its condition matches to another pipeline, named by key, and is skipped by every other request. A request that enters the delegated pipeline is decided inside it, or goes to a person under that pipeline's own default escalation path (else the defaults of the pipelines that delegated into it) if none of its blocks decides; nothing after the delegate runs for that request. The condition belongs to the pipeline holding the block; everything after a match belongs to the target pipeline's owners.",
"required": [
"id",
"name",
"type",
"enabled",
"timeout",
"max_attempts",
"config"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "A key for the block, unique within the pipeline including blocks inside branches."
},
"name": {
"type": "string",
"minLength": 1,
"description": "A display name."
},
"type": {
"type": "string",
"const": "delegate",
"description": "Always `delegate`."
},
"enabled": {
"type": "boolean",
"const": true,
"description": "Always `true`. Leave disabled blocks out of the document."
},
"timeout": {
"type": "string",
"description": "How long the condition may take, as a duration. At most `1s`."
},
"max_attempts": {
"type": "integer",
"const": 1,
"description": "Always 1."
},
"config": {
"$ref": "#/$defs/DelegateBlockConfig"
}
}
},
"LLMJudgeBlockConfig": {
"type": "object",
"additionalProperties": false,
"required": [
"effort",
"instructions",
"include",
"on_verdict",
"automatic_decisions_require_confidence",
"reason"
],
"description": "The model answers with a verdict of approve, deny, or escalate. The on_verdict table maps each verdict to what the pipeline does. A verdict can never map to the opposite decision, and escalate never decides on its own. The deployment decides which judge models are offered, and each decision records the model that made it.",
"properties": {
"model": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "The key of the judge model to use, such as `gpt-5.6-terra`. Leave it out to use the deployment's default model, which follows the deployment when its default changes. A key the deployment does not offer is refused with `judge_model_unavailable`."
},
"effort": {
"type": "string",
"enum": [
"low",
"medium",
"high"
],
"description": "How much reasoning the model spends: `low`, `medium`, or `high`."
},
"instructions": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "Your review policy, in plain language, up to 8,192 characters. It goes into the system prompt after withHuman's fixed framing."
},
"include": {
"type": "object",
"additionalProperties": false,
"description": "What to show the model.",
"required": [
"agent_reasoning",
"context",
"previous_metadata"
],
"properties": {
"agent_reasoning": {
"type": "boolean",
"description": "Include the agent's own explanation of the call."
},
"context": {
"type": "boolean",
"description": "Include the runtime metadata the adapter reported."
},
"previous_metadata": {
"type": "boolean",
"description": "Include the metadata earlier blocks returned."
}
}
},
"on_verdict": {
"type": "object",
"additionalProperties": false,
"description": "What the pipeline does with each verdict.",
"required": [
"approve",
"deny",
"escalate"
],
"properties": {
"approve": {
"type": "string",
"enum": [
"approve",
"next",
"human"
],
"description": "What an `approve` verdict does."
},
"deny": {
"type": "string",
"enum": [
"deny",
"next",
"human"
],
"description": "What a `deny` verdict does."
},
"escalate": {
"type": "string",
"enum": [
"human",
"next"
],
"description": "What an `escalate` verdict does."
}
}
},
"automatic_decisions_require_confidence": {
"type": "string",
"enum": [
"high",
"medium",
"low"
],
"description": "The confidence the model must report before its verdict can decide on its own. Below it, the verdict is treated as `escalate`."
},
"reason": {
"type": "string",
"minLength": 1,
"description": "The note recorded on decisions this block makes. The model's reasoning is kept as evidence."
},
"escalation_path": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "Where the request goes when a verdict maps to `human`. Defaults to the pipeline's default path."
}
}
},
"LLMJudgeBlockDefinition": {
"type": "object",
"additionalProperties": false,
"description": "A block that asks a model to review the request against your written policy.",
"required": [
"id",
"name",
"type",
"enabled",
"timeout",
"max_attempts",
"config"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "A key for the block, unique within the pipeline including blocks inside branches."
},
"name": {
"type": "string",
"minLength": 1,
"description": "A display name."
},
"type": {
"type": "string",
"const": "llm_judge",
"description": "Always `llm_judge`."
},
"enabled": {
"type": "boolean",
"const": true,
"description": "Always `true`. Leave disabled blocks out of the document."
},
"timeout": {
"type": "string",
"description": "How long one attempt may take, as a duration. At most `60s`."
},
"max_attempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "How many times to try, from 1 to 3."
},
"config": {
"$ref": "#/$defs/LLMJudgeBlockConfig"
}
},
"x-withhuman-edition": "hosted"
},
"OutcomeBlockConfig": {
"type": "object",
"additionalProperties": false,
"description": "Returns outcome for every request that reaches this block. Later blocks do not run.",
"required": [
"outcome",
"reason"
],
"dependentSchemas": {
"escalation_path": {
"properties": {
"outcome": {
"const": "human"
}
}
}
},
"properties": {
"outcome": {
"type": "string",
"enum": [
"approve",
"deny",
"human"
],
"description": "The outcome returned unconditionally."
},
"reason": {
"type": "string",
"minLength": 1,
"description": "The note recorded on decisions this block makes."
},
"escalation_path": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "Where the request goes for a `human` outcome. Allowed only when `outcome` is `human`. Defaults to the pipeline's default path."
},
"ask_agent_owner": {
"type": "boolean",
"description": "Send the request to the person who owns the agent instance that made it, instead of `escalation_path`. The path, if set, is then the fallback when the request has no owner able to decide it; without one the fallback is the pipeline default."
}
}
},
"OutcomeBlockDefinition": {
"type": "object",
"additionalProperties": false,
"description": "A block that returns its configured outcome for every request that reaches it.",
"required": [
"id",
"name",
"type",
"enabled",
"timeout",
"max_attempts",
"config"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "A key for the block, unique within the pipeline including blocks inside branches."
},
"name": {
"type": "string",
"minLength": 1,
"description": "A display name."
},
"type": {
"type": "string",
"const": "outcome",
"description": "Always `outcome`."
},
"enabled": {
"type": "boolean",
"const": true,
"description": "Always `true`. Leave disabled blocks out of the document."
},
"timeout": {
"type": "string",
"description": "How long execution may take, as a duration. At most `1s`."
},
"max_attempts": {
"type": "integer",
"const": 1,
"description": "Always 1."
},
"config": {
"$ref": "#/$defs/OutcomeBlockConfig"
}
}
},
"RequestApprovalBlockDefinition": {
"description": "One block of a pipeline document. The type picks the kind of block and the shape of its config. These are the kinds every edition has (`outcome`, `branch`, `delegate`, `webhook`); \"if this, then that\" is a branch whose blocks end in an outcome block; an edition may add kinds of its own with their own config shapes (the hosted edition adds `llm_judge`), and a document naming a kind this deployment lacks is refused as invalid.",
"oneOf": [
{
"$ref": "#/$defs/OutcomeBlockDefinition"
},
{
"$ref": "#/$defs/WebhookBlockDefinition"
},
{
"$ref": "#/$defs/BranchBlockDefinition"
},
{
"$ref": "#/$defs/DelegateBlockDefinition"
},
{
"$ref": "#/$defs/LLMJudgeBlockDefinition"
}
]
},
"WebhookBlockConfig": {
"type": "object",
"additionalProperties": false,
"required": [
"endpoint_key",
"allowed_outcomes",
"include",
"reason"
],
"description": "The block posts the request to a webhook endpoint and the endpoint answers with an outcome. The endpoint is a separate resource, named here by its key. Deliveries go to the key's active revision. If the answer is not in allowed_outcomes, or the call fails, the request goes to a person.",
"properties": {
"endpoint_key": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "The webhook endpoint to call."
},
"allowed_outcomes": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"next",
"human",
"approve",
"deny"
]
},
"description": "The outcomes the endpoint may return. Any other answer sends the request to a person. `approve` and `deny` must be listed explicitly. The editor defaults to `next` and `human`."
},
"include": {
"type": "object",
"additionalProperties": false,
"description": "What to send with the request.",
"required": [
"agent_reasoning",
"context",
"previous_metadata"
],
"properties": {
"agent_reasoning": {
"type": "boolean",
"description": "Include the agent's own explanation of the call."
},
"context": {
"type": "boolean",
"description": "Include the runtime metadata the adapter reported."
},
"previous_metadata": {
"type": "boolean",
"description": "Include the metadata earlier blocks returned."
}
}
},
"reason": {
"type": "string",
"minLength": 1,
"description": "The note recorded on decisions this block makes. The endpoint's own reason is kept as evidence."
},
"escalation_path": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "Where the request goes when the endpoint answers `human`, or when the call fails. Defaults to the pipeline's default path."
},
"ask_agent_owner": {
"type": "boolean",
"description": "Send the request to the person who owns the agent instance that made it, instead of `escalation_path`. The path, if set, is then the fallback when the request has no owner able to decide it; without one the fallback is the pipeline default."
}
}
},
"WebhookBlockDefinition": {
"type": "object",
"additionalProperties": false,
"description": "A block that asks a webhook endpoint of yours for an outcome.",
"required": [
"id",
"name",
"type",
"enabled",
"timeout",
"max_attempts",
"config"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
"description": "A key for the block, unique within the pipeline including blocks inside branches."
},
"name": {
"type": "string",
"minLength": 1,
"description": "A display name."
},
"type": {
"type": "string",
"const": "webhook",
"description": "Always `webhook`."
},
"enabled": {
"type": "boolean",
"const": true,
"description": "Always `true`. Leave disabled blocks out of the document."
},
"timeout": {
"type": "string",
"description": "How long one attempt may take, from connecting to the full response, as a duration. At most `30s`."
},
"max_attempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "How many times to try, from 1 to 3."
},
"config": {
"$ref": "#/$defs/WebhookBlockConfig"
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/withhuman-ai-request-approval-pipeline-preview-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.