---
title: "Quickstart"
description: "Create a key, verify a domain, and send your first email."
url: https://www.unitpost.com/docs/quickstart
section: Docs
updated: 2026-08-28
---
# Quickstart

## Quickstart

> Create a key, verify a domain, and send your first email.

You can send your first email in minutes: create an API key, verify a domain, and make a POST request.

### 1. Create an API key

Go to API Keys (/dashboard/api-keys). Choose a preset — Full, Sending, or Read only — or narrow it further. Copy the key when shown.

> **Scope keys tightly:** A server that only sends mail should use a Sending key. Keys can never manage other keys, team, or billing.

### 2. Verify a sending domain

Add your domain under Domains (/dashboard/email/domains) and publish the generated DNS records. Verification runs automatically.

> **No domain yet?:** While DNS propagates you can still send test emails to your own address from the dashboard onboarding flow — no verified domain required. Test sends confirm the pipeline works; live API sends need a verified domain.

### 3. Send

Send an email in one call — a from address on your verified domain, a recipient, a subject, and either inline HTML or a template ID. The from accepts a bare address or a display name (`"Acme <you@yourdomain.com>"`).

**cURL**

```bash
curl https://www.unitpost.com/api/v1/email \
  -H "Authorization: Bearer $UNITPOST_API_KEY" \
  -H "Content-Type: application/json" \
  -H "User-Agent: my-app/1.0" \
  -d '{
    "from": "Acme <you@yourdomain.com>",
    "to": "customer@acme.com",
    "subject": "Welcome aboard",
    "html": "<p>Thanks for signing up!</p>"
  }'
```

**Node.js**

```ts
import { Unitpost } from "unitpost";

const unitpost = new Unitpost(process.env.UNITPOST_API_KEY);

const { data, error } = await unitpost.email.send({
  from: "Acme <you@yourdomain.com>",
  to: "customer@acme.com",
  subject: "Welcome aboard",
  html: "<p>Thanks for signing up!</p>",
});

if (error) throw error;
console.log(data.id);
```

**Python**

```python
from unitpost import Unitpost

unitpost = Unitpost()  # reads UNITPOST_API_KEY

result = unitpost.email.send({
    "from": "Acme <you@yourdomain.com>",
    "to": "customer@acme.com",
    "subject": "Welcome aboard",
    "html": "<p>Thanks for signing up!</p>",
})

print(result.data["id"])
```

**Ruby**

```ruby
require "unitpost"

unitpost = Unitpost::Client.new  # reads UNITPOST_API_KEY

result = unitpost.email.send({
  from: "Acme <you@yourdomain.com>",
  to: "customer@acme.com",
  subject: "Welcome aboard",
  html: "<p>Thanks for signing up!</p>",
})

puts result.data["id"]
```

**PHP**

```php
<?php
$unitpost = new \Unitpost\Client();
$result = $unitpost->email->send([
    'from' => 'Acme <you@yourdomain.com>',
    'to' => 'customer@acme.com',
    'subject' => 'Welcome aboard',
    'html' => '<p>Thanks for signing up!</p>',
]);
if ($result->error) { throw $result->error; }
echo $result->data['id'];
```

**Laravel**

```php
use Unitpost\Laravel\Facades\Unitpost;

$result = Unitpost::email()->send([
    'from' => 'Acme <you@yourdomain.com>',
    'to' => 'customer@acme.com',
    'subject' => 'Welcome aboard',
    'html' => '<p>Thanks for signing up!</p>',
]);
```

**Go**

```go
data, err := client.Email.Send(ctx, map[string]any{
    "from": "Acme <you@yourdomain.com>",
    "to": "customer@acme.com",
    "subject": "Welcome aboard",
    "html": "<p>Thanks for signing up!</p>",
})
```

**Java**

```java
var result = unitpost.email.send(java.util.Map.of(
    "from", "Acme <you@yourdomain.com>",
    "to", "customer@acme.com",
    "subject", "Welcome aboard",
    "html", "<p>Thanks for signing up!</p>"
));
```

**Rust**

```rust
let result = unitpost.email().send(serde_json::json!({
    "from": "Acme <you@yourdomain.com>",
    "to": "customer@acme.com",
    "subject": "Welcome aboard",
    "html": "<p>Thanks for signing up!</p>"
})).await?;
```

**.NET**

```csharp
var result = await unitpost.Email.Send(new {
    from = "Acme <you@yourdomain.com>",
    to = "customer@acme.com",
    subject = "Welcome aboard",
    html = "<p>Thanks for signing up!</p>",
});
```

The response includes the new email's id. Use GET /api/v1/email/{id} (or `unitpost.email.get(id)`) to read its current status and lifecycle events, or watch it live on the Emails (/dashboard/email/emails) page in the dashboard.

## Related

- [Templates & variables](https://www.unitpost.com/docs/templates): Reference a saved template and pass per-recipient data.
- [Subscription topics](https://www.unitpost.com/docs/topics): Let contacts opt out of one kind of mail without leaving your list.
- [Sending domains](https://www.unitpost.com/docs/domains): Add SPF, DKIM, and DMARC so mail sends from your domain.
