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

# Ruby SDK webhook client

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

Webhook methods are on the same `Paubox::Client` you use to send email.

```ruby theme={null}
require 'paubox'

Paubox.configure do |config|
  config.api_key = 'YOUR_API_KEY'
end

client = Paubox::Client.new
```

## List webhook endpoints

```ruby theme={null}
endpoints = client.list_webhook_endpoints
```

## Create a webhook endpoint

```ruby theme={null}
endpoint = client.create_webhook_endpoint(
  target_url: 'https://example.com/webhooks/paubox',
  events: ['inbound_mail_received', 'api_mail_log_delivered'],
  signing_key: 'whsec_abc123',
)
```

## Get a webhook endpoint

```ruby theme={null}
endpoint = client.get_webhook_endpoint(42)
```

## Update a webhook endpoint

```ruby theme={null}
endpoint = client.update_webhook_endpoint(42, active: false)
```

## Delete a webhook endpoint

```ruby theme={null}
endpoint = client.delete_webhook_endpoint(42)
```


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