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

# Edit webhook subscription (beta)

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

## Request

- Base URL: `https://nexhealth.info`
- URL: `https://nexhealth.info/webhook_endpoints/{id}/webhook_subscriptions/{subscription_id}`
- Auth: API key in header `Authorization`

> 🚧 Beta
>
> Send `Nex-Api-Version: v3.1.0` to use this endpoint. It is still changing, and access is limited to approved partner institutions. Contact NexHealth before you build on it.

> **Changed from v3.0.0:** Adds response field `data.version`.

This endpoint updates a webhook subscription; use `active` to pause or resume deliveries, or `new_endpoint_id` to move the subscription to a different endpoint. The subdomain parameter is required for request validation even when the subscription is not scoped to an institution.

## 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: New Endpoint ID
  - `active` boolean

## Response `200`

Successful

- APIV31EntitiesWebhookSubscriptionResponse: API_V31_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` APIV31EntitiesWebhookSubscription
    - `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
    - `version` string: API version this subscription is pinned to. Webhook payloads delivered to this subscription use the entity contract registered for this version. See the version lifecycle docs for what changes happen within a version label vs across versions.
  - `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.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta.md) - [All operations](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta/revisions/93cb4af790a5?raw)
