Overview#
The Docus Lab API supports AI-powered notifications for partners, enabling real-time alerts about patient health insights, follow-up tests, and recommendations. This webhook allows external systems to receive automated updates based on AI analysis.
Webhook Endpoint#
Partners must provide an endpoint where they will receive notifications.Content-Type: application/json
https://partner-api.example.com/webhooks/notifications
The webhook sends a JSON payload containing the patient_id and a message.| Header | Value | Description |
|---|
x-webhook-key | YOUR_WEBHOOK_SECRET | API secret key for authentication |
Content-Type | application/json | Specifies JSON format |
Request Body#
{
"patient_id": "12345",
"message": "Patient's recent test indicates high cholesterol levels. A follow-up test is recommended."
}
| Field | Type | Description |
|---|
patient_id | string | Unique identifier of the patient. |
message | string | AI-powered health insight or recommendation. |
Partners must return a 200 OK response upon successful receipt of the notification.Success Response:#
{
"status": "success",
"message": "Notification 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" } |
Security & Verification#
To ensure secure communication, partners should:1.
Validate API Keys – Ensure x-webhook-key match expected value.
2.
Rate Limit Handling – Implement request throttling to prevent abuse.
Testing & Debugging#
Partners can test the webhook using tools like Postman or cURL:Example cURL Request#
The webhook URL is reachable.
The API keys are correct.
The system logs received requests for troubleshooting.
Modified at 2025-07-29 12:43:15