Zocdoc sends two kinds of webhook notification:
- Appointment status changes for appointments booked via
/v1/appointments/, such as a cancellation or a reschedule. - Insurance reference-data changes to plans and carriers.
Webhooks support HTTPS only (except for testing within the sandbox environment). All webhook requests are signed with a shared key that is known only to Zocdoc and to the client. You should manually verify the signature of each request to ensure its origin from the Zocdoc API server and to confirm that it has not been tampered with during transit.
- Create an HTTPS endpoint on your server (HTTP can be used for testing purposes).
- You can also use tools like webhook.site to test webhook responses within the sandbox.
- In the sandbox environment, you may use any valid base64 string as a key to test.
Example key:g9Y9hjTUk9KKH7ffBRbtRmJYo2OISsdMK4flbfDa3zR= - Submit your URL to the Zocdoc API team. The URL you provide will be hit by Zocdoc to post updates.
- Verify the signature.
- Return a
2xx. Zocdoc times out after 5 seconds. - Parse the JSON payload. Each webhook type documents its payload below.
A retry can deliver a notification you already processed, so make processing idempotent.
Convert the shared key provided by the Zocdoc API team to bytes as a base64 encoded string.
Extract the timestamp from the
webhook-timestampheader. The timestamp is in Unix epoch time (seconds) (e.g.1686772989= June 14, 2023 20:03:09 UTC).Verify that the timestamp is within a few minutes (default: 5 minutes) of the current time.
Convert the request body's JSON payload to a string. Note: Zocdoc may modify the schema at any time.
Concatenate the signed payload:
<webhook_timestamp>.<json payload>Encode this message as UTF-8 bytes.
Calculate the HMAC SHA256 hash using:
- The shared key as the key
- The encoded message as the input
Compare the calculated hash with the signature in the
webhook-signatureheader.
Example webhook-signature format:
v1:8KsUa1qDHGmJhK25hReYCRhOKkqxTYx7UC78f0FBkdA=;v2:8KsUa1qDHGmJhK25hReYCRhOKkqxTYx7UC78f0FBkdA=Each signature is prefixed by the version (e.g., v1:) and separated by semicolons.
Zocdoc makes up to 15 delivery attempts. Retries start after 5 minutes and double each time, capped at just under 12 hours between attempts, so the last attempt comes about 4 days after the first.
Zocdoc will retry if:
- A connection cannot be established with the developer's server
- No response is provided within 5 seconds
- The connection is severed before a response
Zocdoc will not retry based on the status code returned by the webhook endpoint.
For the patient booking use case, webhook notifications will only be sent for provider-initiated appointment changes. For developer/patient-initiated actions: Update your internal systems based on the API response. Do not wait for a webhook.
{
"data": {
"appointment_data": {
"appointment_id": "62g4ar44-1yv9-0931-dl3t-e9c2174kks09",
"appointment_updated_timestamp": "2023-06-14T17:06:54.9430804Z",
"appointment_update_type": "updated",
"changed_attributes": [
{
"attribute_path": "appointment.start_time"
},
{
"attribute_path": "patient.uploaded_attachments",
"attachment_type": "id_card"
}
]
},
"data_type": "appointment_data"
},
"event_type": "appointment_updated",
"webhook_timestamp": "2023-06-14T17:08:54.9430839Z"
}Note:
- Currently the only supported value for
data_typeisappointment_dataand forevent_typeisappointment_updated. - Supported values for
appointment_update_typeare:updated,cancelled, andcreated. (Thecreatedvalue is only supported within the provider scheduling use case.) - When the webhook is triggered due to attribute changes, the
appointment_datapayload MUST include achanged_attributesarray. Each object MUST contain at least anattribute_path. Forpatient.uploaded_attachments, the object MUST also include theattachment_type.
Zocdoc posts an insurance_plans_updated or insurance_carriers_updated notification when a plan or carrier field exposed by the API changes. A change to a Zocdoc-internal field sends nothing.
{
"event_id": "evt_4f2c8a91d0b34e6f8a1c7d5e9b0f2a63",
"event_type": "insurance_plans_updated",
"event_time_utc": "2026-01-15T14:30:00Z",
"changed_entities": [
{
"insurance_plan_id": "ip_5432",
"changed_attributes": [
{ "attribute_path": "insurance_plan.name" }
]
},
{
"insurance_plan_id": "ip_2345",
"changed_attributes": [
{ "attribute_path": "insurance_plan.carrier" },
{ "attribute_path": "insurance_plan.status" }
]
}
]
}Note:
- Every entry in
changed_entitiesmatches the notification'sevent_type. Each entry hasinsurance_plan_idoninsurance_plans_updatedorinsurance_carrier_idoninsurance_carriers_updated. The other key is absent. changed_entitiesholds 1 to 100 entries. A larger change arrives as several notifications.attribute_pathnames the field that changed, such asinsurance_plan.statusorinsurance_carrier.name. It can be any field on the plan or carrier returned by Get Insurance Plan.event_idis for support requests. It is not a dedup key.
To process a notification:
- Skip each entry whose
changed_attributeslists no field you use. - Fetch each remaining plan from Get Insurance Plan.
An insurance_carriers_updated notification means a field on the carrier itself changed, such as its name. It does not mean the carrier's plans changed. The API returns a carrier only as carrier on a plan. To read the new value, fetch any plan you hold with that carrier.
A retry can re-send entities you already processed. Dedup on insurance_plan_id or insurance_carrier_id.
To send yourself a sample in Sandbox, see the insurance mock request.