{"openapi":"3.1.0","info":{"title":"Acretix Verify API","version":"2026-11-12"},"servers":[{"url":"/v1"},{"url":"https://api.acretix.io/v1","description":"The absolute production address."}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Tenant API key (Bearer)."},"cockpitBearer":{"type":"http","scheme":"bearer","description":"Cockpit bearer for the separately configured counterparty criteria-link address reader."}},"schemas":{"Problem":{"type":"object","description":"Error body sent as application/problem+json. The code is a catalogue code listed on the docs error reference.","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string"},"fix":{"type":"string"}},"required":["type","title","status","code","fix"]},"AiRecordFigure":{"type":"object","properties":{"count":{"type":"integer"},"sample":{"type":"integer"},"rate":{"type":["number","null"]},"too_few_to_show":{"type":"boolean"},"first":{"type":["string","null"],"format":"date-time"},"last":{"type":["string","null"],"format":"date-time"}},"required":["count","sample","rate","too_few_to_show","first","last"],"additionalProperties":false},"AiRecord":{"type":"object","properties":{"tenant_id":{"type":"string","format":"uuid"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"source":{"type":"string","enum":["feedback"]},"figures":{"type":"object","properties":{"agreement":{"$ref":"#/components/schemas/AiRecordFigure"},"false_met":{"$ref":"#/components/schemas/AiRecordFigure"},"overturn":{"$ref":"#/components/schemas/AiRecordFigure"},"abstention":{"$ref":"#/components/schemas/AiRecordFigure"}},"required":["agreement","false_met","overturn","abstention"],"additionalProperties":false},"disputed":{"type":"object","properties":{"count":{"type":"integer"}},"required":["count"],"additionalProperties":false},"by_model":{"type":"string","enum":["not_split_for_feedback"]},"test_split":{"type":"string","enum":["not_yet_available"]},"escalations":{"type":"string","enum":["not_yet_available"]}},"required":["tenant_id","from","to","source","figures","disputed","by_model","test_split","escalations"],"additionalProperties":false},"CriterionPrimitive":{"type":"string","description":"Evaluation primitive a rubric criterion runs. The deterministic primitives are zero-AI-cost and bound input at 256 KiB; llm_judge runs the tiered LLM-as-judge path. This enum is the published format 1.0 set; the engine may accept further primitives outside that format.","oneOf":[{"const":"regex_match@1","description":"Submission must — or, with config.must_match=false, must-not — match a configured regular expression. Patterns are ReDoS-screened at compile and at runtime."},{"const":"json_schema@1","description":"Submission must conform to a configured JSON Schema (type/enum/const, string/number/array bounds, required and additionalProperties)."},{"const":"numeric_threshold@1","description":"A finite numeric value — read from the submission at config.path (default: the whole value; inline JSON is parsed) — compared by config.operator (gt|gte|lt|lte|eq|between; default gte) against config.threshold (or the criterion threshold), or config.min/config.max for between, with optional config.tolerance."},{"const":"llm_judge@1","description":"LLM-as-judge qualitative evaluation of the submission against the criterion, routed through the judge tier map."}]},"RubricSpec":{"title":"Acretix rubric format 1.0","description":"Acretix rubric format 1.0, published at /api/rubric-format/1.0/schema.json. A published version never changes.","type":"object","additionalProperties":false,"required":["name","criteria"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"criteria":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","additionalProperties":false,"required":["key","type","primitive"],"properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,127}$"},"name":{"type":"string","minLength":1,"maxLength":500,"pattern":"^[^\\u0000-\\u001F\\u007F-\\u009F]+$"},"type":{"enum":["must_have","must_not","scored"]},"primitive":{"$ref":"#/components/schemas/CriterionPrimitive"},"judge_tier":{"enum":[1,2,3]},"metric":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\u0000-\\u001F\\u007F-\\u009F]+$"},"threshold":{"anyOf":[{"type":"number"},{"type":"string","minLength":1,"maxLength":200,"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$"}]},"weight":{"type":"number","exclusiveMinimum":0},"evidence_source":{"type":"string","minLength":1,"maxLength":500},"trust_tier":{"type":"string","minLength":1,"maxLength":100},"window":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"object"}]},"required_precision":{"type":"string","minLength":1,"maxLength":100},"confidence_threshold":{"type":"number","minimum":0,"maximum":1},"reference_set_id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"config":{"type":"object"}}}}}},"RubricCompileRequest":{"type":"object","additionalProperties":false,"required":["name","criteria"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"criteria":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","additionalProperties":false,"required":["key","type","primitive"],"properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,127}$"},"name":{"type":"string","minLength":1,"maxLength":500,"pattern":"^[^\\u0000-\\u001F\\u007F-\\u009F]+$"},"type":{"enum":["must_have","must_not","scored"]},"primitive":{"$ref":"#/components/schemas/CriterionPrimitive"},"judge_tier":{"enum":[1,2,3]},"metric":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\u0000-\\u001F\\u007F-\\u009F]+$"},"threshold":{"anyOf":[{"type":"number"},{"type":"string","minLength":1,"maxLength":200,"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$"}]},"weight":{"type":"number","exclusiveMinimum":0},"evidence_source":{"type":"string","minLength":1,"maxLength":500},"trust_tier":{"type":"string","minLength":1,"maxLength":100},"window":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"object"}]},"required_precision":{"type":"string","minLength":1,"maxLength":100},"confidence_threshold":{"type":"number","minimum":0,"maximum":1},"reference_set_id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"config":{"type":"object"}}}},"wording_fingerprint":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$"}}},"RoleBlob":{"description":"A role payload: free text, or a structured object (canonicalized for hashing/display).","oneOf":[{"type":"string"},{"type":"object","additionalProperties":true}]},"RoleAttachment":{"type":"object","description":"A labeled attachment inside context[]/evidence[].","properties":{"label":{"type":"string","maxLength":256,"description":"Optional human label, e.g. \"source\", \"retrieved-passage-1\"."},"type":{"type":"string","maxLength":256,"description":"Optional content/type hint."},"value":{"$ref":"#/components/schemas/RoleBlob"},"trust_tier":{"$ref":"#/components/schemas/TrustTier"},"source_id":{"type":["string","null"],"format":"uuid"},"evidence_packet_id":{"type":"string","format":"uuid"}},"required":["value"],"additionalProperties":false},"InlineSubmission":{"type":"object","description":"Legacy/simple submission: the work to judge, inline. UNCHANGED — every existing caller keeps working verbatim.","properties":{"inline":{"type":"string","description":"The submission content (≤ 512 KiB)."},"content_type":{"type":"string","maxLength":256}},"required":["inline"],"additionalProperties":false},"UriSubmission":{"type":"object","description":"Stored-by-reference submission. UNCHANGED. The API never fetches tenant uris on the request path (https:// or r2://; ≤ 2048 chars; no embedded credentials).","properties":{"uri":{"type":"string","maxLength":2048,"description":"https:// or r2:// reference."},"content_type":{"type":"string","maxLength":256}},"required":["uri"],"additionalProperties":false},"TypedSubmission":{"type":"object","description":"Contract 05 typed roles (all OPTIONAL except output-or-its-alias). The judge receives each role LABELED. Back-compat: if `output` is absent but the legacy `content` or `text` is present, it is treated AS `output`.","properties":{"input":{"$ref":"#/components/schemas/RoleBlob","description":"What was ASKED — the question/instruction/task the output answered."},"output":{"$ref":"#/components/schemas/RoleBlob","description":"REQUIRED (or its alias content/text) — the thing being JUDGED."},"content":{"$ref":"#/components/schemas/RoleBlob","deprecated":true,"description":"Legacy alias for `output` (used only when `output` is absent)."},"text":{"$ref":"#/components/schemas/RoleBlob","deprecated":true,"description":"Legacy alias for `output` (used only when `output` is absent)."},"context":{"type":"array","items":{"$ref":"#/components/schemas/RoleAttachment"},"description":"The AUTHORITATIVE source(s) the output is judged AGAINST. Faithfulness/grounding criteria treat claims un-grounded in (or contradicted by) the context as violations."},"reference":{"$ref":"#/components/schemas/RoleBlob","description":"The EXPECTED / gold answer to compare against, when supplied."},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/RoleAttachment"},"description":"Other supporting material — rendered NON-authoritative (weighed, but not ground truth)."},"values":{"type":"object","additionalProperties":true,"description":"Structured fields for deterministic numeric/json checks."},"content_type":{"type":"string","maxLength":256}},"anyOf":[{"required":["output"]},{"required":["content"]},{"required":["text"]}],"additionalProperties":false},"Submission":{"description":"A submission is ONE of: {inline} (simple text — unchanged), {uri} (stored-by-reference — unchanged), or the Contract 05 typed roles object (input/output/context/reference/evidence/values). The typed variant is fully additive: existing {inline}/{uri} callers are not affected.","oneOf":[{"$ref":"#/components/schemas/InlineSubmission"},{"$ref":"#/components/schemas/UriSubmission"},{"$ref":"#/components/schemas/TypedSubmission"}]},"VerifyOptions":{"type":"object","properties":{"max_judge_tier":{"type":"integer","enum":[1,2,3],"description":"Cap the judge tier for this request."},"require_proof":{"type":"boolean","default":true},"wait_ms":{"type":"integer","minimum":0,"maximum":60000,"description":"Bounded-sync opt-in: block up to wait_ms for the finished verdict, else fall back to 202."},"escalation":{"type":"object","properties":{"destination":{"type":"string","enum":["own_reviewers","acretix_review","none"]}},"required":["destination"],"additionalProperties":false,"description":"Request an escalation destination for this verification; availability is checked server-side."}},"additionalProperties":false},"VerifyRequest":{"type":"object","description":"POST /v1/verify request. `rubric_id` is required (compile rubrics first via POST /v1/rubrics). Idempotency is a header (`Idempotency-Key`), not a body field.","properties":{"rubric_id":{"type":"string","format":"uuid"},"submission":{"$ref":"#/components/schemas/Submission"},"reference_set_id":{"type":"string","format":"uuid"},"caller_attested_identity_rung":{"type":"string","enum":["unverified","email_verified","domain_distinct","payment_verified","entity_verified"],"description":"A caller attestation of the asserting tenant's identity level, recorded as sent and never verified. The survival stream keeps it only from the Deals project tenant and stores unverified for every other caller."},"identity_rung":{"type":"string","enum":["unverified","email_verified","domain_distinct","payment_verified","entity_verified"],"deprecated":true,"description":"Deprecated alias of caller_attested_identity_rung; sunset 2027-01-14. Sending both is refused with invalid_identity_rung."},"options":{"$ref":"#/components/schemas/VerifyOptions"},"callback_url":{"type":"string","format":"uri","description":"Optional per-request override of the registered webhook endpoints."},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["pull_request","task","deal_criterion"]},"ref":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","ref"],"additionalProperties":false}},"required":["rubric_id","submission"],"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"}},"required":["id","url","created_at"],"additionalProperties":false},"WebhookEndpointCreated":{"type":"object","description":"The signing secret is returned only by this registration response and cannot be retrieved later.","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"Signing secret shown once; store it securely."}},"required":["id","url","created_at","secret"],"additionalProperties":false},"WebhookEndpointList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["data"],"additionalProperties":false},"WebhookEndpointRegisterRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false},"EscalationSettings":{"type":"object","description":"One version of a project's escalation settings. Every change is kept as a new version.","properties":{"version":{"type":"integer","minimum":1},"destination":{"type":"string","enum":["own_reviewers","acretix_review","none"]},"confidence_threshold":{"type":["number","null"],"minimum":0,"maximum":1},"review_limit_cents":{"type":["integer","null"],"minimum":1},"changed_by_kind":{"type":"string","enum":["console_account","api_key"]},"created_at":{"type":"string","format":"date-time"}},"required":["version","destination","confidence_threshold","review_limit_cents","changed_by_kind","created_at"],"additionalProperties":false},"EscalationSettingsResponse":{"type":"object","description":"The current version of a project's versioned escalation settings; every change is kept.","properties":{"settings":{"anyOf":[{"$ref":"#/components/schemas/EscalationSettings"},{"type":"null"}]}},"required":["settings"],"additionalProperties":false},"EscalationSettingsUpdate":{"type":"object","description":"A new version of a project's escalation settings. Every change is kept as a new version.","properties":{"destination":{"type":"string","enum":["own_reviewers","acretix_review","none"]},"confidence_threshold":{"type":["number","null"],"minimum":0,"maximum":1},"review_limit_cents":{"type":["integer","null"],"minimum":1}},"required":["destination"],"additionalProperties":false},"RubricIssue":{"type":"object","description":"Compiler issue for an authored rubric spec.","properties":{"severity":{"type":"string","enum":["error","warning"]},"code":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}},"required":["severity","code","path","message"],"additionalProperties":false},"RubricCompilePreview":{"description":"Non-registering compile preview for rubric authoring.","oneOf":[{"type":"object","properties":{"ok":{"const":true},"hash":{"type":"string","description":"rubric_hash: sha-256 of the canonical compiled rubric spec."},"source_hash":{"type":"string","description":"sha-256 of the canonical authored rubric spec."},"issues":{"type":"array","items":{"$ref":"#/components/schemas/RubricIssue"}}},"required":["ok","hash","source_hash","issues"],"additionalProperties":false},{"type":"object","properties":{"ok":{"const":false},"issues":{"type":"array","items":{"$ref":"#/components/schemas/RubricIssue"}}},"required":["ok","issues"],"additionalProperties":false}]},"RubricExamplesRequest":{"type":"object","description":"Run up to five marked submissions against a newly stored draft rubric version.","properties":{"spec":{"type":"object","description":"Authored rubric specification to compile and store as a draft."},"examples":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"mark":{"type":"string","enum":["should_pass","should_fail"]},"submission":{"$ref":"#/components/schemas/Submission"}},"required":["label","mark","submission"],"additionalProperties":false}}},"required":["spec","examples"],"additionalProperties":false},"RubricExamplesResult":{"type":"object","properties":{"rubric":{"type":"object","properties":{"rubric_id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1},"hash":{"type":"string"},"status":{"const":"draft"}},"required":["rubric_id","version","hash","status"],"additionalProperties":false},"examples":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"label":{"type":"string"},"mark":{"type":"string","enum":["should_pass","should_fail"]},"verification_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/VerificationStatus"},"determination":{"oneOf":[{"$ref":"#/components/schemas/Determination"},{"type":"null"}]},"criteria":{"type":"array","items":{"type":"object","properties":{"criterion_id":{"type":"string","format":"uuid"},"determination":{"$ref":"#/components/schemas/Determination"}},"required":["criterion_id","determination"],"additionalProperties":false}},"outcome":{"type":"string","enum":["agrees","contradicts","undetermined"]}},"required":["index","label","mark","verification_id","status","determination","criteria","outcome"],"additionalProperties":false}}},"required":["rubric","examples"],"additionalProperties":false},"RubricSummary":{"type":"object","description":"Compact rubric row in the list surface (no spec body / criteria).","properties":{"rubric_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"version":{"type":"integer","minimum":1},"rubric_hash":{"type":"string","description":"sha-256 of the canonical compiled rubric spec."},"hash":{"type":"string","description":"Alias of rubric_hash."},"source_hash":{"type":["string","null"],"description":"sha-256 of the canonical authored spec."},"rubric_format_version":{"type":"string","description":"The rubric format version the rubric was written in; 1.0 for every rubric so far."},"status":{"type":"string"},"created_at":{"type":"string"}},"required":["rubric_id","name","version","rubric_hash","hash","status","created_at"],"additionalProperties":false},"RubricList":{"type":"object","description":"GET /v1/rubrics — the tenant's rubrics, latest version per name, newest first.","properties":{"rubrics":{"type":"array","items":{"$ref":"#/components/schemas/RubricSummary"}},"limit":{"type":["integer","null"],"description":"Echo of the requested page size (clamped to [1,100])."},"offset":{"type":["integer","null"],"description":"Echo of the requested offset."}},"required":["rubrics"],"additionalProperties":false},"RubricTemplate":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"spec":{"type":"object"}},"required":["slug","label","description","spec"],"additionalProperties":false},"RubricTemplateList":{"type":"object","properties":{"tenant_id":{"type":"string"},"templates":{"type":"array","items":{"$ref":"#/components/schemas/RubricTemplate"}}},"required":["tenant_id","templates"],"additionalProperties":false},"InductionExample":{"type":"object","description":"One labeled outcome example. The labels are the canonical Determination values.","properties":{"id":{"type":"string","maxLength":128,"description":"Stable id used in the explained/unexplained report (defaults to the array index)."},"output":{"$ref":"#/components/schemas/RoleBlob","description":"REQUIRED — the work that was judged."},"input":{"$ref":"#/components/schemas/RoleBlob","description":"What was asked."},"context":{"description":"Authoritative source(s) the output was judged against.","oneOf":[{"$ref":"#/components/schemas/RoleBlob"},{"type":"array","items":{"$ref":"#/components/schemas/RoleAttachment"}}]},"reference":{"$ref":"#/components/schemas/RoleBlob","description":"Expected / gold answer, when supplied."},"evidence":{"description":"Supporting material (non-authoritative).","oneOf":[{"$ref":"#/components/schemas/RoleBlob"},{"type":"array","items":{"$ref":"#/components/schemas/RoleAttachment"}}]},"values":{"type":"object","additionalProperties":true,"description":"Structured fields for deterministic checks."},"label":{"$ref":"#/components/schemas/Determination"},"rationale":{"type":"string","maxLength":600,"description":"Why this example earned its label."}},"required":["output","label"],"additionalProperties":false},"RubricFromOutcomesRequest":{"type":"object","description":"POST /v1/rubrics/from-outcomes request. Drafts + compiles an AUTHORED rubric spec from at least 3 labeled outcome examples; it does NOT register a version (compile + version with POST /v1/rubrics). Examples are treated as data, never as instructions.","properties":{"examples":{"type":"array","minItems":3,"items":{"$ref":"#/components/schemas/InductionExample"},"description":"At least 3 labeled examples."},"goal":{"type":"string","maxLength":500,"description":"Optional plain-language description of what a good output looks like."},"options":{"type":"object","properties":{"max_criteria":{"type":"integer","minimum":1,"maximum":20},"prefer_primitives":{"type":"boolean","description":"Prefer a deterministic primitive (e.g. regex) when the labels separate cleanly."},"judge_tier_hint":{"type":"integer","enum":[1,2,3]}},"additionalProperties":false}},"required":["examples"],"additionalProperties":false},"RubricFromDescriptionRequest":{"type":"object","description":"Draft an authored rubric spec from a natural-language description.","properties":{"description":{"type":"string","minLength":1,"maxLength":4000},"options":{"type":"object","properties":{"max_criteria":{"type":"integer","minimum":1,"maximum":20},"prefer_primitives":{"type":"boolean"},"judge_tier_hint":{"type":"integer","enum":[1,2,3]}},"additionalProperties":false}},"required":["description"],"additionalProperties":false},"RubricFromDescriptionResult":{"type":"object","description":"A compiled, unregistered description-induced rubric draft for human review.","properties":{"rubric_spec":{"$ref":"#/components/schemas/RubricSpec"},"compile":{"type":"object","properties":{"ok":{"type":"boolean"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/RubricIssue"}},"rubric_hash":{"type":"string"},"source_hash":{"type":"string"}},"required":["ok","issues"],"additionalProperties":false},"induction":{"type":"object","properties":{"model":{"type":"string"},"prompt_version":{"type":"string"},"source":{"type":"string","enum":["description"]},"per_criterion":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"confidence":{"type":"number"}},"required":["key"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["model","prompt_version","source","per_criterion","warnings"],"additionalProperties":false},"lint":{"type":"object","properties":{"passes_a3":{"type":"boolean"},"linter":{"type":"string","enum":["authoring-quality-linter@a3"]},"warnings":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["passes_a3","linter","warnings"],"additionalProperties":false},"draft":{"type":"object","properties":{"status":{"type":"string","enum":["draft"]},"bound":{"type":"boolean","enum":[false]},"publishable":{"type":"boolean"},"publish_via":{"type":"string","enum":["POST /v1/rubrics"]}},"required":["status","bound","publishable","publish_via"],"additionalProperties":false}},"required":["rubric_spec","compile","induction","lint","draft"],"additionalProperties":false},"RubricInductionResult":{"type":"object","description":"A drafted, compiled (but unregistered) authored rubric spec plus the induction report.","properties":{"rubric_spec":{"$ref":"#/components/schemas/RubricSpec","description":"The authored RubricSpec — feed this to POST /v1/rubrics to register a version."},"compile":{"type":"object","properties":{"ok":{"type":"boolean"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/RubricIssue"}},"rubric_hash":{"type":"string"},"source_hash":{"type":"string"}},"required":["ok","issues"]},"induction":{"type":"object","properties":{"model":{"type":"string"},"prompt_version":{"type":"string"},"per_criterion":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"explains_example_ids":{"type":"array","items":{"type":"string"}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["key","explains_example_ids"]}},"unexplained_example_ids":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["model","prompt_version","per_criterion","unexplained_example_ids","warnings"]}},"required":["rubric_spec","compile","induction"]},"Determination":{"type":"string","enum":["met","partial","not_met","cannot_determine"]},"VerificationStatus":{"type":"string","enum":["queued","running","succeeded","failed"]},"TrustTier":{"type":"string","enum":["deterministic","source_attested","third_party","claimant"],"description":"Contract 12 evidence trust tier: T0 deterministic, T1 source_attested, T2 third_party, T3 claimant."},"EvidenceCitation":{"type":"object","properties":{"source":{"type":"string","description":"\"submission\", \"reference:<id>\", or \"evidence:<label>\"."},"locator":{"type":"string"},"snippet":{"type":"string"},"trust_tier":{"$ref":"#/components/schemas/TrustTier"},"source_id":{"type":["string","null"],"format":"uuid"}},"required":["source"]},"CriterionResult":{"type":"object","properties":{"criterion_id":{"type":"string","format":"uuid"},"primitive":{"type":"string","description":"e.g. \"llm_judge@1\", \"regex_match@1\"."},"determination":{"$ref":"#/components/schemas/Determination"},"score":{"type":["number","null"],"minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1},"rationale":{"type":"string"},"evidence_spans":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceCitation"}},"value_assessed":{"type":["number","null"]},"flagged":{"type":"boolean","description":"needs_review — set when outside the acceptance frontier."},"model":{"type":"object","description":"the model that produced this criterion's result, and the judge code version","properties":{"id":{"type":"string"},"judge_code_version":{"type":["string","null"]}},"required":["id","judge_code_version"]}},"required":["criterion_id","primitive","determination","confidence","rationale"]},"Verdict":{"type":"object","properties":{"determination":{"$ref":"#/components/schemas/Determination"},"score":{"type":["number","null"],"minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1},"flagged":{"type":"boolean"},"flag_reason":{"type":["string","null"]},"results":{"type":"array","items":{"$ref":"#/components/schemas/CriterionResult"}}},"required":["determination","confidence","results"]},"VerifyAccepted":{"type":"object","description":"202 body (async default).","properties":{"verification_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/VerificationStatus"},"key_mode":{"type":["string","null"],"enum":["live","test",null],"description":"S-169 part MARK: test when a test key submitted this verification, live for a live key, null when no key was recorded or it was recorded before key modes were stored. Server-recorded; never client-supplied."}},"required":["verification_id","status"]},"QuickstartTelemetryRequest":{"type":"object","description":"Guided developer quickstart timing input. The API derives key_prefix from the bearer key; clients must not send key material, tenant ids, account labels, or PII.","properties":{"handle":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{5,63}$","description":"De-identified run handle generated by the console."},"started_at":{"type":"string","format":"date-time"},"first_verdict_at":{"type":"string","format":"date-time"}},"required":["handle","started_at","first_verdict_at"],"additionalProperties":false},"QuickstartTelemetry":{"type":"object","description":"Append-only, tenant-scoped time-to-first-verdict telemetry. Contains only handle, key prefix, and timing metadata.","properties":{"handle":{"type":"string"},"key_prefix":{"type":"string","pattern":"^avk_[A-Za-z0-9_-]{8}$"},"started_at":{"type":"string","format":"date-time"},"first_verdict_at":{"type":"string","format":"date-time"},"first_verdict_ms":{"type":"integer","minimum":0,"maximum":86400000},"created_at":{"type":"string","format":"date-time"}},"required":["handle","key_prefix","started_at","first_verdict_at","first_verdict_ms","created_at"]},"QuickstartTelemetryEnvelope":{"type":"object","properties":{"telemetry":{"oneOf":[{"$ref":"#/components/schemas/QuickstartTelemetry"},{"type":"null"}]}},"required":["telemetry"]},"SourceAttestedEvidenceRequest":{"type":"object","description":"Staging source-attested evidence ingestion. The source signs the canonical payload with its registered Ed25519 key. Bad or unverifiable signatures ingest as claimant tier (T3).","properties":{"source_id":{"type":"string","format":"uuid"},"payload":{"description":"Evidence payload signed by the source.","$ref":"#/components/schemas/RoleBlob"},"signature":{"type":"string","maxLength":2048,"description":"Detached Ed25519 signature over canonical JSON payload bytes."},"signature_encoding":{"type":"string","enum":["base64","hex"],"default":"base64"},"label":{"type":"string","maxLength":256},"locator":{"type":"string","maxLength":512},"content_type":{"type":"string","maxLength":256}},"required":["source_id","payload","signature"],"additionalProperties":false},"SourceAttestedEvidenceResponse":{"type":"object","properties":{"evidence_packet_id":{"type":"string","format":"uuid"},"content_hash":{"type":"string"},"payload_uri":{"type":["string","null"]},"trust_tier":{"$ref":"#/components/schemas/TrustTier"},"trust_tier_label":{"type":"string"},"source_id":{"type":["string","null"],"format":"uuid"},"signature_verified":{"type":"boolean"},"downgrade_reason":{"type":["string","null"]},"evidence":{"$ref":"#/components/schemas/RoleAttachment"}},"required":["evidence_packet_id","content_hash","trust_tier","signature_verified","evidence"]},"EvidenceFileUploadResponse":{"type":"object","properties":{"evidence_packet_id":{"type":"string","format":"uuid"},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":1},"content_type":{"type":"string","enum":["text/plain","text/markdown","text/csv","application/json","application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","image/png","image/jpeg"]}},"required":["evidence_packet_id","content_hash","size_bytes","content_type"],"additionalProperties":false},"VerificationObject":{"type":"object","description":"The verification resource (GET /v1/verifications/{id}, and the bounded-sync 200 body).","properties":{"id":{"type":"string","format":"uuid"},"tenant_id":{"type":"string","format":"uuid","description":"Server-resolved owning tenant for INV-1 echo checks."},"caller_attested_identity_rung":{"type":["string","null"],"enum":["unverified","email_verified","domain_distinct","payment_verified","entity_verified",null],"description":"A caller attestation of the asserting tenant identity level, as sent on POST /v1/verify, or null when none was sent. Acretix never verifies it, and no proof carries it."},"submitted_by":{"type":["object","null"],"description":"The API key that submitted this verification, recorded by the server at submission. For an agent key, authorized_by names the person who authorized it. Null when no key was recorded.","properties":{"api_key_id":{"type":"string","format":"uuid"},"kind":{"type":["string","null"],"enum":["project","agent",null]},"authorized_by":{"type":["string","null"]}},"required":["api_key_id","kind","authorized_by"],"additionalProperties":false},"key_mode":{"type":["string","null"],"enum":["live","test",null],"description":"S-169 part MARK: test when a test key submitted this verification, live for a live key, null when no key was recorded or it was recorded before key modes were stored. Server-recorded; never client-supplied."},"status":{"$ref":"#/components/schemas/VerificationStatus"},"rubric_id":{"type":"string","format":"uuid"},"submission_hash":{"type":"string","description":"sha-256 of the canonical submission (the typed form binds output AND the context it was judged against)."},"determination":{"type":["string","null"],"enum":["met","partial","not_met","cannot_determine",null]},"score":{"type":["number","null"]},"confidence":{"type":["number","null"]},"flagged":{"type":"boolean"},"flag_reason":{"type":["string","null"]},"verdict":{"oneOf":[{"$ref":"#/components/schemas/Verdict"},{"type":"null"}]},"proof_ref":{"type":["string","null"]},"error":{"type":["string","null"]},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]},"criteria_provenance":{"type":"object","description":"S-310 part PROOF: whether this deal-criterion delivery's criteria were agreed by both parties.","properties":{"line":{"type":"string","enum":["criteria agreed by both parties","criteria set by one party"]},"verdict_ref":{"type":["string","null"]}},"required":["line","verdict_ref"],"additionalProperties":false},"escalation":{"type":"object","description":"S-1401: the escalation opened for this verification, when one exists.","properties":{"id":{"type":"string","format":"uuid"},"trigger":{"type":"string","enum":["cannot_determine","below_threshold"]},"threshold":{"type":["number","null"]},"confidence":{"type":["number","null"]},"open_criteria":{"type":"array","items":{"type":"string"}},"destination":{"type":"string","enum":["own_reviewers","acretix_review"]},"set_by":{"type":"string","enum":["project","request"]},"stage":{"type":["string","null"],"enum":["panel","human",null]},"state":{"type":"string","enum":["open","decided","undecided"]},"due_at":{"type":["string","null"]}},"required":["id","trigger","threshold","confidence","open_criteria","destination","set_by","stage","state","due_at"],"additionalProperties":false},"current_verdict":{"type":"object","description":"S-230 item 4: when present, this is the current verdict; determination and verdict remain the point-in-time original.","properties":{"source":{"type":"string","enum":["escalation"]},"escalation_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["decided","undecided"]},"determination":{"type":"string","enum":["met","partial","not_met","cannot_determine"]},"closing_judgment_id":{"type":"string","format":"uuid"},"closed_at":{"type":"string"}},"required":["source","escalation_id","status","determination","closing_judgment_id","closed_at"],"additionalProperties":false},"attempt":{"type":"object","properties":{"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["pull_request","task","deal_criterion"]},"ref":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","ref"],"additionalProperties":false},"number":{"type":"integer","minimum":1},"of":{"type":"integer","minimum":1},"earlier":{"type":"array","items":{"type":"object","properties":{"verification_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/VerificationStatus"},"determination":{"type":["string","null"],"enum":["met","partial","not_met","cannot_determine",null]},"created_at":{"type":"string"}},"required":["verification_id","status","determination","created_at"],"additionalProperties":false}}},"required":["subject","number","of","earlier"],"additionalProperties":false}},"required":["id","status","rubric_id","submission_hash","flagged","created_at"]},"VerificationListItem":{"type":"object","description":"Compact verification row for the tenant-scoped explorer.","properties":{"id":{"type":"string","format":"uuid"},"tenant_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/VerificationStatus"},"rubric_id":{"type":"string","format":"uuid"},"submission_hash":{"type":"string"},"determination":{"type":["string","null"],"enum":["met","partial","not_met","cannot_determine",null]},"score":{"type":["number","null"]},"confidence":{"type":["number","null"]},"flagged":{"type":"boolean"},"flag_reason":{"type":["string","null"]},"proof_ref":{"type":["string","null"]},"error":{"type":["string","null"]},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]}},"required":["id","tenant_id","status","rubric_id","submission_hash","flagged","created_at"]},"VerificationList":{"type":"object","description":"Tenant-scoped verification explorer. The top-level tenant_id is the load-bearing echo check.","properties":{"tenant_id":{"type":"string","format":"uuid"},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0},"filters":{"type":"object","additionalProperties":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/VerificationListItem"}}},"required":["tenant_id","limit","offset","filters","items"]},"FeedbackRequest":{"type":"object","description":"Tenant ground-truth on a completed verification (append-only; feeds calibration, never changes the signed verdict).","properties":{"outcome":{"type":"string","enum":["confirmed_correct","confirmed_wrong","disputed"],"description":"The tenant's verdict on the verification."},"note":{"type":["string","null"],"maxLength":2000,"description":"Optional free-text note."}},"required":["outcome"],"additionalProperties":false},"FeedbackAccepted":{"type":"object","description":"201 body — the recorded feedback.","properties":{"feedback_id":{"type":"string","format":"uuid"},"verification_id":{"type":"string","format":"uuid"},"outcome":{"type":"string","enum":["confirmed_correct","confirmed_wrong","disputed"]}},"required":["feedback_id","verification_id","outcome"]},"CockpitDeterminationRequest":{"type":"object","description":"Customer reviewer determination. decided_by and ts are server-populated from the proven C11 subject.","properties":{"verification_id":{"type":"string","format":"uuid"},"decision":{"type":"string","enum":["accept","override","route"]},"reason":{"type":["string","null"],"maxLength":4000}},"required":["verification_id","decision"],"additionalProperties":false},"CriteriaJudgmentRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["propose","accept"]},"party":{"type":"string","enum":["proposer_side","other_side"]},"judge_id":{"type":"string","pattern":"^judge_[0-9a-f]{16}$","deprecated":true,"description":"Ignored. The judge id is derived on the server from the authenticated principal (S-310 part C)."},"rubric_version":{"type":"string","minLength":1,"maxLength":200},"identity_rung":{"type":"string","enum":["unverified","email_verified","domain_distinct","payment_verified","entity_verified"],"description":"Ignored. The stored level is derived on the server."}},"required":["kind","party","rubric_version","identity_rung"],"additionalProperties":false},"CriteriaJudgment":{"type":"object","properties":{"seq":{"type":"integer"},"kind":{"type":"string","enum":["propose","accept"]},"party":{"type":"string","enum":["proposer_side","other_side"]},"judge_id":{"type":"string"},"rubric_version":{"type":"string"},"rule_version":{"type":"string","const":"criteria-agreement@1"},"judged_at":{"type":"string","format":"date-time"}},"required":["seq","kind","party","judge_id","rubric_version","rule_version","judged_at"],"additionalProperties":false},"CriteriaChangeRequest":{"type":"object","properties":{"seq":{"type":"integer"},"party":{"const":"other_side"},"judge_id":{"type":"string"},"rubric_version":{"type":"string"},"request":{"type":"string"},"judged_at":{"type":"string","format":"date-time"}},"required":["seq","party","judge_id","rubric_version","request","judged_at"],"additionalProperties":false},"CriteriaAgreement":{"oneOf":[{"type":"object","properties":{"status":{"const":"agreed"},"rubricVersion":{"type":"string"},"ruleVersion":{"const":"criteria-agreement@1"},"judgeIds":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"verdictRef":{"type":"string"}},"required":["status","rubricVersion","ruleVersion","judgeIds","verdictRef"],"additionalProperties":false},{"type":"object","properties":{"status":{"const":"not_agreed"},"reason":{"type":"string","enum":["never_sent","awaiting_acceptance"]}},"required":["status","reason"],"additionalProperties":false}]},"CriteriaJudgmentsResponse":{"type":"object","properties":{"tenant_id":{"type":"string","format":"uuid","description":"The caller's own tenant, resolved from the API key."},"subject_ref":{"type":"string"},"rule_version":{"const":"criteria-agreement@1"},"judgments":{"type":"array","items":{"$ref":"#/components/schemas/CriteriaJudgment"}},"agreement":{"$ref":"#/components/schemas/CriteriaAgreement"},"change_requests":{"type":"array","items":{"$ref":"#/components/schemas/CriteriaChangeRequest"}}},"required":["tenant_id","subject_ref","rule_version","judgments","agreement","change_requests"],"additionalProperties":false},"CriteriaJudgmentCreatedResponse":{"type":"object","properties":{"judgment":{"$ref":"#/components/schemas/CriteriaJudgment"},"agreement":{"$ref":"#/components/schemas/CriteriaAgreement"}},"required":["judgment","agreement"],"additionalProperties":false},"CriteriaContest":{"type":"object","properties":{"escalation_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"opened_at":{"type":"string","format":"date-time"},"determination":{"type":["string","null"]},"reasons":{"type":["object","null"],"additionalProperties":{"type":"string"}},"decided_at":{"type":["string","null"],"format":"date-time"}},"required":["escalation_id","status","opened_at","determination","reasons","decided_at"],"additionalProperties":false},"CriteriaContestsResponse":{"type":"object","properties":{"tenant_id":{"type":"string","format":"uuid","description":"The tenant stored on this subject contest rows; the caller own tenant when there are none."},"subject_ref":{"type":"string"},"contests":{"type":"array","items":{"$ref":"#/components/schemas/CriteriaContest"}}},"required":["tenant_id","subject_ref","contests"],"additionalProperties":false},"CriteriaLinkAddressRequest":{"type":"object","properties":{"link":{"type":"string","minLength":1,"maxLength":4096},"subject_ref":{"type":"string"}},"required":["link","subject_ref"],"additionalProperties":false},"CriteriaLinkAddressResponse":{"type":"object","properties":{"tenant_id":{"type":"string"},"counterparty_ref":{"type":"string"},"address":{"type":"string"}},"required":["tenant_id","counterparty_ref","address"],"additionalProperties":false},"CriteriaLinkViewRequest":{"type":"object","properties":{"link":{"type":"string","minLength":1,"maxLength":4096},"subject_ref":{"type":"string"}},"required":["link","subject_ref"],"additionalProperties":false},"CriteriaLinkDelivery":{"type":"object","properties":{"verification_id":{"type":"string","format":"uuid"},"verdict":{"type":"string","enum":["met","partial","not_met","cannot_determine"]},"completed_at":{"type":"string","format":"date-time"}},"required":["verification_id","verdict","completed_at"],"additionalProperties":false},"CriteriaLinkViewResponse":{"type":"object","properties":{"subject_ref":{"type":"string"},"rubric_version":{"type":"string"},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/CriteriaLinkDelivery"}}},"required":["subject_ref","rubric_version","deliveries"],"additionalProperties":false},"CriteriaLinkCriteriaRequest":{"type":"object","properties":{"link":{"type":"string","minLength":1,"maxLength":4096},"subject_ref":{"type":"string"}},"required":["link","subject_ref"],"additionalProperties":false},"CriteriaLinkCriterion":{"type":"object","properties":{"criterion_key":{"type":"string"},"name":{"type":"string"},"primitive":{"type":"string"},"threshold":{"type":["string","number","null"]},"weight":{"type":"number"}},"required":["criterion_key","name","primitive","threshold","weight"],"additionalProperties":false},"CriteriaLinkCriteriaResponse":{"type":"object","properties":{"subject_ref":{"type":"string"},"rubric_id":{"type":"string","format":"uuid"},"rubric_name":{"type":"string"},"rubric_version":{"type":"string"},"criteria":{"type":"array","items":{"$ref":"#/components/schemas/CriteriaLinkCriterion"}},"agreement_state":{"type":"string","enum":["proposed","accepted","superseded"]}},"required":["subject_ref","rubric_id","rubric_name","rubric_version","criteria","agreement_state"],"additionalProperties":false},"CriteriaLinkAcceptRequest":{"type":"object","properties":{"link":{"type":"string","minLength":1,"maxLength":4096},"subject_ref":{"type":"string"},"judge_ref":{"type":"string","minLength":1,"maxLength":128},"rubric_version":{"type":"string","minLength":1,"maxLength":200}},"required":["link","subject_ref","judge_ref","rubric_version"],"additionalProperties":false},"CriteriaLinkAcceptResponse":{"type":"object","properties":{"subject_ref":{"type":"string"},"rubric_version":{"type":"string"},"judgment_seq":{"type":"integer"},"agreement_state":{"type":"string","enum":["proposed","accepted","superseded"]}},"required":["subject_ref","rubric_version","judgment_seq","agreement_state"],"additionalProperties":false},"CriteriaLinkChangeRequest":{"type":"object","properties":{"link":{"type":"string","minLength":1,"maxLength":4096},"subject_ref":{"type":"string"},"judge_ref":{"type":"string","minLength":1,"maxLength":128},"rubric_version":{"type":"string","minLength":1,"maxLength":200},"request":{"type":"string","minLength":1,"maxLength":2000}},"required":["link","subject_ref","judge_ref","rubric_version","request"],"additionalProperties":false},"CriteriaLinkChangeResponse":{"type":"object","properties":{"subject_ref":{"type":"string"},"rubric_version":{"type":"string"},"judgment_seq":{"type":"integer"},"change_requested":{"type":"boolean","const":true}},"required":["subject_ref","rubric_version","judgment_seq","change_requested"],"additionalProperties":false},"CriteriaLinkContestRequest":{"type":"object","properties":{"link":{"type":"string","minLength":1,"maxLength":4096},"subject_ref":{"type":"string"},"judge_ref":{"type":"string","minLength":1,"maxLength":128},"criterion_id":{"type":["string","null"]},"reason":{"type":"string","minLength":1,"maxLength":2000},"file_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["link","subject_ref","judge_ref","criterion_id","reason"],"additionalProperties":false},"CriteriaLinkContestResponse":{"type":"object","properties":{"subject_ref":{"type":"string"},"judgment_seq":{"type":"integer"},"attempt":{"type":"integer","minimum":1},"escalation_id":{"type":"string"}},"required":["subject_ref","judgment_seq","attempt","escalation_id"],"additionalProperties":false},"CriteriaLinkContestAlreadyFiledResponse":{"type":"object","properties":{"subject_ref":{"type":"string"},"judgment_seq":{"type":"integer"},"attempt":{"type":"integer","minimum":1},"escalation_id":{"type":"string"},"already_filed":{"type":"boolean","const":true}},"required":["subject_ref","judgment_seq","attempt","escalation_id","already_filed"],"additionalProperties":false},"CriteriaLinkContestConflictProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"escalation_id":{"type":"string"},"judgment_seq":{"type":"integer"},"attempt":{"type":"integer","minimum":1}}}]},"CockpitDeterminationResponse":{"type":"object","properties":{"tenant_id":{"type":"string","format":"uuid"},"review_decision":{"type":"object","properties":{"verification_id":{"type":"string","format":"uuid"},"tenant_id":{"type":"string","format":"uuid"},"decision":{"type":"string","enum":["accept","override","route"]},"reason":{"type":["string","null"]},"decided_by":{"type":"string"},"ts":{"type":"string"}},"required":["verification_id","tenant_id","decision","reason","decided_by","ts"]},"writeback":{"type":"object","properties":{"status":{"type":"string","enum":["recorded"]},"consequence":{"type":"string","enum":["accept_verdict","override_verdict","route_for_review"]}},"required":["status","consequence"]}},"required":["tenant_id","review_decision","writeback"]},"CockpitReviewerGrantRequest":{"type":"object","description":"One named customer_reviewer grant or revoke. The tenant is server-resolved from the C11 session.","properties":{"reviewer_subject":{"type":"string","minLength":1,"maxLength":256},"active":{"type":"boolean","description":"true grants; false revokes an existing grant."},"tenant_id":{"type":"string","format":"uuid","description":"Optional session-tenant guard; another tenant is refused."}},"required":["reviewer_subject","active"],"additionalProperties":false},"CockpitReviewerGrant":{"type":"object","properties":{"tenant_id":{"type":"string","format":"uuid"},"reviewer_subject":{"type":"string"},"active":{"type":"boolean"},"granted_by":{"type":["string","null"]},"granted_at":{"type":["string","null"],"format":"date-time"},"revoked_by":{"type":["string","null"]},"revoked_at":{"type":["string","null"],"format":"date-time"}},"required":["tenant_id","reviewer_subject","active","granted_by","granted_at","revoked_by","revoked_at"]},"CockpitReviewerStatus":{"type":"object","properties":{"tenant_id":{"type":"string","format":"uuid"},"account_id":{"type":"string"},"has_reviewer_role":{"type":"boolean"},"is_owner":{"type":"boolean"},"granted_by":{"type":["string","null"]},"granted_at":{"type":["string","null"],"format":"date-time"},"grantable_by":{"type":"string","enum":["the tenant owner"]},"reviewers":{"type":"array","items":{"$ref":"#/components/schemas/CockpitReviewerHistoryItem"}},"history_truncated":{"type":"boolean"}},"required":["tenant_id","account_id","has_reviewer_role","is_owner","granted_by","granted_at","grantable_by"]},"CockpitReviewerHistoryItem":{"type":"object","properties":{"reviewer_subject":{"type":"string"},"holds_role":{"type":"boolean"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/CockpitReviewerHistoryEntry"}}},"required":["reviewer_subject","holds_role","entries"]},"CockpitReviewerHistoryEntry":{"type":"object","properties":{"entry_id":{"type":"string"},"act":{"type":"string"},"actor":{"type":"string"},"at":{"type":"string","format":"date-time"},"backfilled":{"type":"boolean"}},"required":["entry_id","act","actor","at","backfilled"]},"OwnReviewDecisionRequest":{"type":"object","properties":{"decided_by":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^@]*$"},"determinations":{"type":"object","additionalProperties":{"type":"object","properties":{"determination":{"type":"string","enum":["met","partial","not_met","cannot_determine"]},"reason":{"type":"string","minLength":1,"maxLength":4000}},"required":["determination","reason"],"additionalProperties":false}}},"required":["decided_by","determinations"],"additionalProperties":false},"ConsoleReviewDecisionRequest":{"type":"object","description":"The signed-in console reviewer supplies criterion determinations; the session supplies the project and decider.","properties":{"determinations":{"type":"object","additionalProperties":{"type":"object","properties":{"determination":{"type":"string","enum":["met","partial","not_met","cannot_determine"]},"reason":{"type":"string","minLength":1,"maxLength":4000}},"required":["determination","reason"],"additionalProperties":false}}},"required":["determinations"],"additionalProperties":false},"SignedEscalationDecision":{"type":"object","description":"The signed escalation decision: its escalation, project, and verification identities; resulting status, determination, judgment, decider, tier, criteria, and decision time; plus its canonical format, signing algorithm and key, content hash, and signature. decided_relation and decided_via are present when the decider is a developer reviewer.","properties":{"escalation_id":{"type":"string"},"project_id":{"type":"string"},"verification_id":{"type":"string"},"status":{"type":"string","enum":["decided","undecided"]},"determination":{"type":"string","enum":["met","partial","not_met","cannot_determine"]},"judgment_id":{"type":"string"},"decided_by":{"type":"string"},"decided_relation":{"type":"string","enum":["owner","member"]},"decided_via":{"type":"string","enum":["console","api"]},"tier_version":{"type":["integer","null"]},"open_criteria":{"type":"array","items":{"type":"string"}},"criteria":{"type":"array","items":{"type":"object","properties":{"criterion_id":{"type":"string"},"determination":{"type":"string","enum":["met","partial","not_met","cannot_determine"]},"reason":{"type":["string","null"]}},"required":["criterion_id","determination","reason"],"additionalProperties":false}},"decided_at":{"type":"string","format":"date-time"},"format":{"type":"string"},"kind":{"type":"string","enum":["escalation_decision"]},"algo":{"type":"string"},"key_id":{"type":"string"},"content_hash":{"type":"string"},"signature":{"type":"string"}},"required":["escalation_id","project_id","verification_id","status","determination","judgment_id","decided_by","tier_version","open_criteria","criteria","decided_at","format","kind","algo","key_id","content_hash","signature"],"additionalProperties":false},"OwnReviewDecisionResponse":{"type":"object","properties":{"escalation_id":{"type":"string"},"escalation_status":{"type":"string"},"determination":{"type":"string"},"judgment_id":{"type":"string"},"tier_version":{"type":["integer","null"]},"decided_by":{"type":"string"},"decided_relation":{"type":"string","enum":["owner","member"]},"decided_via":{"type":"string","enum":["api"]},"asserted_by":{"type":"string","enum":["api_key"]},"decision":{"$ref":"#/components/schemas/SignedEscalationDecision"}},"required":["escalation_id","escalation_status","determination","judgment_id","tier_version","decided_by","decided_relation","decided_via","asserted_by","decision"],"additionalProperties":false},"ConsoleReviewDecisionResponse":{"type":"object","properties":{"escalation_id":{"type":"string"},"escalation_status":{"type":"string"},"determination":{"type":"string"},"judgment_id":{"type":"string"},"tier_version":{"type":["integer","null"]},"decided_by":{"type":"string"},"decided_relation":{"type":"string","enum":["owner","member"]},"decided_via":{"type":"string","enum":["console"]},"asserted_by":{"type":"string","enum":["console_session"]},"decision":{"$ref":"#/components/schemas/SignedEscalationDecision"}},"required":["escalation_id","escalation_status","determination","judgment_id","tier_version","decided_by","decided_relation","decided_via","asserted_by","decision"],"additionalProperties":false},"OwnReviewEscalationItem":{"type":"object","properties":{"escalation_id":{"type":"string"},"verification_id":{"type":"string"},"trigger":{"type":"string","enum":["cannot_determine","below_threshold"]},"stage":{"type":["string","null"],"enum":["panel","human",null]},"open_criteria":{"type":"array","items":{"type":"string"}},"opened_at":{"type":"string","format":"date-time"},"due_at":{"type":["string","null"],"format":"date-time"},"limit_cents":{"type":["integer","null"]},"status":{"type":"string","enum":["open"]}},"required":["escalation_id","verification_id","trigger","stage","open_criteria","opened_at","due_at","limit_cents","status"],"additionalProperties":false},"OwnReviewEscalationList":{"type":"object","properties":{"project_id":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OwnReviewEscalationItem"}},"next":{"type":["object","null"],"properties":{"opened_at":{"type":"string","format":"date-time"},"escalation_id":{"type":"string"}},"required":["opened_at","escalation_id"],"additionalProperties":false}},"required":["project_id","items","next"],"additionalProperties":false},"VerificationRequest":{"type":"object","description":"A verification request: a project asks agents it grants to submit work against one pinned rubric version before a deadline. States: draft, published, suspended, withdrawn, closed.","properties":{"id":{"type":"string","format":"uuid"},"tenant_id":{"type":"string","format":"uuid","description":"The caller's own tenant, resolved from the API key. Present on GET /v1/requests/{id}."},"state":{"type":"string","enum":["draft","published","suspended","withdrawn","closed"]},"current_version":{"type":["integer","null"],"minimum":1},"version":{"anyOf":[{"$ref":"#/components/schemas/RequestVersion"},{"type":"null"}],"description":"The current version with its judging plan; null before the first version."},"series_ref":{"type":["string","null"],"maxLength":120,"description":"Tenant-scoped reference that groups the periods of one review."},"created_at":{"type":"string","format":"date-time"},"state_changed_at":{"type":"string","format":"date-time"}},"required":["id","state","current_version","version","series_ref","created_at","state_changed_at"],"additionalProperties":false},"RequestVersion":{"type":"object","description":"One immutable version of a request. Changing a published request adds a version; a version never changes.","properties":{"request_id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1},"rubric_id":{"type":"string","format":"uuid"},"rubric_version":{"type":"integer","minimum":1},"deadline":{"type":"string","format":"date-time"},"attempt_cap":{"type":"integer","minimum":1,"maximum":100,"description":"Attempts each granted key may make on this version."},"eligibility":{"type":"string","enum":["granted_keys"]},"brief":{"type":"string","minLength":1,"maxLength":20000},"inputs":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/RequestInput"}},"review_destination":{"type":"string","enum":["own_reviewers","acretix_review"]},"period_start":{"type":["string","null"],"format":"date-time","description":"A review period's start; null together with period_end."},"period_end":{"type":["string","null"],"format":"date-time","description":"A review period's end; the deadline is at or after it."},"judging_plan":{"type":"array","items":{"$ref":"#/components/schemas/RequestPlanEntry"}},"created_at":{"type":"string","format":"date-time"}},"required":["request_id","version","rubric_id","rubric_version","deadline","attempt_cap","eligibility","brief","inputs","review_destination","period_start","period_end","judging_plan","created_at"],"additionalProperties":false},"RequestInput":{"type":"object","description":"A named input the agent works from: inline text, or an https URL pinned by its SHA-256. At most 20 per version, names unique within the version; inline text totals at most 262,144 characters.","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["text","url"]},"text":{"type":"string","minLength":1,"maxLength":65536},"url":{"type":"string","format":"uri","maxLength":2048,"description":"https only, with no user or password part."},"sha256":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}},"required":["name","kind"],"oneOf":[{"properties":{"kind":{"const":"text"}},"required":["text"]},{"properties":{"kind":{"const":"url"}},"required":["url","sha256"]}],"additionalProperties":false},"RequestPlanEntry":{"type":"object","description":"How one criterion of the pinned rubric version is judged. The plan is fixed when the version is planned.","properties":{"criterion_key":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"method":{"type":"string","enum":["rule","model","ci"]},"primitive":{"type":["string","null"],"description":"A rule criterion's primitive; null for model and ci."},"settings":{"type":["object","null"],"description":"A rule criterion's settings; null for model and ci."},"sentence":{"type":"string","description":"The fixed sentence that says how this method judges."}},"required":["criterion_key","name","type","method","primitive","settings","sentence"],"additionalProperties":false},"RequestCreate":{"type":"object","description":"Create a draft request with its first version. attempt_cap may be omitted only while a default attempt cap is set. review_destination acretix_review needs Acretix managed review and an escalation limit.","properties":{"rubric_id":{"type":"string","format":"uuid"},"rubric_version":{"type":"integer","minimum":1},"deadline":{"type":"string","format":"date-time"},"attempt_cap":{"type":"integer","minimum":1,"maximum":100},"brief":{"type":"string","minLength":1,"maxLength":20000},"inputs":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/RequestInput"}},"review_destination":{"type":"string","enum":["own_reviewers","acretix_review"],"default":"own_reviewers"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"series_ref":{"type":"string","minLength":1,"maxLength":120}},"required":["rubric_id","rubric_version","deadline","brief"],"additionalProperties":false},"RequestWithdraw":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false},"RequestGrantCreate":{"type":"object","description":"Grant an agent key of the same tenant the right to submit. The key must not be expired, revoked or held.","properties":{"key_id":{"type":"string"}},"required":["key_id"],"additionalProperties":false},"RequestGrant":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid"},"key_id":{"type":"string"},"granted_at":{"type":"string","format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"}},"required":["request_id","key_id","granted_at","revoked_at"],"additionalProperties":false},"RequestList":{"type":"object","description":"The project's requests, newest first, at most 50 a page. Grant key ids are never listed.","properties":{"tenant_id":{"type":"string","format":"uuid","description":"The caller's own tenant, resolved from the API key."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["draft","published","suspended","withdrawn","closed"]},"current_version":{"type":["integer","null"],"minimum":1},"deadline":{"type":["string","null"],"format":"date-time"},"attempt_cap":{"type":["integer","null"],"minimum":1},"attempts_so_far":{"type":"integer","minimum":0},"state_changed_at":{"type":"string","format":"date-time"},"series_ref":{"type":["string","null"]},"period_start":{"type":["string","null"],"format":"date-time"},"period_end":{"type":["string","null"],"format":"date-time"}},"required":["id","state","current_version","deadline","attempt_cap","attempts_so_far","state_changed_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["tenant_id","data","next_cursor"],"additionalProperties":false},"RequestAttempt":{"type":"object","description":"One attempt on a request, as its requester reads it. A key is shown by its prefix, never its id or secret.","properties":{"verification_id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1},"attempt":{"type":"integer","minimum":1},"submitted_at":{"type":"string","format":"date-time"},"status":{"$ref":"#/components/schemas/VerificationStatus"},"determination":{"type":["string","null"],"enum":["met","partial","not_met","cannot_determine",null]},"outcome":{"type":["string","null"],"description":"The request outcome; abstained when below the confidence line."},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"lowest_criterion_confidence":{"type":["number","null"],"minimum":0,"maximum":1},"confidence_line":{"type":["number","null"],"minimum":0,"maximum":1,"description":"The line in force when the result was read; null while no line is set."},"key_prefix":{"type":"string"},"accepted":{"type":["boolean","null"],"description":"The requester's confirmation; null until confirmed."}},"required":["verification_id","version","attempt","submitted_at","status","determination","outcome","confidence","lowest_criterion_confidence","confidence_line","key_prefix","accepted"],"additionalProperties":false},"RequestAttemptList":{"type":"object","description":"Attempts oldest first, across versions.","properties":{"tenant_id":{"type":"string","format":"uuid","description":"The caller's own tenant, resolved from the API key."},"data":{"type":"array","items":{"$ref":"#/components/schemas/RequestAttempt"}},"next_cursor":{"type":["string","null"]}},"required":["tenant_id","data","next_cursor"],"additionalProperties":false},"RequestTask":{"type":"object","description":"A granted agent key's view of a request. brief and inputs are returned only while the request is open. Submit with POST /v1/verify, the subject below and an Idempotency-Key. Another key's id, prefix, grant or attempt is never shown.","properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["open","suspended","withdrawn","closed"]},"current_version":{"type":"integer","minimum":1},"brief":{"type":["string","null"]},"inputs":{"type":["array","null"],"items":{"$ref":"#/components/schemas/RequestInput"}},"deadline":{"type":"string","format":"date-time"},"attempt_cap":{"type":"integer","minimum":1,"maximum":100},"judging_plan":{"type":"array","items":{"$ref":"#/components/schemas/RequestPlanEntry"}},"attempts":{"type":"array","description":"The caller's own attempts on the current version.","items":{"type":"object","properties":{"verification_id":{"type":"string","format":"uuid"},"attempt":{"type":"integer","minimum":1},"status":{"$ref":"#/components/schemas/VerificationStatus"},"created_at":{"type":"string","format":"date-time"},"outcome":{"type":["string","null"]},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"lowest_criterion_confidence":{"type":["number","null"],"minimum":0,"maximum":1},"confidence_line":{"type":["number","null"],"minimum":0,"maximum":1,"description":"The line in force when the result was read; null while no line is set."}},"required":["verification_id","attempt","status","created_at","outcome","confidence","lowest_criterion_confidence","confidence_line"],"additionalProperties":false}},"attempts_used":{"type":"integer","minimum":0},"attempts_remaining":{"type":"integer","minimum":0},"key_expires_at":{"type":["string","null"],"format":"date-time","description":"The caller's key expiry when it falls before the deadline."},"submit_subject":{"type":"object","properties":{"kind":{"type":"string","enum":["task"]},"ref":{"type":"string","description":"request:<id>:v<version>"}},"required":["kind","ref"],"additionalProperties":false}},"required":["id","state","current_version","brief","inputs","deadline","attempt_cap","judging_plan","attempts","attempts_used","attempts_remaining","key_expires_at","submit_subject"],"additionalProperties":false},"RequestReportCreate":{"type":"object","description":"Report misuse of a request. At most 10 reports per key per request per day.","properties":{"category":{"type":"string","enum":["spam","harmful_task","data_exposure","answer_gaming","other"]},"verification_id":{"type":"string","format":"uuid","description":"Optional; must belong to the request."},"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["category","reason"],"additionalProperties":false},"RequestReport":{"type":"object","description":"A misuse report. A reporter reads back only its own reports.","properties":{"id":{"type":"string","format":"uuid"},"request_id":{"type":"string","format":"uuid"},"category":{"type":"string","enum":["spam","harmful_task","data_exposure","answer_gaming","other"]},"verification_id":{"type":["string","null"],"format":"uuid"},"reason":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","request_id","category","verification_id","reason","created_at"],"additionalProperties":false},"RequestResultConfirm":{"type":"object","properties":{"accepted":{"type":"boolean"},"reason":{"type":"string","maxLength":500}},"required":["accepted"],"additionalProperties":false},"RequestResultConfirmation":{"type":"object","description":"The requester's confirmation of one met result. A result is confirmed once.","properties":{"request_id":{"type":"string","format":"uuid"},"verification_id":{"type":"string","format":"uuid"},"accepted":{"type":"boolean"},"reason":{"type":["string","null"]},"confirmed_at":{"type":"string","format":"date-time"}},"required":["request_id","verification_id","accepted","reason","confirmed_at"],"additionalProperties":false}}},"security":[{"apiKey":[]}],"paths":{"/counterparty/criteria-links/address":{"post":{"summary":"Read the address bound to a checked counterparty criteria link.","description":"Requires the separately configured cockpit bearer; it is not authenticated with a tenant API key.","security":[{"cockpitBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkAddressRequest"}}}},"responses":{"200":{"description":"The link tenant, counterparty reference, and bound address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkAddressResponse"}}}},"400":{"description":"Request body must contain only a valid link and subject_ref.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The configured cockpit bearer is required.","x-acretix-codes":["cockpit_caller_required","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The criteria link was refused.","x-acretix-codes":["link_refused"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No address is bound for this checked link.","x-acretix-codes":["address_not_bound"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Only POST is allowed.","x-acretix-codes":["method_not_allowed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The criteria link has expired, or the bound address was erased.","x-acretix-codes":["criteria_link_address_erased","link_expired"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"The address could not be read.","x-acretix-codes":["address_read_failed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The cockpit criteria-link address reader is not configured.","x-acretix-codes":["counterparty_link_unconfigured","service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/counterparty/criteria-links/view":{"post":{"summary":"Read deliveries and verdicts for a checked counterparty criteria link.","description":"Requires the separately configured cockpit bearer; it is not authenticated with a tenant API key.","security":[{"cockpitBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkViewRequest"}}}},"responses":{"200":{"description":"The checked subject, rubric version, and completed deliveries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkViewResponse"}}}},"400":{"description":"Request body must contain only a valid link and subject_ref.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The configured cockpit bearer is required.","x-acretix-codes":["cockpit_caller_required","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The criteria link was refused.","x-acretix-codes":["link_refused"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Only POST is allowed.","x-acretix-codes":["method_not_allowed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The criteria link has expired.","x-acretix-codes":["link_expired"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"The deliveries could not be read.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The cockpit criteria-link delivery reader is not configured.","x-acretix-codes":["counterparty_link_unconfigured","service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/counterparty/criteria-links/criteria":{"post":{"summary":"Read the criteria and agreement state for a checked counterparty criteria link.","description":"Requires the separately configured cockpit bearer; it is not authenticated with a tenant API key.","security":[{"cockpitBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkCriteriaRequest"}}}},"responses":{"200":{"description":"The checked rubric criteria and agreement state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkCriteriaResponse"}}}},"400":{"description":"Request body must contain only a valid link and subject_ref.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The configured cockpit bearer is required.","x-acretix-codes":["cockpit_caller_required","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The criteria link or its rubric was refused.","x-acretix-codes":["link_refused"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Only POST is allowed.","x-acretix-codes":["method_not_allowed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The criteria link has expired.","x-acretix-codes":["link_expired"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"The criteria could not be read.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The cockpit criteria-link reader is not configured.","x-acretix-codes":["counterparty_link_unconfigured","service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/counterparty/criteria-links/contest":{"post":{"summary":"File a counterparty contest for a checked criteria link.","description":"Requires the separately configured cockpit bearer; it is not authenticated with a tenant API key.","security":[{"cockpitBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkContestRequest"}}}},"responses":{"200":{"description":"The request repeats this party's open contest exactly and nothing new was recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkContestAlreadyFiledResponse"}}}},"201":{"description":"The appended counterparty contest judgment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkContestResponse"}}}},"400":{"description":"Request body or constructed judgment is invalid.","x-acretix-codes":["contest_file_ref_invalid","contest_reason_invalid","contest_reason_required","invalid_request","judgment_shape_invalid"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The configured cockpit bearer is required.","x-acretix-codes":["cockpit_caller_required","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The criteria link was refused.","x-acretix-codes":["link_refused"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The checked subject has no verification.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Only POST is allowed.","x-acretix-codes":["method_not_allowed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The contest window is closed or this party already has an open contest.","x-acretix-codes":["contest_already_open","contest_window_closed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem","allOf":[{"$ref":"#/components/schemas/CriteriaLinkContestConflictProblem"}]}}}},"410":{"description":"The criteria link has expired.","x-acretix-codes":["link_expired"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The judgment named an unknown criterion.","x-acretix-codes":["judgment_criterion_unknown"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"The contest could not be appended.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The cockpit criteria-link contest writer is not configured.","x-acretix-codes":["counterparty_link_unconfigured","service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/counterparty/criteria-links/accept":{"post":{"summary":"Accept the signed criteria version of a checked counterparty criteria link.","description":"Requires the separately configured cockpit bearer; it is not authenticated with a tenant API key.","security":[{"cockpitBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkAcceptRequest"}}}},"responses":{"201":{"description":"The appended counterparty criteria acceptance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkAcceptResponse"}}}},"400":{"description":"Request body must contain only a valid checked link, subject, judge, and rubric version.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The configured cockpit bearer is required.","x-acretix-codes":["cockpit_caller_required","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The criteria link or its rubric was refused.","x-acretix-codes":["link_refused"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Only POST is allowed.","x-acretix-codes":["method_not_allowed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The criteria version or agreement state conflicts with this acceptance.","x-acretix-codes":["conflict","criteria_version_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The criteria link has expired.","x-acretix-codes":["link_expired"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"The criteria acceptance could not be appended.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The cockpit criteria-link acceptance writer is not configured.","x-acretix-codes":["counterparty_link_unconfigured","service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/counterparty/criteria-links/change":{"post":{"summary":"Ask for a change to the signed criteria version of a checked counterparty criteria link.","description":"Requires the separately configured cockpit bearer, not a tenant API key. The request text is plain text and never a rubric.","security":[{"cockpitBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkChangeRequest"}}}},"responses":{"201":{"description":"The appended counterparty criteria change request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaLinkChangeResponse"}}}},"400":{"description":"Request body must contain only a valid checked link, subject, judge, rubric version, and plain-text request.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The configured cockpit bearer is required.","x-acretix-codes":["cockpit_caller_required","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The criteria link or its rubric was refused.","x-acretix-codes":["link_refused"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Only POST is allowed.","x-acretix-codes":["method_not_allowed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The criteria version or agreement state conflicts with this change request.","x-acretix-codes":["conflict","criteria_version_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The criteria link has expired.","x-acretix-codes":["link_expired"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"The criteria change request could not be appended.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The cockpit criteria-link change writer is not configured.","x-acretix-codes":["counterparty_link_unconfigured","service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/criteria-links":{"post":{"summary":"Mint a counterparty criteria link for a Deals criteria subject (deals:<uuid>:criteria or review:<uuid>:criteria).","description":"Requires the configured Deals project API key with rubric:write. The counterparty address is obtained only from Deals and is never accepted from the caller; for review:<uuid>:criteria, its counterparty is the contact Deals returns. When rubric_id is sent, the rubric must exist for the Deals project at rubric_version, and the link carries it so the counterparty can read its criteria.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject_ref":{"type":"string","minLength":1,"maxLength":256},"rubric_version":{"type":"string","minLength":1,"maxLength":256},"rubric_id":{"type":"string","format":"uuid"}},"required":["subject_ref","rubric_version"],"additionalProperties":false}}}},"responses":{"201":{"description":"Opaque criteria link minted for the Deals counterparty.","content":{"application/json":{"schema":{"type":"object","properties":{"link":{"type":"string"},"subject_ref":{"type":"string"},"rubric_version":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"rubric_id":{"type":"string","format":"uuid"}},"required":["link","subject_ref","rubric_version","expires_at"],"additionalProperties":false}}}},"400":{"description":"Request body must contain only a valid subject_ref, rubric_version and an optional rubric_id.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks rubric:write or is not the configured Deals project.","x-acretix-codes":["agent_key_request_only","criteria_link_tenant_refused","forbidden","identity_contract_tenant_mismatch","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Deals has no counterparty record for the criteria subject, or the rubric does not exist at that version.","x-acretix-codes":["criteria_link_no_counterparty_record","not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Deals counterparty address conflicts with its existing link binding.","x-acretix-codes":["criteria_link_address_conflict"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Deals returned an invalid counterparty address.","x-acretix-codes":["criteria_link_address_invalid"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Counterparty link is unconfigured or Deals is unavailable.","x-acretix-codes":["counterparty_link_unconfigured","criteria_link_counterparty_unavailable","service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/survival-events/bilateral":{"post":{"summary":"Append a bilateral survival lifecycle event.","description":"Authenticated engine ingress for a marketplace bilateral verdict lifecycle fact. The caller is tenant-bound by its bearer key; replaying the same source, verdict_ref, and state is idempotent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"verdict_ref":{"type":"string","minLength":1,"maxLength":512},"state":{"type":"string","enum":["contested","survived","overturned"]},"identity_rung":{"type":"string","enum":["unverified","email_verified","domain_distinct","payment_verified","entity_verified"],"description":"Kept only when the caller is the Deals project tenant; every other caller event stores unverified."},"adjudication_ref":{"type":["string","null"],"minLength":1,"maxLength":512}},"required":["source","verdict_ref","state","identity_rung"],"additionalProperties":false}}}},"responses":{"201":{"description":"Bilateral survival event appended or replayed idempotently."},"400":{"description":"Invalid bilateral event payload.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The authentication dependency is unavailable.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests":{"get":{"summary":"List the project's verification requests, newest first.","description":"Requires a project key with rubric:write. An agent key is refused with request_requester_only.","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The next_cursor of the previous page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":50}},{"name":"series","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120},"description":"Lists that series' periods in period order, with one outcome per metric, unpaged. The reply echoes it."}],"responses":{"200":{"description":"One page of requests, or a series history.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RequestList"},{"type":"object","required":["series","tenant_id","data","next_cursor"],"additionalProperties":false,"properties":{"series":{"type":"string","minLength":1,"maxLength":120,"description":"The series asked for, echoed. Only the series history read carries it."},"tenant_id":{"type":"string","format":"uuid","description":"The caller's own tenant, resolved from the API key."},"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","state","current_version","period_start","period_end","deadline","rubric_id","rubric_version","attempt_count","outcomes"],"properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string"},"current_version":{"type":["integer","null"]},"period_start":{"type":["string","null"],"format":"date-time"},"period_end":{"type":["string","null"],"format":"date-time"},"deadline":{"type":["string","null"],"format":"date-time"},"rubric_id":{"type":["string","null"],"format":"uuid"},"rubric_version":{"type":["integer","null"]},"attempt_count":{"type":"integer","minimum":0},"outcomes":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["metric","code","late"],"properties":{"metric":{"type":"string"},"code":{"type":"string","enum":["not_due","no_evidence","not_evaluable","met","partial","not_met"]},"late":{"type":"boolean"}}}}}}},"next_cursor":{"type":"null"}}}]}}}},"400":{"description":"Invalid cursor, limit or series.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not read requests.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Requests are not enabled.","x-acretix-codes":["requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Create a draft verification request with its first version.","description":"Requires a project key with rubric:write. The rubric version is pinned and each criterion is planned; a criterion that cannot be checked refuses the whole create with request_criterion_uncheckable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCreate"}}}},"responses":{"201":{"description":"The draft request with its first version and judging plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationRequest"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not create requests.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Requests are not enabled, or the rubric version was not found.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with its current state.","x-acretix-codes":["conflict","request_state_invalid"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The version, its review destination or a criterion cannot be accepted.","x-acretix-codes":["request_criterion_uncheckable","request_input_invalid","request_review_unavailable","unprocessable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}":{"get":{"summary":"Read a verification request with its current version and judging plan.","description":"Requires a project key with rubric:write of the request's tenant. Another tenant's request answers 404.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationRequest"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not read this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}/publish":{"post":{"summary":"Publish a draft request so granted keys can submit to it.","description":"The current version is re-planned; a criterion that cannot be checked refuses the publish and the request stays a draft.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The published request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationRequest"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not publish this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request is not a draft.","x-acretix-codes":["conflict","request_state_invalid"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A criterion of the pinned rubric version cannot be checked.","x-acretix-codes":["request_criterion_uncheckable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}/withdraw":{"post":{"summary":"Withdraw a published or suspended request, with a reason.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestWithdraw"}}}},"responses":{"200":{"description":"The withdrawn request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationRequest"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not withdraw this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request cannot move to withdrawn from its state.","x-acretix-codes":["conflict","request_state_invalid"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}/grants":{"post":{"summary":"Grant an agent key the right to submit to the request.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestGrantCreate"}}}},"responses":{"201":{"description":"The grant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestGrant"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not grant on this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with its current state.","x-acretix-codes":["conflict","request_state_invalid"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The key is not a live agent key of this tenant.","x-acretix-codes":["request_grant_key_invalid","unprocessable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}/grants/{key_id}":{"delete":{"summary":"Revoke an agent key's grant on the request.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The grant is revoked."},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not revoke on this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request or grant not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}/attempts":{"get":{"summary":"List the attempts on a request, oldest first, across versions.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The next_cursor of the previous page."}],"responses":{"200":{"description":"One page of attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAttemptList"}}}},"400":{"description":"Invalid cursor.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not read this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}/task":{"get":{"summary":"Read a granted request as the agent key works it.","description":"A granted agent key with verify:read, or the requester's project key, reads it. A key with no live grant is refused.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTask"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key holds no live grant on this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_key_not_granted"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}/reports":{"post":{"summary":"Report misuse of a request.","description":"The requester's project key, or an agent key that holds or has held a grant on the request, may report.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestReportCreate"}}}},"responses":{"201":{"description":"The report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestReport"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not report on this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_key_not_granted"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited","request_report_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}/results/{verification_id}/confirm":{"post":{"summary":"Confirm or decline one met result of the request.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"verification_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestResultConfirm"}}}},"responses":{"200":{"description":"The confirmation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestResultConfirmation"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not confirm on this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request or result not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The result is not decided yet, is already confirmed, or ran on another rubric.","x-acretix-codes":["request_result_already_confirmed","request_result_not_decided","request_rubric_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The result did not meet the request.","x-acretix-codes":["request_result_not_met"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/requests/{id}/confirmed.csv":{"get":{"summary":"Download the request's confirmed results as CSV.","description":"Columns: row_ref, accepted, version, attempt, key_prefix, confirmed_at. The X-Content-SHA256 response header carries the SHA-256 of the body.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Only this version's rows."}],"responses":{"200":{"description":"The confirmed results.","headers":{"X-Content-SHA256":{"description":"SHA-256 of the body, hex.","schema":{"type":"string"}}},"content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Invalid version.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key may not read this request.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope","request_requester_only"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Request not found, or requests are not enabled.","x-acretix-codes":["not_found","requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/verify":{"post":{"summary":"Submit a verification (async/202 default; bounded-sync opt-in).","description":"Submit a rubric_id + a submission. The submission is {inline} | {uri} | the Contract 05 typed roles object. For faithfulness/grounding, send the work as `output` and its source as `context[]` — the judge is told which blob is authoritative and treats un-grounded or contradicted claims as violations.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Dedupe retries on (tenant, key)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"},"examples":{"faithfulness":{"summary":"Faithfulness (headline): judge OUTPUT against an authoritative CONTEXT source","value":{"rubric_id":"7f8e9d6c-1a2b-4c3d-8e9f-0a1b2c3d4e5f","submission":{"output":"Q2 revenue rose 12% to $4.2M and monthly churn fell to 1.8%.","context":[{"label":"source","value":"Q2 results: revenue grew 12% quarter-over-quarter to $4.2M. Monthly churn improved from 2.4% to 1.8%."}]},"options":{"wait_ms":45000}}},"input_and_output":{"summary":"INPUT + OUTPUT: judge an answer for appropriateness/completeness to what was asked","value":{"rubric_id":"7f8e9d6c-1a2b-4c3d-8e9f-0a1b2c3d4e5f","submission":{"input":"What is the refund window, and do disputes affect it?","output":"Refunds are accepted within 30 days of delivery; an open dispute pauses that clock until resolution."}}},"reference":{"summary":"OUTPUT + REFERENCE: compare against an expected / gold answer","value":{"rubric_id":"7f8e9d6c-1a2b-4c3d-8e9f-0a1b2c3d4e5f","submission":{"output":"The capital of France is Paris.","reference":"Paris"}}},"evidence":{"summary":"OUTPUT + EVIDENCE: supporting material, weighed but NOT authoritative","value":{"rubric_id":"7f8e9d6c-1a2b-4c3d-8e9f-0a1b2c3d4e5f","submission":{"output":"The customer was refunded in full on 2026-05-14.","evidence":[{"label":"support-ticket","value":"Ticket #8821: refund of $42.00 issued 2026-05-14."}]}}},"values":{"summary":"OUTPUT + VALUES: structured fields for deterministic numeric/json checks","value":{"rubric_id":"7f8e9d6c-1a2b-4c3d-8e9f-0a1b2c3d4e5f","submission":{"output":"{\"invoice_number\":\"INV-48213\",\"total\":1250.5,\"currency\":\"USD\"}","values":{"total":1250.5,"currency":"USD"}}}},"legacy_inline":{"summary":"Back-compat: {inline} — unchanged","value":{"rubric_id":"7f8e9d6c-1a2b-4c3d-8e9f-0a1b2c3d4e5f","submission":{"inline":"INV-4821 total $1,250.50"}}},"legacy_content_alias":{"summary":"Back-compat: legacy `content` is treated AS `output`","value":{"rubric_id":"7f8e9d6c-1a2b-4c3d-8e9f-0a1b2c3d4e5f","submission":{"content":"The answer text, submitted via the legacy content field."}}},"uri_reference":{"summary":"Back-compat: {uri} — stored by reference, never fetched on the request path","value":{"rubric_id":"7f8e9d6c-1a2b-4c3d-8e9f-0a1b2c3d4e5f","submission":{"uri":"https://example.com/artifacts/answer.txt"}}}}}}},"responses":{"200":{"description":"Completed verdict (bounded-sync).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationObject"}}}},"202":{"description":"Accepted (async).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyAccepted"}}}},"400":{"description":"Invalid request, or a request subject without an Idempotency-Key.","x-acretix-codes":["invalid_callback_url","invalid_identity_rung","invalid_json","invalid_request","request_idempotency_key_required"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope, or may not submit to this request.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch","insufficient_scope","request_key_not_granted"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Requests are not enabled.","x-acretix-codes":["requests_not_enabled"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Request conflicts with an existing idempotency key, or the request is not open, its attempt cap is reached, or the rubric is not the request version's.","x-acretix-codes":["idempotency_key_conflict","request_attempt_cap_reached","request_not_open","request_rubric_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The deadline of the request has passed.","x-acretix-codes":["request_deadline_passed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Acretix managed review is not available to this project.","x-acretix-codes":["acretix_review_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["account_spend_cap_reached","api_key_monthly_cap_reached","api_key_rate_limited","request_rate_limited","test_key_monthly_cap_reached"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-endpoints":{"get":{"summary":"List this tenant's active webhook endpoints.","responses":{"200":{"description":"Active endpoints, oldest first. Secrets are never returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Register a webhook endpoint and issue its signing secret once.","description":"The API key needs both verify:read and rubric:write. A project may have at most 10 active endpoints; removing one frees a slot. The response is the only place the plaintext signing secret is returned; Acretix stores only its encrypted form.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointRegisterRequest"}}}},"responses":{"201":{"description":"Registered endpoint and its one-time plaintext signing secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}},"400":{"description":"Endpoint URL or request body is invalid.","x-acretix-codes":["invalid_callback_url","invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The project already has the maximum of 10 active webhook endpoints.","x-acretix-codes":["conflict"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-endpoints/{id}":{"delete":{"summary":"Deactivate an active webhook endpoint.","description":"The API key needs both verify:read and rubric:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Endpoint deactivated; historical deliveries are retained."},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Endpoint not found.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/escalation-settings":{"get":{"summary":"Read this project's current escalation settings version.","description":"A project's escalation settings are versioned and every change is kept.","responses":{"200":{"description":"Current settings version, or null when the project has none.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationSettingsResponse"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"summary":"Record a new version of this project's escalation settings.","description":"A project's escalation settings are versioned and every change is kept. The API key needs both verify:read and rubric:write; acretix_review requires review_limit_cents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationSettingsUpdate"}}}},"responses":{"200":{"description":"The newly recorded settings version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationSettingsResponse"}}}},"400":{"description":"Escalation settings request body is invalid.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Acretix managed review is not available to this project.","x-acretix-codes":["acretix_review_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/escalations/{escalation_id}/decisions":{"post":{"summary":"Decide an open own-reviewers escalation.","description":"The API key needs review:decide. decided_by names the account of the person who decided. The engine computes decided_relation, owner or member, from the project's linked owner and the owner's active reviewer grants, and never from the request. The decision is labelled as asserted by the project's key. This route answers 404 until the deployment turns the feature on.","parameters":[{"name":"escalation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnReviewDecisionRequest"}}}},"responses":{"201":{"description":"Recorded own-reviewer decision and its signed decision envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnReviewDecisionResponse"}}}},"400":{"description":"Decision request or judgment shape is invalid.","x-acretix-codes":["judgment_shape_invalid"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks review:decide.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The feature is off or the escalation is not available to this project.","x-acretix-codes":["escalation_not_found","not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The escalation already has a closing judgment.","x-acretix-codes":["judgment_already_closed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The judgment cannot be admitted for this escalation.","x-acretix-codes":["judgment_capacity_not_admitted","judgment_criterion_unknown","judgment_minutes_invalid","judgment_rule_unknown"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The decision could not be completed now.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/escalations":{"get":{"summary":"List the project's open own-reviewers escalations, oldest first.","description":"The API key needs verify:read. The list holds only the key's project's escalations with destination own_reviewers and status open. Each item's verification is read at GET /verifications/{id}. This route answers 404 until the deployment turns the feature on.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"after_opened_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"after_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"This project's open own-reviewer escalations, oldest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnReviewEscalationList"}}}},"400":{"description":"Queue query parameters are invalid.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks verify:read.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The queue feature is not enabled.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The service is unavailable.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/proofs/verify":{"post":{"summary":"Publicly verify a signed proof artifact.","description":"Unauthenticated, read-only proof verification. The request carries a signed proof-envelope document already issued by Acretix; the API re-verifies the Ed25519 signature against the published key and returns only summary credential fields. It never re-signs or returns raw claim/evidence content.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Either the proof-envelope document from GET /v1/verifications/{id}/proof/envelope, or { proof: <that document> }.","type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Proof validity. Valid proofs include a summary credential and SVG badge.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"valid":{"const":true},"verification_id":{"type":"string","format":"uuid"},"determination":{"$ref":"#/components/schemas/Determination"},"flagged":{"type":["boolean","null"],"description":"Signed needs-review signal. Null means the signed payload did not carry the field."},"flag_reason":{"type":["string","null"],"description":"Signed needs-review reason, when present."},"confidence":{"type":["number","null"],"minimum":0,"maximum":1,"description":"Signed aggregate confidence. Null means the signed payload did not carry a valid value."},"manipulation_detected":{"const":true,"description":"Present only when the signed verdict explicitly reported a manipulation attempt."},"issued_at":{"type":"string"},"key_id":{"type":"string"},"credential":{"type":"object","properties":{"verify_url":{"type":"string","format":"uri"},"badge_svg":{"type":"string","description":"Inline SVG badge, summary only."}},"required":["verify_url","badge_svg"],"additionalProperties":false}},"required":["valid","verification_id","determination","flagged","flag_reason","confidence","issued_at","key_id","credential"],"additionalProperties":false},{"type":"object","properties":{"valid":{"const":false},"reason":{"type":"string","enum":["malformed_proof","empty_proof","unsupported_format","unknown_key","content_hash_mismatch","envelope_mismatch","chain_invalid","signature_invalid","expired"]}},"required":["valid","reason"],"additionalProperties":false}]}}}},"400":{"description":"Invalid proof payload.","x-acretix-codes":["invalid_json"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Request source is not trusted.","x-acretix-codes":["untrusted_request_source"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited.","x-acretix-codes":["rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/evidence/source-attested":{"post":{"summary":"Ingest source-attested evidence (staging).","description":"Accepts a payload signed by a registered source key distinct from the claimant. Verified Ed25519 signatures ingest as source_attested (T1); bad or unverifiable signatures ingest as claimant (T3).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceAttestedEvidenceRequest"}}}},"responses":{"201":{"description":"Evidence packet recorded with an explicit trust tier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceAttestedEvidenceResponse"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Source not registered for tenant.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/verifications":{"get":{"summary":"List tenant-scoped verifications for the explorer.","description":"Read-only verification explorer. Tenant is resolved from the API key or the request-threaded identity-contract tenant header; the response echoes tenant_id for a load-bearing caller check.","parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/VerificationStatus"}},{"name":"determination","in":"query","required":false,"schema":{"type":"string","enum":["met","partial","not_met","cannot_determine","none"]}},{"name":"flagged","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD UTC created_at lower bound."}},{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD UTC created_at upper bound."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Tenant-scoped verification list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationList"}}}},"400":{"description":"Invalid filter.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/verifications/{id}":{"get":{"summary":"Get a verification status + verdict.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Verification object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationObject"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Verification not found.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/verifications/{id}/proof":{"get":{"summary":"Get the signed proof object.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Proof object."},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Proof not found.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/verifications/{id}/determination":{"get":{"summary":"Get the latest customer review determination (cockpit→adapter round-trip).","description":"The latest single-party customer review decision for a verification (tenant-scoped). A product adapter polls this to finalize a held check; verify reports the decision + consequence marker only (decide-not-execute).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The latest review determination."},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No determination recorded for this verification.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/verifications/{id}/proof/envelope":{"get":{"summary":"Download the signed attestation envelope(s) for third-party verification.","description":"Streams the exact canonical bytes that were hashed and signed, plus the signature, so a holder can re-verify offline against the published JWKS (/.well-known/acretix-verify/keys.json). See /docs/verify-a-proof for the recipe.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Signed proof-envelope document."},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No proof recorded.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Retention deleted this proof envelope; the content-free signed record still verifies through POST /v1/proofs/verify.","x-acretix-codes":["retention_deleted"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/verifications/{id}/reverify":{"post":{"summary":"Re-verify (new evidence / higher tier / focused criterion).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Re-verify report."},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Verification not found.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Retention deleted an attestation envelope this re-verify needs; the content-free signed record still verifies through POST /v1/proofs/verify.","x-acretix-codes":["retention_deleted"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/verifications/{id}/feedback":{"post":{"summary":"Record tenant ground-truth (outcome feedback) on a completed verification.","description":"Append-only outcome label for a terminal verification (succeeded|failed). Feeds calibration; it does not change the signed verdict. The verification must belong to the caller and be terminal.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"201":{"description":"Feedback recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackAccepted"}}}},"400":{"description":"Invalid outcome/note, or the verification is not terminal yet.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Verification not found.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cockpit/determinations":{"post":{"summary":"Record a customer cockpit determination.","description":"Contract 11 §E / Contract 14 C.1. Requires identity-contract bearer, request-threaded tenant, x-acretix-auth-subject=account_tenant_mapping, and a tenant-scoped customer_reviewer subject. Records the decision and a product-adapter consequence marker; it is not a training path.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CockpitDeterminationRequest"}}}},"responses":{"201":{"description":"Customer determination recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CockpitDeterminationResponse"}}}},"400":{"description":"Invalid decision body.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Subject is not a proven tenant customer_reviewer.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Verification not found for the request-threaded tenant.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Determination already recorded.","x-acretix-codes":["determination_already_recorded"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cockpit/escalations":{"get":{"summary":"List this console session's open own-reviewers escalations, oldest first.","description":"Requires the identity-contract session of the project's owner or of a member with an active reviewer grant. The project comes only from that session, and decisions from this queue are recorded via console. This route answers 404 until the deployment turns the feature on.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"after_opened_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"after_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"This session project's open own-reviewer escalations, oldest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnReviewEscalationList"}}}},"400":{"description":"Queue query parameters are invalid.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired identity-contract bearer.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Caller is not a proven owner or active customer reviewer for the session project.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The queue feature is not enabled.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Bearer per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The service is unavailable.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cockpit/escalations/{escalation_id}/decisions":{"post":{"summary":"Record an own-reviewers escalation decision from the console session.","description":"Requires the identity-contract session of the project's owner or of a member with an active reviewer grant. The project comes only from that session, and the decision is recorded via console. This route answers 404 until the deployment turns the feature on.","parameters":[{"name":"escalation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleReviewDecisionRequest"}}}},"responses":{"201":{"description":"Recorded console own-reviewer decision and its signed decision envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleReviewDecisionResponse"}}}},"400":{"description":"Decision request or judgment shape is invalid.","x-acretix-codes":["judgment_shape_invalid"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired identity-contract bearer.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Caller is not a proven owner or active customer reviewer for the session project.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The feature is off or the escalation is not available to this session project.","x-acretix-codes":["escalation_not_found","not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The escalation already has a closing judgment.","x-acretix-codes":["judgment_already_closed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The judgment cannot be admitted for this escalation.","x-acretix-codes":["judgment_capacity_not_admitted","judgment_criterion_unknown","judgment_minutes_invalid","judgment_rule_unknown"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Bearer per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The decision could not be completed now.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cockpit/reviewers":{"get":{"summary":"Read whether the viewer holds the tenant's customer_reviewer role.","description":"Contract 11 §E5.1. Requires identity-contract bearer, request-threaded tenant, and x-acretix-auth-subject=account_tenant_mapping. Returns the proven viewer role and owner status.","parameters":[{"name":"include","in":"query","required":false,"description":"Set to history for the tenant owner to list every reviewer grant and revocation.","schema":{"type":"string","enum":["history"]}}],"responses":{"200":{"description":"Viewer reviewer-role status for the request-threaded tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CockpitReviewerStatus"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Caller is not a proven identity-contract cockpit principal, or is not the tenant owner listing reviewer history.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Reviewer not found.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Grant or revoke customer_reviewer for one named person (tenant owner only).","description":"Contract 11 §E5.1. Requires the C11 account mapped to the request-threaded tenant; another tenant cannot be named or modified. This is an explicit human capability grant, never an automatic grant.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CockpitReviewerGrantRequest"}}}},"responses":{"200":{"description":"Reviewer grant updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CockpitReviewerGrant"}}}},"400":{"description":"Invalid reviewer grant body.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Caller is not the tenant owner, or attempted to name another tenant.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Reviewer grant was not found for revocation.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/rubrics":{"get":{"summary":"List the tenant's rubrics, or every version of one rubric name.","description":"Returns a compact summary per rubric name (the latest version), newest first. With ?name, returns every version of that rubric name, newest first. Tenant-scoped (server-resolved from the API key). Paging: ?limit (1..100, default 50) & ?offset.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"name","in":"query","required":false,"description":"Return every version of this rubric name, newest first.","schema":{"type":"string"}}],"responses":{"200":{"description":"The tenant's rubrics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricList"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden, or the API key lacks verify:read and rubric:write.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Compile + version a rubric.","description":"Each criterion runs a CriterionPrimitive (see components.schemas.CriterionPrimitive).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricCompileRequest"}}}},"responses":{"201":{"description":"rubric_id + version + hash."},"400":{"description":"Invalid request, including malformed wording_fingerprint.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/rubrics/from-description":{"post":{"summary":"Draft a rubric from a natural-language description.","description":"This route is off until from-description induction opens. The caller's key needs the rubric:write scope. It returns an unregistered draft to review and publish with POST /v1/rubrics. The description is treated as data and never as instructions. The tenant is server-resolved from the bearer.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricFromDescriptionRequest"}}}},"responses":{"200":{"description":"Unregistered description-induced rubric draft and induction report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricFromDescriptionResult"}}}},"400":{"description":"Description is too vague or request input is invalid.","x-acretix-codes":["description_too_vague","invalid_input_roles"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body or description is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Could not produce a compilable rubric spec.","x-acretix-codes":["induction_failed"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Description induction is disabled, or the model is unavailable.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/rubrics/from-outcomes":{"post":{"summary":"Draft + compile a rubric from labeled outcome examples (induction).","description":"Induce an AUTHORED rubric spec from >= 3 labeled outcome examples (the canonical Determination labels). The response is a compiled-but-UNREGISTERED draft (rubric_spec + compile hashes + an induction report); register it with POST /v1/rubrics. Examples are treated as data, never as instructions. Tenant is server-resolved from the API key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricFromOutcomesRequest"}}}},"responses":{"200":{"description":"Drafted + compiled rubric spec and induction report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricInductionResult"}}}},"400":{"description":"Invalid examples/labels (too few, conflicting, or malformed).","x-acretix-codes":["invalid_input_roles","invalid_label","invalid_request","too_few_examples"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Too many examples or body too large.","x-acretix-codes":["too_many_examples"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Could not produce a compilable rubric spec.","x-acretix-codes":["conflicting_labels","induction_failed","unprocessable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The model is unavailable.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/rubrics/compile":{"post":{"summary":"Compile-preview a rubric without registration.","description":"Runs the same rubric compiler as POST /v1/rubrics but does not create or version a registry artifact. The response intentionally excludes rubric_id, version, status, and created.","responses":{"200":{"description":"Preview hash/source_hash or compiler issues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricCompilePreview"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_json"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/rubrics/templates":{"get":{"summary":"List ungated starter rubric templates.","description":"Lists the read-only ungated starter rubric templates. A gated pack is never listed. The answer names the caller tenant; the catalogue is the same for every tenant.","responses":{"200":{"description":"Ungated starter rubric templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricTemplateList"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/rubrics/examples":{"post":{"summary":"Run marked examples against a draft rubric.","description":"Off unless enabled. Stores the compiled rubric version marked draft, which every normal verify call refuses. Runs at most 5 marked examples for author feedback.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricExamplesRequest"}}}},"responses":{"200":{"description":"Draft rubric and the marked example verification outcomes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RubricExamplesResult"}}}},"400":{"description":"Invalid request or rubric specification.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"This route is not enabled.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body or example count is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/rubrics/{id}":{"get":{"summary":"Fetch a compiled rubric.","parameters":[{"name":"id","in":"path","required":true,"description":"A rubric id (uuid) or a rubric hash (64 lower-case hex characters).","schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[a-f0-9]{64}$"}]}}],"responses":{"200":{"description":"Rubric object, including wording_fingerprint (sha-256 hex of the signed wording, or null) and rubric_format_version."},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden, or the API key lacks verify:read and rubric:write.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Rubric not found.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/usage":{"get":{"summary":"Tenant usage summary.","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD UTC lower bound."}},{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD UTC upper bound."}}],"responses":{"200":{"description":"Usage summary."},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/criteria-agreements/{subject_ref}/judgments":{"get":{"summary":"List tenant-scoped criteria agreement judgments and their derived agreement.","parameters":[{"name":"subject_ref","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,200}$"}}],"responses":{"200":{"description":"Recorded judgments and the currently derived agreement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaJudgmentsResponse"}}}},"400":{"description":"Invalid subject reference.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No criteria judgments exist for this tenant subject.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Criteria judgment store is unavailable.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Append a tenant-scoped criteria proposal or acceptance.","parameters":[{"name":"subject_ref","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,200}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaJudgmentRequest"}}}},"responses":{"201":{"description":"Judgment appended and agreement derived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaJudgmentCreatedResponse"}}}},"400":{"description":"Invalid judgment input.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the required scope, or the caller may not act for that party.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Acceptance conflicts with the latest proposal.","x-acretix-codes":["conflict"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Criteria judgment store is unavailable.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/criteria-agreements/{subject_ref}/contests":{"get":{"summary":"List the caller's own contest escalations on one subject with each decision and its reasons once decided, and never name the party who filed it.","parameters":[{"name":"subject_ref","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,200}$"}}],"responses":{"200":{"description":"Contest escalations for this caller subject.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaContestsResponse"}}}},"400":{"description":"Invalid subject reference.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Criteria contest store is unavailable.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/reviewer-tiers":{"get":{"summary":"Reviewer tier record: the current version and every earlier one (read-only).","responses":{"200":{"description":"Reviewer tier versions, ascending, with current_version."},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Reviewer tier record missing or unreadable.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/dev-reporting/summary":{"get":{"summary":"Developer reporting: the caller's own usage + verdict roll-up (tenant-scoped, read-only).","responses":{"200":{"description":"Usage + verdict summary."},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/dev-reporting/ai-record":{"get":{"summary":"Developer reporting: the caller's own feedback-based AI record (tenant-scoped, read-only).","parameters":[{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD lower bound; defaults to the first day of the current UTC month; must not be after to; range is at most 366 days.","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD upper bound; defaults to today in UTC.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Feedback-based agreement, overturn, abstention, and dispute figures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiRecord"}}}},"400":{"description":"Invalid date range.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API key lacks the verify:read scope.","x-acretix-codes":["agent_key_request_only","forbidden","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/dev-reporting/health":{"get":{"summary":"Developer reporting: own-tenant subscription health aggregate.","description":"Default-off, aggregate-only daily pass/exception-rate read. The tenant is server-resolved from the API key or identity-contract tenant header; a subscription_id not visible to the resolved tenant returns 404.","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD UTC lower bound."}},{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD UTC upper bound."}},{"name":"subscription_id","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}}],"responses":{"200":{"description":"Daily aggregate pass/exception health buckets; no raw verification rows."},"400":{"description":"Invalid date range or subscription_id.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Health view disabled, or subscription not found for the resolved tenant.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/dev-reporting/quickstart/telemetry":{"post":{"summary":"Append guided developer quickstart time-to-first-verdict telemetry.","description":"Tenant-scoped, append-only telemetry for the guided /developers quickstart. The server derives key_prefix from the bearer key; the request body contains only a de-identified handle and timestamps.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickstartTelemetryRequest"}}}},"responses":{"201":{"description":"Telemetry appended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickstartTelemetryEnvelope"}}}},"400":{"description":"Invalid handle/timing or key/PII-shaped fields supplied.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Telemetry for this handle already exists.","x-acretix-codes":["conflict"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/dev-reporting/quickstart/telemetry/{handle}":{"get":{"summary":"Read guided quickstart telemetry by de-identified handle.","description":"Tenant-scoped read; missing or other-tenant handles return { telemetry: null }.","parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{5,63}$"}}],"responses":{"200":{"description":"Own-tenant telemetry or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickstartTelemetryEnvelope"}}}},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Request conflicts with current telemetry.","x-acretix-codes":["conflict"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/dev-reporting/scoped-tags":{"post":{"summary":"Scoped bulk-tagging — private customer_gate case-memory only (single-party). Gated by SCOPED_LEARNING_ENABLED (503 when disabled).","responses":{"201":{"description":"Recorded scoped tags."},"400":{"description":"Invalid request.","x-acretix-codes":["invalid_json","invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Scoped bulk-tagging disabled.","x-acretix-codes":["service_unavailable"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/evidence/files":{"post":{"summary":"Upload supplier evidence file bytes.","description":"Accepts raw file bytes in the request body, with the type declared in Content-Type. Files are at most 4 MiB and are stored byte-exact as claimant evidence. This route is off until VERIFY_EVIDENCE_FILES_ENABLED is enabled.","requestBody":{"required":true,"content":{"text/plain":{"schema":{"type":"string","format":"binary"}},"text/markdown":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Evidence file stored as a claimant evidence packet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceFileUploadResponse"}}}},"400":{"description":"Evidence file body is required.","x-acretix-codes":["invalid_request"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid or expired bearer API key.","x-acretix-codes":["api_key_expired","key_on_hold","unauthorized"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access is forbidden.","x-acretix-codes":["agent_key_request_only","forbidden","identity_contract_tenant_mismatch","insufficient_scope"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Evidence file uploads are not enabled.","x-acretix-codes":["not_found"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body is too large.","x-acretix-codes":["payload_too_large"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"Content-Type is not allowed for evidence files.","x-acretix-codes":["unsupported_media_type"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Evidence file was refused by safety checks.","x-acretix-codes":["evidence_file_refused"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"API key per-minute limit reached; wait Retry-After seconds before retrying.","x-acretix-codes":["api_key_rate_limited"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error.","x-acretix-codes":["internal_error"],"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}}}