This endpoint is solely responsible for sending emails over Pepipost’s v2 API.
Using this API, you can pass the components of the messages such as To/Recipient, From, Subject, HTML/Content, attachments, etc. Pepipost will build a MIME representation of the message and send it.
In case you want to get an advanced control of MIME. Then it is suggested to use your own SMTP to generate the emails and submit to Pepipost’s SMTP to deliver. In case of SMTP, it’s you who is actually building the MIME.
While there is no limit on the number of personalization objects which you can add in a single API call, but still it is recommended to not include more than 5000 personalizations per API request. If you need to include more than 5000 personalizations, please divide these across multiple API requests.
Name of the file to be attached. e.g. abc.pdf or mydoc.xls
base64 encoded value of the attached file. e.g if you want to attach a xyz.pdf file, then first convert the file content in base64 and pass the same in this parameter.
The HTML content to be sent in your email. You can use attributes to display dynamic values such as name, account number, etc. for ex. [% NAME %] for NAME , [% AGE %] for AGE etc.
The name of the recipient to whom you are sending an email.
An array of recipients and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled.
A collection of key/value pairs following the pattern “NAME”:“John”. All are assumed to be strings. These attributes will apply to the html content of the body of your email, sender name and subject parameters. The total collective size of your attributes may not exceed 10,000 bytes per personalization object.
Each attribute can be used in your HTML as [%NAME%] for NAME , [%AGE%] for AGE. Spaces are not allowed within the attribute name, but special character underscore can be used.
An array of recipients email address. Each object within this array must always contain the email address of a recipient.
An array of recipients who will receive a copy of your email i.e. recipients who will be in CC of your emails. Each object within this array must always contain the email address of the recipient.
Values that are specific to this personalization that will be carried along with the email and its activity data. It is recommended to pass Unique string in this parameter. Example: You can pass InvoiceID, TransactionID, MessageID in this parameter. These will get associated with their respective email messages and will be returned back to you in reports and over webhooks. Each of the X-APIHEADER value should not exceed 256 characters.
Values that are specific to this personalization that will be carried along with the email and its activity data. This data is going to be mapped with their respective email address defined in the parameter recipient_cc. It is recommended to pass Unique string in this parameter. Example: You can pass InvoiceID, TransactionID, MessageID in this parameter. These will get associated with their respective email messages and will be returned back to you in reports and over webhooks. Each of the X-APIHEADER value should not exceed 256 characters.
Email address which need to be used as Reply-To
You can set the email address on which a Bcc copy of the email will be sent.
You can enable or disable click tracking for your emails.
You can set common footer under your Pepipost account. And in case you want to use that footer than set this value to 1.
You can enable or disable open tracking for your emails.
You can enable or disable unsubscribe tracking for your emails.
The subject line for your email. You can also use attributes in subject like [% NAME %], [% AGE %] and these will be replaced with the respective value for the recipient.
Tags can help organize your email analytics by enabling you to “tag” emails by type or broad topic. You can define your own custom tags like “OTP Emails”, “Order Confirmation emails” etc
You can upload the HTML content in your Pepipost account and can just pass the TemplateID here. This will save the data transfer in API call in case you are going to repeatedly use same HTML template for all your emails.