---
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-07-23
---
# 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/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/emails \
  -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.emails.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.emails.send({
    "from": "Acme <you@yourdomain.com>",
    "to": "customer@acme.com",
    "subject": "Welcome aboard",
    "html": "<p>Thanks for signing up!</p>",
})

print(result.id)
```

**Ruby**

```ruby
require "unitpost"

unitpost = Unitpost::Client.new  # reads UNITPOST_API_KEY

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

puts result.id
```

The response includes the new email's id. Use GET /api/v1/emails/{id} (or `unitpost.emails.get(id)`) to read its current status and lifecycle events, or watch it live on the Emails (/dashboard/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.
