API Reference

Webhook Endpoints

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
130 sec
21.5 min
33.5 min
410 min
530 min
62 hours
75 hours
810 hours
924 hours
1048 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
}