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

Webhook methods are on `WebhookService`.

```java theme={null}
import com.paubox.service.WebhookService;

WebhookService webhookService = new WebhookService();
```

## List webhook endpoints

```java theme={null}
String response = webhookService.listWebhookEndpoints();
```

## Create a webhook endpoint

```java theme={null}
List<String> events = Arrays.asList("inbound_mail_received", "api_mail_log_delivered");
String response = webhookService.createWebhookEndpoint(
    "https://example.com/webhooks/paubox",
    events,
    "whsec_abc123", // signingKey
    null,           // apiKey
    true            // active
);
```

## Get a webhook endpoint

```java theme={null}
String response = webhookService.getWebhookEndpoint(42);
```

## Update a webhook endpoint

```java theme={null}
String body = "{\"active\": false}";
String response = webhookService.updateWebhookEndpoint(42, body);
```

## Delete a webhook endpoint

```java theme={null}
String response = webhookService.deleteWebhookEndpoint(42);
```
