Full reference for the PatientPulse REST API (452 endpoints) and PulseVault Mobile API (88 endpoints). Base URL: https://api.patientpulse.in
All requests require a Bearer token in the Authorization header, except auth endpoints themselves. OTP-based login is the primary patient flow.
Sends an OTP via SMS (Twilio) or WhatsApp to the patient's registered phone number. Rate-limited to prevent abuse.
| Parameter | Type | Required | Description |
|---|---|---|---|
| phone | string | required | E.164 format phone number, e.g. +919876543210 |
| channel | enum | optional | sms (default) or whatsapp |
{
"status": "otp_sent",
"expires_in": 300,
"channel": "sms"
}Verifies the OTP and returns an access token (JWT) and a refresh token (HttpOnly cookie).
| Parameter | Type | Required | Description |
|---|---|---|---|
| phone | string | required | Same phone used for request-otp |
| otp | string | required | 6-digit OTP received |
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "bearer",
"expires_in": 900,
"user": {
"id": "pat_01JFGH3K2MNPQ4RS5TUVWXYZ",
"phone": "+919876543210",
"role": "patient"
}
}Exchange a Google ID token for a PatientPulse session. Suitable for web app login flows.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id_token | string | required | Google ID token from OAuth flow |
Returns the full profile of the currently authenticated user including role, organization, and permissions.
Include Authorization: Bearer <token> header.
PatientPulse ships a full AI suite β lab interpretation, ambient clinical scribe, demand forecasting, and staffing recommendations. AI endpoints require AI_ENABLED=true in your environment.
Pass a lab report (PDF or image reference) and receive structured clinical interpretation β abnormal flags, trend markers, recommended actions.
| Parameter | Type | Required | Description |
|---|---|---|---|
| record_id | string | required | ID of uploaded health record |
| patient_id | string | required | Patient to contextualize results against |
| include_history | boolean | optional | Compare against prior lab results (default: true) |
{
"interpretation": {
"summary": "HbA1c elevated at 7.8% β borderline diabetic range.",
"abnormal_markers": [
{ "name": "HbA1c", "value": "7.8%", "flag": "HIGH" },
{ "name": "Triglycerides", "value": "210 mg/dL", "flag": "HIGH" }
],
"recommendations": ["Repeat HbA1c in 3 months", "Dietary consult advised"],
"confidence": 0.91
}
}Submit consultation transcript or audio reference; receive a structured SOAP note with chief complaint, history, assessment, and plan.
| Parameter | Type | Required | Description |
|---|---|---|---|
| transcript | string | required* | Consultation transcript text |
| audio_url | string | optional | URL to audio recording (*one of transcript or audio_url required) |
| appointment_id | string | optional | Link note to existing appointment |
Returns ML-generated demand forecast (XGBoost + Prophet ensemble) for OPD and Emergency departments. Used for capacity planning and staffing optimization.
| Query Param | Type | Description |
|---|---|---|
| department | enum | opd, emergency, ipd |
| horizon_days | integer | Forecast horizon (1β14 days) |
| org_id | string | Filter by organization |
PatientPulse implements HL7 FHIR R4 for patient data export and interoperability. Use these endpoints to fetch FHIR-compliant bundles for any patient.
Returns a complete FHIR R4 Bundle containing Patient, Conditions, Medications, Observations, and Appointments resources.
{
"resourceType": "Bundle",
"type": "collection",
"entry": [
{
"resource": {
"resourceType": "Patient",
"id": "pat_01JFGH3K2MNPQ4RS5TUVWXYZ",
"name": [{ "text": "Ramesh Kumar" }],
"birthDate": "1985-04-15",
"identifier": [{ "system": "https://abha.gov.in", "value": "12-3456-7890-1234" }]
}
}
]
}First-class ABDM (Ayushman Bharat Digital Mission) integration. Link ABHA IDs, push/pull PHR records, and sync with HFR/HPR registries.
Poll the status of an ABHA identity linking request. Links are initiated via the mobile app and processed asynchronously by the ABDM connector.
Triggered automatically on consult completion (Feature 7A). Can also be called manually to push specific records to a patient's ABHA-linked health locker.
Set ABDM_AUTO_PUSH_ON_CONSULT=true to enable automatic FHIR bundle push after each consultation.
| Parameter | Type | Required | Description |
|---|---|---|---|
| patient_id | string | required | Patient identifier |
| doctor_id | string | required | Assigned doctor |
| slot_id | string | required | Availability slot from GET /availability/slots |
| visit_type | enum | required | opd, telemedicine, followup |
| notes | string | optional | Chief complaint or notes for doctor |
| Query Param | Type | Description |
|---|---|---|
| doctor_id | string | Filter by doctor |
| date | date | Target date (ISO 8601) |
| specialty | string | Filter by medical specialty |
Submit a pre-authorization or claim to the payer via NHCX. Returns a correlation_id for status polling.
Polls the National Health Claims Exchange for real-time claim status using the correlation ID returned at claim submission.
The PulseVault mobile backend provides 88 endpoints for the Android consumer app. Base URL: https://api.pulsevault.in/v1
Identical contract to PatientPulse auth. Can be proxied to canonical PatientPulse backend via NODE_AUTH_PROXY_ENABLED=true.
Returns all health records for a profile, grouped by category (labs, prescriptions, imaging, discharge summaries).
{
"profile_id": "prof_abc123",
"records": {
"labs": [/* ... */],
"prescriptions": [/* ... */],
"imaging": [/* ... */]
},
"total_records": 47,
"last_updated": "2025-11-14T10:30:00Z"
}Queues an async AI job to extract structured health markers (diagnoses, medications, vitals) from a health record document.
452 total PatientPulse endpoints + 88 PulseVault endpoints. Download the full OpenAPI spec for complete reference.
Download OpenAPI 3.0 Spec βAll error responses are JSON with an error key. The table below covers every non-2xx status your integration should handle.
| HTTP Status | error code | When it happens | Fix |
|---|---|---|---|
| 401 | invalid_api_key | Key not found, revoked, or environment mismatch (sandbox key on production endpoint) | Issue a new key in the Developer Portal |
| 402 | plan_required | Your plan tier is below the minimum required for this endpoint (e.g. calling AI features on the free plan) | Upgrade at developer-portal.html#plans |
| 402 | subscription_required | Attempted to issue a production key with no active paid subscription | Subscribe via Razorpay on the Developer Portal |
| 429 | quota_exceeded | Monthly API call quota exhausted for your plan (free: 10K, growth: 500K) | Upgrade plan or wait for the monthly reset |
| 422 | validation_error | Request body fails schema validation | Check the detail array for field-level messages |
| 404 | not_found | Resource (patient, appointment, claimβ¦) does not exist or belongs to a different org | Verify the ID and your org_id |
| 500 | internal_error | Unexpected server error | Retry with exponential back-off; open a GitHub issue if persistent |
Every response from an API-key-authenticated request carries these headers:
| Header | Value | Notes |
|---|---|---|
| X-RateLimit-Limit | 10000 / 500000 / unlimited | Monthly quota for your plan |
| X-RateLimit-Remaining | integer β₯ 0 | Calls left this calendar month |
| X-RateLimit-Period | monthly | Resets on the 1st of each month |
{
"error": "quota_exceeded",
"monthly_calls": 10001,
"quota": 10000,
"plan": "free",
"reset": "first day of next calendar month",
"upgrade_url": "https://patientpulse.in/developer-portal#plans"
}
Manage API keys programmatically. All routes require an org-admin JWT token in the Authorization: Bearer <jwt> header.
| Field | Type | Required | Description |
|---|---|---|---|
| environment | enum | optional | sandbox (default) or production. Production requires an active paid subscription. |
| scopes | string[] | optional | Permission scopes: read:patients, write:appointments, ai:interpret, interop:fhir, admin:org, etc. |
| label | string | optional | Human-readable label, max 120 chars |
The full key is returned in the response and never stored. Store it securely immediately β you cannot retrieve it again.
| Query Param | Type | Description |
|---|---|---|
| include_revoked | bool | Default false. Set true to include revoked keys in the response. |
Sets revoked_at timestamp. All subsequent requests using this key will receive 401 invalid_api_key. Irreversible β rotate instead if you need a replacement.
Atomically revokes the old key and creates a replacement with the same environment, plan, scopes, and label. The new plaintext key is returned once.
| Query Param | Values | Description |
|---|---|---|
| period | 7d Β· 30d Β· 90d | Lookback window (default 30d) |
| key_id | integer | Filter to a specific key |
Send a live request to the sandbox API.