{
  "openapi": "3.1.0",
  "info": {
    "title": "Learnerbly Public API",
    "version": "1.0.0",
    "description": "The public HTTP API exposed by learnerbly.com. The current API accepts responsible security disclosures; product and account APIs are not exposed by the marketing site."
  },
  "servers": [
    {
      "url": "https://www.learnerbly.com",
      "description": "Learnerbly production website"
    }
  ],
  "paths": {
    "/api/security-reports": {
      "post": {
        "operationId": "submitSecurityReport",
        "summary": "Submit a responsible security disclosure",
        "description": "Submits a vulnerability report for an approved Learnerbly asset. Requests are rate limited by source address and accepted reports are queued for delivery to Learnerbly's security team.",
        "tags": [
          "Security"
        ],
        "requestBody": {
          "required": true,
          "description": "A URL-encoded responsible disclosure report.",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SecurityReportRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The report was accepted for delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedResponse"
                }
              }
            }
          },
          "204": {
            "description": "The request was accepted without a response body."
          },
          "400": {
            "description": "One or more required report fields were missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "The source has submitted too many reports in the current rate-limit window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Report delivery or its rate limiter is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SecurityReportRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "title",
          "description",
          "steps",
          "asset"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "A concise title describing the vulnerability."
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000,
            "description": "A detailed description of the vulnerability."
          },
          "steps": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000,
            "description": "Reproduction steps that let the security team verify the issue."
          },
          "impact": {
            "type": "string",
            "maxLength": 5000,
            "description": "The security or user impact, when known."
          },
          "contact": {
            "type": "string",
            "maxLength": 5000,
            "description": "Optional contact details for follow-up."
          },
          "asset": {
            "type": "string",
            "description": "The affected Learnerbly service.",
            "enum": [
              "app.learnerbly.com",
              "api.app.learnerbly.com",
              "www.learnerbly.com"
            ]
          }
        }
      },
      "AcceptedResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true,
            "description": "Confirms that the report was accepted."
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "A human-readable explanation of the request failure."
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Security",
      "description": "Responsible disclosure reporting."
    }
  ],
  "externalDocs": {
    "description": "Learnerbly's AI crawler guide",
    "url": "https://www.learnerbly.com/llms.txt"
  }
}