---
title: "C# SDK"
description: "The official .NET client for the Nextmail API. One NuGet package with no dependencies on .NET 8 and later, and one method for every endpoint."
url: "https://openemail.uk/docs/csharp"
area: "C#"
category: "Getting started"
---

# C# SDK

The official .NET client for the Nextmail API. One NuGet package with no dependencies on .NET 8 and later, and one method for every endpoint.

## What it is

One package over the whole API, from sending, templates and tracking to threads, contacts, domains, webhooks and disposable inboxes. It has a method for every method of the TypeScript SDK under the same name in PascalCase with an `Async` suffix, one exception type with a property for every kind of refusal, retries that cannot duplicate a send, and a webhook signature verifier. It targets `net8.0` and `netstandard2.0`, so it runs on .NET 8 and later and on any runtime that implements .NET Standard 2.0.

**Install**

_.NET CLI_

```bash
dotnet add package OpenEmail
```

**Program.cs**

```
using OpenEmail;

var client = new OpenEmailClient();

var sent = await client.Emails.SendAsync(new Body
{
    ["from"] = "Acme Billing <billing@acme.com>",
    ["to"] = "ada@example.com",
    ["subject"] = "Your September invoice",
    ["html"] = "<p>Invoice attached.</p>",
});

Console.WriteLine($"{sent["id"]} {sent["status"]}");
```

## Where to go

- [Install](https://openemail.uk/docs/csharp/install.md): Add the package and send your first message.
- [Configuration](https://openemail.uk/docs/csharp/configuration.md): Every option, and what the client refuses.
- [Send an email](https://openemail.uk/docs/csharp/emails/send.md): Attachments, scheduling and batches.
- [Errors and retries](https://openemail.uk/docs/csharp/errors.md): One exception type, and what is tried again.
- [Pagination](https://openemail.uk/docs/csharp/pagination.md): One page, every page, or one item at a time.
- [Verify webhooks](https://openemail.uk/docs/csharp/webhooks/verify.md): Check a delivery before you trust it.
- [Every method](https://openemail.uk/docs/csharp/reference/methods.md): The complete list, one row each.

## It wraps the same API as every other client

Everything here is the surface the API reference documents and the TypeScript SDK wraps, so read the API reference for what an endpoint does and this for how to call it from C#. Every TypeScript method has a C# twin, and the parity check of the package runs both with the same arguments and fails unless they send the same request.

- [API reference](https://openemail.uk/docs/api/overview.md): What each endpoint does, and how it fails.
