Email API
The Email API allows you to send emails using our API.
Info: To get started, contact your account manager. Provide a sender email configured
for your account.
Tip: Check code examples in the Send SMS section for quick integration.
Authentication
To interact with the email service, you need API Key and Partner ID.
Required Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| API-Key | [YOUR_API_KEY] |
| PartnerID | [YOUR_PARTNER_ID] |
POST Method
Endpoint:
https://{{url}}/api/services/send-email
Request Body:
{
"apikey": "xxxxx",
"partnerID": "xxxx",
"from_address": "test@email.com",
"to_address": "testrecipient@email.com",
"subject": "API test",
"body": "This is a test email",
"pass_type": "plain"
}
Sample Success Response:
{
"response-code": 200,
"response-description": "Success",
"recipient": "testrecipient@email.com",
"messageid": "xxxxxxxx",
"cost": 1,
"reason": "1 email sent successfully. Cost: 1 unit"
}
Sample Error Response:
{
"response-code": 1006,
"response-description": "Invalid credentials"
}
Key Considerations
- Sender email must be pre-approved.
- HTML content supported with
pass_typeset to html. - Ensure API Key and Partner ID are valid.