Webhook Endpoints

Create webhook endpoint

POST
/webhook_endpoints

This endpoint creates a new webhook endpoint for the authenticated API user; target_url must use HTTPS in production.

Authorization

Authorization
Authorization<token>

In: header

Header Parameters

Nex-Api-Version*string

The NexHealth API version

Default"v3.0.0"

Request Body

application/json

Create webhook endpoint

target_url*string

URL to send POST requests to in response to subscribed events. Must use HTTPS in production

active?boolean

Whether the endpoint receives deliveries. Defaults to true. An inactive endpoint keeps its subscriptions but receives nothing

Response Body

application/vnd.Nexhealth+json;version=2

application/vnd.Nexhealth+json;version=2

application/vnd.Nexhealth+json;version=2

application/vnd.Nexhealth+json;version=2

curl -X POST "https://example.com/webhook_endpoints" \  -H "Nex-Api-Version: v3.0.0" \  -H "Content-Type: application/json" \  -d '{    "target_url": "string"  }'
{  "code": false,  "description": "Description",  "error": [    "Error message"  ],  "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}