---
updatedAt: 2026-10-01T07:07:15.000Z
agentTools:
  projectIndex: https://docs.nexhealth.com/v2.2.2/llms.txt
---

# Edit webhook endpoint

This endpoint updates a webhook endpoint belonging to the authenticated API user; `target_url` must use HTTPS in production.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "NexHealth API v2.2.2 (Deprecated)",
    "description": "> **⚠️ Deprecated.** v2.2.2 is the legacy version of the NexHealth API and is deprecated; new development should target v3.0.0 (also known by its original date-based name v20240412). Our migration guide walks through every breaking change: https://docs.nexhealth.com/v20240412/docs/api-v2-to-v20240412-migration-guide\n\nWelcome to the developer hub and documentation for NexHealth API. This section of guide describes the operations, response parameters, request parameters, and parameter constraints related to User API. The term Operations refer to functions or methods. The operations are included in requests and send to the web server. Each operation performs a different action or a query on database.",
    "termsOfService": "https://www.nexhealth.com/terms-of-service",
    "contact": {
      "name": "NexHealth",
      "email": "info@nexhealth.com"
    },
    "license": {
      "name": "NexHealth License 1.0",
      "url": "https://www.nexhealth.com/privacy"
    },
    "version": "v2"
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "tags": [
    {
      "name": "Webhook Endpoints",
      "description": "Save and configure API user endpoints for use with webhooks"
    }
  ],
  "paths": {
    "/webhook_endpoints/{id}": {
      "patch": {
        "summary": "Edit webhook endpoint",
        "description": "This endpoint updates a webhook endpoint belonging to the authenticated API user; `target_url` must use HTTPS in production.",
        "parameters": [
          {
            "in": "header",
            "name": "Nex-Api-Version",
            "description": "The NexHealth API version",
            "required": true,
            "schema": {
              "type": "string",
              "default": "v2"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Webhook Endpoint id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patchWebhookEndpointsId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful",
            "content": {
              "application/vnd.Nexhealth+json;version=2": {
                "schema": {
                  "$ref": "#/components/schemas/API_V2_Entities_WebhookEndpoint_Response"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/vnd.Nexhealth+json;version=2": {
                "schema": {
                  "$ref": "#/components/schemas/API_Errors_BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/vnd.Nexhealth+json;version=2": {
                "schema": {
                  "$ref": "#/components/schemas/API_Errors_Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/vnd.Nexhealth+json;version=2": {
                "schema": {
                  "$ref": "#/components/schemas/API_Errors_NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/vnd.Nexhealth+json;version=2": {
                "schema": {
                  "$ref": "#/components/schemas/API_Errors_InternalServerError"
                }
              }
            }
          }
        },
        "tags": [
          "Webhook Endpoints"
        ],
        "operationId": "patchWebhookEndpointsId"
      }
    }
  },
  "servers": [
    {
      "url": "https://nexhealth.info"
    }
  ],
  "components": {
    "securitySchemes": {
      "Authorization": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "API_Errors_BadRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "boolean",
            "description": "Indicates the success or failure of the request."
          },
          "description": {
            "type": "string",
            "description": "Additional context about the request to help with debugging."
          },
          "data": {
            "type": "object"
          },
          "error": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any errors that occured during the execution of the request."
          }
        },
        "description": "API_Errors_BadRequest model"
      },
      "API_Errors_Unauthorized": {
        "type": "object",
        "properties": {
          "code": {
            "type": "boolean",
            "description": "Indicates the success or failure of the request."
          },
          "description": {
            "type": "string",
            "description": "Additional context about the request to help with debugging."
          },
          "data": {
            "type": "object"
          },
          "error": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any errors that occured during the execution of the request."
          }
        },
        "description": "API_Errors_Unauthorized model"
      },
      "API_Errors_InternalServerError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "boolean",
            "description": "Indicates the success or failure of the request."
          },
          "description": {
            "type": "string",
            "description": "Additional context about the request to help with debugging."
          },
          "data": {
            "type": "object"
          },
          "error": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any errors that occured during the execution of the request."
          }
        },
        "description": "API_Errors_InternalServerError model"
      },
      "API_Errors_NotFound": {
        "type": "object",
        "properties": {
          "code": {
            "type": "boolean",
            "description": "Indicates the success or failure of the request."
          },
          "description": {
            "type": "string",
            "description": "Additional context about the request to help with debugging."
          },
          "data": {
            "type": "object"
          },
          "error": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any errors that occured during the execution of the request."
          }
        },
        "description": "API_Errors_NotFound model"
      },
      "API_V2_Entities_WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "description": "Endpoint id"
          },
          "target_url": {
            "type": "string",
            "example": "http://localhost:8085/hook",
            "description": "Endpoint url"
          },
          "secret_key": {
            "type": "string",
            "example": "NArWk7gdI96Bdn",
            "description": "Endpoint secret key"
          },
          "active": {
            "type": "boolean",
            "example": true,
            "description": "True if endpoint is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-06-05T20:16:57.007Z",
            "description": "Endpoint create date in UTC"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-06-05T20:16:57.007Z",
            "description": "Endpoint update date in UTC"
          }
        }
      },
      "API_V2_Entities_WebhookEndpoint_Response": {
        "type": "object",
        "properties": {
          "code": {
            "type": "boolean",
            "example": false,
            "description": "Indicates the success or failure of the request"
          },
          "description": {
            "type": "string",
            "example": "Description",
            "description": "Additional context on the request to help with debugging."
          },
          "error": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "Error message"
            ],
            "description": "Any errors that occur during the execution of the request."
          },
          "data": {
            "$ref": "#/components/schemas/API_V2_Entities_WebhookEndpoint"
          },
          "count": {
            "type": "integer",
            "format": "int32",
            "example": 2,
            "description": "Number of total objects, in case of collection."
          }
        },
        "description": "API_V2_Entities_WebhookEndpoint_Response model"
      },
      "patchWebhookEndpointsId": {
        "type": "object",
        "properties": {
          "target_url": {
            "type": "string",
            "description": "URL to send POST requests to in response to subscribed events. Must use HTTPS in production"
          },
          "active": {
            "type": "boolean",
            "description": "Return only active or inactive endpoints"
          }
        },
        "description": "Edit webhook endpoint"
      }
    }
  }
}
```