# Update a Webhook Endpoint

Updates an existing webhook endpoint. 

<Callout icon="📘" theme="info">
  **Note:**

  * Scroll down to the **Response** section below and expand the status code(s) to view the detailed response schema.
  * Refer to the **RESPONSE** section on the right and choose an example to see how the API response appears for each status code.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "heygen-api",
    "version": "4.0.8"
  },
  "servers": [
    {
      "url": "https://api.heygen.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header",
        "x-default": "<your-api-key>"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/webhook/endpoint.update": {
      "patch": {
        "summary": "Update a Webhook Endpoint",
        "description": "update an existing webhook endpoint",
        "operationId": "update-a-webhook-endpoint",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint_id": {
                    "type": "string",
                    "description": "Unique identifier of the webhook endpoint that needs to be updated. "
                  },
                  "url": {
                    "type": "string",
                    "description": "New callback URL to which event notifications will be sent. For HTTPS URLs, only servers with SSL security level 2 or above are supported.  "
                  },
                  "events": {
                    "type": "array",
                    "description": "List of new event types to set for the endpoint. A `null` value means the endpoint listens to all events. ",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "endpoint_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook endpoint updated successfully - Expand to view the detailed response schema.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "code": 100,
                      "data": {
                        "username": "b3ebafd81a8541z0b8d56a14c8a4ce92",
                        "url": "https://smee.io/MnBgJ2lt4vbwk5zQ",
                        "events": [
                          "photo_avatar_generation.success",
                          "photo_avatar_generation.fail"
                        ],
                        "created_at": "2025-10-22T08:31:48",
                        "entity_id": null,
                        "endpoint_id": "1b7c53dfc92349e89b82c1zfa7cf7819",
                        "status": "enabled",
                        "secret": "1esec_ZvRV3QFE12WZcYA1qSBwBA==",
                        "space_id": "b3ebafd81a8541z0b8d56a14c8a4ce92"
                      },
                      "msg": null,
                      "message": null
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 100,
                      "default": 0,
                      "description": "Status code indicating the result of the API request. A 100 indicates a successful response. Other codes might indicate different types of errors. Refer to the <a href=\"https://docs.heygen.com/reference/errors\" target=\"_blank\">Error Responses</a> for more details."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "username": {
                          "type": "string",
                          "example": "123456",
                          "description": "Unique identifier of the user who registered the webhook endpoint. "
                        },
                        "url": {
                          "type": "string",
                          "example": "https://helloworld.com",
                          "description": "New callback URL where Heygen delivers event notifications. "
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of specific event types the endpoint is subscribed to. A `null` value means the endpoint listens to all events. "
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-04-03T05:40:47",
                          "description": "The date and time when the endpoint was . ",
                          "format": "date-time"
                        },
                        "entity_id": {
                          "type": "string",
                          "description": "Identifier associated with a specific entity, if applicable. **Note:** This field is only applicable to translated videos with multiple language versions. For other video types, such as avatar videos, this field may return null since they are not linked to a project-based entity."
                        },
                        "endpoint_id": {
                          "type": "string",
                          "example": "123456",
                          "description": "Unique identifier of the registered webhook endpoint. "
                        },
                        "status": {
                          "type": "string",
                          "example": "enabled",
                          "description": "Indicates whether the endpoint is currently active or inactive. ",
                          "enum": [
                            "enabled",
                            "disabled"
                          ]
                        },
                        "secret": {
                          "type": "string",
                          "example": "whsec_123456",
                          "description": "Secret key associated with the endpoint. Used to verify that webhook requests originate from HeyGen. "
                        },
                        "space_id": {
                          "type": "string",
                          "description": "Unique identifier of the space or environment the webhook endpoint belongs to. "
                        }
                      },
                      "description": "Contains detailed information about the updated endpoint. "
                    },
                    "msg": {
                      "type": "string",
                      "description": "Legacy field for messages. This field is deprecated."
                    },
                    "message": {
                      "type": "string",
                      "description": "New field for messages. Contains human-readable messages explaining the status of the request. In case of errors, it returns an explanation."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid URL": {
                    "value": "{\"code\":400542,\"message\":\"Url of this webhook endpoint is invalid\"}",
                    "summary": "Invalid URL"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "404": {
            "description": "Webhook endpoint not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "Webhook Endpoint Not Found": {
                    "summary": "Webhook Endpoint Not Found",
                    "value": {
                      "code": 400131,
                      "message": "Webhook endpoint not found"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```