{
  "openapi": "3.1.0",
  "info": {
    "title": "C3 Verified Response Layer API",
    "version": "0.1",
    "summary": "Static API contract for Verified Response Layer v0.1.",
    "description": "Verified Response Layer v0.1 is a deterministic/static answer surface. It does not use a runtime LLM, does not generate open-ended answers, and treats unknown questions or registry mismatch as HOLD."
  },
  "servers": [
    {
      "url": "https://www.c3-anchor.jp"
    }
  ],
  "paths": {
    "/api/verified-answer": {
      "post": {
        "operationId": "postVerifiedAnswer",
        "summary": "Resolve a question against registered public answer cards.",
        "description": "Accepts a question string and returns RELEASE, HOLD, or ESCALATE using deterministic/static answer-card matching. Unknown questions return HOLD. Registry mismatch should be treated as HOLD before calling this endpoint.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifiedAnswerRequest"
              },
              "examples": {
                "knownQuestion": {
                  "summary": "Known question",
                  "value": {
                    "question": "what is c3"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic/static answer-card response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifiedAnswerResponse"
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method. The API still returns JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MethodNotAllowedResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "VerifiedAnswerRequest": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "question"
        ],
        "properties": {
          "question": {
            "type": "string"
          }
        }
      },
      "VerifiedStatus": {
        "type": "string",
        "enum": [
          "RELEASE",
          "HOLD",
          "ESCALATE"
        ]
      },
      "VerifiedAnswerResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "response_version",
          "status",
          "answer_status",
          "reason_code",
          "reason_codes",
          "question",
          "normalized_question",
          "card_id",
          "answer",
          "evidence_refs",
          "limits",
          "policy"
        ],
        "properties": {
          "response_version": {
            "type": "string",
            "const": "VRL-0.1"
          },
          "status": {
            "$ref": "#/components/schemas/VerifiedStatus"
          },
          "answer_status": {
            "$ref": "#/components/schemas/VerifiedStatus"
          },
          "reason_code": {
            "type": "string"
          },
          "reason_codes": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            },
            "description": "Array alias whose first item is the primary reason_code."
          },
          "question": {
            "type": "string"
          },
          "normalized_question": {
            "type": "string"
          },
          "card_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "answer": {
            "type": [
              "string",
              "null"
            ]
          },
          "evidence_refs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "limits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "policy": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "runtime_llm",
              "matching",
              "raw_query_logging"
            ],
            "properties": {
              "runtime_llm": {
                "type": "boolean",
                "const": false
              },
              "matching": {
                "type": "string"
              },
              "raw_query_logging": {
                "type": "boolean",
                "const": false
              }
            }
          }
        }
      },
      "MethodNotAllowedResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "response_version",
          "status",
          "answer_status",
          "reason_code",
          "reason_codes"
        ],
        "properties": {
          "response_version": {
            "type": "string",
            "const": "VRL-0.1"
          },
          "status": {
            "type": "string",
            "const": "HOLD"
          },
          "answer_status": {
            "type": "string",
            "const": "HOLD"
          },
          "reason_code": {
            "type": "string",
            "const": "RC_METHOD_NOT_ALLOWED"
          },
          "reason_codes": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "const": "RC_METHOD_NOT_ALLOWED"
              }
            ],
            "minItems": 1
          }
        }
      }
    }
  },
  "x-c3-boundary": {
    "response_layer": "deterministic/static",
    "runtime_llm": false,
    "unknown_questions": "HOLD",
    "registry_mismatch": "HOLD",
    "raw_query_logging": false,
    "does_not_mean": [
      "outside assessment",
      "mark grant",
      "compliance result",
      "operational readiness statement",
      "broad safety statement",
      "legal, financial, medical, or other professional advice"
    ]
  }
}
