---
title: esc env webhook edit | CLI commands
url: /docs/esc/cli/commands/esc_env_webhook_edit/
---

Edit an environment webhook.

## Synopsis

[EXPERIMENTAL] Edit an environment webhook

This command updates one or more fields of the named webhook. The CLI fetches the
current webhook, applies the supplied flag values on top of it, and submits the
merged state to the service.

--event replaces the event list. Use --add-event and --remove-event to apply
incremental changes that merge with the existing events; mixing --event with
either of those is not allowed. Event names are validated by the service.

--group, --add-group, and --remove-group behave the same way for event groups.
Valid groups for environment webhooks are: environments, change_requests.

Allowed --format values are: raw, slack, ms_teams, pulumi_deployments. URL
requirements (validated against the format that will be in effect):
  raw, ms_teams:      any http(s) URL
  slack:              must begin with https://hooks.slack.com/
  pulumi_deployments: must be of the form /<stack>

--secret replaces the shared secret. Use --remove-secret to clear an existing
secret; passing --secret "" leaves it unchanged.

```
esc env webhook edit [<org-name>/][/]<environment-name> <webhook-name> [flags]
```

## Options

```
      --active                     Whether the webhook is active (default true)
      --add-event stringArray      Subscribe to an additional event (repeatable)
      --add-group stringArray      Subscribe to an additional event group (repeatable)
      --display-name string        The display name
      --event stringArray          Replace the subscribed events (repeatable)
      --format string              The payload format
      --group stringArray          Replace the subscribed event groups (repeatable)
  -h, --help                       help for edit
      --remove-event stringArray   Unsubscribe from an event (repeatable)
      --remove-group stringArray   Unsubscribe from an event group (repeatable)
      --remove-secret              Clear the existing shared secret
      --secret string              Shared secret used to sign deliveries
      --url string                 The payload URL to deliver events to
```

## Options inherited from parent commands

```
      --env string   The name of the environment to operate on.
```

## SEE ALSO

* [esc env webhook](/docs/esc/cli/commands/esc_env_webhook/)	 - Manage environment webhooks


