Skip to Content
StoneDock Connect
StoneDock Connect
StoneDock Connect Documentation
WebhooksError HandlingRate LimitsHIPAA for IntegratorsMedication Refill Lifecycle
Guides

Webhooks

Receive real-time notifications when StoneDock events occur.

StoneDock sends webhook events to your registered endpoints when key actions happen. Today that means one event: a message recorded through the Messaging endpoint. More event types (health data updates, lab analysis completion, consent changes) are planned but not live yet — don't build against them until they appear here.

Registering an Endpoint

Register endpoints in the Partner Portal under Settings → Webhooks.

Requirements:

  • Must be HTTPS
  • Must verify the X-OnePath-Signature header

Event Types

EventWhen it fires
message_createdA message was recorded via POST /partner/v1/users/{id}/messages, in either direction

Payload Structure

{
  "id": "evt_01j2k3l4m5n6",
  "type": "message_created",
  "createdAt": "2026-08-04T09:01:45Z",
  "data": {
    "userId": "onepath_usr_7xkm2p9q",
    "communicationId": "comm-abc123",
    "direction": "patient-to-provider"
  }
}

Verifying Signatures

Always verify the X-OnePath-Signature header to confirm events are from StoneDock:

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;
}

Delivery Guarantees

Delivery is currently best-effort, single-attempt — there is no automatic retry scheduler yet. If your endpoint is down or returns a non-200 response, that delivery is logged as failed and not retried. Design your integration to tolerate a missed webhook (e.g. by periodically polling the underlying resource as a backstop) rather than relying on guaranteed delivery.

Every delivery attempt — success or failure, including the HTTP status your endpoint returned — is recorded and visible in the Partner Portal under Settings → Webhooks.

API Reference

Full reference for all StoneDock Connect partner endpoints.

Error Handling

How to handle API errors gracefully in your integration.

On this page

Registering an EndpointEvent TypesPayload StructureVerifying SignaturesDelivery Guarantees