Email API Documentation

This api handles post request for single authorized email dispatch

Preliminary requirement:

All sender emails must be verified. Kindly contact the DreamWEB for the verification of email addresses

 

API call with username and password (POST)

https://app.dreamwebgroup.com/smsbackend/clientapi/Dreamweb_Resl/send-email/

REQUEST PARAMETERS

Parameter Required Description
username Yes Api username
password Yes Api username
emailTo Yes Recipient
emailFrom Yes The source of the mail. This must be a verified email of the account that will be used.
emailBody Yes Email body
senderName Yes The name of the sender
subject Yes subject of the mail
callBackUrl Yes, but can be empty callback for the request
template Yes, when is provided in the request. dedicated api template on the system with a placeholder {{{content}}}
html Yes, when is provided in encoded html can be passed

 

HTTP STATUS CODE

Code Interpretation
200 Accepted; Single email dispatch is accepted and processed to the recipient
400 Validation failed; if any required parameter is missing in the request object, a response with this status code as well as descriptive message will be returned
401 Unauthorized; if username, password or key is wrong
412 Precondition failed; if the api call failed to meet business and application specific rules such as account balance, email worker job creation etc.
500 Server and Application level error

 

REQUEST PARAMETERS

Parameters Interpretations
mid unique id for the email
sender_address sender email address
destination_address recipient address
timestamp date and time mail was sent
status_desc the state of that particular email job such us insufficient balance, sent etc.

 

Example Body (Raw) using username and password

{                      “username”:”general”,

                        “password”:”qwerty@123″,

                       “emailTo”:[“alexander@gmail.com”],

                        “emailFrom”:”kappernie@gmail.com”,

                        “emailBody”:”This is just a test”,

                       “senderName”:”Alex”,

                       “subject”:”Pushing the limit with Mina And Pk”,

                       “callBackUrl”:”http://127.0.0.1:8001/api”

}

 

Api call using authentication key (POST)

https://app.dreamwebgroup.com/smsbackend/clientapi/Dreamweb_Resl/send-email/

Kindly note: The key is designed to replace username and password.

 Example Body (Raw) using authentication key

{
“key”:”@z0!!whci#!llf4yzcydd7uoaq5i4q(lnmknknjnlmkpcFJFVVEF..ACFWFSDSAC,CWDW”,    “emailTo”:[“alexandera@gmail.com”],    “emailFrom”:”kapper@gmail.com”,    “emailBody”:”This is just a test. “,    “senderName”:”Alex”,    “subject”:”Pushing the limit with Mina And Pk”,    “callBackUrl”:””,    “template”:”test with Alex”
}