---
title: "webhooks update"
description: "Update a webhook endpoint"
canonical: "https://pgbeam.com/docs/cli/webhooks/update"
last-updated: "2026-10-29T19:01:20.000Z"
---

# webhooks update

> Update a webhook endpoint

URL: https://pgbeam.com/docs/cli/webhooks/update

{/* Auto-generated from CLI commands. Do not edit. Run `pnpm generate:cli-docs` to regenerate. */}

Update the configuration of an existing webhook endpoint. Only the fields you provide are changed; current settings are preserved for any flag not specified. Use `--event` to replace the subscribed event types (comma-separated) and `--enabled` to toggle delivery.

## Usage

```bash
pgbeam webhooks update <id> [flags]
```

## Options

| Option                  | Description                                                                                                              | Required | Default |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| `<id>`                  | ID of the webhook endpoint to update                                                                                     | Yes      | -       |
| `--url <value>`         | New destination URL for webhook deliveries.                                                                              | No       | -       |
| `--format <value>`      | New delivery format: json, splunk_hec, datadog, or elastic.                                                              | No       | -       |
| `--event <value>`       | Replace subscribed event type(s). Comma-separated.                                                                       | No       | -       |
| `--secret <value>`      | New shared secret used to sign webhook payloads. Visible in shell history and the process list; prefer `--secret-stdin`. | No       | -       |
| `--secret-stdin`        | Read the signing secret from stdin. One trailing newline is removed.                                                     | No       | `false` |
| `--description <value>` | New human-readable description for the webhook endpoint.                                                                 | No       | -       |
| `--enabled`             | Enable (true) or disable (false) the webhook endpoint.                                                                   | No       | -       |

> **Global options**
>
> All [global options](/docs/cli/global-options) (`--token`, `--profile`,
> `--project`, `--org`, `--json`, `--no-color`, `--no-trunc`, `--debug`) are
> also available on this command.

## Examples

```bash
# Change a webhook's URL
pgbeam webhooks update wh_xxx --url https://new.example.com/hook

# Subscribe a webhook to specific events
pgbeam webhooks update wh_xxx --event query_blocked,canary_tripped

# Disable a webhook
pgbeam webhooks update wh_xxx --enabled=false

# Rotate a webhook's signing secret from stdin
printf %s "$SECRET" | pgbeam webhooks update wh_xxx --secret-stdin
```

## Output

Prints a success message confirming the webhook was updated. With `--json`, returns the full updated webhook object from the API.