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

# Receiving client

> Full reference for the Paubox C# SDK receiving API: managing domains, mailboxes, and retrieving inbound email.

Receiving endpoints are exposed through the `ReceivingLibrary` class, which uses the same `Token token=` authentication as `EmailLibrary`.

```csharp theme={null}
var receiving = new ReceivingLibrary("YOUR_API_KEY");
```

Or with `IConfiguration`:

```csharp theme={null}
var receiving = new ReceivingLibrary(configuration);
```

## Domains

### List domains

```csharp theme={null}
string json = receiving.ListReceivingDomains();
```

### Create a domain

```csharp theme={null}
string json = receiving.CreateReceivingDomain("support");
```

Pass `null` to auto-generate a slug.

### Get a domain

```csharp theme={null}
string json = receiving.GetReceivingDomain(1);
```

### Delete a domain

```csharp theme={null}
string json = receiving.DeleteReceivingDomain(1);
```

## Mailboxes

### List mailboxes

```csharp theme={null}
string json = receiving.ListMailboxes(domainId);
```

### Create a mailbox

```csharp theme={null}
string json = receiving.CreateMailbox(domainId, "intake", "SecurePass123!");
```

Pass a fourth `int?` argument for `quotaBytes`.

### Get a mailbox

```csharp theme={null}
string json = receiving.GetMailbox(domainId, mailboxId);
```

### Delete a mailbox

```csharp theme={null}
string json = receiving.DeleteMailbox(domainId, mailboxId);
```

## Emails

### List received emails

```csharp theme={null}
string json = receiving.ListReceivedEmails(limit: 10);
```

`after` and `before` cursors are also accepted for pagination.

### Get a received email

```csharp theme={null}
string json = receiving.GetReceivedEmail("eaaaaab");
```

### Download an attachment

```csharp theme={null}
string data = receiving.DownloadAttachment("eaaaaab", "blob123");
```
