Guides
Webhooks
Receive real-time notifications when OnePath events occur.
OnePath sends webhook events to your registered endpoints when key actions happen — user health data updates, AI analysis completion, consent changes, and more.
Registering an Endpoint
Register endpoints in the Partner Portal under Settings → Webhooks.
Requirements:
- Must be HTTPS
- Must return
200within 5 seconds - Must verify the
X-Onepath-Signatureheader
Event Types
| Event | When it fires |
|---|---|
user.onboarded | New user registered via /onboard |
health_data.updated | FHIR observations submitted |
lab_analysis.complete | Lab document processing finished |
insights.refreshed | AI insights regenerated |
consent.revoked | User revoked consent |
Payload Structure
{
"id": "evt_01j2k3l4m5n6",
"type": "lab_analysis.complete",
"createdAt": "2026-08-04T09:01:45Z",
"data": {
"userId": "onepath_usr_7xkm2p9q",
"analysisId": "anlz_abc123"
}
}Verifying Signatures
Always verify the X-Onepath-Signature header to confirm events are from OnePath:
import { createHmac } from "crypto";
function verifyWebhook(payload: string, signature: string, secret: string): boolean {
const expected = createHmac("sha256", secret)
.update(payload)
.digest("hex");
return `sha256=${expected}` === signature;
}Retry Policy
Failed deliveries (non-200 response or timeout) are retried with exponential backoff:
| Attempt | Delay |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
| 4th retry | 2 hours |
| Final retry | 24 hours |
After 5 failures, the event is marked as failed and logged in the Partner Portal.