{
  "openapi": "3.1.0",
  "info": {
    "title": "LakesideMantra Resort Enquiry API",
    "version": "1.0.0",
    "description": "Versioned API for user-authorized LakesideMantra enquiries. Success indicates message delivery for human follow-up, not availability, payment, or a confirmed reservation.",
    "contact": { "name": "LakesideMantra Resort", "email": "lakesidemantrapune@gmail.com", "url": "https://www.lakesidemantra.in/developers" }
  },
  "servers": [{ "url": "https://www.lakesidemantra.in", "description": "Production" }],
  "tags": [{ "name": "Enquiries", "description": "Consent-based resort enquiry submission" }],
  "paths": {
    "/api/v1/enquiries": {
      "post": {
        "tags": ["Enquiries"],
        "operationId": "submitLakesideMantraEnquiryV1",
        "summary": "Submit a resort enquiry",
        "description": "Transmit contact details only with the traveller's consent. No authentication is required. Limited to 10 requests per 60 seconds per client and endpoint.",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Enquiry" } } } },
        "responses": {
          "200": { "description": "Enquiry delivered for human follow-up", "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Success" } } } },
          "400": { "$ref": "#/components/responses/JsonError" },
          "405": { "$ref": "#/components/responses/JsonError" },
          "415": { "$ref": "#/components/responses/JsonError" },
          "429": { "description": "Rate limit exceeded", "headers": { "Retry-After": { "schema": { "type": "integer" }, "description": "Seconds before retrying" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
          "502": { "$ref": "#/components/responses/JsonError" },
          "503": { "$ref": "#/components/responses/JsonError" }
        }
      }
    },
    "/api/send-enquiry": {
      "post": {
        "deprecated": true,
        "tags": ["Enquiries"],
        "operationId": "submitLegacyLakesideMantraEnquiry",
        "summary": "Legacy enquiry endpoint",
        "description": "Deprecated compatibility alias. Responses include Deprecation, Sunset, and successor Link headers. Migrate to /api/v1/enquiries before 28 February 2027.",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Enquiry" } } } },
        "responses": { "200": { "description": "Enquiry delivered" }, "400": { "$ref": "#/components/responses/JsonError" }, "429": { "$ref": "#/components/responses/JsonError" } }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimitLimit": { "schema": { "type": "integer", "example": 10 }, "description": "Request limit for the current policy" },
      "RateLimitRemaining": { "schema": { "type": "integer", "example": 9 }, "description": "Requests remaining in the current window" },
      "RateLimitReset": { "schema": { "type": "integer", "example": 60 }, "description": "Seconds until the current window resets" }
    },
    "responses": {
      "JsonError": { "description": "Structured JSON error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }
    },
    "schemas": {
      "Enquiry": {
        "type": "object",
        "additionalProperties": false,
        "required": ["firstName", "lastName", "phone", "query"],
        "properties": {
          "firstName": { "type": "string", "minLength": 1, "maxLength": 100 },
          "lastName": { "type": "string", "minLength": 1, "maxLength": 100 },
          "email": { "type": "string", "format": "email", "maxLength": 254 },
          "phone": { "type": "string", "minLength": 5, "maxLength": 30 },
          "query": { "type": "string", "minLength": 1, "maxLength": 3000 },
          "source": { "type": "string", "maxLength": 100, "default": "Website Enquiry" }
        }
      },
      "Success": { "type": "object", "required": ["data"], "properties": { "data": { "type": "object", "required": ["accepted", "status", "message"], "properties": { "accepted": { "type": "boolean", "const": true }, "status": { "type": "string", "const": "enquiry_received" }, "message": { "type": "string" } } } } },
      "Error": { "type": "object", "required": ["code", "message", "hint", "docs"], "properties": { "code": { "type": "string", "example": "VALIDATION_ERROR" }, "message": { "type": "string" }, "hint": { "type": "string" }, "details": { "type": "object", "additionalProperties": true }, "docs": { "type": "string", "format": "uri" } } },
      "ErrorResponse": { "type": "object", "required": ["error"], "properties": { "error": { "$ref": "#/components/schemas/Error" } } }
    }
  },
  "externalDocs": { "description": "LakesideMantra developer resources, CLI, versioning, deprecation, errors, and rate limits", "url": "https://www.lakesidemantra.in/developers" }
}
