Skip to content

API Reference

Chatbot Service

POST /webhook

Main entry point for WhatsApp webhooks. Payload:

{
  "object": "whatsapp_business_account",
  "entry": [...]
}

GET /analysis/summary/{patient_id}

Returns the AI summary of recent conversations.

Response:

{
  "summary": "Patient reported mild headache...",
  "risk_score": "low",
  "data_points": [
    {"type": "glucose", "value": "5.5", "timestamp": "..."}
  ]
}

EHR Backend

POST /api/patients

Create a new patient.

Headers: Authorization: Bearer <token>