---
title: pulumi env webhook new | CLI commands
url: /docs/iac/cli/commands/pulumi_env_webhook_new/
---

Create a new environment webhook.

## Synopsis

[EXPERIMENTAL] Create a new environment webhook

This command attaches a new webhook to the given environment. The positional
argument is the human-readable display name; the service generates the webhook's
unique name, which is printed on success and is the identifier used by the other
`esc env webhook` subcommands (edit, get, rm, ping, delivery list).

The webhook will be delivered to --url whenever the environment changes. Use
--event to limit the set of events that trigger a delivery, or --group to
subscribe to every event in a named group (valid groups for environment
webhooks: environments, change_requests). Both flags are repeatable. Event
and group names are validated by the service.

Allowed --format values are: raw (default), slack, ms_teams, pulumi_deployments.

URL requirements depend on --format:
  raw, ms_teams:      any http(s) URL
  slack:              must begin with https://hooks.slack.com/
  pulumi_deployments: must be of the form /<stack>

```
pulumi env webhook new [<org-name>/][/]<environment-name> <webhook-display-name> [flags]
```

## Options

```
      --active              Whether the webhook is active (default true)
      --event stringArray   Event types to subscribe to (repeatable)
      --format string       The payload format (default "raw")
      --group stringArray   Event groups to subscribe to (repeatable)
  -h, --help                help for new
      --secret string       Shared secret used to sign deliveries
      --url string          The payload URL to deliver events to (required)
```

## Options inherited from parent commands

```
      --color string                 Colorize output. Choices are: always, never, raw, auto (default "auto")
  -C, --cwd string                   Run pulumi as if it had been started in another directory
      --disable-integrity-checking   Disable integrity checking of checkpoint files
  -e, --emoji                        Enable emojis in the output
      --env string                   The name of the environment to operate on.
  -Q, --fully-qualify-stack-names    Show fully-qualified stack names
      --logflow                      Flow log settings to child processes (like plugins)
      --logtostderr                  Log to stderr instead of to files
      --memprofilerate int           Enable more precise (and expensive) memory allocation profiles by setting runtime.MemProfileRate
      --non-interactive              Disable interactive mode for all commands
      --otel-traces string           Export OpenTelemetry traces to the specified endpoint. Use file:// for local JSON files, grpc:// for remote collectors
      --profiling string             Emit CPU and memory profiles and an execution trace to '[filename].[pid].{cpu,mem,trace}', respectively
      --tracing file:                Emit tracing to the specified endpoint. Use the file: scheme to write tracing data to a local file
  -v, --verbose int                  Enable verbose logging (e.g., v=3); anything >3 is very verbose
```

## SEE ALSO

* [pulumi env webhook](/docs/iac/cli/commands/pulumi_env_webhook/)	 - Manage environment webhooks


