{
  "openapi": "3.1.0",
  "info": {
    "title": "GoCheckYourself — Unified Archive & Staged Submission API (The GCY Standard)",
    "version": "2.1.0",
    "summary": "Machine-readable API under The GCY Standard (spec gcy-standard/2026; legacy aliases GCY-2, GCY-1) for offline-verifiable Lean 4.34.1 papers, standalone Zenodo deposits, 43 public Verify Kits, directional leaderboards, tools, and staged offline contributor submission contract.",
    "description": "Read-only GET endpoints are live as deterministic static JSON directly at https://gocheckyourself.org (compact overview at /llms.txt, full single-file mirror at /llms-full.txt). Every active deposit ships full public offline verification files and public clean-machine Ubuntu CI logs (zero private-tool or withheld-file dependencies). The Public Verification Receipt API (GET /api/v1/verify-kit/index.json, GET /api/v1/verify-kit/{slug}.json, POST /api/v1/receipts, GET /api/v1/receipts, GET /api/v1/receipts/{receipt_id}, GET /api/v1/receipts/verify-chain) is LIVE on https://gocheckyourself.org backed by a hash-chained ledger separating SELF_ATTESTED_EXTERNAL and LINKED_PUBLIC_ARTIFACT replays from NAMED_SPECIALIST_REVIEW. Every claim is tagged PROVED, COMPUTED, CONDITIONAL, CITED, CONJECTURED, or OPEN, and every leaderboard record declares an explicit mathematical bound direction. Account-bound write/submission endpoints (/api/v1/submissions, /api/v1/keys, /api/v1/attestations, /api/v1/tool-requests) remain staged_offline_not_deployed (HTTP 501) until announced in /agents.json.",
    "x-standard-id": "gcy-standard/2026",
    "x-legacy-aliases": [
      "GCY-2",
      "GCY-1"
    ],
    "x-generated-utc": "2026-12-03T17:19:01Z",
    "x-author": "Sonny",
    "x-receipt-api-status": "live",
    "x-write-endpoints-status": "staged_offline_not_deployed"
  },
  "servers": [
    {
      "url": "https://gocheckyourself.org",
      "description": "Primary public archive (static GET + live /api/v1/receipts; account-bound submissions staged offline)"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "GCY-1 Scoped Agent Upload Key (<YOUR_GCY_API_KEY>)",
        "description": "Revocable contributor key bound to a verified GitHub or ORCID account. Stored strictly as SHA-256 hash. Default scope: submit:draft."
      },
      "AccountSessionAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "HMAC-SHA256 Account Session Token (gcy_sess...)",
        "description": "Short-lived zero-cookie bearer token issued after GitHub or ORCID OAuth sign-in for minting and revoking API keys."
      }
    },
    "schemas": {
      "ValidationErrorItem": {
        "type": "object",
        "required": [
          "field",
          "code",
          "message",
          "fix_hint"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "JSONPath or request field pointing to the offending input (e.g. $.card.venues[0].url)"
          },
          "code": {
            "type": "string",
            "description": "Stable machine-readable error code"
          },
          "message": {
            "type": "string"
          },
          "fix_hint": {
            "type": "string",
            "description": "Concrete repair instruction enabling automated self-correction"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "ok",
          "errors"
        ],
        "properties": {
          "ok": {
            "const": false
          },
          "errors": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ValidationErrorItem"
            }
          }
        }
      },
      "PresignedBundleUpload": {
        "type": "object",
        "required": [
          "method",
          "url",
          "r2_key",
          "expires_at",
          "required_headers"
        ],
        "properties": {
          "method": {
            "const": "PUT"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "r2_key": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "required_headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "SubmissionRequest": {
        "type": "object",
        "required": [
          "card",
          "bundle_sha256"
        ],
        "properties": {
          "card": {
            "$ref": "/api/v1/schema/gcy-v1.json"
          },
          "bundle_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "Lowercase 64-hex SHA-256 digest of the reproducible archive bundle"
          },
          "bundle_size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 262144000,
            "description": "Archive bundle byte length (required > 0 when request_upload_url is true; capped at 250 MiB)"
          },
          "request_upload_url": {
            "type": "boolean",
            "default": false,
            "description": "When true, returns a short-lived single-object presigned R2 PUT descriptor"
          },
          "doesNotCommitTo": {
            "type": "array",
            "maxItems": 32,
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Explicit plain-language scope disclosures stating what this submission does not claim"
          },
          "leaderboard_entries": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "bound_type",
                "better_direction"
              ],
              "properties": {
                "bound_type": {
                  "enum": [
                    "upper_bound",
                    "lower_bound",
                    "two_sided_bracket",
                    "threshold_radius",
                    "exact_identity",
                    "no_go_barrier"
                  ]
                },
                "better_direction": {
                  "enum": [
                    "lower_is_better",
                    "higher_is_better",
                    "narrower_bracket",
                    "exact"
                  ]
                },
                "direction_badge": {
                  "type": "string"
                },
                "certified_score": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "SubmissionAccepted": {
        "type": "object",
        "required": [
          "ok",
          "submission_id",
          "status",
          "account_handle",
          "identity_provider",
          "paper_id",
          "card_sha256",
          "bundle_sha256",
          "status_url",
          "queued_at"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "submission_id": {
            "type": "string"
          },
          "status": {
            "const": "queued"
          },
          "account_handle": {
            "type": "string"
          },
          "identity_provider": {
            "enum": [
              "github",
              "orcid"
            ]
          },
          "paper_id": {
            "type": "string"
          },
          "card_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "bundle_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "doesNotCommitTo": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status_url": {
            "type": "string"
          },
          "queued_at": {
            "type": "string",
            "format": "date-time"
          },
          "bundle_upload": {
            "$ref": "#/components/schemas/PresignedBundleUpload"
          }
        }
      },
      "VerificationRunSummary": {
        "type": "object",
        "required": [
          "run_id",
          "runner_kind",
          "toolchain",
          "network_disabled",
          "trust_level_zero",
          "planted_controls_total",
          "planted_controls_rejected",
          "manifest_files_checked",
          "bundle_sha256_matched",
          "verdict",
          "receipt_sha256",
          "finished_at"
        ],
        "properties": {
          "run_id": {
            "type": "string"
          },
          "runner_kind": {
            "type": "string"
          },
          "toolchain": {
            "type": "string"
          },
          "network_disabled": {
            "type": "boolean"
          },
          "trust_level_zero": {
            "type": "boolean"
          },
          "planted_controls_total": {
            "type": "integer",
            "minimum": 0
          },
          "planted_controls_rejected": {
            "type": "integer",
            "minimum": 0
          },
          "manifest_files_checked": {
            "type": "integer",
            "minimum": 0
          },
          "bundle_sha256_matched": {
            "type": "boolean"
          },
          "verdict": {
            "enum": [
              "pass",
              "needs_fix",
              "error"
            ]
          },
          "computed_tier": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 5
          },
          "receipt_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "finished_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SubmissionStatus": {
        "type": "object",
        "required": [
          "ok",
          "submission_id",
          "status",
          "account_handle",
          "paper_id",
          "card_sha256",
          "bundle_sha256",
          "errors",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "submission_id": {
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "verifying",
              "verified_tier_1",
              "verified_tier_2",
              "verified_tier_3",
              "verified_tier_4",
              "verified_tier_5",
              "needs_fix",
              "published",
              "rejected"
            ]
          },
          "verified_tier": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 5
          },
          "account_handle": {
            "type": "string"
          },
          "identity_provider": {
            "enum": [
              "github",
              "orcid"
            ]
          },
          "paper_id": {
            "type": "string"
          },
          "card_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "bundle_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "doesNotCommitTo": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationErrorItem"
            }
          },
          "latest_run": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/VerificationRunSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AccountCardsResponse": {
        "type": "object",
        "required": [
          "ok",
          "account",
          "count",
          "cards"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "account": {
            "type": "object",
            "required": [
              "handle",
              "display_name",
              "identity_provider",
              "profile_url"
            ],
            "properties": {
              "handle": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              },
              "identity_provider": {
                "enum": [
                  "github",
                  "orcid"
                ]
              },
              "profile_url": {
                "type": "string"
              }
            }
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "cards": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "submission_id",
                "paper_id",
                "verified_tier",
                "card_sha256",
                "bundle_sha256",
                "doesNotCommitTo",
                "published_at",
                "card"
              ],
              "properties": {
                "submission_id": {
                  "type": "string"
                },
                "paper_id": {
                  "type": "string"
                },
                "verified_tier": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 5
                },
                "card_sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "bundle_sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "doesNotCommitTo": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "published_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "card": {
                  "$ref": "/api/v1/schema/gcy-v1.json"
                }
              }
            }
          }
        }
      },
      "ApiKeyCreateRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 80
          },
          "scope": {
            "enum": [
              "submit:draft",
              "read:status"
            ],
            "default": "submit:draft"
          },
          "expires_in_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "default": 90
          }
        }
      },
      "ApiKeyCreatedResponse": {
        "type": "object",
        "required": [
          "ok",
          "key_id",
          "account_handle",
          "scope",
          "key_prefix",
          "api_key",
          "expires_at",
          "warning"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "key_id": {
            "type": "string"
          },
          "account_handle": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "scope": {
            "enum": [
              "submit:draft",
              "read:status"
            ]
          },
          "key_prefix": {
            "type": "string"
          },
          "api_key": {
            "type": "string",
            "description": "Returned once at creation; only SHA-256 digest is stored"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "warning": {
            "type": "string"
          }
        }
      }
    }
  },
  "paths": {
    "/api/v1/index.json": {
      "get": {
        "operationId": "getArchiveIndex",
        "summary": "Retrieve archive verification totals, paper catalog summary, standalone deposits, legacy summary, and problem snapshot index",
        "responses": {
          "200": {
            "description": "Archive index JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/digests.json": {
      "get": {
        "operationId": "getPinnedDigests",
        "summary": "Retrieve all 43 pinned live Zenodo archive SHA-256 digests consumed by /tools/verify-browser.html and automated checksum verifiers",
        "responses": {
          "200": {
            "description": "Canonical live Zenodo SHA-256 digest ledger JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/papers/{id}.json": {
      "get": {
        "operationId": "getPaperCard",
        "summary": "Retrieve a single canonical research card under The GCY Standard (backward-compatible gcy-v1 schema; paper-01..paper-66 or standalone deposit slug gcy-*)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{2,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Canonical gcy-v1 research card",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "/api/v1/schema/gcy-v1.json"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/leaderboard.json": {
      "get": {
        "operationId": "getLeaderboard",
        "summary": "Retrieve all directional leaderboard benchmarks with projected standing, bound_type, better_direction, and venue status",
        "responses": {
          "200": {
            "description": "Directional leaderboard JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/problems/{slug}.json": {
      "get": {
        "operationId": "getProblemSnapshot",
        "summary": "Retrieve a domain problem snapshot aggregating related papers, directional records, and open boundaries",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "yang-mills-4d",
                "erdos-36",
                "littlewood-c1",
                "heilbronn",
                "navier-stokes-3d",
                "p-vs-np-circuits",
                "quantum-walk"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Problem snapshot JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools.json": {
      "get": {
        "operationId": "getToolsCatalog",
        "summary": "Retrieve public downloadable verification tools (with SHA-256) and live zero-install browser verifiers",
        "responses": {
          "200": {
            "description": "Tools catalog JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/schema/gcy-v1.json": {
      "get": {
        "operationId": "getGcyV1Schema",
        "summary": "Retrieve the backward-compatible gcy-v1 research card JSON Schema (Draft 2020-12)",
        "responses": {
          "200": {
            "description": "GCY-1 JSON Schema",
            "content": {
              "application/schema+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/legacy/index.json": {
      "get": {
        "operationId": "getLegacyArchiveIndex",
        "summary": "Retrieve historical November 2026 adapter metadata (retired books now map to 2026 Zenodo deposits and native pages)",
        "responses": {
          "200": {
            "description": "Historical legacy adapter index JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/legacy/results.json": {
      "get": {
        "operationId": "getLegacyArchiveResults",
        "summary": "Retrieve historical November 2026 register pointer records (345 preserved entries mapped to modern successors) with original status labels and doesNotCommitTo disclosures",
        "responses": {
          "200": {
            "description": "Historical legacy archive pointer records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/collections/can4k2.json": {
      "get": {
        "operationId": "getCan4k2CollectionTable",
        "summary": "Retrieve Sonny's own binary strength-4 covering array CAN(4, k, 2) collection table (15 maximal-width arrays, 77 widths, exhaustive verification and public table comparison)",
        "responses": {
          "200": {
            "description": "CAN(4, k, 2) own collection JSON table",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/libraries/index.json": {
      "get": {
        "operationId": "getLeanLibrariesIndex",
        "summary": "Retrieve the Tier-2 Standalone Formal Lean Libraries catalog (5 clean-room domain archives, deduplicated structural theorem counts, archive SHA-256 digests, and live zero-Mathlib vs archival Mathlib compilation disclosure)",
        "responses": {
          "200": {
            "description": "Tier-2 Lean libraries index JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/verify-kit/index.json": {
      "get": {
        "operationId": "getVerifyKitIndex",
        "summary": "Retrieve the static index of all 43 one-fetch Verify Kits (all Tier-1 paper archives and Tier-2 Lean libraries) with exact Zenodo download URLs, SHA-256, MD5, and receipt API endpoints",
        "responses": {
          "200": {
            "description": "Verify-kit index JSON (gcy-verify-kit-index/1)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/verify-kit/{slug}.json": {
      "get": {
        "operationId": "getVerifyKit",
        "summary": "Retrieve a single deposit's one-fetch Verify Kit (Zenodo download URL, SHA-256, MD5, exact offline CLI commands, open boundaries, verification levels, and copyable audit prompt)",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{2,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Single deposit Verify Kit JSON (gcy-verify-kit/1)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/receipts": {
      "get": {
        "operationId": "listVerificationReceipts",
        "summary": "[LIVE] List recent hash-chained public verification receipts with strict counts by verification_level, verdict, and trust_tier (separating self-attested and linked-artifact replays from specialist review)",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "verdict",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PASSED",
                "PARTIAL",
                "FAILED",
                "BLOCKER_FOUND"
              ]
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "L1_ARCHIVE_INTEGRITY",
                "L2_REPLAY_EXECUTION",
                "L3_CLEAN_ROOM_RECOMPUTE",
                "L4_MATHEMATICAL_AUDIT"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Receipt ledger list and separated trust-tier counts (X-Agent-Data-Boundary: untrusted)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "submitVerificationReceipt",
        "summary": "[LIVE] Mint an immutable hash-chained verification receipt (gcy-verification-receipt/1) pinned to a canonical deposit slug and exact archive_sha256",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "schema",
                  "slug",
                  "archive_sha256",
                  "verification_level",
                  "verdict",
                  "submitter",
                  "checked",
                  "not_checked"
                ],
                "properties": {
                  "schema": {
                    "const": "gcy-verification-receipt/1"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "zenodo_doi": {
                    "type": "string"
                  },
                  "archive_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "verification_level": {
                    "enum": [
                      "L1_ARCHIVE_INTEGRITY",
                      "L2_REPLAY_EXECUTION",
                      "L3_CLEAN_ROOM_RECOMPUTE",
                      "L4_MATHEMATICAL_AUDIT"
                    ]
                  },
                  "verdict": {
                    "enum": [
                      "PASSED",
                      "PARTIAL",
                      "FAILED",
                      "BLOCKER_FOUND"
                    ]
                  },
                  "submitter": {
                    "type": "object",
                    "required": [
                      "handle",
                      "kind"
                    ],
                    "properties": {
                      "handle": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "kind": {
                        "enum": [
                          "human",
                          "ai-assisted",
                          "automated-script"
                        ]
                      },
                      "identity_proof": {
                        "type": "string"
                      }
                    }
                  },
                  "checked": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  },
                  "not_checked": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "evidence": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Immutable hash-chained receipt minted with permalink and receipt_sha256"
          },
          "400": {
            "description": "Schema validation error, unknown slug, or archive_sha256 mismatch"
          },
          "413": {
            "description": "Payload exceeds 8192-byte limit"
          },
          "429": {
            "description": "Per-IP hourly rate limit exceeded"
          }
        }
      }
    },
    "/api/v1/receipts/{receipt_id}": {
      "get": {
        "operationId": "getVerificationReceipt",
        "summary": "[LIVE] Fetch a single immutable verification receipt JSON record by receipt_id",
        "parameters": [
          {
            "name": "receipt_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rcpt_[0-9]{8}_[0-9a-f]{8,16}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Immutable verification receipt JSON (X-Agent-Data-Boundary: untrusted)"
          },
          "404": {
            "description": "Receipt not found"
          }
        }
      }
    },
    "/api/v1/receipts/verify-chain": {
      "get": {
        "operationId": "verifyReceiptChain",
        "summary": "[LIVE] Walk and cryptographically verify the entire verification_receipts hash chain from genesis to head",
        "responses": {
          "200": {
            "description": "Hash-chain integrity status (chain_valid, receipts_checked, head_sha256, broken_links)"
          }
        }
      }
    },
    "/api/v1/attestations": {
      "post": {
        "operationId": "submitReplayAttestation",
        "summary": "[STAGED OFFLINE — DO NOT POST YET] Intake endpoint for independent offline replay attestations of an existing GCY-1 paper card",
        "x-intake-status": "staged_offline_not_deployed",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "paper_id",
                  "verifier_handle",
                  "toolchain",
                  "verify_exit_code",
                  "planted_controls_rejected",
                  "sha256_manifest_digest"
                ],
                "properties": {
                  "paper_id": {
                    "type": "string"
                  },
                  "verifier_handle": {
                    "type": "string"
                  },
                  "toolchain": {
                    "type": "string"
                  },
                  "verify_exit_code": {
                    "type": "integer"
                  },
                  "planted_controls_rejected": {
                    "type": "boolean"
                  },
                  "sha256_manifest_digest": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "501": {
            "description": "Not Implemented — staged offline (status: staged_offline_not_deployed; submit via /review/ or hello@gocheckyourself.org)"
          },
          "405": {
            "description": "Method Not Allowed — GET/HEAD on this POST-only staged path return 405 with Allow: POST, OPTIONS"
          },
          "202": {
            "description": "Attestation queued (once deployed)"
          },
          "422": {
            "description": "Malformed attestation"
          }
        }
      }
    },
    "/api/v1/tool-requests": {
      "post": {
        "operationId": "submitToolRequest",
        "summary": "[STAGED OFFLINE — DO NOT POST YET] Reserved contributor tool intake route (all active verification tools are public downloads or browser tools)",
        "x-intake-status": "staged_offline_not_deployed",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tool_id",
                  "intended_problem",
                  "requester_handle",
                  "contact"
                ],
                "properties": {
                  "schema_version": {
                    "const": "gcy-tool-request-v1"
                  },
                  "tool_id": {
                    "type": "string"
                  },
                  "intended_problem": {
                    "type": "string"
                  },
                  "requester_handle": {
                    "type": "string"
                  },
                  "contact": {
                    "type": "string",
                    "description": "Public profile URL (GitHub/ORCID) only — do not submit personal addresses or sensitive PII. Privacy/retention: retained solely for benchmark-access coordination and deleted upon request."
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "501": {
            "description": "Not Implemented — staged offline (status: staged_offline_not_deployed)"
          },
          "405": {
            "description": "Method Not Allowed — GET/HEAD on this POST-only staged path return 405 with Allow: POST, OPTIONS"
          },
          "202": {
            "description": "Tool access request logged (once deployed)"
          },
          "422": {
            "description": "Missing required fields"
          }
        }
      }
    },
    "/api/v1/submissions": {
      "post": {
        "operationId": "submitAccountBoundGcyCard",
        "summary": "[STAGED OFFLINE — DO NOT POST YET] Submit an account-bound GCY-1 research card and bundle SHA-256 into the sandbox verification queue",
        "description": "Requires a revocable scoped Agent Upload Key (scope: submit:draft). Validates GCY-1 schema, explicit bound directions, planted-control counts, conditional venue URLs, local-path hygiene, and payload size caps (256 KiB JSON). Never executes submitted code at the Worker edge.",
        "x-intake-status": "staged_offline_not_deployed",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmissionRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted and queued for ephemeral offline sandbox verification",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmissionAccepted"
                }
              }
            }
          },
          "400": {
            "description": "Edge GCY-1 validation failed; unified errors[] returned for self-correction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired, or revoked Bearer API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Valid key lacks required submit:draft scope or origin refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "JSON request payload exceeds 262,144-byte cap",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Atomic hourly or daily rate_limits exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "Not Implemented — staged offline (status: staged_offline_not_deployed)"
          },
          "405": {
            "description": "Method Not Allowed — unsupported HTTP verb on this path"
          }
        }
      }
    },
    "/api/v1/submissions/{id}": {
      "get": {
        "operationId": "getSubmissionStatus",
        "summary": "[STAGED OFFLINE — DO NOT POST YET] Retrieve live verification status, sandbox receipt summary, and fixable errors[] for a submission",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^sub_[a-f0-9]{12,48}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current submission lifecycle state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmissionStatus"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required for unpublished drafts"
          },
          "403": {
            "description": "Key belongs to a different account"
          },
          "404": {
            "description": "Submission not found"
          },
          "501": {
            "description": "Not Implemented — staged offline (status: staged_offline_not_deployed)"
          },
          "405": {
            "description": "Method Not Allowed — unsupported HTTP verb on this path"
          }
        },
        "x-intake-status": "staged_offline_not_deployed"
      }
    },
    "/api/v1/accounts/{handle}/cards": {
      "get": {
        "operationId": "getAccountPublishedCards",
        "summary": "[STAGED OFFLINE — DO NOT POST YET] List publicly verified and owner-approved GCY-1 research cards bound to a contributor handle",
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "required": true,
            "description": "Lowercase contributor handle (for example sonny)",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{1,31}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public verified cards bound to the contributor account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountCardsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Account handle not found"
          },
          "501": {
            "description": "Not Implemented — staged offline (status: staged_offline_not_deployed)"
          },
          "405": {
            "description": "Method Not Allowed — unsupported HTTP verb on this path"
          }
        },
        "x-intake-status": "staged_offline_not_deployed"
      }
    },
    "/api/v1/keys": {
      "post": {
        "operationId": "mintScopedApiKey",
        "summary": "[STAGED OFFLINE — DO NOT POST YET] Mint a revocable scoped Agent Upload Key for the signed-in contributor account",
        "security": [
          {
            "AccountSessionAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Scoped key created; raw token returned once and stored strictly as SHA-256 hash",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired account session token"
          },
          "501": {
            "description": "Not Implemented — staged offline (status: staged_offline_not_deployed)"
          },
          "405": {
            "description": "Method Not Allowed — unsupported HTTP verb on this path"
          }
        },
        "x-intake-status": "staged_offline_not_deployed"
      }
    },
    "/api/v1/keys/{id}": {
      "delete": {
        "operationId": "revokeScopedApiKey",
        "summary": "[STAGED OFFLINE — DO NOT POST YET] Immediately revoke an Agent Upload Key owned by the signed-in account",
        "security": [
          {
            "AccountSessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^key_[a-f0-9]{12,48}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Key revoked immediately"
          },
          "401": {
            "description": "Invalid or expired account session token"
          },
          "404": {
            "description": "Key not found or already revoked"
          },
          "501": {
            "description": "Not Implemented — staged offline (status: staged_offline_not_deployed)"
          },
          "405": {
            "description": "Method Not Allowed — unsupported HTTP verb on this path"
          }
        },
        "x-intake-status": "staged_offline_not_deployed"
      }
    }
  }
}
