Welcome to NipaMail — your delivery rail for email and SMS that keeps teams shipping fast without wrestling infrastructure.
This guide walks you from zero to sent: authorize with your client credentials, fire off transactional messages with templates or Base64 encoded HTML, attach assets or raw payloads, inquire sending status, and keep an eye on tenant credits before you run low.
Every section is hands-on with copy‑paste curl calls, clear field tables, and the exact responses you should expect so you can integrate with confidence.
Start at authorization, explore transactional sending, inquire message status, then check credits to round out the flow; all endpoints share the base URL below.
https://api.nipamail.com
- Get an access token
curl -X POST https://api.nipamail.com/v1/auth/tokens \
-H "Content-Type: application/json" \
--data @- <<'JSON'
{
"grant_type": "client_credentials",
"client_id": "<CLIENT_ID>",
"client_secret": "<CLIENT_SECRET>"
}
JSONUse the returned access_token as Bearer <TOKEN> in the next steps.
- Send a transactional email (Base64 encoded HTML)
curl -X POST https://api.nipamail.com/v1/messages \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
--data @- <<'JSON'
{
"type": "EMAIL",
"message": {
"sender": "Sender <no-reply@yourdomain.com>",
"recipient": "user@example.com",
"subject": "Welcome to NipaMail",
"html": "PCFkb2N0eXBlIGh0bWw+PGh0bWw+PGJvZHk+PGgxPldlbGNvbWUgdG8gTmlwYU1haWw8L2gxPjxwPlRoaXMgaXMgYW4gaW5saW5lIEhUTUwuPC9wPjwvYm9keT48L2h0bWw+"
}
}
JSONSwap template_id and template_values in place of html if you want to render a stored template.
- Inquire transactional message status
Use the id returned from the send response as transactional_message_id.
curl -X GET https://api.nipamail.com/v1/messages/<transactional_message_id> \
-H "Authorization: Bearer <TOKEN>"- Check tenant credits
curl -X GET https://api.nipamail.com/v1/credits \
-H "Authorization: Bearer <TOKEN>"