---
title: "Edit webhook subscription"
method: PATCH
path: "/webhook_endpoints/{id}/webhook_subscriptions/{subscription_id}"
tags: ["Webhook Subscriptions"]
---

# Edit webhook subscription

`PATCH /webhook_endpoints/{id}/webhook_subscriptions/{subscription_id}`

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.

## Path parameters

- `id` integer, required
- `subscription_id` integer, required

## Query parameters

- `subdomain` string, required

## Headers

- `Nex-Api-Version` string, required

## Request body

- PatchWebhookEndpointsIdWebhookSubscriptionsSubscriptionId — Edit webhook subscription
  - `new_endpoint_id` integer — 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.
  - `active` boolean — Set to false to pause webhook deliveries for this subscription, or true to resume them. Omitting the param leaves the current value unchanged.

## Response `200`

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)
