{"openapi":"3.1.0","info":{"title":"BetaXLab API","version":"1.0.0","description":"BetaXLab is a WhatsApp CRM and automation platform for Indian businesses. This specification documents the public, machine-readable HTTP surface of www.betaxlab.com: content-negotiated Markdown mirrors of every page, the site's AI-context index files, and the lead-capture webhook used by the on-site contact/signup forms.","contact":{"name":"BetaXLab Support","email":"info@betaxlab.com","url":"https://www.betaxlab.com/contact"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://www.betaxlab.com"}],"tags":[{"name":"content","description":"Markdown and AI-context resources for agents and crawlers."},{"name":"leads","description":"Lead-capture webhook used by BetaXLab's own forms."}],"paths":{"/api/markdown/{path}":{"get":{"tags":["content"],"operationId":"getPageAsMarkdown","summary":"Get any site page as Markdown","description":"Returns a clean Markdown rendering of any public BetaXLab page, stripping navigation, scripts, and layout chrome. Reachable either directly, or via content negotiation by sending `Accept: text/markdown` (or a `.md` suffix) to the page's normal URL — middleware rewrites the request here transparently.","parameters":[{"name":"path","in":"path","required":true,"description":"URL path of the page to render, e.g. \"pricing\" or \"blogs/some-post\". May be empty for the homepage.","schema":{"type":"string"}}],"responses":{"200":{"description":"Markdown rendering of the page.","content":{"text/markdown":{"schema":{"type":"string"}}},"headers":{"Vary":{"schema":{"type":"string"},"description":"Always includes \"Accept\"."}}},"404":{"description":"No page exists at the requested path.","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/llms.txt":{"get":{"tags":["content"],"operationId":"getLlmsTxt","summary":"llms.txt AI-context index","description":"Short, curated index of key pages and facts for AI systems, following the llms.txt convention.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/llms-full.txt":{"get":{"tags":["content"],"operationId":"getLlmsFullTxt","summary":"Full AI-context document","description":"Extended machine-readable context covering positioning, offerings, and published blog URLs.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"tags":["content"],"operationId":"getSitemap","summary":"XML sitemap of all published pages","responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/api/capi-lead":{"post":{"tags":["leads"],"operationId":"submitLeadEvent","summary":"Forward a lead event to Meta Conversions API","description":"Server-side webhook used exclusively by BetaXLab's own on-site forms to record a lead event. Not intended for third-party integration: it accepts only pre-hashed PII generated by the site's own client code. Documented here for transparency about the site's public HTTP surface.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["eventName","leadId","hashedEmail","hashedPhone","sourceUrl"],"properties":{"eventName":{"type":"string","example":"Lead"},"leadId":{"type":"string"},"hashedEmail":{"type":"string","description":"SHA-256, lowercased."},"hashedPhone":{"type":"string","description":"SHA-256, lowercased."},"hashedFirstName":{"type":"string"},"hashedLastName":{"type":"string"},"contentCategory":{"type":"string"},"contentName":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"fbc":{"type":"string","nullable":true},"fbp":{"type":"string","nullable":true},"utms":{"type":"object","properties":{"utm_source":{"type":"string"},"utm_medium":{"type":"string"},"utm_campaign":{"type":"string"},"utm_content":{"type":"string"},"utm_term":{"type":"string"}}}}}}}},"responses":{"200":{"description":"Event accepted (or silently skipped if CAPI is not configured).","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"events_received":{"type":"integer"}}}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error identifier."},"message":{"type":"string","description":"Human-readable explanation of what went wrong."},"hint":{"type":"string","description":"What the caller should do to resolve or avoid the error."}}}}}}}},"405":{"description":"Method not allowed — this endpoint only accepts POST.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error identifier."},"message":{"type":"string","description":"Human-readable explanation of what went wrong."},"hint":{"type":"string","description":"What the caller should do to resolve or avoid the error."}}}}}}}},"502":{"description":"Upstream Meta Conversions API request failed.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error identifier."},"message":{"type":"string","description":"Human-readable explanation of what went wrong."},"hint":{"type":"string","description":"What the caller should do to resolve or avoid the error."}}}}}}}}}}},"/api/{unknown}":{"get":{"tags":["leads"],"operationId":"unknownApiRoute","summary":"Any unmatched /api/* path","description":"Any request under /api/ that does not match a documented route returns a structured JSON 404.","responses":{"404":{"description":"No such API route.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error identifier."},"message":{"type":"string","description":"Human-readable explanation of what went wrong."},"hint":{"type":"string","description":"What the caller should do to resolve or avoid the error."}}}}}}}}}}}}}