> ## 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.

# PHP SDK webhook client

> Create, list, get, update, and delete Paubox webhook endpoints with the PHP SDK to receive delivery, open, failure, and inbound mail events.

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);
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.