{
  "openapi": "3.1.0",
  "info": {
    "title": "AI Pulse API",
    "description": "API endpoints for the AI Pulse observatory. Includes health check and AI disclosure submission.",
    "version": "1.0.0",
    "contact": {
      "name": "AI Pulse (fruggr)",
      "url": "https://ai-pulse.fruggr.io",
      "email": "contact@fruggr.io"
    }
  },
  "servers": [
    {
      "url": "https://ai-pulse.fruggr.io",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Health check",
        "description": "Returns the API status and current timestamp. Use this to verify the API is operational.",
        "responses": {
          "200": {
            "description": "API is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string", "example": "ok" },
                    "timestamp": { "type": "string", "format": "date-time" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/submit-disclosure": {
      "post": {
        "operationId": "submitDisclosure",
        "summary": "Submit an AI Disclosure",
        "description": "Submit an AI governance disclosure for expert assessment. Sends a notification email with the submission details and optional registry file attachment.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["email", "company", "industry"],
                "properties": {
                  "email": { "type": "string", "format": "email", "description": "Professional email address (no gmail/yahoo)" },
                  "company": { "type": "string", "description": "Company name" },
                  "industry": { "type": "string", "description": "Industry sector", "enum": ["Technology", "Financial Services", "Healthcare", "Energy", "Manufacturing", "Retail", "Public Sector", "Other"] },
                  "fileName": { "type": "string", "description": "Name of the uploaded registry file" },
                  "fileData": { "type": "string", "description": "Base64-encoded file content (.xlsx, .xls, or .csv)" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Disclosure submitted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean", "example": true }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": { "type": "string" }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
