Overview
Introduction
How Webhooks Work
1.
2.
POST
request with event data to the configured webhook URL.3.
4.
200 OK
response to confirm receipt.Webhook Configuration
Webhook Setup Steps:
1.
2.
3.
4.
5.
Available Webhook Events
Event Name | Description |
---|---|
report_ready | Triggered when a health report is available. |
report_dynamics_ready | Triggered when a health dynamics report is available. |
patient_notification | Sent when an AI-powered health notification is generated. |
Webhook Request Format
POST
requests with a JSON payload.Headers:
Header | Description |
---|---|
x-webhook-key | Partner's authentication key |
Content-Type | application/json |
Example Webhook Request:
{
"event": "patient_notification",
"timestamp": "2025-03-04T12:00:00Z",
"data": {
"patient_id": "12345",
"message": "Patient's cholesterol is high. A follow-up is recommended."
}
}
Webhook Response Requirements
Example Success Response:
{
"status": "success",
"message": "Webhook received successfully."
}
Error Responses:
Status Code | Meaning | Example Response |
---|---|---|
400 | Bad Request | { "error": "Invalid payload format" } |
401 | Unauthorized | { "error": "Invalid API key" } |
500 | Server Error | { "error": "Internal server issue" } |
Testing & Debugging Webhooks
Example cURL Test Request:
Handling Webhook Failures
Retry Logic:
Modified at 2025-03-04 08:26:49