---
title: "Create webhook subscription"
method: POST
path: "/webhook_endpoints/{id}/webhook_subscriptions"
tags: ["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.

## Path parameters

- `id` integer, required

## Query parameters

- `subdomain` string, required

## Headers

- `Nex-Api-Version` string, required

## Request body

- PostWebhookEndpointsIdWebhookSubscriptions — Create webhook subscription
  - `resource_type` 'Adjustment' | 'AdjustmentType' | 'Appointment' | 'Charge' | 'Claim' | 'Document' | 'FeeSchedule' | 'FormResponse' | 'Message' | 'Onboarding' | 'Patient' | 'PatientInsuranceCoverage' | 'Payment' | 'PaymentType' | 'Procedure' | 'ProcedureCode' | 'SyncStatus' | 'TreatmentPlan', required — The resource to subscribe to
  - `event` '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', required — A valid event type to listen to for the defined resource
  - `active` boolean — Whether the subscription is active. Inactive subscriptions are kept but receive no webhook deliveries. Defaults to true.

## Response `201`

Successful

- APIV2EntitiesWebhookSubscriptionResponse — API_V2_Entities_WebhookSubscription_Response model
  - `code` boolean — Indicates the success or failure of the request
  - `description` string — Additional context on the request to help with debugging.
  - `error` string[] — Any errors that occur during the execution of the request.
  - `data` APIV2EntitiesWebhookSubscription
    - `id` integer — Subscription id
    - `webhook_endpoint_id` integer — Webhook Endpoint id
    - `institution_id` integer, nullable — Institution id. Null for subscriptions to resources not owned by an institution (currently: Onboarding)
    - `resource_type` string — Resource type
    - `event` string — Event type
    - `active` boolean — True if subscription is active
    - `created_at` string, date-time — Subscription create date in UTC
    - `updated_at` string, date-time — Subscription update date in UTC
  - `count` integer — Number of total objects, in case of collection.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/nexhealth/apis/nexhealth-api.md) · [All operations](https://skmtc.net/nexhealth/apis/nexhealth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nexhealth/nexhealth-api/revisions/a180e830b672/schema)
