Email API
An email API your app can rely on
Send receipts, passcodes and alerts with one HTTPS request from any language, and get a status for every recipient.
- REST API with JSON
- Signed webhooks for every event
- Free plan, no card needed
What the API gives you
One simple request
POST the sender, recipients, subject and content as JSON. Each recipient gets its own message ID that you can follow.
Scoped API keys
Give each app only the permissions it needs, limit a key to certain domains, and revoke it without touching the others.
Idempotent sending
Send an Idempotency-Key with a request and a retry after a network error will not send the email twice.
Signed webhooks
Receive delivered, bounced, opened, clicked and unsubscribed events on your server, signed so you can trust them, with automatic retries.
Templates with variables
Keep the design out of your code. Write a template once, then send it by ID with your data; every edit is versioned.
Suppression built in
Addresses that bounced, complained or unsubscribed are skipped automatically, so your code does not have to track them.
One request to send
The same call in cURL, Node.js, Python and PHP.
curl -X POST https://api.esp.nesliferesearch.com/api/v1/emails \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <hello@mail.acme.in>",
"to": ["priya@example.com"],
"subject": "Welcome to Acme",
"html": "<p>Hi Priya, welcome!</p>"
}'Send your first email by API
01
Verify your domain
Add your domain and publish the DNS records we give you, so your email is signed for it with DKIM.
02
Create an API key
Choose its permissions in the dashboard. The key is shown once, so keep it in your app's secrets.
03
Make the request
Call the API from your code, then follow delivery in Email logs or through a webhook.
Questions
Which languages does the email API work with?
Any language that can make an HTTPS request. The examples on this page show cURL, Node.js, Python and PHP.
How do I know an email was delivered?
Every message has a history in Email logs, and webhooks tell your server about each event. Delivered means the receiving server accepted the message; it does not guarantee the inbox.
Can I retry a failed request safely?
Yes. Send the same Idempotency-Key with the retry and the email is not sent twice.
Can I send from any address?
You send from addresses on a domain you have verified. Verification is what lets receiving servers trust your email.
Start sending from your own domain
Free plan. No card needed. Billed in rupees.
Start free