{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenAIIS Operator-Pinned Universal Registry Reference API",
    "version": "1.0.0-candidate",
    "description": "Fully executable loopback owner-operated registry HTTP reference. Admission uses out-of-band operator issuer-key/type allowlist; no client private signing keys or mutable history. Checkpoint issuance restricted to operator. This is NOT the unpermissioned global PoW network, nor proof of consent or ownership; does not automatically Bitcoin-anchor checkpoints."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:8082",
      "description": "IPv4 loopback only, mandatory"
    }
  ],
  "components": {
    "securitySchemes": {
      "operatorBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Process liveness",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        }
      }
    },
    "/v1/capabilities": {
      "get": {
        "operationId": "capabilities",
        "summary": "Complete local registry capability manifest",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        }
      }
    },
    "/v1/verify/inclusion": {
      "post": {
        "operationId": "verifyInclusion",
        "summary": "Verify signed inclusion against caller pinned keys",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/claims": {
      "post": {
        "operationId": "submitClaim",
        "summary": "Submit externally signed typed claim against operator provisioned pins",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "record_base64",
                  "payload_base64",
                  "issuer_id"
                ],
                "properties": {
                  "record_base64": {
                    "type": "string",
                    "contentEncoding": "base64"
                  },
                  "payload_base64": {
                    "type": "string",
                    "contentEncoding": "base64"
                  },
                  "issuer_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/checkpoints": {
      "post": {
        "operationId": "issueCheckpoint",
        "summary": "Sign and durably store Merkle checkpoint with operator authorization",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "maxProperties": 0
              }
            }
          }
        },
        "security": [
          {
            "operatorBearer": []
          }
        ]
      }
    },
    "/v1/claims/{digest}": {
      "get": {
        "operationId": "getClaim",
        "summary": "Retrieve a persisted canonical signed claim, but not typed payload",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        },
        "parameters": [
          {
            "name": "digest",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ]
      }
    },
    "/v1/claims/{digest}/receipt": {
      "get": {
        "operationId": "getReceipt",
        "summary": "Proof of inclusion against a stored signed checkpoint",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        },
        "parameters": [
          {
            "name": "digest",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ]
      }
    },
    "/v1/checkpoints/latest": {
      "get": {
        "operationId": "latestCheckpoint",
        "summary": "Latest signed checkpoint; does not assert Bitcoin confirmation",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        }
      }
    },
    "/v1/checkpoints/{size}": {
      "get": {
        "operationId": "checkpointAtSize",
        "summary": "Retrieve a particular immutable checkpoint",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        },
        "parameters": [
          {
            "name": "size",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/v1/proofs/consistency": {
      "get": {
        "operationId": "checkpointConsistency",
        "summary": "Consistency path between two published checkpoint tree sizes",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        },
        "parameters": [
          {
            "name": "old",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "new",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/v1/registry/status": {
      "get": {
        "operationId": "registryStatus",
        "summary": "Durable append-only registry current status",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        }
      }
    },
    "/v1/claim-types": {
      "get": {
        "operationId": "claimTypes",
        "summary": "List all supported typed claim profiles",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        }
      }
    },
    "/v1/verify/record": {
      "post": {
        "operationId": "verifySignedRecord",
        "summary": "Verify canonical record signature against caller-provided pinned key",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/verify/typed": {
      "post": {
        "operationId": "verifyTypedClaim",
        "summary": "Verify typed payload and issuer signature against caller-provided pinned key",
        "responses": {
          "200": {
            "description": "Successful operation with bounded cryptographic/trust assertions"
          },
          "400": {
            "description": "Malformed or unacceptable request"
          },
          "403": {
            "description": "Issuer or operator policy rejected"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Requires signed checkpoint or irreconcilable state"
          },
          "413": {
            "description": "Request is too large"
          },
          "415": {
            "description": "Unsupported content type"
          },
          "422": {
            "description": "Signed payload or Merkle proof not valid"
          },
          "201": {
            "description": "Durably registered typed claim; not evidence of independently authorized identity, consent, rights, or Bitcoin time"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    }
  }
}
