# Get access to email

Transactional email is **allowlist-gated and founder-approved** — it is not instant self-serve. This page walks you from zero to your first sent message, including the approval step.

> Email is for transactional messages only — sign-in links, receipts, password resets, alerts. Not marketing, not bulk.

## The onboarding flow at a glance

1. **Create an account & API key** — sign up and grab your platform API key.
2. **Request email access** — one click in the dashboard records your request.
3. **Founder approval** — a thin.host admin reviews and enables sending (a deliverability / anti-abuse check).
4. **Verified sending domain** — send from the shared `mail.thin.host` sender immediately, or verify your own domain.
5. **Send** — via the REST API, SMTP relay, or the `send_email` MCP tool.

## 1. Create an account & API key

Sign up at [thin.host](https://thin.host/auth/signup). API keys live in the dashboard under **Settings → API keys**. Issue one key per app that sends email; each is labelled and can be revoked without affecting the others. A key (`th_live_…`) authenticates every email send, so keep it secret. The free tier is enough to get started.

## 2. Request email access

Email is off by default. In the dashboard, open **Email** (or **Settings → Transactional Email → How to request access**) and click **Request email access**. This records the request — *no email or support ticket is required*.

Once requested, the dashboard shows an **Awaiting approval** badge with the time you applied. Your request appears in the founder's review queue.

## 3. Founder approval

A thin.host admin reviews each request — this keeps shared sending reputation clean. Approval is quick for legitimate transactional use; we email your account address when sending goes live. Until then, any send attempt returns `email_not_enabled`.

You can check your status any time on the dashboard **Email** page — the badge flips from **Not enabled** to **Email enabled** once you're approved.

## 4. Verified sending domain

Your `from` address must use a verified domain:

- **Shared domain (works immediately after approval)** — omit `from` and messages go out as `no-reply@mail.thin.host`. DKIM, SPF, and DMARC are already configured.
- **Your own domain** — add it in platform settings and publish every DNS row we show. Targets are thin.host-branded (DKIM + return-path CNAMEs under `dns.thin.host`, apex SPF `include:_spf.dns.thin.host` merged into any existing SPF, and a DMARC TXT). Inbox providers look at SPF/DMARC on the From domain, not only DKIM.

A `from` address that doesn't match a verified domain returns `invalid_from_domain` — surface it to the user, don't retry.

## 5. Send your first email

Once approved, pick any of the three transports — the same allowlist, domain, suppression, and rate-limit gates apply to all of them.

### REST API

```bash
curl -X POST https://thin.host/v1/emails \
  -H "X-Platform-API-Key: th_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "user@example.com",
    "subject": "Your sign-in link",
    "text": "Click here: https://app.example.com/login?token=..."
  }'

# → 202 { "id": "...", "status": "sent", "to": "user@example.com",
#          "from": "no-reply@mail.thin.host" }
```

### SMTP relay

Issue per-app SMTP credentials from the dashboard (**Email → SMTP credentials** — only available after approval). The password is shown once at issue time.

```python
import smtplib
smtp = smtplib.SMTP("smtp.thin.host", 587)  # STARTTLS
smtp.login("your_smtp_username", "your_smtp_password")
smtp.sendmail(from_addr, [to_addr], message)
```

### MCP tool (`send_email`)

Download the ready-to-install `.mcpb` package from the dashboard (**Email → Claude Desktop MCP package**) and open it with Claude Desktop. Your agent can then call `send_email` directly. See the [MCP Tool Reference](https://thin.host/docs/mcp) for parameters and error codes.

## Why the approval gate?

Deliverability is a shared resource. Founder approval and the suppression/rate-limit gates keep the sending pool healthy for everyone — which is what keeps your messages landing in the inbox. The gates you'll encounter:

| Error code | Meaning | What to do |
|---|---|---|
| `email_not_enabled` | Account not yet approved for email | Request access in the dashboard; wait for approval |
| `invalid_from_domain` | `from` isn't a verified domain | Omit `from`, or verify your domain — don't retry |
| `recipient_suppressed` | Recipient previously bounced/complained | Don't retry; surface to the user |
| `rate_limited` | Daily send cap reached | Retry after the 24h window resets |

Want a marketing-level overview? See the [transactional email use-case page](https://thin.host/use-cases/email). There's also a drop-in [Claude skill](https://github.com/thinhost/thinhost-mcp/blob/main/skills/thin-host-email/SKILL.md) that wraps the precondition check and the send call.

---
Canonical page: https://thin.host/docs/email
