API Reference

Webhook Endpoints

Setting up a webhook endpoint is the first step to working with NexHealth webhooks. Do this by making a POST request with your desired URL to /webhook_endpoints.

Since our webhook messages may contain PHI, you must register a valid URL using HTTPS

Upon successful registration, we will respond with the id of the new registered endpoint. Since your server will be listening on a public endpoint, the registered endpoint includes a secret key that will allow you to cryptographically verify the authenticity of the messages you receive.

Once you've set up your endpoint, you can subscribe to whatever events you would like to receive notifications for, see Webhook Subscriptions for more details.

📘

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

Webhook Endpoints 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
}