Docus Lab SAAS Sandbox
  1. Webhooks
Docus Lab SAAS Sandbox
  • Getting Started
  • Initial Biomarkers and Biomarker Groups Setup
  • Flow Between Lab and API
  • Limitations
  • Support
  • Patient
    • Create a patient
      POST
    • Update a patient
      PUT
    • Get patient by ID
      GET
  • Visit
    • Create visit
      POST
    • Create composite visit
      POST
    • Generate AI report
      POST
    • Get AI report by visit ID
      GET
  • Lab Test
    • Create a plain lab test
      POST
    • Create a lab test with biomarkers
      POST
    • Create bulk plain lab tests
      POST
    • Create bulk lab tests with biomarkers
      POST
    • Get lab test by ID
      GET
  • Biomarker Group
    • Create a biomarker group
      POST
    • Update a biomarker group
      PUT
    • Get biomarker group by ID
      GET
  • Biomarker
    • Create a biomarker
      POST
    • Update biomarker by ID
      PUT
    • Get biomarker by ID
      GET
  • Branch
    • Create a branch
    • Update branch by ID
    • Get branch by ID
  • Webhooks
    • Health reports
    • Notifications
  • Schemas
    • Schemas
      • UpdateBiomarkerDto
      • CreateLabTestPlanDTO
      • UpdateBiomarkerGroupDto
      • LabTestReport
      • CreateCompositeVisitDto
      • MultipleTestIdsDto
      • CreateBulkLabTestsPlainDTO
      • CreateBulkLabTestsDTO
      • CreateBranchDto
      • UpdateBranchDto
      • Biomarker
      • CreateBiomarkerGroupDto
      • CreateBiomarkerDto
      • SingleReport
      • CreatePatientDto
      • UpdatePatientDto
      • CreateVisitDto
      • CreateLabTestDTO
  1. Webhooks

Notifications

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.
Method: POST
Content-Type: application/json
Example Endpoint:
https://partner-api.example.com/webhooks/notifications

Request Format#

The webhook sends a JSON payload containing the patient_id and a message.

Request Headers#

HeaderValueDescription
x-webhook-keyYOUR_WEBHOOK_SECRETAPI secret key for authentication
Content-Typeapplication/jsonSpecifies JSON format

Request Body#

{
  "patient_id": "12345",
  "message": "Patient's recent test indicates high cholesterol levels. A follow-up test is recommended."
}
FieldTypeDescription
patient_idstringUnique identifier of the patient.
messagestringAI-powered health insight or recommendation.

Response Format#

Partners must return a 200 OK response upon successful receipt of the notification.

Success Response:#

{
  "status": "success",
  "message": "Notification received successfully."
}

Error Responses:#

Status CodeMeaningExample Response
400Bad Request{ "error": "Invalid payload format" }
401Unauthorized{ "error": "Invalid API key" }
500Server 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#

For debugging, ensure:
The webhook URL is reachable.
The API keys are correct.
The system logs received requests for troubleshooting.

Contact & Support#

For assistance, contact our support team at: support@docus.ai
Modified at 2025-07-29 12:43:15
Previous
Health reports
Next
UpdateBiomarkerDto
Built with