{"openapi":"3.1.0","info":{"title":"Hermes AI Office — Public API","version":"1.0.0","description":"Public, safe endpoints of the HermesOS website. These endpoints do not expose the internal Hermes runtime, private client data, CRM, messaging channels or the lead database. There is no public read access to submitted leads."},"servers":[{"url":"https://hermesos.md"}],"paths":{"/api/leads":{"post":{"operationId":"createLead","summary":"Submit a lead / implementation-map request","description":"Creates a lead request. Requires explicit consent and at least one contact method. Does not provide public read access to stored leads. Returns ok:true only when the request is accepted/persisted (not a confirmation of downstream delivery).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadRequest"}}}},"responses":{"200":{"description":"Lead accepted/persisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}}},"400":{"description":"Invalid request (missing consent or contact method)."},"429":{"description":"Rate limited."},"500":{"description":"Storage failed; the request was not persisted."}}}},"/api/leads/health":{"get":{"operationId":"getLeadPipelineHealth","summary":"Non-sensitive lead-pipeline status","description":"Returns only configuration booleans and safe aggregate counts. Never returns personal data, lead IDs, emails, phones, raw payloads, URLs or secrets.","responses":{"200":{"description":"Safe status object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/site-agent/chat":{"post":{"operationId":"askHermesAiPilot","summary":"Public closed-world assistant (Hermes AI Pilot)","description":"Answers questions about HermesOS and Hermes AI Office from approved public knowledge only. No internal runtime access and no external actions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Assistant answer.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request."},"429":{"description":"Rate limited."},"500":{"description":"Internal error."}}}}},"components":{"schemas":{"LeadRequest":{"type":"object","required":["contactMethod","consent"],"properties":{"name":{"type":"string"},"contactMethod":{"type":"string","enum":["telegram","whatsapp","phone","email"],"description":"The chosen contact channel; the matching field must be provided."},"telegram":{"type":"string"},"whatsapp":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string","format":"email"},"businessType":{"type":"string"},"message":{"type":"string"},"intent":{"type":"string","enum":["audit","pricing","calculator","demo","general"]},"locale":{"type":"string","enum":["en","ru","ro"]},"consent":{"type":"boolean","description":"Must be true. Explicit, versioned consent to be contacted."}}},"LeadResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"accepted":{"type":"boolean"},"leadId":{"type":"string","description":"Human-friendly reference for the submitter."},"notificationPending":{"type":"boolean"},"error":{"type":"string"}}},"HealthResponse":{"type":"object","description":"Booleans and aggregate counts only — no personal or secret data.","properties":{"ok":{"type":"boolean"},"supabase":{"type":"boolean"},"dispatchMode":{"type":"string"},"channels":{"type":"object","additionalProperties":{"type":"boolean"}},"outbox":{"type":"object","additionalProperties":{"type":"integer"}}}},"ChatRequest":{"type":"object","required":["message","locale"],"properties":{"message":{"type":"string","maxLength":1000},"locale":{"type":"string","enum":["en","ru","ro"]},"history":{"type":"array","maxItems":10,"items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"}}}}}}}},"x-boundaries":["No access to the internal Hermes runtime.","No access to private client data, CRM, memory or the lead database.","No external actions.","No secret-protected internal routes are documented here.","Critical business actions require explicit owner approval."]}