{ "structure_hash": "sha256:bdad6e5b1b879209305f1555b43ec62666a4d74a925280c66e54cc4dc07bb1ae", "question_hashes": { "item_used": "sha256:2cd936709034818c3beca2574ca48ef400577728a20532924ed68f1ca1f26e3d", "defective": "sha256:8dd4a69d6bfaf9fa766adcac7cfa1c4af7eff57a690a1e39666398bf85cd1869" }, "canonical": "{\"aggregations\":{\"grant_score\":{\"inputs\":[{\"invert\":true,\"name\":\"questions.item_used\"},{\"name\":\"questions.defective\"}],\"type\":\"weighted_mean\"},\"handling\":{\"else\":\"escalate\",\"rules\":[{\"outcome\":\"escalate\",\"when\":{\"gt\":30,\"name\":\"attributes.days_since_delivery\"}},{\"outcome\":\"grant\",\"when\":{\"gte\":0.72,\"name\":\"aggregations.grant_score\"}},{\"outcome\":\"deny\",\"when\":{\"lt\":0.38,\"name\":\"aggregations.grant_score\"}}],\"type\":\"rules\"}},\"attributes\":{\"days_since_delivery\":{\"minimum\":0,\"type\":\"number\"}},\"format\":\"moonbounce.structure/1\",\"questions\":{\"defective\":{\"instructions\":\"Does the customer describe a defect, damage on arrival, or the item failing under normal use?\",\"reads\":[\"state.message\"],\"type\":\"noul\"},\"item_used\":{\"instructions\":\"Has the customer used the item beyond trying it on or setting it up once?\",\"reads\":[\"state.message\"],\"type\":\"noul\"}},\"result\":\"aggregations.handling\"}", "warnings": []}
Checks a decision file ({decision_id?, structure, objective?}) and returns its structure hash, every question’s hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose details.issues lists every issue, each with its param, as registerDecision would answer; so is an objective naming an outcome the structure can’t produce. decision_id is optional and only checked against the id pattern. Warnings never depend on an environment or a model; UNUSED_FEATURE names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of reads and of aggregation inputs, and defaults spelled out (invert: false, gte: 0.5, empty criteria) do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.
{ "structure_hash": "sha256:bdad6e5b1b879209305f1555b43ec62666a4d74a925280c66e54cc4dc07bb1ae", "question_hashes": { "item_used": "sha256:2cd936709034818c3beca2574ca48ef400577728a20532924ed68f1ca1f26e3d", "defective": "sha256:8dd4a69d6bfaf9fa766adcac7cfa1c4af7eff57a690a1e39666398bf85cd1869" }, "canonical": "{\"aggregations\":{\"grant_score\":{\"inputs\":[{\"invert\":true,\"name\":\"questions.item_used\"},{\"name\":\"questions.defective\"}],\"type\":\"weighted_mean\"},\"handling\":{\"else\":\"escalate\",\"rules\":[{\"outcome\":\"escalate\",\"when\":{\"gt\":30,\"name\":\"attributes.days_since_delivery\"}},{\"outcome\":\"grant\",\"when\":{\"gte\":0.72,\"name\":\"aggregations.grant_score\"}},{\"outcome\":\"deny\",\"when\":{\"lt\":0.38,\"name\":\"aggregations.grant_score\"}}],\"type\":\"rules\"}},\"attributes\":{\"days_since_delivery\":{\"minimum\":0,\"type\":\"number\"}},\"format\":\"moonbounce.structure/1\",\"questions\":{\"defective\":{\"instructions\":\"Does the customer describe a defect, damage on arrival, or the item failing under normal use?\",\"reads\":[\"state.message\"],\"type\":\"noul\"},\"item_used\":{\"instructions\":\"Has the customer used the item beyond trying it on or setting it up once?\",\"reads\":[\"state.message\"],\"type\":\"noul\"}},\"result\":\"aggregations.handling\"}", "warnings": []}
A name you choose for this decision, such as refund-exception: a lowercase letter, then up to 127 of a-z 0-9 _ . -. Unique in your organization and shared by its test and production keys. The first registration or evaluation under a new one creates the decision.
Things that are valid but probably not meant. They never depend on an environment or a model.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Moonbounce Decisions API","colors":{"primary":"#1D5AB5","light":"#74A8F0","dark":"#478EF0"},"logo":{"light":"https://mintcdn.com/moonbounce/mWuXGW-nUJSEdABp/logo/lockup-light.svg?fit=max\u0026auto=format\u0026n=mWuXGW-nUJSEdABp\u0026q=85\u0026s=367a5dedb5799a16c5737d136af68dc5","dark":"https://mintcdn.com/moonbounce/mWuXGW-nUJSEdABp/logo/lockup-dark.svg?fit=max\u0026auto=format\u0026n=mWuXGW-nUJSEdABp\u0026q=85\u0026s=3b3e891bc9f1e5b26bee272f878ecd4f","href":"https://moonbounce.ai"},"favicon":{"light":"https://mintcdn.com/moonbounce/XgvwJtU0Z2TC5k2H/logo/symbol-light.svg?fit=max\u0026auto=format\u0026n=XgvwJtU0Z2TC5k2H\u0026q=85\u0026s=cd361cb434cc5cabaa2240471ebc780a","dark":"https://mintcdn.com/moonbounce/XgvwJtU0Z2TC5k2H/logo/symbol-dark.svg?fit=max\u0026auto=format\u0026n=XgvwJtU0Z2TC5k2H\u0026q=85\u0026s=30d3353b4d3a5756ecfadd153e271d89"},"background":{"color":{"light":"#FFFEEE","dark":"#000000"}},"navbar":{"primary":{"type":"button","label":"Request access","href":"https://app.moonbounce.ai"}},"banner":{"content":"Looking for the Clavata policy and labeling API? Those docs are at [docs.clavata.ai](https://docs.clavata.ai). You are on the docs for the Moonbounce decisions platform.","dismissible":true,"type":"info","color":{"light":"#1D5AB5","dark":"#1D5AB5"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"moonbounce","hasAudioNarration":false,"actualSubdomain":"moonbounce","customDomains":["docs.moonbounce.ai"],"gitSource":{"type":"github","owner":"clavataai","repo":"decisions-platform","deployBranch":"main","contentDirectory":"docs/site","isPrivate":true,"mountPath":"","label":"","_id":"6ae8f7a905e268646b31d443"},"chroma":{"latestBuiltDeploymentHistoryId":"6aeca9a037327199c83cec33","collectionId":"e9c425b7-eb17-41bc-adf6-390226fcaa59","liveDeploymentHistoryId":"6aeca9a037327199c83cec33","schemaVersion":"v3"},"entitlements":{},"buildId":"6aee8126743394e1d8192bce","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"API reference","count":41},{"language":"default","tag":"Endpoints","count":40},{"language":"default","tag":"Guides","count":15},{"language":"default","tag":"review","count":10},{"language":"default","tag":"decisions","count":6},{"language":"default","tag":"suggestions","count":6},{"language":"default","tag":"feedback","count":5},{"language":"default","tag":"objective","count":4},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"Build a decision","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"brand.css","content":":root{--mb-font-sans: \"Helvetica Neue\", Helvetica, Arial, sans-serif;--mb-font-mono: ui-monospace, \"SF Mono\", Menlo, Consolas, monospace;--mb-rule: rgb(225, 230, 240);--mb-rule-strong: rgb(134, 134, 134)}.dark{--mb-rule: rgb(68, 69, 74);--mb-rule-strong: rgb(134, 134, 134)}body{font-family:var(--mb-font-sans)}h1,h2,h3,h4,h5,h6{font-family:var(--mb-font-sans);font-weight:600;letter-spacing:-0.011em}#page-title{letter-spacing:-0.03em;line-height:1.05}code,pre,kbd,samp{font-family:var(--mb-font-mono)}#navbar a[target=\"_blank\"][href=\"https://app.moonbounce.ai\"]>span.absolute{background:rgb(0, 0, 0);border-radius:999px}#navbar a[target=\"_blank\"][href=\"https://app.moonbounce.ai\"] .text-white,#navbar a[target=\"_blank\"][href=\"https://app.moonbounce.ai\"] svg{color:rgb(255, 254, 238)}.dark #navbar a[target=\"_blank\"][href=\"https://app.moonbounce.ai\"]>span.absolute{background:rgb(255, 254, 238)}.dark #navbar a[target=\"_blank\"][href=\"https://app.moonbounce.ai\"] .text-white,.dark #navbar a[target=\"_blank\"][href=\"https://app.moonbounce.ai\"] svg{color:rgb(0, 0, 0)}.card,.callout,.code-block,.accordion,table{border-radius:0;box-shadow:none}.card{border:1px solid var(--mb-rule)}.card:hover{border-color:var(--mb-rule-strong)}"}],"page":{"pagePath":"api-reference/decisions/validate-a-decision-file","slug":"/api-reference/decisions/validate-a-decision-file","pageMetadata":{"title":"Validate a decision file","description":"Checks a decision file (`{decision_id?, structure, objective?}`) and returns its structure hash, every question's hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose `details.issues` lists every issue, each with its `param`, as `registerDecision` would answer; so is an objective naming an outcome the structure can't produce. `decision_id` is optional and only checked against the id pattern. Warnings never depend on an environment or a model; `UNUSED_FEATURE` names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of `reads` and of aggregation `inputs`, and defaults spelled out (`invert: false`, `gte: 0.5`, empty `criteria`) do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/validate","href":"/api-reference/decisions/validate-a-decision-file","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Checks a decision file (\", _jsx(_components.code, {\n children: \"{decision_id?, structure, objective?}\"\n }), \") and returns its structure hash, every question’s hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose \", _jsx(_components.code, {\n children: \"details.issues\"\n }), \" lists every issue, each with its \", _jsx(_components.code, {\n children: \"param\"\n }), \", as \", _jsx(_components.code, {\n children: \"registerDecision\"\n }), \" would answer; so is an objective naming an outcome the structure can’t produce. \", _jsx(_components.code, {\n children: \"decision_id\"\n }), \" is optional and only checked against the id pattern. Warnings never depend on an environment or a model; \", _jsx(_components.code, {\n children: \"UNUSED_FEATURE\"\n }), \" names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of \", _jsx(_components.code, {\n children: \"reads\"\n }), \" and of aggregation \", _jsx(_components.code, {\n children: \"inputs\"\n }), \", and defaults spelled out (\", _jsx(_components.code, {\n children: \"invert: false\"\n }), \", \", _jsx(_components.code, {\n children: \"gte: 0.5\"\n }), \", empty \", _jsx(_components.code, {\n children: \"criteria\"\n }), \") do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Validate a decision file","description":"Checks a decision file (`{decision_id?, structure, objective?}`) and returns its structure hash, every question's hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose `details.issues` lists every issue, each with its `param`, as `registerDecision` would answer; so is an objective naming an outcome the structure can't produce. `decision_id` is optional and only checked against the id pattern. Warnings never depend on an environment or a model; `UNUSED_FEATURE` names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of `reads` and of aggregation `inputs`, and defaults spelled out (`invert: false`, `gte: 0.5`, empty `criteria`) do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/validate","href":"/api-reference/decisions/validate-a-decision-file","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"validateDecision","x-mcp-annotations":{"readOnlyHint":true,"openWorldHint":false},"tags":["decisions"],"security":[],"summary":"Validate a decision file","description":"Checks a decision file (`{decision_id?, structure, objective?}`) and returns its structure hash, every question's hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose `details.issues` lists every issue, each with its `param`, as `registerDecision` would answer; so is an objective naming an outcome the structure can't produce. `decision_id` is optional and only checked against the id pattern. Warnings never depend on an environment or a model; `UNUSED_FEATURE` names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of `reads` and of aggregation `inputs`, and defaults spelled out (`invert: false`, `gte: 0.5`, empty `criteria`) do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.","requestBody":"f85cc5d9-9bfe-486c-8a0d-87d6d395e4cf","responses":{"200":"689df04b-fe65-400f-8d85-8e65cc57b4d5","400":"121f66be-2cc6-49d3-b334-a0a219f9b680","413":"5dea6a7e-671e-4918-b507-9747c6251720","429":"7bb55cb6-8880-45d8-bb1e-d0b7cd1825ce"},"method":"post","type":"path","servers":["d74a0e6e-c4ac-4495-a224-a84e2d741c54"],"path":"/v1/validate","baseUrlOptions":["https://api.moonbounce.ai"],"title":"Validate a decision file","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"examples":{"decision_file":{"title":"decision_file","value":{"decision_id":"refund-exception","structure":{"questions":{"item_used":{"type":"noul","instructions":"Has the customer used the item beyond trying it on or setting it up once?","reads":["state.message"]},"defective":{"type":"noul","instructions":"Does the customer describe a defect, damage on arrival, or the item failing under normal use?","reads":["state.message"]}},"attributes":{"days_since_delivery":{"type":"number","minimum":0}},"aggregations":{"grant_score":{"type":"weighted_mean","inputs":[{"name":"questions.item_used","invert":true},{"name":"questions.defective"}]},"handling":{"type":"rules","rules":[{"when":{"name":"attributes.days_since_delivery","gt":30},"outcome":"escalate"},{"when":{"name":"aggregations.grant_score","gte":0.72},"outcome":"grant"},{"when":{"name":"aggregations.grant_score","lt":0.38},"outcome":"deny"}],"else":"escalate"}},"result":"aggregations.handling"},"objective":{"fallback":"escalate","mistakes":[{"expected":"deny","got":"grant","severity":"costly"}]}}}},"schema":{"type":"object","properties":{"structure":{"type":"object","properties":{"questions":{"type":"object","additionalProperties":{"type":"object","description":"P(true) for a statement about the state.","required":["type","instructions"],"properties":{"type":{"type":"string","enum":["noul"],"isRequired":true,"uniqueKey":"structure.questions.additionalProperties.type","typeLabel":"enum\u003cstring>"},"instructions":{"oneOf":[{"type":"string","maxLength":4000,"minLength":1,"isRequired":true,"uniqueKey":"structure.questions.additionalProperties.instructions.oneOf.0","typeLabel":"string"},{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"structure.questions.additionalProperties.instructions.oneOf.1.additionalProperties","typeLabel":"any"},"isRequired":true,"uniqueKey":"structure.questions.additionalProperties.instructions.oneOf.1","typeLabel":"object"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"structure.questions.additionalProperties.instructions.oneOf.2.items.[INDEX]","typeLabel":"any"},"minItems":1,"isRequired":true,"uniqueKey":"structure.questions.additionalProperties.instructions.oneOf.2","typeLabel":"any[]"}],"isRequired":true,"uniqueKey":"structure.questions.additionalProperties.instructions","typeLabel":"string | object | any[]"},"criteria":{"type":"object","properties":{"true":{"type":"string","minLength":1,"maxLength":4000,"uniqueKey":"structure.questions.additionalProperties.criteria.true","typeLabel":"string"},"false":{"type":"string","minLength":1,"maxLength":4000,"uniqueKey":"structure.questions.additionalProperties.criteria.false","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"structure.questions.additionalProperties.criteria","typeLabel":"object"},"reads":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256,"description":"`state.\u003ckey>` or a nested object path such as `state.order.customer.tier`: keys of an object `state`. A key has no `.`, `[` or `]`. Array indexes are not supported yet.","examples":["state.message","state.order.order_total_usd"],"uniqueKey":"structure.questions.additionalProperties.reads.items.[INDEX]","typeLabel":"string"},"minItems":1,"maxItems":64,"description":"Paths into an object `state` this question reads, such as `state.message` or `state.order.customer.tier`. The question sees just those values, nested as in the state. Without it the question sees the whole state, as in System One. Every path must exist in the call's `state`; no entry may repeat or contain another.","uniqueKey":"structure.questions.additionalProperties.reads","typeLabel":"string[]"}},"additionalProperties":false,"uniqueKey":"structure.questions.additionalProperties","typeLabel":"object"},"description":"System One questions, keyed by name.","isRequired":true,"uniqueKey":"structure.questions","typeLabel":"object"},"result":{"type":"string","minLength":1,"maxLength":80,"description":"The final feature's path, such as `aggregations.band`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.result","typeLabel":"string"},"attributes":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","required":["type","enum"],"properties":{"type":{"type":"string","enum":["string"],"isRequired":true,"uniqueKey":"structure.attributes.additionalProperties.oneOf.0.type","typeLabel":"enum\u003cstring>"},"enum":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"uniqueKey":"structure.attributes.additionalProperties.oneOf.0.enum.items.[INDEX]","typeLabel":"string"},"minItems":1,"maxItems":255,"isRequired":true,"uniqueKey":"structure.attributes.additionalProperties.oneOf.0.enum","typeLabel":"string[]"},"default":{"type":"string","uniqueKey":"structure.attributes.additionalProperties.oneOf.0.default","typeLabel":"string"},"source":{"type":"string","minLength":1,"maxLength":200,"description":"The model and version behind this attribute, such as `toxicity-classifier-v3`. Hashed.","uniqueKey":"structure.attributes.additionalProperties.oneOf.0.source","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"structure.attributes.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["number"],"isRequired":true,"uniqueKey":"structure.attributes.additionalProperties.oneOf.1.type","typeLabel":"enum\u003cstring>"},"minimum":{"type":"number","uniqueKey":"structure.attributes.additionalProperties.oneOf.1.minimum","typeLabel":"number"},"maximum":{"type":"number","uniqueKey":"structure.attributes.additionalProperties.oneOf.1.maximum","typeLabel":"number"},"default":{"type":"number","uniqueKey":"structure.attributes.additionalProperties.oneOf.1.default","typeLabel":"number"},"source":{"type":"string","minLength":1,"maxLength":200,"description":"The model and version behind this attribute, such as `toxicity-classifier-v3`. Hashed.","uniqueKey":"structure.attributes.additionalProperties.oneOf.1.source","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"structure.attributes.additionalProperties.oneOf.1","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["boolean"],"isRequired":true,"uniqueKey":"structure.attributes.additionalProperties.oneOf.2.type","typeLabel":"enum\u003cstring>"},"default":{"type":"boolean","uniqueKey":"structure.attributes.additionalProperties.oneOf.2.default","typeLabel":"boolean"},"source":{"type":"string","minLength":1,"maxLength":200,"description":"The model and version behind this attribute, such as `toxicity-classifier-v3`. Hashed.","uniqueKey":"structure.attributes.additionalProperties.oneOf.2.source","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"structure.attributes.additionalProperties.oneOf.2","typeLabel":"object"}],"uniqueKey":"structure.attributes.additionalProperties","typeLabel":"object"},"description":"Values your app supplies with each call in `attribute_values`. The model never sees them.","uniqueKey":"structure.attributes","typeLabel":"object"},"aggregations":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","description":"Σ wᵢ·xᵢ / Σ wᵢ: a weighted average from 0 to 1, not a probability.","required":["type","inputs"],"properties":{"type":{"type":"string","enum":["weighted_mean"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.0.type","typeLabel":"enum\u003cstring>"},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.0.inputs.items.[INDEX].name","typeLabel":"string"},"weight":{"type":"number","exclusiveMinimum":0,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.0.inputs.items.[INDEX].weight","typeLabel":"number"},"invert":{"type":"boolean","uniqueKey":"structure.aggregations.additionalProperties.oneOf.0.inputs.items.[INDEX].invert","typeLabel":"boolean"}},"required":["name"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.0.inputs.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.0.inputs","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","description":"σ(bias + Σ wᵢ·xᵢ), with signed weights on raw input values.","required":["type","bias","inputs"],"properties":{"type":{"type":"string","enum":["logistic"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.1.type","typeLabel":"enum\u003cstring>"},"bias":{"type":"number","isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.1.bias","typeLabel":"number"},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.1.inputs.items.[INDEX].name","typeLabel":"string"},"weight":{"type":"number","isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.1.inputs.items.[INDEX].weight","typeLabel":"number"}},"required":["name","weight"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.1.inputs.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.1.inputs","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.1","typeLabel":"object"},{"type":"object","description":"min xᵢ: all of these, when they overlap.","required":["type","inputs"],"properties":{"type":{"type":"string","enum":["min"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.2.type","typeLabel":"enum\u003cstring>"},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.2.inputs.items.[INDEX].name","typeLabel":"string"},"invert":{"type":"boolean","uniqueKey":"structure.aggregations.additionalProperties.oneOf.2.inputs.items.[INDEX].invert","typeLabel":"boolean"}},"required":["name"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.2.inputs.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.2.inputs","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.2","typeLabel":"object"},{"type":"object","description":"max xᵢ: any of these, when they overlap.","required":["type","inputs"],"properties":{"type":{"type":"string","enum":["max"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.3.type","typeLabel":"enum\u003cstring>"},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.3.inputs.items.[INDEX].name","typeLabel":"string"},"invert":{"type":"boolean","uniqueKey":"structure.aggregations.additionalProperties.oneOf.3.inputs.items.[INDEX].invert","typeLabel":"boolean"}},"required":["name"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.3.inputs.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.3.inputs","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.3","typeLabel":"object"},{"type":"object","description":"Π xᵢ: all of these, when they are independent.","required":["type","inputs"],"properties":{"type":{"type":"string","enum":["product"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.4.type","typeLabel":"enum\u003cstring>"},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.4.inputs.items.[INDEX].name","typeLabel":"string"},"invert":{"type":"boolean","uniqueKey":"structure.aggregations.additionalProperties.oneOf.4.inputs.items.[INDEX].invert","typeLabel":"boolean"}},"required":["name"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.4.inputs.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.4.inputs","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.4","typeLabel":"object"},{"type":"object","description":"1 − Π(1 − xᵢ): any of these, when they are independent.","required":["type","inputs"],"properties":{"type":{"type":"string","enum":["noisy_or"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.5.type","typeLabel":"enum\u003cstring>"},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.5.inputs.items.[INDEX].name","typeLabel":"string"},"invert":{"type":"boolean","uniqueKey":"structure.aggregations.additionalProperties.oneOf.5.inputs.items.[INDEX].invert","typeLabel":"boolean"}},"required":["name"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.5.inputs.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.5.inputs","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.5","typeLabel":"object"},{"type":"object","description":"1 when every input passes its threshold (default ≥ 0.5), else 0.","required":["type","inputs"],"properties":{"type":{"type":"string","enum":["all"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.6.type","typeLabel":"enum\u003cstring>"},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.6.inputs.items.[INDEX].name","typeLabel":"string"},"gte":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.6.inputs.items.[INDEX].gte","typeLabel":"number"},"gt":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.6.inputs.items.[INDEX].gt","typeLabel":"number"},"lte":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.6.inputs.items.[INDEX].lte","typeLabel":"number"},"lt":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.6.inputs.items.[INDEX].lt","typeLabel":"number"}},"required":["name"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.6.inputs.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.6.inputs","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.6","typeLabel":"object"},{"type":"object","description":"1 when any input passes its threshold (default ≥ 0.5), else 0.","required":["type","inputs"],"properties":{"type":{"type":"string","enum":["any"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.7.type","typeLabel":"enum\u003cstring>"},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.7.inputs.items.[INDEX].name","typeLabel":"string"},"gte":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.7.inputs.items.[INDEX].gte","typeLabel":"number"},"gt":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.7.inputs.items.[INDEX].gt","typeLabel":"number"},"lte":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.7.inputs.items.[INDEX].lte","typeLabel":"number"},"lt":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.7.inputs.items.[INDEX].lt","typeLabel":"number"}},"required":["name"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.7.inputs.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.7.inputs","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.7","typeLabel":"object"},{"type":"object","description":"Names an outcome for each range of one feature's value. `at` means ≥; `below` is under the first cut.","required":["type","input","below","cuts"],"properties":{"type":{"type":"string","enum":["bands"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.8.type","typeLabel":"enum\u003cstring>"},"input":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.8.input","typeLabel":"string"},"below":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.8.below","typeLabel":"string"},"cuts":{"type":"array","items":{"type":"object","properties":{"at":{"type":"number","isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.8.cuts.items.[INDEX].at","typeLabel":"number"},"outcome":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.8.cuts.items.[INDEX].outcome","typeLabel":"string"}},"required":["at","outcome"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.8.cuts.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":9,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.8.cuts","typeLabel":"object[]"},"abstain":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","uniqueKey":"structure.aggregations.additionalProperties.oneOf.8.abstain","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.8","typeLabel":"object"},{"type":"object","description":"The first rule whose condition is true names its `outcome`; otherwise `else`.","required":["type","rules","else"],"properties":{"type":{"type":"string","enum":["rules"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.type","typeLabel":"enum\u003cstring>"},"rules":{"type":"array","items":{"type":"object","properties":{"when":{"oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0.name","typeLabel":"string"},"gte":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0.gte","typeLabel":"number"},"gt":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0.gt","typeLabel":"number"},"lte":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0.lte","typeLabel":"number"},"lt":{"type":"number","uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0.lt","typeLabel":"number"},"is":{"type":"string","minLength":1,"maxLength":200,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0.is","typeLabel":"string"},"in":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0.in.items.[INDEX]","typeLabel":"string"},"minItems":1,"maxItems":255,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0.in","typeLabel":"string[]"},"abstained":{"type":"boolean","enum":[true],"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0.abstained","typeLabel":"enum\u003cboolean>"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.0","typeLabel":"object"},{"type":"object","required":["all"],"properties":{"all":{"type":"array","items":{"$circularRef":"f3a56dea-20a6-4cd1-9853-cd499bc639d6"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.1.all","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.1","typeLabel":"object"},{"type":"object","required":["any"],"properties":{"any":{"type":"array","items":{"$circularRef":"f3a56dea-20a6-4cd1-9853-cd499bc639d6"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.2.any","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.2","typeLabel":"object"},{"type":"object","required":["not"],"properties":{"not":{"oneOf":[{"$circularRef":"f3a56dea-20a6-4cd1-9853-cd499bc639d6","isRequired":true}],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.3.not","typeLabel":"any"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].when","typeLabel":"object"},"outcome":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX].outcome","typeLabel":"string"}},"required":["when","outcome"],"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.rules","typeLabel":"object[]"},"else":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9.else","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.9","typeLabel":"object"},{"type":"object","description":"Maps a label straight to an outcome.","required":["type","input","cases"],"properties":{"type":{"type":"string","enum":["match"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.10.type","typeLabel":"enum\u003cstring>"},"input":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.10.input","typeLabel":"string"},"cases":{"type":"object","additionalProperties":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","uniqueKey":"structure.aggregations.additionalProperties.oneOf.10.cases.additionalProperties","typeLabel":"string"},"description":"Maps labels to outcomes. \"__proto__\" is not supported as a case key; use a rules is-condition for that label.","isRequired":true,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.10.cases","typeLabel":"object"},"else":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","uniqueKey":"structure.aggregations.additionalProperties.oneOf.10.else","typeLabel":"string"},"abstain":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","uniqueKey":"structure.aggregations.additionalProperties.oneOf.10.abstain","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"structure.aggregations.additionalProperties.oneOf.10","typeLabel":"object"}],"uniqueKey":"structure.aggregations.additionalProperties","typeLabel":"object"},"uniqueKey":"structure.aggregations","typeLabel":"object"}},"required":["questions","result"],"additionalProperties":false,"description":"Everything that defines a decision: questions, attribute declarations, aggregations and the result. Names are unique across all three maps.","isRequired":true,"uniqueKey":"structure","typeLabel":"object"},"decision_id":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{0,127}$","description":"A name you choose for this decision, such as `refund-exception`: a lowercase letter, then up to 127 of `a-z 0-9 _ . -`. Unique in your organization and shared by its test and production keys. The first registration or evaluation under a new one creates the decision.","uniqueKey":"decision_id","typeLabel":"string"},"objective":{"oneOf":[{"type":"object","description":"What the decision optimizes for, as the decision file holds it. Its outcomes must be ones `structure` can produce. Never part of the structure hash.","properties":{"fallback":{"type":"string","minLength":1,"maxLength":200,"description":"The safe outcome. Sending a case there when it belonged elsewhere is `minor`, unless that mistake is listed.","uniqueKey":"objective.oneOf.0.fallback","typeLabel":"string"},"mistakes":{"type":"array","items":{"oneOf":[{"type":"object","description":"One mistake that matters, by severity or by a direct loss. A mistake that isn't listed is `normal`.","required":["expected","got","severity"],"properties":{"expected":{"type":"string","minLength":1,"maxLength":200,"description":"The outcome the case should have had.","isRequired":true,"uniqueKey":"objective.oneOf.0.mistakes.items.[INDEX].oneOf.0.expected","typeLabel":"string"},"got":{"type":"string","minLength":1,"maxLength":200,"description":"The outcome the decision gave instead.","isRequired":true,"uniqueKey":"objective.oneOf.0.mistakes.items.[INDEX].oneOf.0.got","typeLabel":"string"},"severity":{"type":"string","enum":["minor","normal","costly","severe"],"description":"How bad a mistake is: `minor` weighs 0.5, `normal` 1, `costly` 3 and `severe` 10.","isRequired":true,"uniqueKey":"objective.oneOf.0.mistakes.items.[INDEX].oneOf.0.severity","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"objective.oneOf.0.mistakes.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One mistake that matters, by severity or by a direct loss. A mistake that isn't listed is `normal`.","required":["expected","got","loss"],"properties":{"expected":{"type":"string","minLength":1,"maxLength":200,"description":"The outcome the case should have had.","isRequired":true,"uniqueKey":"objective.oneOf.0.mistakes.items.[INDEX].oneOf.1.expected","typeLabel":"string"},"got":{"type":"string","minLength":1,"maxLength":200,"description":"The outcome the decision gave instead.","isRequired":true,"uniqueKey":"objective.oneOf.0.mistakes.items.[INDEX].oneOf.1.got","typeLabel":"string"},"loss":{"type":"number","minimum":0,"maximum":1000000,"description":"A direct loss in place of a severity. At least 10 counts as severe.","isRequired":true,"uniqueKey":"objective.oneOf.0.mistakes.items.[INDEX].oneOf.1.loss","typeLabel":"number"}},"additionalProperties":false,"uniqueKey":"objective.oneOf.0.mistakes.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"objective.oneOf.0.mistakes.items.[INDEX]","typeLabel":"object"},"maxItems":400,"uniqueKey":"objective.oneOf.0.mistakes","typeLabel":"object[]"},"target":{"type":"object","properties":{"max_loss_per_case":{"type":"number","minimum":0,"description":"A reference loss per case the owner would be content with.","isRequired":true,"uniqueKey":"objective.oneOf.0.target.max_loss_per_case","typeLabel":"number"}},"required":["max_loss_per_case"],"additionalProperties":false,"description":"Optional, a soft reference point: reports say whether loss per case is at or below it (`target_met`). The refine loop stops when the owner decides, not on the target.","uniqueKey":"objective.oneOf.0.target","typeLabel":"object"},"outcome":{"type":"string","minLength":1,"maxLength":200,"description":"With `priority`: the outcome the two-outcome shortcut is about.","uniqueKey":"objective.oneOf.0.outcome","typeLabel":"string"},"priority":{"type":"string","enum":["catch_all","be_sure","balanced"],"description":"With `outcome`, the shortcut: `catch_all` makes missing `outcome` costly and a false alarm normal, `be_sure` the reverse, `balanced` both normal. A listed mistake overrides the shortcut's entry for it.","uniqueKey":"objective.oneOf.0.priority","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"objective.oneOf.0","typeLabel":"object"},{"type":"null","description":"What the decision optimizes for, as the decision file holds it. Its outcomes must be ones `structure` can produce. Never part of the structure hash.","uniqueKey":"objective.oneOf.1","typeLabel":"null"}],"uniqueKey":"objective","typeLabel":"object | null"}},"required":["structure"],"additionalProperties":false,"description":"A decision file to check. `decision_id` is optional and only checked against the id pattern.","uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"689df04b-fe65-400f-8d85-8e65cc57b4d5":{"description":"The file is valid","content":{"application/json":{"examples":{"valid":{"title":"valid","value":{"structure_hash":"sha256:bdad6e5b1b879209305f1555b43ec62666a4d74a925280c66e54cc4dc07bb1ae","question_hashes":{"item_used":"sha256:2cd936709034818c3beca2574ca48ef400577728a20532924ed68f1ca1f26e3d","defective":"sha256:8dd4a69d6bfaf9fa766adcac7cfa1c4af7eff57a690a1e39666398bf85cd1869"},"canonical":"{\"aggregations\":{\"grant_score\":{\"inputs\":[{\"invert\":true,\"name\":\"questions.item_used\"},{\"name\":\"questions.defective\"}],\"type\":\"weighted_mean\"},\"handling\":{\"else\":\"escalate\",\"rules\":[{\"outcome\":\"escalate\",\"when\":{\"gt\":30,\"name\":\"attributes.days_since_delivery\"}},{\"outcome\":\"grant\",\"when\":{\"gte\":0.72,\"name\":\"aggregations.grant_score\"}},{\"outcome\":\"deny\",\"when\":{\"lt\":0.38,\"name\":\"aggregations.grant_score\"}}],\"type\":\"rules\"}},\"attributes\":{\"days_since_delivery\":{\"minimum\":0,\"type\":\"number\"}},\"format\":\"moonbounce.structure/1\",\"questions\":{\"defective\":{\"instructions\":\"Does the customer describe a defect, damage on arrival, or the item failing under normal use?\",\"reads\":[\"state.message\"],\"type\":\"noul\"},\"item_used\":{\"instructions\":\"Has the customer used the item beyond trying it on or setting it up once?\",\"reads\":[\"state.message\"],\"type\":\"noul\"}},\"result\":\"aggregations.handling\"}","warnings":[]}}},"schema":{"type":"object","properties":{"structure_hash":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","isRequired":true,"uniqueKey":"structure_hash","typeLabel":"string"},"question_hashes":{"type":"object","additionalProperties":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","uniqueKey":"question_hashes.additionalProperties","typeLabel":"string"},"description":"Each question, by name, mapped to its hash (its definition without its name). A question's hash is what feedback about it is stored against.","isRequired":true,"uniqueKey":"question_hashes","typeLabel":"object"},"canonical":{"type":"string","description":"The exact text whose SHA-256 is `structure_hash`: the structure's canonical form in RFC 8785 (JCS) JSON.","isRequired":true,"uniqueKey":"canonical","typeLabel":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Stable, extensible warning code. `UNUSED_FEATURE`: the result never reaches this question, attribute or aggregation, so it changes the hash but never the outcome.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"string"},"param":{"type":"string","description":"The field the warning is about, such as `structure.questions.item_used`.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].param","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"}},"required":["code","param","message"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"description":"Things that are valid but probably not meant. They never depend on an environment or a model.","isRequired":true,"uniqueKey":"warnings","typeLabel":"object[]"}},"required":["structure_hash","question_hashes","canonical","warnings"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"exampleType":"examples"},"121f66be-2cc6-49d3-b334-a0a219f9b680":{"description":"Invalid request: `param` names the field at fault when one applies","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`attribute_values.region`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"param":{"type":"string","isRequired":true,"uniqueKey":"error.details.issues.items.[INDEX].param","typeLabel":"string"},"code":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Stable, extensible issue code; unknown codes still have a parameter and human-readable message.","isRequired":true,"uniqueKey":"error.details.issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.issues.items.[INDEX].message","typeLabel":"string"}},"required":["param","code","message"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"uniqueKey":"error.details.issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.issues","typeLabel":"object[]"}},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{"issues":[{"param":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"5dea6a7e-671e-4918-b507-9747c6251720":{"description":"The HTTP body exceeds 1 MB (reason BODY_TOO_LARGE)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`attribute_values.region`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"param":{"type":"string","isRequired":true,"uniqueKey":"error.details.issues.items.[INDEX].param","typeLabel":"string"},"code":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Stable, extensible issue code; unknown codes still have a parameter and human-readable message.","isRequired":true,"uniqueKey":"error.details.issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.issues.items.[INDEX].message","typeLabel":"string"}},"required":["param","code","message"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"uniqueKey":"error.details.issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.issues","typeLabel":"object[]"}},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{"issues":[{"param":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"7bb55cb6-8880-45d8-bb1e-d0b7cd1825ce":{"description":"RATE_LIMITED: retry after Retry-After seconds; QUOTA_EXCEEDED: details.reset_at gives the daily reset time (no Retry-After)","headers":{"Retry-After":{"schema":{"type":"string","description":"Seconds to wait before retrying, when waiting helps."},"required":false,"description":"Seconds to wait before retrying, when waiting helps."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`attribute_values.region`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"param":{"type":"string","isRequired":true,"uniqueKey":"error.details.issues.items.[INDEX].param","typeLabel":"string"},"code":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Stable, extensible issue code; unknown codes still have a parameter and human-readable message.","isRequired":true,"uniqueKey":"error.details.issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.issues.items.[INDEX].message","typeLabel":"string"}},"required":["param","code","message"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"uniqueKey":"error.details.issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.issues","typeLabel":"object[]"}},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":true,"x-moonbounce-sdk-known-fields":true,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{"issues":[{"param":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"d74a0e6e-c4ac-4495-a224-a84e2d741c54":{"url":"https://api.moonbounce.ai","description":"Production"}},"schemas":{"f3a56dea-20a6-4cd1-9853-cd499bc639d6":{"oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A feature's path: `questions.\u003cname>`, `attributes.\u003cname>` or `aggregations.\u003cname>`.","examples":["questions.asks_for_refund","aggregations.band"],"isRequired":true},"gte":{"type":"number"},"gt":{"type":"number"},"lte":{"type":"number"},"lt":{"type":"number"},"is":{"type":"string","minLength":1,"maxLength":200},"in":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":255},"abstained":{"type":"boolean","enum":[true]}},"additionalProperties":false},{"type":"object","required":["all"],"properties":{"all":{"type":"array","items":{"$circularRef":"f3a56dea-20a6-4cd1-9853-cd499bc639d6"},"minItems":1,"maxItems":64,"isRequired":true}},"additionalProperties":false},{"type":"object","required":["any"],"properties":{"any":{"type":"array","items":{"$circularRef":"f3a56dea-20a6-4cd1-9853-cd499bc639d6"},"minItems":1,"maxItems":64,"isRequired":true}},"additionalProperties":false},{"type":"object","required":["not"],"properties":{"not":{"oneOf":[{"isRequired":true}],"isRequired":true}},"additionalProperties":false}]}}},"originalFileLocation":"openapi.json"},"subdomain":"moonbounce","siteName":"Moonbounce Decisions API","title":"Validate a decision file - Moonbounce Decisions API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-07T01:38:52.474Z","originalFileLocation":"api-reference/decisions/validate-a-decision-file.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Checks a decision file ({decision_id?, structure, objective?}) and returns its structure hash, every question\u0026#x27;s hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose details.issues lists every issue, each with its param, as registerDecision would answer; so is an objective naming an outcome the structure can\u0026#x27;t produce. decision_id is optional and only checked against the id pattern. Warnings never depend on an environment or a model; UNUSED_FEATURE names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of reads and of aggregation inputs, and defaults spelled out (invert: false, gte: 0.5, empty criteria) do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Moonbounce Decisions API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Validate a decision file - Moonbounce Decisions API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Checks a decision file ({decision_id?, structure, objective?}) and returns its structure hash, every question\u0026#x27;s hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose details.issues lists every issue, each with its param, as registerDecision would answer; so is an objective naming an outcome the structure can\u0026#x27;t produce. decision_id is optional and only checked against the id pattern. Warnings never depend on an environment or a model; UNUSED_FEATURE names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of reads and of aggregation inputs, and defaults spelled out (invert: false, gte: 0.5, empty criteria) do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Moonbounce Decisions API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://moonbounce.mintlify.site/_mintlify/api/og/v2?division=decisions\u0026amp;title=Validate+a+decision+file\u0026amp;description=Checks+a+decision+file+%28%60%7Bdecision_id%3F%2C+structure%2C+objective%3F%7D%60%29+and+returns+its+structure+hash%2C+every+question%27s+hash%2C+the+canonical+text+the+hash+is+the+SHA-2\u0026amp;theme=e6d1608244ab860cac0ff47e\u0026amp;signature=6891867430cbdb75b3393c72e466041f02739e972767afb5ebc6e569089b0222\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Validate a decision file - Moonbounce Decisions API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Checks a decision file ({decision_id?, structure, objective?}) and returns its structure hash, every question\u0026#x27;s hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose details.issues lists every issue, each with its param, as registerDecision would answer; so is an objective naming an outcome the structure can\u0026#x27;t produce. decision_id is optional and only checked against the id pattern. Warnings never depend on an environment or a model; UNUSED_FEATURE names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of reads and of aggregation inputs, and defaults spelled out (invert: false, gte: 0.5, empty criteria) do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://moonbounce.mintlify.site/_mintlify/api/og/v2?division=decisions\u0026amp;title=Validate+a+decision+file\u0026amp;description=Checks+a+decision+file+%28%60%7Bdecision_id%3F%2C+structure%2C+objective%3F%7D%60%29+and+returns+its+structure+hash%2C+every+question%27s+hash%2C+the+canonical+text+the+hash+is+the+SHA-2\u0026amp;theme=e6d1608244ab860cac0ff47e\u0026amp;signature=6891867430cbdb75b3393c72e466041f02739e972767afb5ebc6e569089b0222\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/moonbounce/Pq6Jhs_BrzDTLcf2/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Moonbounce Decisions API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1D5AB5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/decisions/validate-a-decision-file.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.moonbounce.ai/#organization\",\"name\":\"Moonbounce Decisions API\",\"url\":\"https://docs.moonbounce.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/moonbounce/mWuXGW-nUJSEdABp/logo/lockup-light.svg?fit=max\u0026auto=format\u0026n=mWuXGW-nUJSEdABp\u0026q=85\u0026s=367a5dedb5799a16c5737d136af68dc5\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.moonbounce.ai#website\",\"name\":\"Moonbounce Decisions API\",\"url\":\"https://docs.moonbounce.ai\",\"publisher\":{\"@id\":\"https://docs.moonbounce.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file#webpage\",\"url\":\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file\",\"name\":\"Validate a decision file\",\"description\":\"Checks a decision file ({decision_id?, structure, objective?}) and returns its structure hash, every question's hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose details.issues lists every issue, each with its param, as registerDecision would answer; so is an objective naming an outcome the structure can't produce. decision_id is optional and only checked against the id pattern. Warnings never depend on an environment or a model; UNUSED_FEATURE names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of reads and of aggregation inputs, and defaults spelled out (invert: false, gte: 0.5, empty criteria) do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.\",\"dateModified\":\"2026-11-07T01:38:52.474Z\",\"isPartOf\":{\"@id\":\"https://docs.moonbounce.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.moonbounce.ai/api-reference/health/health-check\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Validate a decision file\",\"item\":\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file#apireference\",\"headline\":\"Validate a decision file\",\"name\":\"Validate a decision file\",\"description\":\"Checks a decision file ({decision_id?, structure, objective?}) and returns its structure hash, every question's hash, the canonical text the hash is the SHA-256 of, and warnings, without registering anything: free (no model call), public (needs no API key), and safe to run in CI on every change. An invalid file is a 400 whose details.issues lists every issue, each with its param, as registerDecision would answer; so is an objective naming an outcome the structure can't produce. decision_id is optional and only checked against the id pattern. Warnings never depend on an environment or a model; UNUSED_FEATURE names a question, attribute or aggregation the result never reaches. Key order, Unicode normalization (NFC) of instructions, criteria and attribute sources, the order of reads and of aggregation inputs, and defaults spelled out (invert: false, gte: 0.5, empty criteria) do not change the hashes. Read paths, string attribute labels and label comparisons stay exact, since customer content is not normalized.\",\"url\":\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file\",\"mainEntityOfPage\":{\"@id\":\"https://docs.moonbounce.ai/api-reference/decisions/validate-a-decision-file#webpage\"},\"dateModified\":\"2026-11-07T01:38:52.474Z\",\"publisher\":{\"@id\":\"https://docs.moonbounce.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.moonbounce.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Moonbounce Decisions API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Moonbounce Decisions API","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"API reference overview","href":"/reference/overview"}]},{"group":"Endpoints","pages":[{"group":"health","pages":[{"title":"Health check","description":"Public, no customer data. Reports the deployed version (the deploy tag, else the Worker version id) and whether a Postgres round trip through the Worker's own Hyperdrive binding succeeded within about 2 seconds and showed the app role holding the write privileges the API needs. 503 with `db: unavailable` when it did not; the cause is logged, never returned.","deprecated":null,"version":null,"openapi":"/openapi.json get /health","href":"/api-reference/health/health-check"}]},{"group":"decisions","pages":[{"title":"Validate a decision file","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/validate","href":"/api-reference/decisions/validate-a-decision-file"},{"title":"List decisions","description":"Reads only. Lists the organization's decisions, newest decision first; test and production keys see the same ones. Pass next_cursor as cursor while has_more is true.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions","href":"/api-reference/decisions/list-decisions"},{"title":"Register a decision's version","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions","href":"/api-reference/decisions/register-a-decisions-version"},{"title":"Get a version","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/versions/{ref}","href":"/api-reference/decisions/get-a-version"},{"title":"Get a decision","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}","href":"/api-reference/decisions/get-a-decision"},{"title":"List a decision's versions","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/versions","href":"/api-reference/decisions/list-a-decisions-versions"}]},{"group":"engines","pages":[{"title":"List the engines a decision can run on","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/engines","href":"/api-reference/engines/list-the-engines-a-decision-can-run-on"},{"title":"Get the engine a decision runs on","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/binding","href":"/api-reference/engines/get-the-engine-a-decision-runs-on"},{"title":"Choose the engine a decision runs on","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/binding/revisions","href":"/api-reference/engines/choose-the-engine-a-decision-runs-on"}]},{"group":"objective","pages":[{"title":"Sweep a cut over a run's answers","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/cut-sweeps","href":"/api-reference/objective/sweep-a-cut-over-a-runs-answers"},{"title":"Judge results under a decision's objective","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/loss-reports","href":"/api-reference/objective/judge-results-under-a-decisions-objective"},{"title":"Get what a decision optimizes for","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/objective","href":"/api-reference/objective/get-what-a-decision-optimizes-for"},{"title":"Set what a decision optimizes for","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/objective/revisions","href":"/api-reference/objective/set-what-a-decision-optimizes-for"}]},{"group":"feedback","pages":[{"title":"List a decision's labeled cases","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/cases","href":"/api-reference/feedback/list-a-decisions-labeled-cases"},{"title":"Submit feedback on evaluations or items","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/feedback","href":"/api-reference/feedback/submit-feedback-on-evaluations-or-items"},{"title":"Get a feedback submission as stored","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/feedback/{feedback_id}","href":"/api-reference/feedback/get-a-feedback-submission-as-stored"},{"title":"Export a decision's feedback as training data","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/feedback","href":"/api-reference/feedback/export-a-decisions-feedback-as-training-data"},{"title":"Import labeled examples","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/examples","href":"/api-reference/feedback/import-labeled-examples"}]},{"group":"evaluate","pages":[{"title":"Evaluate an item, or run a version over many items","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/evaluate","href":"/api-reference/evaluate/evaluate-an-item-or-run-a-version-over-many-items"},{"title":"Get a past evaluation","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/evaluations/{evaluation_id}","href":"/api-reference/evaluate/get-a-past-evaluation"},{"title":"List a decision's evaluations","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/evaluations","href":"/api-reference/evaluate/list-a-decisions-evaluations"}]},{"group":"review","pages":[{"title":"Fill the review queue","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/fill","href":"/api-reference/review/fill-the-review-queue"},{"title":"List review items","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/review/items","href":"/api-reference/review/list-review-items"},{"title":"Get a review item","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/review/items/{review_item_id}","href":"/api-reference/review/get-a-review-item"},{"title":"Get the structure a review item was decided with","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/review/items/{review_item_id}/configuration","href":"/api-reference/review/get-the-structure-a-review-item-was-decided-with"},{"title":"Mark a review item as shown","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{review_item_id}/shown","href":"/api-reference/review/mark-a-review-item-as-shown"},{"title":"Submit a review","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{review_item_id}/submit","href":"/api-reference/review/submit-a-review"},{"title":"Withdraw a review answer","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{review_item_id}/withdraw","href":"/api-reference/review/withdraw-a-review-answer"},{"title":"Change your own earlier review answer","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{review_item_id}/change","href":"/api-reference/review/change-your-own-earlier-review-answer"},{"title":"Skip a review item","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{review_item_id}/skip","href":"/api-reference/review/skip-a-review-item"},{"title":"Add the reason for a blind disagreement","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{review_item_id}/reason","href":"/api-reference/review/add-the-reason-for-a-blind-disagreement"}]},{"group":"suggestions","pages":[{"title":"List suggestions for a decision","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/suggestions","href":"/api-reference/suggestions/list-suggestions-for-a-decision"},{"title":"Generate a suggestion on demand","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/suggestions","href":"/api-reference/suggestions/generate-a-suggestion-on-demand"},{"title":"Get a suggestion","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/suggestions/{suggestion_id}","href":"/api-reference/suggestions/get-a-suggestion"},{"title":"Mark a suggestion pulled or rejected","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/suggestions/{suggestion_id}/status","href":"/api-reference/suggestions/mark-a-suggestion-pulled-or-rejected"},{"title":"Preview a structure change against past feedback","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/previews","href":"/api-reference/suggestions/preview-a-structure-change-against-past-feedback"},{"title":"Get the improvement loop's status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/loop","href":"/api-reference/suggestions/get-the-improvement-loops-status"}]},{"group":"usage","pages":[{"title":"Get a decision's engine cost, per evaluation and in total","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/usage","href":"/api-reference/usage/get-a-decisions-engine-cost-per-evaluation-and-in-total"}]},{"group":"keys","pages":[{"title":"Identify the calling key or sign-in","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/whoami","href":"/api-reference/keys/identify-the-calling-key-or-sign-in"}]}]}]}]},"basePath":"","title":"Validate a decision file - Moonbounce Decisions API","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-BcDCEkh6.js","dist-CwjSCXIK.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-eKJ4rcii.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js","Markdown-D7Ofw1oz.js","AssistantPageLink-9EK5IAXV.js"]}