> ## 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 Node.js SDK.

Webhook methods are on the same `emailService` instance you use to send email.

```javascript theme={null}
const paubox = require('paubox-node');
const service = paubox.emailService({ apiKey: 'YOUR_API_KEY' });
```

## List webhook endpoints

```javascript theme={null}
const endpoints = await service.listWebhookEndpoints();
```

## Create a webhook endpoint

```javascript theme={null}
const result = await service.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

```javascript theme={null}
const endpoint = await service.getWebhookEndpoint(42);
```

## Update a webhook endpoint

```javascript theme={null}
const result = await service.updateWebhookEndpoint(42, {
  active: false,
});
```

## Delete a webhook endpoint

```javascript theme={null}
const result = await service.deleteWebhookEndpoint(42);
```
