> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infraudit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# infraudit webhook — outbound webhook management commands

> infraudit webhook list, create, delete, and test — register outbound webhooks for InfraAudit events. Key flags: --url, --events for event type filtering.

The `webhook` command group manages outbound webhooks. When an InfraAudit event occurs — such as a drift finding or a new alert — InfraAudit sends an HTTP POST to each registered webhook URL. Use these commands to register, test, and remove webhooks.

## `webhook list`

List all registered webhooks:

```bash theme={null}
infraudit webhook list
```

Example output:

```
ID  NAME          URL                                    EVENTS                       STATUS
--  ----          ---                                    ------                       ------
1   Slack Alerts  https://hooks.slack.com/services/...  drift.detected,alert.created  active
2   PagerDuty     https://events.pagerduty.com/...      alert.created                active
```

## `webhook create`

Register a new webhook endpoint.

**Synopsis:**

```bash theme={null}
infraudit webhook create [flags]
```

| Flag       | Description                                         |
| ---------- | --------------------------------------------------- |
| `--url`    | Destination URL that receives the HTTP POST         |
| `--events` | Comma-separated list of event types to subscribe to |
| `--name`   | Display name for the webhook                        |
| `--secret` | Signing secret for HMAC payload verification        |

Example:

```bash theme={null}
infraudit webhook create \
  --name "Slack Alerts" \
  --url https://hooks.slack.com/services/... \
  --events drift.detected,alert.created
```

To see available event types, run `infraudit webhook events`.

## `webhook get`

Show details for a specific webhook, including its URL, subscribed events, and delivery statistics:

**Synopsis:**

```bash theme={null}
infraudit webhook get <webhook-id>
```

Example:

```bash theme={null}
infraudit webhook get 1
```

## `webhook delete`

Remove a registered webhook:

**Synopsis:**

```bash theme={null}
infraudit webhook delete <webhook-id>
```

Example:

```bash theme={null}
infraudit webhook delete 1
```

## `webhook test`

Send a test payload to a webhook endpoint to verify it is reachable and processing events correctly:

**Synopsis:**

```bash theme={null}
infraudit webhook test <webhook-id>
```

Example:

```bash theme={null}
infraudit webhook test 1
```

## `webhook events`

List all available event types that you can subscribe to:

```bash theme={null}
infraudit webhook events
```

Example event types:

| Event                   | Description                 |
| ----------------------- | --------------------------- |
| `drift.detected`        | New drift finding created   |
| `alert.created`         | New alert triggered         |
| `vulnerability.found`   | New vulnerability finding   |
| `compliance.failed`     | Compliance control failed   |
| `remediation.completed` | Remediation action executed |

<Note>
  Webhook payloads include an HMAC signature in the `X-InfraAudit-Signature` header when you provide a `--secret`. Verify this signature in your endpoint to reject forged requests.
</Note>
