{
  "openapi": "3.1.0",
  "info": {
    "title": "TYM Agency Autonomous Commercial Engine API",
    "description": "Programmatic API for AI agents and conversational search models to query TYM Agency's 5 Core Transformation Pillars, estimate project scopes, and submit enterprise diagnostic intakes.",
    "version": "1.0.0",
    "contact": {
      "name": "David Jacob Durairaj & Stephen Daniel J",
      "email": "office.theyouthmint@gmail.com",
      "url": "https://tymagency.in"
    }
  },
  "servers": [
    {
      "url": "https://tymagency.in",
      "description": "Production Web & API Gateway"
    }
  ],
  "paths": {
    "/api/leads": {
      "post": {
        "summary": "Submit a Growth Diagnostic or Project Scoping Request",
        "description": "Dispatches a project lead directly to founders David Jacob and Stephen Daniel with a sub-2-hour response SLA and sub-30-second WhatsApp sales desk triage. Protected by sliding-window rate limiting (maximum 15 requests per 15 minutes per IP) and anti-spam verification.",
        "operationId": "submitDiagnosticLead",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "phone", "service", "message"],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Client or Executive Name",
                    "example": "Karthik Subramanian"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Corporate or Business Email",
                    "example": "karthik@enterprise.in"
                  },
                  "phone": {
                    "type": "string",
                    "description": "WhatsApp or Mobile Contact Number",
                    "example": "+91 98424 12345"
                  },
                  "company": {
                    "type": "string",
                    "description": "Company Name or Website URL",
                    "example": "Apex Precision Engineering Pvt Ltd"
                  },
                  "service": {
                    "type": "string",
                      "enum": [
                      "Pillar 01: Market Intelligence, Strategic Branding & Business Strategy",
                      "Pillar 02: Sovereign Digital Flagships & High-Performance Web Platforms",
                      "Pillar 03: Full-Spectrum Search Authority (SEO + GEO + AEO & Reputation)",
                      "Pillar 04: High-Intent Paid Acquisition & Scaled Conversion Funnels",
                      "Pillar 05: Bespoke Internal Software, Unified ERP / CRM & AI Lead Pipelines",
                      "Full Commercial Diagnostic / General Inquiry"
                    ],
                    "description": "Target Transformation Pillar"
                  },
                  "budget": {
                    "type": "string",
                    "description": "Estimated Budget Bracket",
                    "example": "₹1L - ₹3L Fixed Sprint"
                  },
                  "message": {
                    "type": "string",
                    "description": "Project Bottleneck and Scope Description",
                    "example": "Our current WordPress website takes 5 seconds to load and converts 0% of mobile visitors. We need a custom digital flagship."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagnostic lead successfully queued and dispatched to founders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean", "example": true },
                    "message": { "type": "string", "example": "Diagnostic submitted. Founder response SLA: < 2 hours." },
                    "sla": { "type": "string", "example": "120 minutes" }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (sliding-window IP limit: 15 requests per 15 minutes).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": { "type": "string", "example": "Too many submissions from this IP address. Please wait a few minutes before trying again." }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
