v1

latestOpenAPI 3.0.0NexHealth License 1.02026-07-2688180386.6 KB
Webhook Subscriptions

Edit webhook subscription

Updates a webhook subscription. The subdomain parameter is required for request validation even when the subscription is not scoped to an institution (e.g. Onboarding); pass the subdomain of any institution your API user has access to.

patch/webhook_endpoints/{id}/webhook_subscriptions/{subscription_id}

Path parameters

idinteger required

Webhook Endpoint id

subscription_idinteger required

Webhook Subscription id

Query parameters

subdomainstring required

Used to scope the request to the specified institution

Headers

Nex-Api-Versionstring required

The NexHealth API version

Request body

new_endpoint_idinteger

Id of another webhook endpoint owned by the same API user to move this subscription to. Future webhook deliveries go to the new endpoint. Returns 404 if the id does not belong to one of your webhook endpoints. After a successful move, subsequent requests for the subscription must use the new endpoint id in the URL path; requests using the old endpoint id return 404.

activeboolean

Set to false to pause webhook deliveries for this subscription, or true to resume them. Omitting the param leaves the current value unchanged.

Example request

{
  "new_endpoint_id": 1,
  "active": true
}

Response

Successful

codeboolean

Indicates the success or failure of the request

descriptionstring

Additional context on the request to help with debugging.

errorstring[]

Any errors that occur during the execution of the request.

countinteger

Number of total objects, in case of collection.

Example response

{
  "description": "Description",
  "error": [
    "Error message"
  ],
  "data": {
    "id": 1,
    "webhook_endpoint_id": 1,
    "institution_id": 1,
    "resource_type": "Appointment",
    "event": "appointment_insertion",
    "active": true,
    "created_at": "2020-06-05T20:16:57.007Z",
    "updated_at": "2020-06-05T20:16:57.007Z"
  },
  "count": 2
}