Send personalized content to a single recipient

Pepipost Send Email API allows you to personalize the body content of an email for a particular recipient. We build a personalized body content of an email using the combination of the content and attributes values.

The content object contains the common value for all the recipients. The content can also be fetched using a stored template using template_id.

The attributes object contains all the personalized elements & their respective values that would replace the attribute tags (e.g. [%NAME%]) within the content.

In the code sample below, The subject and content values contain the attributes tags [%NAME%], [%DESTINATION%], [%TICKET%], [%DATE%] which are replaced by their respective value defined in the attributes object. This way we are able to send a flight confirmation mail filled with details specific to the recipient.

Send requests directly from the browser (CORS must be enabled)
$$.env
No $$.env variables are being used in this request.