Email API v.2 - Sending Transactional Email HTTP API

After you are done with the Configuration step, you may initiate sending transactional emails.
First of all we will need to obtain a valid token based on your API key and your API Secret as described in section "Get authenticated using your application credentials"

## Request fields

attachments An array of attachmentObject in the following format:
[{"content":"base64 encoded data", "type":"mime/type", "filename":"attachment file name you wish"}, ...]

PathTypeDescription
contentStringThe attachment content base64encoded
If provided, must not be blank
typeStringThe attachment (mime) type If provided must not be blank
filenameStringThe attachment file name
If provided, must not be blank. Size must be between 0 and 128 inclusive

bcc An array of Objects in the format [{"name":"Name to be included", "address":"[email protected]"}, ...]. These recipient will receive a blind carbon copy.

PathTypeDescription
nameStringThe name of the blind carbon copy recipient
addressStringThe actual email address of the blind carbon copy recipient
Must be a well-formed email address. Must not be blank

callback an Object of Objects containing two properties indicating call-backs to be executed when a message changes status or when recipient performs an action on the message (Open/Click).

PathTypeDescription
statusCallbackObjectCallback information regarding message status. Contains two properties called "strategy" and "url".
eventCallbackObjectCallback information regarding events (onClick/onOpen etc.).
If provided, at least one of the event urls must exist.

cc Carbon Copy: this array of Objects contains additional recipient in the format [{"name":"Name to be included", "address":"[email protected]"}, ...] that will get the same message.

PathTypeDescription
nameStringThe name of the carbon copy recipient
addressStringThe actual email address of the carbon copy recipient.
If provided, must be a well-formed email address and not be blank

content This Object encapsulates the actual message body. Email Plus supports two type of message content HTML and UTF-8 TEXT .

PathTypeDescription
htmlStringThe html content of the email message
Must not be null/blank/empty
textStringOptional, the text content of the email message

customheaders An array of custom headers to be included in call-backs and tracking. Email Plus accepts up to 10 custom headers in object format {"name":"xxx", "value":"yyy"}.

PathTypeDescription
nameStringThe name of the custom header.
If provided it must not be null. The Size must be between 1 and 60 inclusive.
valueStringThe value of the custom header.
If provided must not be blank

dsn Delivery Status Notification Object enabling DSN functionality of Email Plus.

PathTypeDescription
notifyString (enumeration)Comma separated notification statuses. Should be comma separated values of FAILURE, DELAY, SUCCESS or NEVER. NEVER cannot be combined with any of the other values.
orcptString (email)Email address (orcpt) to receive the Notification. Must be a well-formed email address.
envidStringEnvelope identifier (envid). It may be set to custom ID if DSN notification will be processed by an automated system.

event callback An object containing two properties one for onClick event and the second for onOpen event. If supplied, both must be valid, reachable URLs accepting HTTP Method POST.

PathTypeDescription
onClickString (url)The callback url of the 'onClick' action.
Must be a well-formed URL, accepting POST HTTP method
onOpenString (url)The callback url of the 'onOpen' action
Must be a well-formed URL, accepting POST HTTP method

footer An Object containing two properties one for html message part and one for text part.

PathTypeDescription
htmlString (partial HTML)The html content of footer
If footer object is present this property must not be null
textStringThe text content of the footer.
If present should be pure UTF8 text

from An Object indicating who will appear as sender in the message.

PathTypeDescription
nameStringThe friendly name of the sender
addressString (email address)The actual email address of the sender.
Must be a well-formed email address. Must not be blank

replyto An Object indicating where to send the response if recipient hits "Reply To" button.

nameStringThe name of the reply to address
addressString (email address)The actual email address regarding the reply to information.
If the Object is present, this property must be a well-formed email address and not blank

Request fields-status callback info

PathTypeDescription
strategyString(Enumeration)Valid values are OnCompletion and OnChange if the object is supplied, this property is required.
urlString (url)The url of the callback.
Must be a well-formed, reachable URL.

to An array of objects indicating message recipient(s) in format [{"name":"Recipient Name","address":"recipient_email_address"} ,...]

PathTypeDescription
nameStringThe name of the standard recipient
addressString (email address)The actual email address of the standard recipient.
Must be a well-formed email address.

Request fields Summary

PathTypeDescription
fromObjectThe sender information of the email
Address must be one of the Authorized senders. Required
replyToObjectInformation regarding the reply to address
to[]Array of Email Address ObjectsThe standard email recipient addresses along with (optional) name information.
Must contain at least one recipient. Required
cc[]Array of Email Address ObjectsThe carbon copy email recipient addresses along with (optional) name information.
Optional
bcc[]Array of Email Address ObjectsThe blind carbon copy email recipient addresses along with (optional) name information.
Optional
customHeaders[]Array of customHeader ObjectsList of custom headers.
No more than 10 elements.
Optional
subjectStringThe subject of the email.
Size must be less than 145 characters.
Skipping this property is strongly discouraged
contentObjectThe actual content of the email message.
Contains two properties html containing the HTML content and text for text only UTF-8 content.
attachments[]Array of attachmentObjectAttachments of the email message. The attachmentObject has the following format:{"content":"base64 encoded data", "type":"mime/type", "filename":"attachment file name you wish"}
scheduledDateStringThe date and time to send the email message(s) . Given date must be {offset} {unit} after now
ttlNumberTime-to-live value in minutes, after this period, if the message is not delivered it will be considered as failed.
Must be a positive number of minutes between 30 and 4320 (72H).
maxAttemptsNumberThe maximum send retries to apply on transitional failures.
footerObjectThe footer to apply on the message, containing two properties html and text to be applied on the actual content of the message
callbackObjectCallback related information regarding the execution. If provided, at least one type of callback information must exist.
labelStringCustom label for the email message(s). A string up to 80 characters long that categorizes the message.
dsnObjectDelivery status notifications (DSN) options

Response fields

PathTypeDescription
trackingIdStringThe tracking id of the transactional email execution

Table 1. HTTP 400

errorCodetypeExplanation
000000InvalidDomainThe provided sender domain is invalid. It needs to get added and verified to be used.
000001InvalidSenderThe provided sender is invalid. It needs to get added and verified to be used.
000002UnverifiedSenderThe provided sender is unverified. It needs to get verified to be used.
000004NoActiveSubscriptionNo active transactional email subscription exists
000005InsufficientResourcesExceptionIn case resources are not enough to send email (depleted or limited)
Language