Build powerful healthcare applications with our comprehensive REST API
API Endpoints
Uptime SLA
Average Response
Navigate to Settings → API Keys in your dashboard to generate your API key.
Use your API key to authenticate and make your first API call:
curl -X GET https://api.healthdock.org/v1/patients \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Browse through our comprehensive API endpoints and start building!
The HealthDock API uses Bearer token authentication. Include your API key in the Authorization header of each request:
Authorization: Bearer YOUR_API_KEY
For third-party applications, we support OAuth 2.0 authentication flow:
Initialize OAuth flow for user authorization
| Parameter | Type | Description |
|---|---|---|
| client_id | string | Required Your application's client ID |
| redirect_uri | string | Required Callback URL for authorization |
| scope | string | Optional Requested permissions |
Retrieve a list of all patients
| Parameter | Type | Description |
|---|---|---|
| page | integer | Optional Page number (default: 1) |
| limit | integer | Optional Results per page (max: 100) |
| search | string | Optional Search by name or ID |
{
"success": true,
"data": {
"patients": [...],
"pagination": {
"current_page": 1,
"total_pages": 10,
"total_count": 245
}
}
}
curl -X GET https://api.healthdock.org/v1/patients?page=1&limit=10 \
-H "Authorization: Bearer YOUR_API_KEY"
Create a new patient record
| Parameter | Type | Description |
|---|---|---|
| first_name | string | Required Patient's first name |
| last_name | string | Required Patient's last name |
| date_of_birth | date | Required Format: YYYY-MM-DD |
| gender | string | Required M/F/Other |
| phone | string | Required Contact number |
| abha_number | string | Optional ABHA ID for ABDM integration |
List all appointments with filtering options
| Parameter | Type | Description |
|---|---|---|
| date | date | Optional Filter by date (YYYY-MM-DD) |
| doctor_id | string | Optional Filter by doctor |
| status | string | Optional scheduled/confirmed/completed/cancelled |
Schedule a new appointment
| Parameter | Type | Description |
|---|---|---|
| patient_id | string | Required Patient ID |
| doctor_id | string | Required Doctor ID |
| date_time | datetime | Required ISO 8601 format |
| duration | integer | Optional Duration in minutes (default: 30) |
| type | string | Optional consultation/follow-up/procedure |
HealthDock can send real-time notifications to your application when certain events occur. Configure webhook endpoints in your dashboard.
{
"event": "patient.created",
"timestamp": "2024-01-12T10:30:00Z",
"data": {
"patient_id": "PAT123456",
"first_name": "John",
"last_name": "Doe",
...
},
"signature": "sha256=..."
}
All webhook payloads are signed using HMAC-SHA256. Verify the signature to ensure the request came from HealthDock:
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return signature === `sha256=${expectedSignature}`;
}
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 750
X-RateLimit-Reset: 1642089600
The HealthDock API uses standard HTTP status codes to indicate success or failure of requests.
| Code | Message | Description |
|---|---|---|
| 200 | OK | Request successful |
| 201 | Created | Resource created successfully |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error, please retry |
{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request parameters are invalid",
"details": {
"field": "date_of_birth",
"issue": "Invalid date format"
}
}
}
Use our official SDKs for faster integration: