{
  "openapi": "3.1.0",
  "info": {
    "title": "Lexora Public API",
    "version": "1.0.0",
    "summary": "Contact Lexora, an enterprise software & AI engineering firm.",
    "description": "Lexora designs, builds, and scales intelligent software — AI platforms, custom web and mobile applications, cloud infrastructure, data analytics, and cybersecurity. Use this API to send a project inquiry or question; the team replies by email within 24 hours. Human-readable documentation: https://lexora.fyi/docs/api",
    "contact": { "name": "Lexora", "email": "lexora87@gmail.com", "url": "https://lexora.fyi" }
  },
  "servers": [{ "url": "https://lexora.fyi" }],
  "paths": {
    "/api/contact": {
      "post": {
        "operationId": "submitInquiry",
        "summary": "Send a project inquiry or question to Lexora",
        "description": "Delivers the message to the Lexora team by email and sends a confirmation to the sender. No authentication required. One submission per genuine inquiry — do not use for bulk or automated messaging.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/InquiryRequest" },
              "example": {
                "name": "Sara Ahmed",
                "email": "sara@example.com",
                "message": "We need an AI-powered CRM for a 40-person sales team. Can you share a rough timeline and how you'd approach discovery?"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Inquiry delivered.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InquiryResponse" } } }
          },
          "400": {
            "description": "A required field is missing or empty.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          },
          "500": {
            "description": "Email delivery failed. The error message includes a direct email address to use instead.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Liveness check",
        "responses": {
          "200": {
            "description": "Service is up.",
            "content": {
              "application/json": {
                "schema": { "type": "object", "properties": { "status": { "type": "string", "const": "ok" } }, "required": ["status"] }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "InquiryRequest": {
        "type": "object",
        "required": ["name", "email", "message"],
        "properties": {
          "name": { "type": "string", "minLength": 1, "description": "Sender's full name or company name." },
          "email": { "type": "string", "format": "email", "description": "Reply-to address. Lexora's confirmation and reply go here." },
          "message": { "type": "string", "minLength": 1, "description": "The inquiry: what you want to build, timeline, budget range, or your question." }
        }
      },
      "InquiryResponse": {
        "type": "object",
        "properties": { "ok": { "type": "boolean", "const": true } },
        "required": ["ok"]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": { "error": { "type": "string" } },
        "required": ["error"]
      }
    }
  }
}
