{
  "openapi": "3.0.3",
  "info": {
    "title": "QuantBOM \u2014 SecQDevOps MOD-08 Compliance & Certification API",
    "version": "0.5.0",
    "description": "Certify quantum software releases (CycloneDX QBOM evidence -> 24-control CRA gate -> signed certificate -> independent verification) and read the compliance scheme.\n\nIntegrator notes: all GET endpoints are free (no credit is spent); POST /v1/certify spends 1 prepaid credit. Scheme endpoints are public. Release endpoints require a per-user API key and only ever return the QBOM *document* and result JSONs \u2014 never circuit artifact bytes. Data returned here is evidence and verdicts; any downstream interpretation (e.g. LLM-generated explanations) is advisory and non-normative."
  },
  "servers": [
    {
      "url": "https://certify.zortenet.eu"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Per-user key from the QuantBOM dashboard (Account -> Generate key). `Authorization: Bearer <key>` is also accepted."
      },
      "AdminKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "The service operator's MOD08_API_KEY (admin endpoints only)."
      },
      "SessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "qb_session",
        "description": "Web-console session set by the magic-link sign-in (internal routes)."
      }
    }
  },
  "x-scopes": {
    "certify": "full per-user scope: POST /v1/certify, DELETE /v1/releases/{id}, and everything below",
    "explain": "POST /v1/explain, plus read",
    "read": "GET /v1/usage, GET /v1/releases*"
  },
  "paths": {
    "/healthz": {
      "get": {
        "summary": "Liveness probe",
        "responses": {
          "200": {
            "description": "Service is up",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Service is up",
                  "example": {
                    "status": "ok",
                    "service": "mod08-api-prototype"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/meta": {
      "get": {
        "summary": "Service discovery: versions, scheme identifiers, endpoint index",
        "responses": {
          "200": {
            "description": "Service metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Service metadata",
                  "example": {
                    "service": "quantbom",
                    "api_version": "0.5.0",
                    "scheme": "EU-CRA",
                    "catalogue_version": "cra-v1.0-cyclonedx-prototype@1.16.0",
                    "qbom_profile": "0.3.0",
                    "cyclonedx": "1.7 (ECMA-424:2025)",
                    "assurance": {
                      "tiers": [
                        "client-attested",
                        "service-verified",
                        "service-re-executed"
                      ],
                      "reexecution_available": true,
                      "equivalence_rederivation_available": true
                    },
                    "auth": {
                      "mode": "pilot-password",
                      "signup": "closed"
                    },
                    "endpoints": [
                      "/v1/scheme",
                      "/v1/certify",
                      "/v1/releases",
                      "..."
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/openapi.json": {
      "get": {
        "summary": "This document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.0 spec",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "OpenAPI 3.0 spec"
                }
              }
            }
          }
        }
      }
    },
    "/v1/harness": {
      "get": {
        "summary": "Harness actions and what each covers (public)",
        "description": "Every evidence action of the MOD-08 harness: who provides it, its status per quantum framework, how to switch it on (SDK keyword, CLI flag or partner tool command), the controls its evidence feeds and the requirements of every scheme those controls serve. Identical to the index shipped in the quantbom SDK (`quantbom actions`). With a filter, answers e.g. 'which action would cover CRA-II-3?'.",
        "parameters": [
          {
            "name": "framework",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "cirq",
            "description": "adds each action's status for this framework"
          },
          {
            "name": "requirement",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "CRA-II-3",
            "description": "only actions whose evidence feeds this requirement (any scheme)"
          },
          {
            "name": "control",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "QNT-05",
            "description": "only actions whose evidence feeds this control"
          }
        ],
        "responses": {
          "200": {
            "description": "Harness index (secqdevops.harness-index/v1), or the filtered actions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Harness index (secqdevops.harness-index/v1), or the filtered actions"
                }
              }
            }
          },
          "404": {
            "description": "Unknown framework, requirement or control",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Unknown framework, requirement or control"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schemes": {
      "get": {
        "summary": "Enumerate available compliance schemes (public, F3)",
        "responses": {
          "200": {
            "description": "Scheme registry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Scheme registry",
                  "example": {
                    "schemes": [
                      {
                        "id": "eu-cra",
                        "default": true,
                        "scheme": "EU-CRA",
                        "requirements_total": 11
                      },
                      {
                        "id": "eu-ai-act-quantum",
                        "default": false,
                        "scheme": "EU-AI-ACT-QUANTUM",
                        "requirements_total": 8
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/schemes/{scheme_id}": {
      "get": {
        "summary": "Overview of one scheme (public)",
        "parameters": [
          {
            "name": "scheme_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "eu-ai-act-quantum"
          }
        ],
        "responses": {
          "200": {
            "description": "Scheme overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Scheme overview"
                }
              }
            }
          },
          "404": {
            "description": "Unknown scheme id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Unknown scheme id"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scheme": {
      "get": {
        "summary": "Compliance-scheme overview (public)",
        "description": "Scheme id, versions, control/requirement counts, harmonised-standards status, and links to the full catalogue/mapping. Stable grounding material for knowledge bases.",
        "responses": {
          "200": {
            "description": "Scheme overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Scheme overview"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scheme/catalogue": {
      "get": {
        "summary": "Full control catalogue (public)",
        "description": "All gate controls with title, description, check name, required evidence and standard_refs (CRA / EN 40000 / CEN-CENELEC / NIST / ETSI identifiers).",
        "responses": {
          "200": {
            "description": "control_catalogue.cra-cdx.json contents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "control_catalogue.cra-cdx.json contents"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scheme/controls/{control_id}": {
      "get": {
        "summary": "One control by id (public)",
        "parameters": [
          {
            "name": "control_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "CRA-ESR-06"
          }
        ],
        "responses": {
          "200": {
            "description": "Control detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Control detail"
                }
              }
            }
          },
          "404": {
            "description": "Unknown control id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Unknown control id"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scheme/mapping": {
      "get": {
        "summary": "CRA requirements mapping (public)",
        "description": "Regulation (EU) 2024/2847 Annex I requirements mapped to controls, owner modules and draft EN 40000 standard_refs (M/606).",
        "responses": {
          "200": {
            "description": "cra_mapping.json contents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "cra_mapping.json contents"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scheme/requirements/{requirement_id}": {
      "get": {
        "summary": "One CRA requirement with its controls resolved (public)",
        "parameters": [
          {
            "name": "requirement_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "CRA-II-2"
          }
        ],
        "responses": {
          "200": {
            "description": "Requirement detail incl. resolved controls",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Requirement detail incl. resolved controls"
                }
              }
            }
          },
          "404": {
            "description": "Unknown requirement id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Unknown requirement id"
                }
              }
            }
          }
        }
      }
    },
    "/v1/certify": {
      "post": {
        "summary": "Certify an evidence bundle (spends 1 credit)",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Body: a zip of the client-collected evidence (sbom.cdx.json + artifacts). Normally produced by the `quantbom` SDK, not hand-built. The bundle is evaluated in an ephemeral tempdir; nothing is stored unless X-Retain is set. CRA-SIGN-01 rests on the PRODUCER's signature (quantbom keygen; quantbom certify --sign): an unsigned bundle is NON_COMPLIANT; the service countersigns what it received as a receipt. The response's `bundle` maps file names to the files' exact text as the service wrote them (what the SDK writes to the local mirror): csnap.json, certificate.json, certificate.json.att.json, signing.pub, verification.json, plus the QBOM the gate ran on (sbom.cdx.json, countersigned) and the receipt (evidence/service-attestation.json, evidence/service-signing.pub) \u2014 the complete bundle `quantbom verify` checks offline; the attestations' digests are over these bytes. Where the host has mqt.qcec, the certificate carries `service_checks.QNT-05` (the equivalence proof re-derived from the circuit bytes), outside its reproducible payload.",
        "parameters": [
          {
            "name": "X-Release-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "my-app@1.2.3"
          },
          {
            "name": "X-Retain",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Opt into server-side retention of the QBOM document + results (never artifact bytes)."
          },
          {
            "name": "X-Scheme",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Compliance scheme id (default eu-cra; enumerate via GET /v1/schemes). The certificate's requirement mapping follows the chosen scheme."
          },
          {
            "name": "X-Assurance",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "standard",
                "re-executed"
              ]
            },
            "description": "re-executed: the service independently re-runs the circuit (size-capped, privacy=standard only) and must reproduce the claimed result distribution; costs 1 extra credit. Response/certificate carry assurance: service-verified | service-re-executed | re-execution-failed."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/zip": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gate verdict + certificate + verification + result bundle",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Gate verdict + certificate + verification + result bundle",
                  "example": {
                    "release_id": "my-app@1.2.3",
                    "overall_status": "COMPLIANT",
                    "retained": 7,
                    "certificate": {
                      "certificate_id": "CERT-\u2026",
                      "overall_status": "PARTIALLY_ASSESSED",
                      "privacy_mode": "standard",
                      "coverage": {
                        "coverage_pct": 90.9
                      }
                    },
                    "verification": {
                      "verdict": "VERIFIED"
                    },
                    "credits_remaining": 99,
                    "bundle": {
                      "csnap.json": "\u2026",
                      "certificate.json": "\u2026",
                      "certificate.json.att.json": "\u2026",
                      "signing.pub": "\u2026",
                      "verification.json": "\u2026",
                      "sbom.cdx.json": "\u2026",
                      "evidence/service-attestation.json": "\u2026",
                      "evidence/service-signing.pub": "\u2026"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed bundle",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Malformed bundle"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid or missing API key"
                }
              }
            }
          },
          "402": {
            "description": "No credits remaining",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No credits remaining"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the certify scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key lacks the certify scope"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "x-scope": "certify"
      }
    },
    "/v1/usage": {
      "get": {
        "summary": "Credit balance and recent usage",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "read",
        "responses": {
          "200": {
            "description": "Balance + recent events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Balance + recent events"
                }
              }
            }
          },
          "401": {
            "description": "Invalid key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid key"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/v1/keys": {
      "get": {
        "summary": "The service's certification-authority public key(s) \u2014 the trust anchor (public, P0-3)",
        "description": "Current and retired Ed25519 public keys with key_id (sha256 of the raw key) and the PEM's sha256. Verify certificate.json.att.json and evidence/attestation.json against a key listed here whose key_id equals the DSSE envelope's keyid, instead of trusting the copy inside a result bundle. Also served at /.well-known/quantbom-signing-keys.json. Rotation: KEY_LIFECYCLE.md.",
        "responses": {
          "200": {
            "description": "Signing keys (secqdevops.signing-keys/v1)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Signing keys (secqdevops.signing-keys/v1)",
                  "example": {
                    "schema": "secqdevops.signing-keys/v1",
                    "issuer": "QuantBOM (SecQDevOps MOD-08)",
                    "keys": [
                      {
                        "key_id": "sha256:\u2026",
                        "algorithm": "Ed25519",
                        "status": "current",
                        "public_key_pem": "-----BEGIN PUBLIC KEY-----\u2026",
                        "pem_sha256": "sha256:\u2026"
                      }
                    ],
                    "notes": []
                  }
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/security.txt": {
      "get": {
        "summary": "Coordinated vulnerability disclosure contact (RFC 9116, public)",
        "responses": {
          "200": {
            "description": "security.txt",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/releases": {
      "get": {
        "summary": "List retained releases",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "read",
        "responses": {
          "200": {
            "description": "Retained releases",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Retained releases",
                  "example": {
                    "releases": [
                      {
                        "id": 7,
                        "release_id": "my-app@1.2.3",
                        "cert_id": "CERT-\u2026",
                        "overall_status": "COMPLIANT",
                        "privacy_mode": "strict",
                        "stale": 0,
                        "last_rescan_at": 1780000000,
                        "created_at": 1779990000
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Authentication required"
                }
              }
            }
          }
        }
      }
    },
    "/v1/releases/{id}": {
      "get": {
        "summary": "One retained release: full stored QBOM document + result JSONs",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stored release (sbom + results)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Stored release (sbom + results)"
                }
              }
            }
          },
          "404": {
            "description": "No such stored release",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No such stored release"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a retained release (right to erasure)",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "certify",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Deleted",
                  "example": {
                    "deleted": true
                  }
                }
              }
            }
          },
          "404": {
            "description": "No such stored release",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No such stored release"
                }
              }
            }
          }
        }
      }
    },
    "/v1/releases/{id}/files/{name}": {
      "get": {
        "summary": "One file of a retained release, as the bytes the service wrote",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "read",
        "description": "certificate.json, certificate.json.att.json, signing.pub, csnap.json, verification.json or sbom.cdx.json of a release certified with X-Retain \u2014 the same bytes /v1/certify's bundle carried, so the certificate's attestation verifies over the downloaded certificate.json. Session cookie or API key.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "certificate.json",
                "certificate.json.att.json",
                "signing.pub",
                "csnap.json",
                "verification.json",
                "sbom.cdx.json"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file (application/json or application/x-pem-file)"
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Authentication required"
                }
              }
            }
          },
          "404": {
            "description": "No such stored release, or no such file (e.g. an unsigned certificate has no attestation)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No such stored release, or no such file (e.g. an unsigned certificate has no attestation)"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cases": {
      "get": {
        "summary": "The before/after case pack: one Eclipse Qrisp QBOM per unique FAIL",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "read",
        "description": "One case per control a release can fail (23 of 24; QNT-07 needs the QIR toolchain). Each case's `before` QBOM fails exactly that control and no other; its `after` QBOM, the same release fixed, fails none. Categories: genuine defect, simulated toolchain fault, evidence defect. Built for MOD-02 (LLM/SLM code assurance) as review inputs with known answers. Session cookie or API key; free.",
        "responses": {
          "200": {
            "description": "The case index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The case index",
                  "example": {
                    "count": 23,
                    "cases": [
                      {
                        "control": "QBOM-BENCH-02",
                        "case": "01-QBOM-BENCH-02",
                        "category": "genuine defect",
                        "title": "A Qrisp refactor swaps a controlled flip",
                        "before": {
                          "overall_status": "NON_COMPLIANT",
                          "fails": [
                            "QBOM-BENCH-02"
                          ]
                        },
                        "after": {
                          "overall_status": "COMPLIANT",
                          "fails": []
                        },
                        "links": {
                          "before": {
                            "qbom": "/v1/cases/QBOM-BENCH-02/before/qbom"
                          }
                        }
                      }
                    ],
                    "not_demonstrated": {
                      "QNT-07": "\u2026"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Authentication required"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cases/{control_id}": {
      "get": {
        "summary": "One case: the failing control, its story, the gate's findings, what changed",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "read",
        "parameters": [
          {
            "name": "control_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "QBOM-BENCH-02"
          }
        ],
        "responses": {
          "200": {
            "description": "The case record (case.json)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The case record (case.json)"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Authentication required"
                }
              }
            }
          },
          "404": {
            "description": "No case for that control",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No case for that control"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cases/{control_id}/{phase}/qbom": {
      "get": {
        "summary": "The case's QBOM (CycloneDX 1.7, QBOM profile 0.3), before or after",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "read",
        "parameters": [
          {
            "name": "control_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "QBOM-BENCH-02"
          },
          {
            "name": "phase",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "before",
                "after"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "sbom.cdx.json (application/vnd.cyclonedx+json)"
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Authentication required"
                }
              }
            }
          },
          "404": {
            "description": "No case for that control",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No case for that control"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cases/{control_id}/{phase}/bundle.zip": {
      "get": {
        "summary": "The case's whole evidence bundle as a zip, before or after",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "read",
        "description": "The QBOM with every file it references: quantum/ (native-program.json in Qrisp's own terms, program.qasm, native-result.json with outcomes per Qrisp variable, the QPY circuits), evidence/ (signature, provenance, partner documents), crypto/. What `quantbom verify` and the gate read.",
        "parameters": [
          {
            "name": "control_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "QBOM-BENCH-02"
          },
          {
            "name": "phase",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "before",
                "after"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The bundle (application/zip)"
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Authentication required"
                }
              }
            }
          },
          "404": {
            "description": "No case for that control",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No case for that control"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cases/{control_id}/{phase}/verdict": {
      "get": {
        "summary": "The deployed gate's verdict on the case bundle, evaluated now",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "read",
        "description": "Runs the service's gate on the stored bundle at request time: no credit, no certificate. `before` must fail exactly `control_id`; `after` must fail nothing; `matches_expected` says whether the deployed gate agrees. Includes every control's result, the failing control's findings and the N-A reasons.",
        "parameters": [
          {
            "name": "control_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "QBOM-BENCH-02"
          },
          {
            "name": "phase",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "before",
                "after"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The live verdict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The live verdict",
                  "example": {
                    "control": "QBOM-BENCH-02",
                    "phase": "before",
                    "overall_status": "NON_COMPLIANT",
                    "fails": [
                      "QBOM-BENCH-02"
                    ],
                    "expected_fails": [
                      "QBOM-BENCH-02"
                    ],
                    "matches_expected": true,
                    "findings": [
                      {
                        "control_id": "QBOM-BENCH-02",
                        "message": "observed result distribution deviates from the declared expectation (TVD 0.509138 > tolerance 0.050000)"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Authentication required"
                }
              }
            }
          },
          "404": {
            "description": "No case for that control",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No case for that control"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assessments": {
      "post": {
        "summary": "SC-0040: assess a deployment's evidence by reference (MOD-04 -> MOD-08)",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "assess",
        "description": "ICD interface IF-0040. The body names the evidence by MOD-13 reference, never its bytes: either one `BUNDLE` (a zip of the QBOM and every file it references), or one `QBOM` with any number of `EVIDENCE` references, each with the bundle-relative `path` the QBOM references it by. A `sha256` per reference is checked against the fetched bytes. Answers 202 at once with the assessment; the evaluation runs in the background and `GET /v1/assessments/{assessment_id}` reports it. MOD-08 returns a compliance outcome and its evidence; the PASS / FAIL / EXCEPTION gate decision is MOD-12's. No credit is spent. Repeating a POST with the same assessment_id and body returns the same assessment (200 once it is finished); the same id with a different body is a 409. Until MOD-13 exposes its API only `mod13-stub:` references resolve, which serve the MOD-02 case pack (e.g. `mod13-stub:cases/QNT-09/before/bundle.zip`); anything else is a 422. The key needs the `assess` scope, which the operator issues (MOD04_SC0040.md).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "assessment_id",
                  "evidence_refs"
                ],
                "properties": {
                  "assessment_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:-]{1,300}$",
                    "description": "MOD-04: <run_id>:<gate>, run_id being the Argo Workflow name"
                  },
                  "deployment_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:-]{1,300}$",
                    "description": "Optional; the DEPLOY stage's deployment"
                  },
                  "release_id": {
                    "type": "string",
                    "description": "Optional; by default the QBOM's name@version"
                  },
                  "gate": {
                    "type": "string",
                    "enum": [
                      "RELEASE",
                      "DEPLOY"
                    ],
                    "description": "Defaults to the assessment_id's :RELEASE / :DEPLOY suffix, else RELEASE; may not contradict it"
                  },
                  "evidence_refs": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 500,
                    "items": {
                      "type": "object",
                      "required": [
                        "type",
                        "ref"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "BUNDLE",
                            "QBOM",
                            "EVIDENCE"
                          ]
                        },
                        "ref": {
                          "type": "string"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^(sha256:)?[0-9a-fA-F]{64}$"
                        },
                        "path": {
                          "type": "string",
                          "description": "EVIDENCE only: where the QBOM references the file"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "assessment_id": "qbom-release-x7k2p:RELEASE",
                  "gate": "RELEASE",
                  "evidence_refs": [
                    {
                      "type": "BUNDLE",
                      "ref": "mod13-stub:cases/QNT-09/before/bundle.zip"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted (or still running, on a repeated POST); poll the Location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Accepted (or still running, on a repeated POST); poll the Location",
                  "example": {
                    "assessment_id": "qbom-release-x7k2p:RELEASE",
                    "deployment_id": null,
                    "gate": "RELEASE",
                    "status": "pending",
                    "submitted_at": "2026-11-10T14:00:00Z",
                    "started_at": null,
                    "completed_at": null,
                    "compliance_outcome": null,
                    "release_id": null,
                    "qbom_ref": null,
                    "csnap_ref": null,
                    "certificate_ref": null,
                    "certificate_attestation_ref": null,
                    "aexp_ref": null,
                    "certificate_id": null,
                    "catalogue_version": null,
                    "reproducibility_hash": null,
                    "summary": null,
                    "findings": null,
                    "digests": null,
                    "error": null,
                    "links": {
                      "self": "/v1/assessments/qbom-release-x7k2p:RELEASE"
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "A repeated POST of a finished assessment: the assessment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A repeated POST of a finished assessment: the assessment"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (the error names the field)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request (the error names the field)"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Missing or invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the assess scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key lacks the assess scope"
                }
              }
            }
          },
          "409": {
            "description": "This assessment_id already names a different request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "This assessment_id already names a different request"
                }
              }
            }
          },
          "422": {
            "description": "A reference this deployment cannot resolve (MOD-13 not connected yet)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A reference this deployment cannot resolve (MOD-13 not connected yet)"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/v1/assessments/{assessment_id}": {
      "get": {
        "summary": "SC-0040: the assessment's status and, when completed, its outcome and evidence references",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "assess",
        "description": "`status` is pending, running, completed or failed; while it is pending or running the response carries Retry-After. When completed: `compliance_outcome` (COMPLIANT, NON_COMPLIANT or PARTIALLY_ASSESSED), `qbom_ref`, `csnap_ref`, `certificate_ref`, `certificate_attestation_ref` (when this instance signs) and `aexp_ref` (MOD-13 references), the certificate id, the catalogue version, the CSNAP summary and findings, and the SHA-256 of each artefact. When failed: `error` says why (an unresolvable reference, a digest mismatch, an evidence bundle without a QBOM). Only the key holder's own assessments are visible.",
        "parameters": [
          {
            "name": "assessment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The assessment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The assessment",
                  "example": {
                    "assessment_id": "qbom-release-x7k2p:RELEASE",
                    "deployment_id": null,
                    "gate": "RELEASE",
                    "status": "completed",
                    "submitted_at": "2026-11-10T14:00:00Z",
                    "started_at": "2026-11-10T14:00:00Z",
                    "completed_at": "2026-11-10T14:00:01Z",
                    "compliance_outcome": "NON_COMPLIANT",
                    "release_id": "teleport@1.0.0",
                    "qbom_ref": "mod13-stub:cases/QNT-09/before/bundle.zip#sbom.cdx.json",
                    "csnap_ref": "mod13-stub:artifacts/7-3f9a.../csnap.json",
                    "certificate_ref": "mod13-stub:artifacts/7-3f9a.../certificate.json",
                    "certificate_attestation_ref": "mod13-stub:artifacts/7-3f9a.../certificate.json.att.json",
                    "aexp_ref": "mod13-stub:artifacts/7-3f9a.../aexp.zip",
                    "certificate_id": "CERT-\u2026",
                    "catalogue_version": "cra-v1.0-cyclonedx-prototype@1.16.0",
                    "reproducibility_hash": null,
                    "summary": {
                      "total_controls": 24,
                      "passed": 15,
                      "failed": 1,
                      "exceptions": 0,
                      "not_applicable": 8
                    },
                    "findings": [
                      {
                        "control_id": "QNT-09",
                        "message": "the program on its own framework's simulator disagrees with the shared-format run (TVD 1.0)"
                      }
                    ],
                    "digests": {
                      "qbom": "sha256:\u2026",
                      "csnap": "sha256:\u2026",
                      "certificate": "sha256:\u2026",
                      "aexp": "sha256:\u2026"
                    },
                    "error": null,
                    "links": {
                      "self": "/v1/assessments/qbom-release-x7k2p:RELEASE"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Missing or invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the assess scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key lacks the assess scope"
                }
              }
            }
          },
          "404": {
            "description": "No such assessment for this key's holder",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No such assessment for this key's holder"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/v1/releases/{id}/context": {
      "get": {
        "summary": "LLM-ready compliance context for a retained release",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "A compact digest designed for downstream explanation engines (e.g. the SecQDevOps Compliance Manager): verdicts, failed/N-A controls joined with their catalogue descriptions, findings and standard_refs, certificate gaps with owners, and a vulnerability summary. Contains metadata only \u2014 no circuit artifacts, no SBOM blob.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compliance context digest",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Compliance context digest",
                  "example": {
                    "release_id": "my-app@1.2.3",
                    "overall_status": "NON_COMPLIANT",
                    "privacy_mode": "standard",
                    "stale": false,
                    "certificate": {
                      "certificate_id": "CERT-\u2026",
                      "overall_status": "PARTIALLY_ASSESSED",
                      "coverage": {
                        "coverage_pct": 72.7
                      }
                    },
                    "verification_verdict": "VERIFIED",
                    "failed_controls": [
                      {
                        "control_id": "CRA-SIGN-01",
                        "title": "Evidence signature verification",
                        "findings": [
                          "missing secqdevops:signature-ref \u2026"
                        ],
                        "standard_refs": []
                      }
                    ],
                    "not_applicable_controls": [
                      "CRA-CRYPTO-01"
                    ],
                    "gaps": [
                      {
                        "id": "CRA-I-3j",
                        "clause": "Annex I, Part I 3(j)",
                        "title": "Security logging \u2026",
                        "owner_module": "MOD-06/MOD-10",
                        "standard_refs": [
                          "EN 40000-1-4 (prEN)"
                        ]
                      }
                    ],
                    "vulnerabilities": {
                      "total": 11,
                      "by_severity": {
                        "high": 4,
                        "medium": 6,
                        "low": 1
                      },
                      "top": [
                        "GHSA-\u2026"
                      ]
                    },
                    "standards_basis": {
                      "request": "C(2025) 618 final / M/606"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No such stored release",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No such stored release"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Authentication required"
                }
              }
            }
          }
        }
      }
    },
    "/v1/certificates/{cert_id}": {
      "get": {
        "summary": "Public certificate check (no auth)",
        "description": "What the certificate holder publishes by sharing the id: gate verdict, release id, issue date, retention/staleness (the red lane as publicly visible trust decay). Never user identity.",
        "parameters": [
          {
            "name": "cert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "CERT-1e2f8f8dfdbec1d2"
          }
        ],
        "responses": {
          "200": {
            "description": "Public certificate record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Public certificate record",
                  "example": {
                    "certificate_id": "CERT-\u2026",
                    "release_id": "my-app@1.2.3",
                    "gate_status": "COMPLIANT",
                    "scheme": "EU-CRA",
                    "issued_at": 1780000000,
                    "retained": true,
                    "stale": false
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown certificate id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Unknown certificate id"
                }
              }
            }
          }
        }
      }
    },
    "/badge/{cert_id}.svg": {
      "get": {
        "summary": "Public status badge (SVG, no auth)",
        "description": "Shields-style badge for READMEs/CI pages. Green COMPLIANT, red NON_COMPLIANT, amber when stale, gray for unknown ids (always 200 so embedded images never break).",
        "parameters": [
          {
            "name": "cert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG badge",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/explain": {
      "post": {
        "summary": "Advisory explanation via the Compliance Manager (strictly non-normative)",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-scope": "explain",
        "description": "Body: {control_id, store_id?} for a grounded control explanation (findings included when the release is retained), or {question, context?} passthrough. Requires QUANTBOM_CM_URL on the service; 503 when unconfigured/unreachable. Responses always carry advisory=true, non_normative=true \u2014 never part of any verdict.",
        "responses": {
          "200": {
            "description": "Grounded explanation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Grounded explanation",
                  "example": {
                    "answer": "\u2026",
                    "citations": [
                      "concepts/annex-i.md"
                    ],
                    "advisory": true,
                    "non_normative": true
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown control id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Unknown control id"
                }
              }
            }
          },
          "503": {
            "description": "Explanation service not configured/unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Explanation service not configured/unreachable"
                }
              }
            }
          }
        }
      }
    },
    "/v1/releases/{id}/diff/{other}": {
      "get": {
        "summary": "What changed between two retained releases",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "other",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Components added/removed, vulnerabilities new/resolved, control-status changes, coverage/privacy deltas",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Components added/removed, vulnerabilities new/resolved, control-status changes, coverage/privacy deltas"
                }
              }
            }
          },
          "404": {
            "description": "One or both stored releases not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "One or both stored releases not found"
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/standards-drift": {
      "post": {
        "summary": "Regulatory drift: mark releases resting on a changed standard as STALE (admin)",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Drift summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Drift summary",
                  "example": {
                    "standard_ref": "EN 40000-1-3",
                    "scanned": 12,
                    "marked_stale": 3
                  }
                }
              }
            }
          },
          "400": {
            "description": "standard_ref required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "standard_ref required"
                }
              }
            }
          },
          "401": {
            "description": "Invalid admin key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid admin key"
                }
              }
            }
          },
          "403": {
            "description": "Admin key not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key not configured"
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/rescan": {
      "post": {
        "summary": "Re-scan all retained releases against current CVE data (admin)",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Re-scan summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Re-scan summary"
                }
              }
            }
          },
          "401": {
            "description": "Invalid admin key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid admin key"
                }
              }
            }
          },
          "403": {
            "description": "Admin key not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key not configured"
                }
              }
            }
          },
          "503": {
            "description": "grype unavailable on host",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "grype unavailable on host"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/export": {
      "get": {
        "summary": "Everything held about the signed-in account, as one JSON document (GDPR access and portability; internal)",
        "description": "Console session only. Account, API keys (prefix, label, scope, dates; never hashes), credit ledger, usage, certifications, checkouts, retained releases with their stored QBOM and results.",
        "responses": {
          "200": {
            "description": "Account export (quantbom.account-export/v1)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Account export (quantbom.account-export/v1)"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Not signed in"
                }
              }
            }
          }
        },
        "x-stability": "internal"
      }
    },
    "/v1/auth/password": {
      "post": {
        "summary": "Pilot sign-in: email + the shared project password sets the session cookie (internal)",
        "description": "Enabled only when the deployment sets QUANTBOM_PILOT_PASSWORD (then sign-up by email is closed and /v1/meta auth.mode is pilot-password). The account is created on first sign-in with the free tier. Five attempts per 15 minutes per client.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "password"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed in; Set-Cookie qb_session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Signed in; Set-Cookie qb_session",
                  "example": {
                    "ok": true,
                    "email": "you@example.org"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Wrong project password",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Wrong project password"
                }
              }
            }
          },
          "404": {
            "description": "Password sign-in not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Password sign-in not enabled"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "x-stability": "internal"
      }
    },
    "/v1/auth/request-link": {
      "post": {
        "summary": "Request a magic sign-in link by email (internal)",
        "x-stability": "internal",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "{email}",
                "example": {
                  "email": "you@example.com"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sent (a dev link is returned only with QUANTBOM_DEV_AUTH=1 on loopback)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Sent (a dev link is returned only with QUANTBOM_DEV_AUTH=1 on loopback)"
                }
              }
            }
          },
          "400": {
            "description": "Invalid email",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid email"
                }
              }
            }
          },
          "503": {
            "description": "No mail transport configured on a public host",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No mail transport configured on a public host"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/v1/auth/verify": {
      "get": {
        "summary": "Magic-link click: sets the session cookie and redirects to the console (internal)",
        "x-stability": "internal",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Signed in"
          },
          "400": {
            "description": "Invalid or expired link",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid or expired link"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/logout": {
      "post": {
        "summary": "End the console session (internal)",
        "x-stability": "internal",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Signed out",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Signed out"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "summary": "Console account overview (internal)",
        "x-stability": "internal",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Balance, keys, recent certifications",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Balance, keys, recent certifications"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Not signed in"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete the signed-in account (GDPR erasure; internal)",
        "x-stability": "internal",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "description": "Console session only, confirmed by sending the account's own email. Removes the account, API keys, sessions, credits, usage and retained releases; keeps certification records (no personal data) re-attributed to a reserved holder so /v1/certificates/{id} keeps answering. Clears the session cookie.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "{confirm}",
                "example": {
                  "confirm": "you@example.org"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What was removed and what was kept",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "What was removed and what was kept",
                  "example": {
                    "deleted": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Confirmation missing or wrong",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Confirmation missing or wrong"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Not signed in"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/keys": {
      "post": {
        "summary": "Issue a per-user API key with a scope (internal)",
        "x-stability": "internal",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "{label?, scope?}",
                "example": {
                  "label": "ci",
                  "scope": "read"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The key, shown once",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key, shown once",
                  "example": {
                    "api_key": "qb_live_\u2026",
                    "scope": "read"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Unknown scope"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Not signed in"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/v1/account/keys/{id}/revoke": {
      "post": {
        "summary": "Revoke one of the caller's keys (internal)",
        "x-stability": "internal",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Revoked"
                }
              }
            }
          },
          "404": {
            "description": "No such key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No such key"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Not signed in"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/checkout": {
      "post": {
        "summary": "Start a credit-pack checkout from the console (internal)",
        "x-stability": "internal",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Checkout session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Checkout session"
                }
              }
            }
          },
          "403": {
            "description": "Billing disabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Billing disabled"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Not signed in"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/v1/billing/packs": {
      "get": {
        "summary": "Credit-pack catalogue (public; purchasing stays off unless QUANTBOM_BILLING_ENABLED)",
        "x-stability": "internal",
        "responses": {
          "200": {
            "description": "Packs and whether billing/Stripe are enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Packs and whether billing/Stripe are enabled"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/checkout": {
      "post": {
        "summary": "Start a credit-pack checkout (internal)",
        "x-stability": "internal",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "SessionCookie": []
          }
        ],
        "x-scope": "certify",
        "responses": {
          "200": {
            "description": "Checkout session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Checkout session"
                }
              }
            }
          },
          "403": {
            "description": "Billing disabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Billing disabled"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Authentication required"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/v1/billing/simulate": {
      "post": {
        "summary": "Complete a checkout without Stripe (TEST mode only, internal)",
        "x-stability": "internal",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Credits granted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Credits granted"
                }
              }
            }
          },
          "403": {
            "description": "Disabled when Stripe is configured or billing is off",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Disabled when Stripe is configured or billing is off"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/v1/billing/webhook": {
      "post": {
        "summary": "Stripe webhook (signature-verified, internal)",
        "x-stability": "internal",
        "responses": {
          "200": {
            "description": "Received",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Received"
                }
              }
            }
          },
          "400": {
            "description": "Signature verification failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Signature verification failed"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/compliance/evaluations": {
      "post": {
        "summary": "Evaluate a release from a server-side SBOM path",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body"
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/releases/{release_id}/snapshot": {
      "get": {
        "summary": "Latest CSNAP for a release",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "parameters": [
          {
            "name": "release_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/compliance/releases/{release_id}/certificate": {
      "get": {
        "summary": "Latest certificate for a release",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "parameters": [
          {
            "name": "release_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "Issue a certificate for a release",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "parameters": [
          {
            "name": "release_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body"
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/releases/{release_id}/audit-export": {
      "post": {
        "summary": "Build the AEXP audit export",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "parameters": [
          {
            "name": "release_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body"
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/deploy/{release_id}/envbase": {
      "post": {
        "summary": "ENVBASE check (prototype: caller-supplied deviations)",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "parameters": [
          {
            "name": "release_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body"
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/drift/run": {
      "post": {
        "summary": "Run the DRIFT check (prototype)",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body"
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/drift/current": {
      "get": {
        "summary": "Current drift report (prototype)",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/compliance/controls/{control_id}/history": {
      "get": {
        "summary": "Verdict history of one control",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "parameters": [
          {
            "name": "control_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/compliance/self-service/check": {
      "post": {
        "summary": "One-shot evaluation (FR-0026)",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body"
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/self-service/certificate": {
      "post": {
        "summary": "One-shot evaluate -> certify -> export (FR-0027)",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body"
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/verify": {
      "post": {
        "summary": "Independent verification of a bundle from server-side paths",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body"
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/contracts": {
      "get": {
        "summary": "Interface contract summary",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/integrations/state": {
      "get": {
        "summary": "Dummy sibling-module integration state",
        "security": [
          {
            "AdminKeyAuth": []
          }
        ],
        "x-stability": "legacy",
        "description": "Consortium demo console route (API_CONTRACTS.md). Requires the operator's MOD08_API_KEY; closed (401) when none is configured. Server-side path parameters in the body are confined to the repository and DATA_DIR.",
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or path outside the allowed roots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Invalid request or path outside the allowed roots"
                }
              }
            }
          },
          "401": {
            "description": "Admin key missing, invalid or not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Admin key missing, invalid or not configured"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured cap (refused before it is read)"
          },
          "429": {
            "description": "Rate limit exceeded for this key or client; Retry-After says when"
          }
        }
      }
    }
  }
}