REST API Reference HMS4all exposes a REST API across 37 modules. All endpoints require JWT or API key authentication unless noted otherwise. The complete, always-current reference is the auto-generated Swagger UI — the sample below is a quick tour.
Swagger UI The interactive Swagger UI is available at your API instance:
# Swagger UI
https://your-api.hms4all.com/api/docs
# OpenAPI JSON spec
https://your-api.hms4all.com/.well-known/openapi.json Base URL All API requests go to your API instance. Include the Authorization header and x-tenant-id header (for JWT auth):
curl https://your-api.hms4all.com/patients \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" Endpoint Reference Key endpoints by category. See Swagger UI for the complete list.
Authentication Method Path Description POST /auth/login Login and get JWT token GET /auth/me Get current user profile
Patients Method Path Description GET /patients List patients (paginated) POST /patients/register Register new patient GET /patients/:id Get patient by ID
Appointments Method Path Description GET /appointments List appointments POST /appointments Create appointment PATCH /appointments/:id/status Update appointment status GET /appointments/queue Get current queue
Encounters (OPD) Method Path Description GET /encounters List encounters POST /encounters Create encounter GET /encounters/:id Get encounter details PATCH /encounters/:id/vitals Add vitals POST /encounters/:id/prescriptions Add prescription
Admissions (IPD) Method Path Description POST /admissions Admit patient GET /admissions/:id Get admission details POST /admissions/:id/discharge Discharge patient
AI Agents Method Path Description GET /agenty/meta/tools List all MCP tools (public) GET /agenty/meta/skills List all A2A skills (public) GET /agenty/admin/audit Agent audit logs GET /agent-actions/pending List pending HITL actions POST /agent-actions/:id/approve Approve HITL action POST /agent-actions/:id/reject Reject HITL action
Billing Method Path Description GET /billing List bills POST /billing Create bill GET /billing/dashboard Billing dashboard stats
API Playground API Playground Load preset... Error Responses The API returns standard HTTP status codes with JSON error bodies:
{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}
// Common codes:
// 400 — Validation error
// 401 — Authentication required
// 403 — Insufficient permissions
// 404 — Resource not found
// 429 — Rate limit exceeded Next Steps