{
  "openapi": "3.1.0",
  "info": {
    "title": "Zotta Public Landing API",
    "version": "2026-05-05",
    "description": "Public, human-paced endpoints used by the Zotta marketing site for contact requests and product Q&A."
  },
  "servers": [
    {
      "url": "https://zotta.ai",
      "description": "Zotta public marketing origin"
    }
  ],
  "paths": {
    "/api/contact": {
      "post": {
        "operationId": "submitContactRequest",
        "summary": "Submit a contact or demo request",
        "description": "Use only when a user explicitly asks to contact Zotta, request a demo, or start a commercial conversation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "message"],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Human contact name"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Reply-to email address"
                  },
                  "company": {
                    "type": "string",
                    "description": "Company or lending organization"
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Brief request or context"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request accepted"
          },
          "400": {
            "description": "Invalid request"
          },
          "502": {
            "description": "Mail delivery temporarily unavailable"
          }
        }
      }
    },
    "/api/chat": {
      "post": {
        "operationId": "askZottaLandingAssistant",
        "summary": "Ask the public Zotta landing assistant",
        "description": "Ask public product questions about Zotta LMS. Do not send borrower PII, credentials, or confidential credit data.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["message"],
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1
                  },
                  "history": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": ["user", "assistant"]
                        },
                        "content": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assistant response"
          },
          "400": {
            "description": "Invalid request"
          },
          "502": {
            "description": "Assistant temporarily unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {}
  }
}
