Modern email services usually offer two ways in: call an HTTP API or send over SMTP. The result is the same, the email reaches the recipient, but the developer experience is quite different.
| Email API (REST) | SMTP | |
|---|---|---|
| Connection | One HTTP POST | Several command round trips (EHLO, AUTH, DATA) |
| What you get back | The email's id right away, for tracking | An SMTP reply code |
| Extra features | Templates, scheduling, idempotency keys, batch | Sending only |
| Best for | Apps you write yourself | Off-the-shelf systems such as WordPress, ERPs, legacy software |
When to use the API
- You write the code and want the email id stored next to the order or user
- You want retries without duplicate sends, using an Idempotency-Key
- You use templates stored with the provider, or schedule sends
- You want delivery and bounce results through webhooks
curl -X POST https://api.bytesms.com/api/v1/emails \
-H "Authorization: Bearer tp_live_xxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"from": "Your Shop <[email protected]>",
"to": ["[email protected]"],
"subject": "Order #1024 confirmed",
"html": "<p>Thanks for your order</p>"
}'
When to use SMTP
- You use software you can't change, but it has SMTP settings
- You are moving off an old mail server without touching code
- Your language already ships a solid SMTP client
In Bytesms both paths go through the same rules: quotas, the suppression list, webhooks and logs. You can start with SMTP and move to the API later.
A third option: MCP for AI agents
If you work with an AI assistant such as Claude or ChatGPT, Bytesms has an MCP server that lets the assistant send email, check status and manage domains directly.



