# Webhooks Commands

> See [Webhooks module docs](../../modules/webhooks) for permissions and data model.

# Webhooks Commands

See [Webhooks module docs](../../modules/webhooks) for permissions and data model.

### `soat list-webhooks`

List webhooks

- Method: `GET`
- Path: `/api/v1/webhooks`

#### Usage

```bash
soat list-webhooks
```

#### Options

##### `--project-id`

—

- Source: `query`
- Required: no
- Type: `string`

##### `--limit`

Maximum number of results to return

- Source: `query`
- Required: no
- Type: `integer`
- Default: `50`

##### `--offset`

Number of results to skip

- Source: `query`
- Required: no
- Type: `integer`
- Default: `0`

### `soat create-webhook`

Create a webhook

- Method: `POST`
- Path: `/api/v1/webhooks`

#### Usage

```bash
soat create-webhook --name <string> --url <string> --events <array<string>>
```

#### Options

##### `--project-id`

Public ID of the project. Optional when authenticating with a project-scoped API key, which defaults to the key's project; required otherwise.

- Source: `body`
- Required: no
- Type: `string`

##### `--name`

—

- Source: `body`
- Required: yes
- Type: `string`

##### `--description`

—

- Source: `body`
- Required: no
- Type: `string`

##### `--url`

—

- Source: `body`
- Required: yes
- Type: `string`

##### `--events`

—

- Source: `body`
- Required: yes
- Type: `array<string>`

##### `--policy-id`

—

- Source: `body`
- Required: no
- Type: `string`

### `soat get-webhook`

Get a webhook

- Method: `GET`
- Path: `/api/v1/webhooks/{webhook_id}`

#### Usage

```bash
soat get-webhook --webhook-id <string>
```

#### Options

##### `--webhook-id`

—

- Source: `path`
- Required: yes
- Type: `string`

### `soat update-webhook`

Update a webhook

- Method: `PUT`
- Path: `/api/v1/webhooks/{webhook_id}`

#### Usage

```bash
soat update-webhook --webhook-id <string>
```

#### Options

##### `--webhook-id`

—

- Source: `path`
- Required: yes
- Type: `string`

##### `--name`

—

- Source: `body`
- Required: no
- Type: `string`

##### `--description`

—

- Source: `body`
- Required: no
- Type: `string`

##### `--url`

—

- Source: `body`
- Required: no
- Type: `string`

##### `--events`

—

- Source: `body`
- Required: no
- Type: `array<string>`

##### `--active`

—

- Source: `body`
- Required: no
- Type: `boolean`

##### `--policy-id`

—

- Source: `body`
- Required: no
- Type: `string \| null`

### `soat delete-webhook`

Delete a webhook

- Method: `DELETE`
- Path: `/api/v1/webhooks/{webhook_id}`

#### Usage

```bash
soat delete-webhook --webhook-id <string>
```

#### Options

##### `--webhook-id`

—

- Source: `path`
- Required: yes
- Type: `string`

### `soat list-webhook-deliveries`

List webhook deliveries

- Method: `GET`
- Path: `/api/v1/webhook-deliveries`

#### Usage

```bash
soat list-webhook-deliveries --webhook-id <string>
```

#### Options

##### `--webhook-id`

Webhook to list deliveries for (wh_...)

- Source: `query`
- Required: yes
- Type: `string`

##### `--limit`

—

- Source: `query`
- Required: no
- Type: `integer`
- Default: `50`

##### `--offset`

—

- Source: `query`
- Required: no
- Type: `integer`
- Default: `0`

### `soat get-webhook-delivery`

Get a delivery

- Method: `GET`
- Path: `/api/v1/webhook-deliveries/{delivery_id}`

#### Usage

```bash
soat get-webhook-delivery --delivery-id <string>
```

#### Options

##### `--delivery-id`

—

- Source: `path`
- Required: yes
- Type: `string`

### `soat redeliver-webhook-delivery`

Redeliver a webhook delivery

- Method: `POST`
- Path: `/api/v1/webhook-deliveries/{delivery_id}/redeliver`

#### Usage

```bash
soat redeliver-webhook-delivery --delivery-id <string>
```

#### Options

##### `--delivery-id`

Delivery to send again (wh_deliv_...)

- Source: `path`
- Required: yes
- Type: `string`

### `soat get-webhook-secret`

Get webhook secret

- Method: `GET`
- Path: `/api/v1/webhooks/{webhook_id}/secret`

#### Usage

```bash
soat get-webhook-secret --webhook-id <string>
```

#### Options

##### `--webhook-id`

—

- Source: `path`
- Required: yes
- Type: `string`

### `soat rotate-webhook-secret`

Rotate webhook secret

- Method: `POST`
- Path: `/api/v1/webhooks/{webhook_id}/rotate-secret`

#### Usage

```bash
soat rotate-webhook-secret --webhook-id <string>
```

#### Options

##### `--webhook-id`

—

- Source: `path`
- Required: yes
- Type: `string`
