Email and SMS in one API call
In Kenya many customers read SMS faster than email. JMSURF Mail lets you send both from the same request: the email from your domain, the text through your JMSURF SMS account.
How it works
Add an sms object with a phone number and a message to any POST /emails request. After the email is sent, JMSURF Mail sends the SMS through your company's JMSURF SMS account and puts the result in the response.
{
"from": "Your Shop <[email protected]>",
"to": "[email protected]",
"subject": "Your order SV-1024 has shipped",
"html": "<p>Your parcel left our Nairobi store today.</p>",
"sms": { "to": "07XXXXXXXX", "message": "Your order SV-1024 has shipped. Track it in your email." }
}{ "id": "4f1c…", "status": "sent", "sms": { "ok": true, "id": "…" } }If the SMS fails (for example no SMS credit), the email still goes and the response says "sms": { "ok": false, "error": "…" }, so your code can decide what to do.
What you need
- A JMSURF SMS account connected to your company in JMSURF DASH (the same JMSURF login works across these products).
- SMS credit in that account. SMS is billed by JMSURF SMS from your SMS credit, not from your email plan.
When to send both
- One-time codes: the SMS arrives in seconds on any phone; the email is a record and a fallback. See password reset and OTP emails.
- Payment receipts: the SMS confirms at once, the email carries the full receipt.
- Service alerts: an ISP can text "your package expires tomorrow" and email the invoice. See ISP notifications.
- School notices: fee reminders by SMS to parents, with the statement by email. See schools.
Why one call is better than two integrations
You keep one API key, one error format and one place in your code that sends customer messages. There is no second provider to sign up with, no second invoice and no second set of credentials to protect.
Questions
- Does the SMS use my email allowance?
- No. The email counts against your JMSURF Mail plan; the SMS is paid from your JMSURF SMS credit.
- Which sender name does the SMS use?
- The sender set on your JMSURF SMS account.
Send your first email today
Free plan with 100 emails a month, no card needed. Questions? WhatsApp or call +254 712 504 593, or email [email protected].