---
name: send
description: Autopilot email marketing through Send — give it a one-line brief and it writes copy + design, queues the campaign for approval (or sends automatically), sends, measures, and learns from results for the next campaign. Pay-per-send, unlimited contacts, Korean ad-mail compliance built in. Use when the user asks to email a list, run a newsletter/promotion, migrate subscribers from Mailchimp/SendGrid/Stibee, create an email template, or check campaign results.
---

# Send — promotional email for AI agents

Send's loop: **brief → AI writes subject/body/design → approval (or autopilot) → send → measure → learning notes improve the next campaign**. Autopilot mode per campaign: `manual` (edit yourself), `approve` (default: AI drafts, human approves once), `auto` (send without review). Send bills only per email sent (₩2/email); contacts are free. Compliance is automatic per workspace region — `kr` (Korean 정보통신망법): "(광고)" subject prefix, legal footer (company, address, contact, unsubscribe), and 21:00–08:00 KST scheduling is blocked unless the workspace confirmed night consent; `global` (CAN-SPAM): sender identity, physical address, and unsubscribe link in the footer. Both regions get one-click List-Unsubscribe headers and suppression of unsubscribed/bounced/complained addresses.

## Auth
- API key from Settings → API 키 (`sd_live_…`). Set `SEND_API_KEY` (and optionally `SEND_BASE_URL`, default https://send.ad).
- REST: `Authorization: Bearer $SEND_API_KEY`. CLI: `npx send.ad …`. MCP: `claude mcp add sendad -e SEND_API_KEY=… -- npx -y send.ad mcp`.
- Check: `npx send.ad whoami` or `GET https://send.ad/api/v1/me`.

## Approval + autopilot commands
- `npx send.ad approvals` → awaiting campaigns; `npx send.ad approve <id> [--at ISO]` sends (or schedules); `npx send.ad reject <id> --note "…"` returns it to draft. REST: `GET /api/v1/approvals`, `POST /api/v1/campaigns/{id}/approve|reject`. The approval mail also carries a no-login one-click page `/a/{token}`.
- `npx send.ad autopilot mode [manual|approve|auto]` (REST `GET/PUT /api/v1/autopilot/settings`, guardrails: max_sends_per_day, quiet_hours, min_balance_krw, require_approval_over_recipients).
- Recurring campaigns: `npx send.ad autopilot create --name 주간뉴스 --brief "{{date}} 이번 주 소식: {{recent_posts}}" --cadence weekly --dow 2 --hour 10 --list 고객 --rss <url>`; `autopilot list|run <id>|pause <id>|resume <id>` (REST `/api/v1/autopilot/plans`).
- `npx send.ad learning` (REST `GET /api/v1/learning`) — what worked (subjects, length, send hours); Send injects it into the next AI campaign automatically. `POST /api/v1/learning/next-suggestions?campaign_id=` gives concrete next-campaign suggestions.
- `sendad ai … --send` in approve mode stops at `awaiting_approval` and prints `approval_url` (exit 0) — do not poll; ask the user to approve, or call `approve` if they already said yes.

## The 5 things you will actually do
1. **Import subscribers**: `npx send.ad contacts import ./subscribers.csv --list 고객` (Mailchimp export CSV works as-is) or `POST /api/v1/contacts/bulk`.
2. **Create + send a campaign from a brief** (the one-liner):
   `npx send.ad ai "추석 프로모션 20% 할인, 9/25까지, 무료배송" --list 고객` → prints subjects + preview URL + cost estimate.
   Add `--send` to send now, or `--at 2026-09-20T10:00:00+09:00` to schedule. REST: `POST /api/v1/ai/campaign { brief, list_names, send }`.
3. **Send one email**: `npx send.ad send --to a@b.com --subject "…" --html "<p>…</p>"` or `POST /api/v1/send`.
4. **Check results**: `npx send.ad campaigns report <id>` or `GET /api/v1/campaigns/{id}/report` (sent/delivered/opens/clicks/bounces/unsubscribes, per-link clicks).
5. **Check balance before big sends**: `npx send.ad balance` or `GET /api/v1/campaigns/{id}/estimate` (returns recipients, cost_krw, balance_krw, ok). Top up: `POST /api/v1/billing/topup { packId: "t30k" }` (requires a registered card).

## Workflow guidance
- Default to the approval flow: create with `send:false` → the campaign appears in the user's 승인 대기 queue → share `preview_url` → after the user approves, `POST /api/v1/campaigns/{id}/send`. Use `send:true` only when the user explicitly asked for autopilot/no review.
- After a campaign finishes, read `GET /api/v1/campaigns/{id}/report`; Send stores learning notes from results and applies them to the next `/ai/campaign` call automatically — you can mention what changed (subject style, length, send time).
- Migrating from Mailchimp/SendGrid/Stibee: upload their export CSV via `POST /api/v1/contacts/import` (columns auto-mapped) and the unsubscribed export via `POST /api/v1/suppressions/import`.
- Before the first send, make sure the workspace sender profile is complete (company name, address, phone/email): `GET /api/v1/workspace` → `sender_profile_complete`. If false, ask the user for those and `PUT /api/v1/workspace`.
- Fill the **brand profile** (tone, products with URLs/prices, links) once via `PUT /api/v1/workspace { brand_profile }` — AI output quality depends on it.
- Prefer `send:false` first, share `preview_url`, then `POST /api/v1/campaigns/{id}/send` after the user confirms — unless the user explicitly asked to send without review.
- Never upload lists without consent; never remove addresses from the suppression list on the user's behalf without explicit instruction.
- Use `--json` on CLI commands for machine-readable output.

## Design JSON (when composing templates yourself)
`{ "version": 1, "settings": { "brandColor": "#0f7b6c" }, "blocks": [ { "id": "h1", "type": "heading", "text": "{{first_name|고객}}님, 추석 선물 20% 할인" }, { "id": "t1", "type": "text", "html": "<p>9월 25일까지…</p>" }, { "id": "b1", "type": "button", "text": "쿠폰 받기", "href": "https://…" } ] }`
Render/preview: `POST /api/v1/designs/render { design }`. Full schema: https://send.ad/api/v1/openapi.json (components.schemas.Design).

## Errors
`{ error, code }`. Notable codes: `insufficient_balance` (402 — top up), `admin_only` (403), `bad_api_key` (401), `sender_profile_incomplete` (400 — fill workspace), `night_consent_required` (400 — schedule outside 21:00–08:00 KST or set night_consent).
