{
  "endpoint": "/api/feedback",
  "method": "POST",
  "contentType": "application/json",
  "authentication": "none",
  "description": "Submit a bug report, feature request, or general feedback.",
  "types": [
    {
      "value": "bug",
      "label": "Bug report",
      "description": "Tell us what went wrong."
    },
    {
      "value": "feature",
      "label": "Feature request",
      "description": "Tell us what would help."
    },
    {
      "value": "general",
      "label": "General feedback",
      "description": "Share your thoughts with us."
    }
  ],
  "schema": {
    "type": "object",
    "required": [
      "type",
      "message"
    ],
    "additionalProperties": false,
    "properties": {
      "type": {
        "type": "string",
        "enum": [
          "bug",
          "feature",
          "general"
        ]
      },
      "message": {
        "type": "string",
        "minLength": 10,
        "maxLength": 5000,
        "description": "Trimmed before validation."
      },
      "name": {
        "type": "string",
        "maxLength": 100
      },
      "email": {
        "type": "string",
        "maxLength": 254,
        "description": "A valid reply email, or an empty string."
      },
      "source": {
        "type": "string",
        "maxLength": 2048
      },
      "reporter": {
        "type": "string",
        "enum": [
          "human",
          "agent"
        ],
        "default": "human"
      },
      "agentName": {
        "type": "string",
        "maxLength": 100
      }
    }
  },
  "idempotency": {
    "header": "Idempotency-Key",
    "required": false,
    "maxLength": 256,
    "pattern": "^[A-Za-z0-9._:/-]+$",
    "description": "Use a unique key per report. Reuse it with the same body when retrying within 24 hours."
  },
  "rateLimit": {
    "requests": 5,
    "windowSeconds": 600,
    "scope": "Per IP, per server instance."
  },
  "example": {
    "type": "bug",
    "message": "The page stopped loading after I selected Shield.",
    "reporter": "agent",
    "agentName": "Browser assistant",
    "source": "/product"
  },
  "docs": "https://www.legba.app/openapi.json"
}