{
  "openapi": "3.1.0",
  "info": {
    "title": "MAXMUDOV.DEV API",
    "version": "1.0.0",
    "description": "AI assistant and consent-based callback API. The lead endpoint must only be used after explicit user approval."
  },
  "servers": [{ "url": "https://maxmudov-dev.uz/api" }],
  "paths": {
    "/ai": {
      "post": {
        "operationId": "askWebsiteAssistant",
        "summary": "Ask about Ahmadjon, his services, projects, products or contact options",
        "requestBody": {
          "required": true,
          "content": { "application/json": { "schema": { "type": "object", "required": ["message", "locale"], "properties": { "message": { "type": "string", "maxLength": 900 }, "locale": { "type": "string", "enum": ["uz", "ru", "en"] } } } } }
        },
        "responses": { "200": { "description": "Scoped Markdown answer" } }
      }
    },
    "/telegram": {
      "post": {
        "operationId": "requestCallback",
        "summary": "Request a callback after explicit user consent",
        "description": "Do not call this operation without explicit user consent.",
        "requestBody": {
          "required": true,
          "content": { "application/json": { "schema": { "type": "object", "required": ["phone", "service"], "properties": { "phone": { "type": "string", "pattern": "^\\+[1-9]\\d{7,14}$" }, "service": { "type": "string", "maxLength": 120 }, "locale": { "type": "string", "enum": ["uz", "ru", "en"] }, "source": { "type": "string" } } } } }
        },
        "responses": { "200": { "description": "Callback request accepted" }, "400": { "description": "Invalid request" } }
      }
    }
  }
}
