Setting up a webhook endpoint is the first step to using NexHealth's webhooks.
To get started, send a post request to webhook_endpoints with the URL you want to receive messages at. Since webhook messages may contain Protected Health Information (PHI), you must use a secure HTTPS URL.
Once registered, you will receive an ID for the new webhook endpoint. Because your server will be publicly accessible, the registered endpoint includes a secret key to help you verify the authenticity of incoming messages.
After setting up your endpoint, you can subscribe to specific events to receive notifications. For more details, see webhook subscriptions.
Webhook retries
If your application does not respond with a 2xx status code we will retry using the schedule below. If we continue to receive errors for 48 hours we will update the webhook endpoint
active
field to false and stop sending webhooks. Otherwise, webhook endpoints persist indefinitely.To reactivate your endpoint you can make a patch request to the subscription or endpoint and set
active
to "true".
Retry # Total Time 1 30 sec 2 1.5 min 3 3.5 min 4 10 min 5 30 min 6 2 hours 7 5 hours 8 10 hours 9 24 hours 10 48 hours
Sample response
{
"code": false,
"description": [
[
"Description"
]
],
"error": [
[
"Error"
]
],
"data": [
{
"id": 1,
"target_url": "http://localhost:8085/hook",
"secret_key": "NArWk7gdI96Bdn",
"active": true,
"created_at": "2020-06-05T20:16:57.007Z",
"updated_at": "2020-06-05T20:16:57.007Z"
}
],
"count": 2
}