Webhook Subscriptions

Create webhook subscription

POST
/webhook_endpoints/{id}/webhook_subscriptions

Creates a webhook subscription on the given webhook endpoint. The subscription is pinned to the API version used to create it (v3.0.0): webhook payloads delivered for this subscription use the v3.0.0 entity contract. To pin a subscription to a different version, create it via that version of this endpoint.

Authorization

Authorization
Authorization<token>

In: header

Path Parameters

id*integer

Webhook Endpoint ID

Formatint32

Query Parameters

subdomain*string

Used to scope the request to the specified institution. Required for institution-owned resources; must be omitted for the following resources (passing it returns 400): LocationDataReadiness, Onboarding

Header Parameters

Nex-Api-Version*string

The NexHealth API version

Default"v3.0.0"

Request Body

application/json

Create webhook subscription

resource_type*string

The resource to subscribe to

Value in

  • "Adjustment"
  • "AdjustmentType"
  • "Appointment"
  • "Charge"
  • "Claim"
  • "Document"
  • "FeeSchedule"
  • "FormResponse"
  • "Message"
  • "Onboarding"
  • "Patient"
  • "PatientInsuranceCoverage"
  • "Payment"
  • "PaymentType"
  • "Procedure"
  • "ProcedureCode"
  • "SyncStatus"
  • "TreatmentPlan"
event*string

A valid event type to listen to for the defined resource

Value in

  • "adjustment_created"
  • "adjustment_updated"
  • "adjustment_deleted"
  • "adjustment_insertion"
  • "adjustment_type_created"
  • "adjustment_type_updated"
  • "appointment_insertion"
  • "appointment_created"
  • "appointment_updated"
  • "appointment_requested"
  • "charge_created"
  • "charge_updated"
  • "charge_deleted"
  • "claim_created"
  • "claim_updated"
  • "claim_deleted"
  • "document_insertion"
  • "fee_schedule_created"
  • "fee_schedule_updated"
  • "form_response_insertion"
  • "message_created"
  • "message_updated"
  • "onboarding_created"
  • "onboarding_updated"
  • "onboarding_availability_ready"
  • "patient_created"
  • "patient_updated"
  • "patient_insurance_created"
  • "patient_insurance_updated"
  • "payment_created"
  • "payment_updated"
  • "payment_deleted"
  • "payment_insertion"
  • "payment_type_created"
  • "payment_type_updated"
  • "procedure_created"
  • "procedure_updated"
  • "procedure_code_created"
  • "procedure_code_updated"
  • "procedure_code_deleted"
  • "sync_status_read_change"
  • "sync_status_write_change"
  • "treatment_plan_created"
  • "treatment_plan_updated"
  • "treatment_plan_deleted"
active?boolean

Whether the subscription is active. Inactive subscriptions are kept but receive no webhook deliveries. Defaults to true.

Defaulttrue

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/webhook_endpoints/0/webhook_subscriptions?subdomain=demo-practice" \  -H "Nex-Api-Version: v3.0.0" \  -H "Content-Type: application/json" \  -d '{    "resource_type": "Appointment",    "event": "appointment_insertion"  }'
{  "code": false,  "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}