{"openapi":"3.1.0","info":{"title":"Hayati AI Nexus Public API","version":"1.0.0","description":"Public API for Hayati AI Nexus — a Healthcare Operating System for Indian hospitals, clinics, and pharmacies. This API provides read-only access to pricing plans, health status, and product information.\n\n## Versioning\n\nThis API uses URL-path versioning implied by the stable `/api/` prefix. The current version is `1.0.0`. Breaking changes will be communicated via a `Sunset` response header and a minimum 90-day deprecation window before removal. Non-breaking additions (new fields, new endpoints) do not increment the version.\n\n## Rate Limits\n\nPublic endpoints are rate-limited. Responses include standard headers:\n- `X-RateLimit-Limit` — requests allowed per window\n- `X-RateLimit-Remaining` — requests remaining\n- `X-RateLimit-Reset` — UTC epoch seconds when the window resets\n\nWhen the limit is exceeded, a `429` response is returned with a `Retry-After` header.","contact":{"name":"Hayati AI Nexus Support","email":"contact@hayatiainexus.com","url":"https://www.hayatiainexus.com/contact"},"license":{"name":"Proprietary","url":"https://www.hayatiainexus.com/terms"},"x-api-versioning":{"strategy":"url-path-stable","current":"1.0.0","deprecationPolicy":"Sunset header + 90-day notice before breaking changes"}},"servers":[{"url":"https://www.hayatiainexus.com","description":"Production"}],"paths":{"/api/health":{"get":{"operationId":"getHealthStatus","summary":"Service health check","description":"Returns the current health status of the Hayati AI Nexus cloud service. No authentication required.","tags":["System"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"Service is healthy","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/plans":{"get":{"operationId":"listPricingPlans","summary":"List active pricing plans","description":"Returns all currently active license plans with pricing in INR, branch limits, and feature flags. Plans are ordered by contactSales (non-contact first) then by maxBranches ascending.","tags":["Pricing"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"List of active plans","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlansResponse"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/contact":{"post":{"operationId":"submitContactForm","summary":"Submit a contact inquiry","description":"Submit a contact form inquiry. Messages are delivered to the Hayati sales and support team.","tags":["Contact"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}}},"responses":{"200":{"description":"Contact form submitted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/llms.txt":{"get":{"operationId":"getLlmsTxt","summary":"Machine-readable product summary","description":"Returns the llms.txt file — a plain-text, markdown-structured document describing the product, pricing, features, and key pages for AI agents and language models.","tags":["Discovery"],"responses":{"200":{"description":"llms.txt content","content":{"text/plain":{"schema":{"type":"string","description":"Markdown-structured plain text"}}}},"500":{"$ref":"#/components/responses/InternalError"}}}},"/openapi.json":{"get":{"operationId":"getOpenApiSpec","summary":"OpenAPI specification","description":"Returns this OpenAPI 3.1 specification document.","tags":["Discovery"],"responses":{"200":{"description":"OpenAPI 3.1 JSON specification","content":{"application/json":{"schema":{"type":"object","description":"OpenAPI 3.1 document"}}}},"500":{"$ref":"#/components/responses/InternalError"}}}}},"components":{"parameters":{"ApiVersion":{"name":"X-API-Version","in":"header","required":false,"description":"API version. Currently only '1' is supported. Omitting defaults to the latest stable version.","schema":{"type":"string","default":"1","enum":["1"]}}},"headers":{"X-RateLimit-Limit":{"description":"Maximum requests allowed per rate-limit window","schema":{"type":"integer","example":60}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":58}},"X-RateLimit-Reset":{"description":"UTC epoch seconds when the rate-limit window resets","schema":{"type":"integer","example":1719500000}}},"schemas":{"HealthResponse":{"type":"object","required":["status","service","timestamp","version","documentation"],"properties":{"status":{"type":"string","enum":["ok"],"description":"Health status indicator"},"service":{"type":"string","example":"hayati-cloud","description":"Service identifier"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the check"},"version":{"type":"string","example":"1.0.0","description":"API version"},"documentation":{"type":"string","format":"uri","example":"https://www.hayatiainexus.com/openapi.json","description":"Link to the OpenAPI specification"}}},"PlansResponse":{"type":"object","required":["success","plans"],"properties":{"success":{"type":"boolean","example":true},"plans":{"type":"array","items":{"$ref":"#/components/schemas/LicensePlan"}}}},"ContactRequest":{"type":"object","required":["name","email","message"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Full name of the person reaching out"},"email":{"type":"string","format":"email","description":"Contact email address"},"phone":{"type":"string","maxLength":20,"description":"Phone number (optional)"},"organization":{"type":"string","maxLength":200,"description":"Organization or hospital name (optional)"},"message":{"type":"string","minLength":10,"maxLength":5000,"description":"Inquiry message"}}},"ContactResponse":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Message sent"}}},"LicensePlan":{"type":"object","required":["id","name","priceINR","maxBranches","isActive"],"properties":{"id":{"type":"string","description":"Unique plan identifier","example":"plan_foundation"},"name":{"type":"string","description":"Display name of the plan","example":"Starter"},"priceINR":{"type":"integer","description":"Annual price in paise (INR × 100)","example":499900},"maxBranches":{"type":"integer","description":"Maximum number of branches supported","example":1},"isActive":{"type":"boolean","description":"Whether this plan is currently offered"},"contactSales":{"type":"boolean","description":"Whether pricing requires contacting sales"},"features":{"type":"object","additionalProperties":true,"description":"Feature flags and limits for this plan"}}},"ApiError":{"type":"object","required":["error"],"description":"Standard error response. All API errors use this shape.","properties":{"error":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Machine-readable error code (e.g. VALIDATION_ERROR, NOT_FOUND, RATE_LIMITED, INTERNAL_ERROR)","example":"VALIDATION_ERROR"},"errorId":{"type":"string","format":"uuid","description":"Unique error ID for support reference (5xx errors only)"},"details":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string","description":"Field that failed validation"},"message":{"type":"string","description":"Validation failure reason"}}},"description":"Field-level validation errors (400 responses only)"},"hint":{"type":"string","description":"Suggested resolution for the agent or developer"}}}},"responses":{"ValidationError":{"description":"Request validation failed (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"Request validation failed","code":"VALIDATION_ERROR","details":[{"field":"email","message":"Invalid email format"}],"hint":"Check the 'details' array for field-level errors."}}}},"RateLimited":{"description":"Rate limit exceeded (429)","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","example":60}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"Rate limit exceeded","code":"RATE_LIMITED","hint":"Wait before retrying. See Retry-After header."}}}},"InternalError":{"description":"Internal server error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"An unexpected error occurred","code":"INTERNAL_ERROR","errorId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","hint":"An unexpected error occurred. Quote the errorId when contacting support."}}}},"NotFound":{"description":"Resource not found (404)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"The requested endpoint does not exist","code":"NOT_FOUND","hint":"Check /openapi.json for available endpoints or /llms.txt for product documentation."}}}}}},"tags":[{"name":"System","description":"Service health and status"},{"name":"Pricing","description":"Pricing plans and subscription information"},{"name":"Contact","description":"Contact and inquiry endpoints"},{"name":"Discovery","description":"Machine-readable discovery endpoints"}],"externalDocs":{"description":"Hayati AI Nexus Developer Documentation","url":"https://www.hayatiainexus.com/developers"}}