# Webhooks

> SDK methods for the Webhooks module, accessed via `soat.webhooks`. See the [Webhooks module docs](/docs/modules/webhooks) for permissions and data model, and each method's REST page for the full request/response schema.

# Webhooks

SDK methods for the Webhooks module, accessed via `soat.webhooks`. See the [Webhooks module docs](/docs/modules/webhooks) for permissions and data model, and each method's REST page for the full request/response schema.

### `soat.webhooks.listWebhooks()`

List webhooks

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

```ts
await soat.webhooks.listWebhooks({
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/webhooks/list-webhooks)

### `soat.webhooks.createWebhook()`

Create a webhook

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

```ts
await soat.webhooks.createWebhook({
  body: { name, url, events, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/webhooks/create-webhook)

### `soat.webhooks.getWebhook()`

Get a webhook

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

```ts
await soat.webhooks.getWebhook({
  path: { webhook_id },
});
```

→ [Request & response schema](/docs/api/webhooks/get-webhook)

### `soat.webhooks.updateWebhook()`

Update a webhook

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

```ts
await soat.webhooks.updateWebhook({
  path: { webhook_id },
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/webhooks/update-webhook)

### `soat.webhooks.deleteWebhook()`

Delete a webhook

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

```ts
await soat.webhooks.deleteWebhook({
  path: { webhook_id },
});
```

→ [Request & response schema](/docs/api/webhooks/delete-webhook)

### `soat.webhooks.listWebhookDeliveries()`

List webhook deliveries

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

```ts
await soat.webhooks.listWebhookDeliveries({
  query: { webhook_id, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/webhooks/list-webhook-deliveries)

### `soat.webhooks.getWebhookDelivery()`

Get a delivery

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

```ts
await soat.webhooks.getWebhookDelivery({
  path: { delivery_id },
});
```

→ [Request & response schema](/docs/api/webhooks/get-webhook-delivery)

### `soat.webhooks.redeliverWebhookDelivery()`

Redeliver a webhook delivery

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

```ts
await soat.webhooks.redeliverWebhookDelivery({
  path: { delivery_id },
});
```

→ [Request & response schema](/docs/api/webhooks/redeliver-webhook-delivery)

### `soat.webhooks.getWebhookSecret()`

Get webhook secret

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

```ts
await soat.webhooks.getWebhookSecret({
  path: { webhook_id },
});
```

→ [Request & response schema](/docs/api/webhooks/get-webhook-secret)

### `soat.webhooks.rotateWebhookSecret()`

Rotate webhook secret

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

```ts
await soat.webhooks.rotateWebhookSecret({
  path: { webhook_id },
});
```

→ [Request & response schema](/docs/api/webhooks/rotate-webhook-secret)
