# Chalk CLI Reference: Webhooks
source: https://docs.chalk.ai/cli#webhooks

Configure webhooks to receive notifications about events in your Chalk deployment.

## `chalk webhook list`
source: https://docs.chalk.ai/cli?command=webhook_list

```bash
chalk webhook list
```

Use the 'chalk webhook list' command to view all webhooks configured in the current environment.

Webhooks can be created with 'chalk webhook create', updated with 'chalk webhook update', and deleted with 'chalk webhook delete'.

**Example**

```
$ chalk webhook list
✓ Fetched webhooks
 Name           URL                          Subscriptions      Updated
──────────────────────────────────────────────────────────────────────────
 query-monitor  https://hooks.example.com    query.run          1mo ago
 resolver-hook  https://hooks.internal.net   resolver.run       2w ago
```

## `chalk webhook create`
source: https://docs.chalk.ai/cli?command=webhook_create

```bash
chalk webhook create [flags]
```

Use the 'chalk webhook create' command to create a new webhook that subscribes to Chalk events.

You must provide:

- name: A descriptive name for the webhook
- url: The endpoint URL where events will be sent
- subscriptions: Event types to subscribe to (e.g., query.run, resolver.run)

Optional:

- secret: A secret string for webhook signature verification
- headers: Custom HTTP headers as a JSON object

**Flags**

- `--name <name>` (string)
  Name of the webhook.
- `--url <url>` (string)
  URL endpoint for the webhook.
- `--subscriptions <subscriptions>` (string[], default `[]`)
  Event types to subscribe to (e.g., query.run, resolver.run).
- `--secret <secret>` (string)
  Secret for webhook signature verification.
- `--headers <headers>` (string)
  Custom headers as JSON object (e.g., `'{"Authorization": "Bearer token"}'`).

**Example**

```
$ chalk webhook create --name query-monitor --url https://hooks.example.com --subscriptions query.run,resolver.run
✓ Created webhook

$ chalk webhook create --name auth-webhook --url https://internal.example.com/hooks --subscriptions query.run --secret my-secret --headers '{"Authorization": "Bearer token123"}'
✓ Created webhook
```

## `chalk webhook update`
source: https://docs.chalk.ai/cli?command=webhook_update

```bash
chalk webhook update [--id] [flags]
```

Use the 'chalk webhook update' command to update an existing webhook.

You must provide the webhook ID, or select from a list if not provided.

All other fields are optional and will only be updated if provided:

- name: New name for the webhook
- url: New endpoint URL
- subscriptions: New event types to subscribe to
- secret: New secret for signature verification
- headers: New custom HTTP headers as a JSON object

**Flags**

- `--id <id>` (string)
  ID of the webhook.
- `--name <name>` (string)
  Name of the webhook.
- `--url <url>` (string)
  URL endpoint for the webhook.
- `--subscriptions <subscriptions>` (string[], default `[]`)
  Event types to subscribe to (e.g., query.run, resolver.run).
- `--secret <secret>` (string)
  Secret for webhook signature verification.
- `--headers <headers>` (string)
  Custom headers as JSON object (e.g., `'{"Authorization": "Bearer token"}'`).

**Example**

```
$ chalk webhook update --id abc123 --name updated-webhook --url https://new-url.example.com
✓ Updated webhook

$ chalk webhook update --id abc123 --subscriptions query.run,resolver.run,feature.computed
✓ Updated webhook
```

## `chalk webhook delete`
source: https://docs.chalk.ai/cli?command=webhook_delete

```bash
chalk webhook delete [--id]
```

Use the 'chalk webhook delete' command to delete a webhook.

You can specify the webhook ID with the '--id' flag, or select from a list if not provided.

**Flags**

- `--id <id>` (string)
  ID of the webhook.

**Example**

```
$ chalk webhook delete --id abc123
✓ Deleted webhook

$ chalk webhook delete
# Presents an interactive list to select from
```
