---
updatedAt: 2026-06-30T16:05:21.000Z
agentTools:
  projectIndex: https://docs.pelcro.com/llms.txt
---

# Update webhook

Update an existing webhook.

## Overview

Update a webhook's URL, description, and event subscriptions.

**Example:** Update a webhook URL when migrating to a new server, or switch from all events to a specific set.

***

## Important Behaviors

* **Events are replaced, not merged.** All existing event subscriptions are deleted and recreated from the `events_enabled` array.
* **Status cannot be changed** through this endpoint. The `status` field (enabled/disabled) is not writable via update.
* **Cache refresh**: The account's webhook cache is refreshed after update.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "core-api",
    "version": "1.88"
  },
  "servers": [
    {
      "url": "https://www.pelcro.com/api/v1/core"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      },
      "sec1": {
        "type": "apiKey",
        "in": "query",
        "name": "site_id"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/webhooks/{id}": {
      "put": {
        "summary": "Update webhook",
        "description": "Update an existing webhook.",
        "operationId": "api-core-update-webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The webhook unique identifier",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "site_id",
            "in": "query",
            "description": "The unique identifier of the site associated with your account.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Bearer eyJ***"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "all_events_enabled"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The webhook endpoint URL. Must be unique per account (excluding current webhook). Must return HTTP 200 when called via POST."
                  },
                  "description": {
                    "type": "string",
                    "description": "A description of what this webhook is for."
                  },
                  "all_events_enabled": {
                    "type": "boolean",
                    "description": "Set to true to receive all event types. If false, events_enabled is required."
                  },
                  "events_enabled": {
                    "type": "array",
                    "description": "Array of event names to subscribe to. Required when all_events_enabled is false. All existing event subscriptions are replaced. No duplicates allowed.",
                    "items": {
                      "type": "string",
                      "enum": [
                        "subscription_created",
                        "subscription_updated",
                        "subscription_changed",
                        "subscription_canceled",
                        "subscription_renewed",
                        "subscription_deleted",
                        "subscription_trial_will_end",
                        "subscription_gift_notification",
                        "customer_created",
                        "customer_updated",
                        "customer_deleted",
                        "customer_password_reset",
                        "customer_password_updated",
                        "customer_verify_email",
                        "customer_verify_email_succeeded",
                        "customer_passwordless",
                        "invoice_created",
                        "invoice_updated",
                        "invoice_upcoming",
                        "invoice_payment_succeeded",
                        "invoice_payment_failed",
                        "invoice_payment_action_required",
                        "source_created",
                        "source_updated",
                        "source_canceled",
                        "source_expiring",
                        "source_expired",
                        "address_created",
                        "address_updated",
                        "charge_succeeded",
                        "charge_refunded",
                        "charge_failed",
                        "newsletter_created",
                        "newsletter_updated",
                        "order_created",
                        "order_payment_succeeded",
                        "order_payment_failed",
                        "member_created",
                        "member_updated",
                        "member_activated",
                        "member_deleted",
                        "member_subscription_updated",
                        "campaign_triggered",
                        "campaign_run_completed",
                        "product_created",
                        "product_updated",
                        "product_deleted",
                        "product_sku_created",
                        "product_sku_updated",
                        "product_sku_deleted",
                        "plan_created",
                        "plan_updated",
                        "export_requested",
                        "export_failed",
                        "export_completed",
                        "export_downloaded",
                        "bill_created",
                        "bill_updated",
                        "bill_finalized",
                        "bill_paid",
                        "bill_deleted",
                        "vendor_created",
                        "vendor_updated",
                        "vendor_deleted",
                        "vendor_payout_detail_created",
                        "vendor_payout_detail_updated",
                        "vendor_payout_detail_deleted",
                        "vendor_payout_detail_authorized",
                        "vendor_payout_detail_revoked",
                        "fraud_prevention_triggered"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"data\": {\n    \"id\": 26,\n    \"all_events_enabled\": true,\n    \"description\": \"description\",\n    \"events\": [],\n    \"status\": null,\n    \"url\": \"https://example.net/pelcro-webhooks\",\n    \"created_at\": 1650974042,\n    \"updated_at\": 1650974042\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 26,
                          "default": 0
                        },
                        "all_events_enabled": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "description": {
                          "type": "string",
                          "example": "description"
                        },
                        "events": {
                          "type": "array"
                        },
                        "status": {},
                        "url": {
                          "type": "string",
                          "example": "https://example.net/pelcro-webhooks"
                        },
                        "created_at": {
                          "type": "integer",
                          "example": 1650974042,
                          "default": 0
                        },
                        "updated_at": {
                          "type": "integer",
                          "example": 1650974042,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": "Unauthenticated."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": {
                        "status": 404,
                        "message": "Not found."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [List webhooks](https://docs.pelcro.com/reference/api-core-list-webhooks.md)
* [Create webhook](https://docs.pelcro.com/reference/api-core-create-webhook.md)
* [Get webhook](https://docs.pelcro.com/reference/api-core-get-webhook.md)
* [Delete webhook](https://docs.pelcro.com/reference/api-core-delete-webhook.md)