# Update a webhook endpoint (/growsocmed/docs/api-reference/webhooks/update-webhook)

Change the URL or events, or turn the endpoint on or off

PATCH /webhooks/{id}

```json
{
  "tags": [
    "Webhooks"
  ],
  "summary": "Update a webhook endpoint",
  "parameters": [
    {
      "schema": {
        "type": "string",
        "format": "uuid"
      },
      "required": true,
      "name": "id",
      "in": "path"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "maxLength": 2000,
              "format": "uri"
            },
            "events": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "account.connected",
                  "account.expired",
                  "account.disconnected",
                  "post.published",
                  "post.failed",
                  "comment.created",
                  "comment.replied",
                  "comment.hidden",
                  "comment.unhidden",
                  "comment.deleted",
                  "message.received",
                  "message.sent",
                  "automation.run"
                ]
              },
              "minItems": 1
            },
            "active": {
              "type": "boolean"
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "active": {
                "type": "boolean"
              },
              "consecutive_failures": {
                "type": "number"
              },
              "disabled_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "url",
              "events",
              "active",
              "consecutive_failures",
              "disabled_at",
              "created_at"
            ]
          }
        }
      }
    }
  },
  "operationId": "update-webhook",
  "description": "Change the URL or events, or turn the endpoint on or off"
}
```