Send email with cURL
One terminal command to prove the whole pipeline works. Allow additional time for domain verification.
Download the starter projects · View on GitHub · Check your email domain
Before you start
- 1
Create a free account
Sign up at sendar.app — the Free plan includes 3,000 emails a month (100/day) with no card and no expiry.
- 2
Verify your sending domain
On the Domains page, add the domain you'll send from and create the DNS records it shows you. Verification usually completes within minutes of the DNS propagating.
- 3
Create an API key
On the API Keys page, create a key. It's shown once — copy it somewhere safe. Keys look like sndr_… and go in the Authorization header.
Send your first email
Replace the API key and the from domain with your own — the from address must use the domain you verified.
curl -X POST https://sendar.app/api/emails \
-H "Authorization: Bearer sndr_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <hello@yourdomain.com>",
"to": ["delivered@example.com"],
"subject": "Hello World",
"html": "<p>It works!</p>"
}'Replace the key and the from domain with your own, then paste into any terminal.
Check the result
A successful live send returns an email object; a status of sent means provider acceptance. Open the Emails page in your dashboard to see the send, its recipient, and its delivery status — provider acceptance does not guarantee inbox delivery.
If something goes wrong
| Code | Meaning | Fix |
|---|---|---|
| 401 | Missing or invalid API key | Check the Authorization header is exactly `Bearer sndr_...` with a key from the API Keys page. |
| 403 | Sending domain not verified | The domain in your `from` address must be added and verified (DNS records) on the Domains page first. |
| 422 | Invalid request body | Provide `from`, at least one `to` recipient, a `subject`, and `html` or `text`. The error message names the exact field. |
| 429 | Plan quota reached | You've hit your plan's monthly or daily cap (Free: 3,000/month, 100/day). Upgrade on the Pricing page or wait for the window to reset. |
Where to next
- Batch sending — POST /emails/batch delivers up to 100 emails in one request — see the API docs.
- Scheduling — Add scheduledAt (ISO 8601) to send up to 30 days in the future (Growth plan and above).
- Webhooks — Get notified of delivery events instead of polling — configured on the Webhooks page.
- Pricing — 3,000 emails/month free; paid plans from $12 for 30,000 — flat caps, no overage billing.