EmailTransaction v1.2

Sends a transactional email to a specified subscriber.

What can I do with emailTransaction?

EmailTransaction can be used to send transactional emails and retrieve information about sent ones.

  • Issue a POST to send a new transactional email.
  • Use email or subscriber_id to get all transactional emails sent to a subscriber.

GET /emailTransaction or /emailTransaction/:id

AttributeTypeFilterSortDescription
id
intYesYesUnique ID of the resource.
subscriber_id
int/nullYesNoRecipient subscriber id.
email
string/nullYesNoRecipient email address.
subject
stringNoNoEmail subject.
bodyhtml
text/nullNoNoEmail html body.
bodytext
text/nullNoNoEmail text body.
fromemail
string/nullNoNoEmail from address subject (defaults to noreply@).
fromname
string/nullNoNoEmail from name (defaults to company name).
completed
boolYesYesWhether the opt-in email has been sent.
error
boolYesNoWhether the opt-in encountered an error.
errortype
enum/nullNoNoAn enum of an error, if one occured. Possible values: 'Failed', 'Blacklisted', 'Hard bounce', 'Soft bounce'.
cdate
decimalNoYesCreation timestamp.

HEAD /emailTransaction or /emailTransaction/:id

AttributeTypePresenceDescription
id
intOptionalUnique ID of the resource.
subscriber_id
int/nullOptionalRecipient subscriber id.
email
string/nullOptionalRecipient email address.
completed
boolOptionalWhether the opt-in email has been sent.
error
boolOptionalWhether the opt-in encountered an error.

POST /emailTransaction

AttributeTypePresenceDescription
subscriber_id
int/nullRequired*Recipient subscriber id.
email
string/nullRequired*Recipient email address.
subject
stringRequiredEmail subject.
bodyhtml
text/nullOptional**Email html body.
bodytext
text/nullOptional**Email text body.
fromemail
string/nullOptionalEmail from address subject (defaults to noreply@).
fromname
string/nullOptionalEmail from name (defaults to company name).

* Either address or subscriber_id is required.

** Either body_html or body_text must be specified.

PUT /emailTransaction or /emailTransaction/:id

This method is not supported.

DELETE /emailTransaction or /emailTransaction/:id

This method is not supported.

Error codes

There are no error codes for this endpoint.

Examples

JSON response

{
    "id"               : 123456,
    "subscriber_id"    : 123456,
    "email"            : "example@example.com",
    "subject"          : "Example email",
    "bodyhtml"         : "<html><body><h1>Example email</h1><p>Lorem ipsum.</p></body></html>",
    "bodytext"         : "Example email, lorem ipsum.",
    "fromemail"        : null,
    "fromname"         : null,
    "completed"        : true,
    "error"            : false,
    "errortype"        : null,
    "cdate"            : 123456,
}