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

Webhook methods are on `WebhookLibrary`, which implements `IWebhookLibrary`.

```csharp theme={null}
using Paubox.Email.API;

var webhookLibrary = new WebhookLibrary("YOUR_API_KEY");
```

## List webhook endpoints

```csharp theme={null}
var endpoints = webhookLibrary.ListWebhookEndpoints();
```

## Create a webhook endpoint

```csharp theme={null}
var request = new CreateWebhookEndpointRequest
{
    TargetUrl = "https://example.com/webhooks/paubox",
    Events = new List<string> { "inbound_mail_received", "api_mail_log_delivered" },
    SigningKey = "whsec_abc123",
    Active = true,
};
var response = webhookLibrary.CreateWebhookEndpoint(request);
```

## Get a webhook endpoint

```csharp theme={null}
var response = webhookLibrary.GetWebhookEndpoint(42);
```

## Update a webhook endpoint

```csharp theme={null}
var request = new UpdateWebhookEndpointRequest
{
    Active = false,
};
var response = webhookLibrary.UpdateWebhookEndpoint(42, request);
```

## Delete a webhook endpoint

```csharp theme={null}
var response = webhookLibrary.DeleteWebhookEndpoint(42);
```
