It's a little bit challenging to work with because differential updates only work if you volume is low enough. This is what it returns for individual emails:
"metadata": {
"from": {
// The details of the sender
"email": "email@domain.com",
// String; the email address of the sender
"firstName": "First",
// String; The first name of the sender
"lastName": "Last"
// String; The last name of the sender
},
"to": [
// The details of the recipient
{
"email": "contact name <test@test.com>"
// String; the email address of the recipient
}
],
"cc": [],
// A list of details for anyone cc'd on the email.
"bcc": [],
// A list of details for anyone bcc'd on the email.
"subject": "This is the subject of the email",
// String; The subject of the email
"html": "<div>This is the body of the email</div><div><br></div><div>-Me</div>",
// String; The body of the HTML email
"text": "This is the body of the email\n\n-Me"
// String; The body of the text-only email.
}
It looks like we are not on the same page. Here is the use-case we are trying to integrate.
We have created many campaigns in our account. The emails to customers for these campaigns are sent using 'Single Send' Transactional Email API. I am trying to retrieve the mail body sent through these emails.
Please let me know if the Engagements APIs can be made use in this case. If so can you please explain how to relate the engagement with the sent email event. Or is there any APIs to integrate the above use-case.
Is there any API methods to retrieve the email body sent using Transactional Email API?
Hi Deepu, I understand the rqeuest. The only way I know of to get email content is through the Engagements API. This contains interactions with a Contact, including emails sent to them. What I'm not certain about is whether or not Engagements contain the transactional emails or not (marketing campaign emails for example don't appear in that list). But it's pretty quick to find out. Send yourself a transactional email and then use the recent Engagments API to see if you see it: