Skip to main content
The Register a Webhook Endpoint call lets you subscribe an HTTPS URL to one or more ByDoctor events. Once registered, ByDoctor will send a signed HTTP POST request to your URL whenever a matching event occurs in your clinic. The response includes a one-time signing secret you must store immediately — it will not be shown again.

Endpoint

Authentication

Include your API key as a Bearer token in the Authorization header of every request.

Request Body Parameters

string
required
The full HTTPS URL of your endpoint. ByDoctor will POST event payloads to this address. Plain HTTP URLs are rejected — your endpoint must use https://.
array
required
An array of event name strings you want to subscribe to. Pass ["*"] to subscribe to all current and future events. See the full list of available events below.

Available Events

You can pass ["*"] as the events value to subscribe to all events using a wildcard. This is handy during development and testing, but we recommend subscribing only to the specific events your integration needs in production — it reduces unnecessary traffic and simplifies your event handler logic.

Response Fields

A successful request returns HTTP 201 Created with the newly registered webhook object, including the one-time signing secret.
string
Unique identifier for the webhook endpoint (UUID).
string
Identifier of the clinic this webhook belongs to.
string
The HTTPS endpoint URL you registered.
array
The list of event names this webhook is subscribed to, as provided in the request.
string
HMAC signing secret. ByDoctor uses this value to sign every event payload sent to your endpoint. You should use it to verify that incoming requests genuinely originate from ByDoctor. This value is only returned once.
boolean
true for all newly registered webhooks. You can pause delivery at any time by calling PATCH /webhooks/{id} with {"active": false}.
string
ISO 8601 UTC timestamp of when this webhook was registered.
Store the secret immediately. ByDoctor will never return it again after this response. If you lose it, you must delete the webhook and create a new one to obtain a fresh signing secret. We recommend storing it in your application’s secret manager (e.g. AWS Secrets Manager, HashiCorp Vault) rather than in plain environment variables.

Error Responses

Example Request

Example Response