Send transactional email from the command line (curl) with the OquMail API
A runnable the command line (curl) example that sends email through OquMail: the endpoint, the auth header, and where to keep your key.
If your the command line (curl) app sends receipts, welcome emails, or alerts, you can push them through OquMail with one HTTPS POST — from your own domain, on the free plan. Here is a working the command line (curl) example and the things that trip people up.
Quick summary
- POST https://API (a way for your app or website to send email automatically).oqumail.com/api/v1/emails
- Header: Authorization: Bearer YOUR_API_KEY
- JSON body: from, to, subject, and html (or text)
- Your sending domain must be verified in OquMail (SPF/DKIM/DMARC green).
- The "from" address must be on that verified domain.
The endpoint
- POST https://API (a way for your app or website to send email automatically).oqumail.com/api/v1/emails
- Header: Authorization: Bearer YOUR_API_KEY
- JSON body: from, to, subject, and html (or text)
the command line (curl) example
Paste this into your the command line (curl) code and swap in your domain and key:
curl -X POST https://api.oqumail.com/api/v1/emails \
-H "Authorization: Bearer $OQUMAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"hello@yourdomain.com","to":"customer@example.com","subject":"Welcome","html":"<p>Thanks.</p>"}'the command line (curl) tip
The fastest way to smoke-test your key and from-domain before wiring it into code.
Before it works
- Your sending domain must be verified in OquMail (SPF/DKIM/DMARC green).
- The "from" address must be on that verified domain.
- Create an API key in the OquMail dashboard; treat it like a password.
- Keep a normal mailbox on the same domain so customer replies reach a human.
Common questions
How long does send transactional email from the command line (curl) with the oqumail api take for a small business?
Most teams finish domain connection and first mailboxes in under an hour. DNS propagation is often minutes; in rare cases wait up to 24–48 hours. OquMail shows live verification so you know when you are ready.
Do I need technical experience to set up business email?
No. If you can log into where you bought your domain and paste a few lines of text, you can set up professional email. OquMail guides you step by step and verifies when DNS is correct.
Can my small team use business email for free?
Yes. OquMail's free plan includes up to 15 mailboxes on your own domain with webmail, guided SPF/DKIM/DMARC setup, and a transactional email API — no credit card required.
Free business email on your own domain
OquMail gives you up to 15 mailboxes on your domain — free — with guided SPF/DKIM/DMARC, webmail, IMAP/SMTP for any mail app, and a send API. Most teams are live in under fifteen minutes. Start at oqumail.com.
Get started free