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

# Webhook client

> Manage webhook endpoints with the Paubox PHP SDK.

Webhook methods are on `PauboxWebhooks`.

```php theme={null}
use Paubox\PauboxWebhooks;

$webhooks = new PauboxWebhooks('YOUR_API_KEY');
```

## List webhook endpoints

```php theme={null}
$endpoints = $webhooks->listWebhookEndpoints();
```

## Create a webhook endpoint

```php theme={null}
$endpoint = $webhooks->createWebhookEndpoint([
    'target_url' => 'https://example.com/webhooks/paubox',
    'events' => ['inbound_mail_received', 'api_mail_log_delivered'],
    'signing_key' => 'whsec_abc123',
    'active' => true,
]);
```

## Get a webhook endpoint

```php theme={null}
$endpoint = $webhooks->getWebhookEndpoint(42);
```

## Update a webhook endpoint

```php theme={null}
$endpoint = $webhooks->updateWebhookEndpoint(42, [
    'active' => false,
]);
```

## Delete a webhook endpoint

```php theme={null}
$endpoint = $webhooks->deleteWebhookEndpoint(42);
```
