{
  "openapi": "3.1.0",
  "info": {
    "title": "BRC Research Problem and Manuscript Submission API",
    "version": "0.2.0",
    "description": "Submit an unsolved research problem or a scholarly work. Access tokens are scoped and issued by BRC; receipt is not publication, personal diagnosis, or scientific validation."
  },
  "servers": [
    {
      "url": "https://research.baekrokdam.com"
    }
  ],
  "paths": {
    "/api/submissions": {
      "post": {
        "summary": "Submit an open problem or scholarly work",
        "description": "Use problem-submission.schema.json for a research question and submission.schema.json for a manuscript.",
        "operationId": "createSubmission",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "/problem-submission.schema.json"
                  },
                  {
                    "$ref": "/submission.schema.json"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Problem or manuscript received"
          },
          "400": {
            "description": "Invalid submission"
          },
          "401": {
            "description": "Invalid or missing scoped token"
          },
          "409": {
            "description": "Idempotency conflict"
          },
          "503": {
            "description": "Machine submission intake is not open"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "BRC scoped submission token"
      }
    }
  }
}