Threading replies
By default, Waypoint prevents email replies from being grouped into a single thread. This ensures transactional messages (like receipts or password resets) stay separate in the inbox.
However, there are cases where threading can be useful - for example, keeping replies within the same conversation thread.
Example of threaded replies on Gmail sent through Waypoint.
Enabling threading
Section titled “Enabling threading”Enable threading when sending an email via API API:
-
Use a thread identifier – pass in a custom
headers
references
property to set a unique thread identifier. For legacy reasons, this identifier must be formatted as email address. Example: ‘reservationRequest_2334234@boop-marketplace.com’ -
Keep the subject line identical across all replies – if you are using dynamic variables in your subject line, ensure that the output doesn’t change across replies. Example: ‘Dog Boarding Inquiry for
{{reservationRequest.startDate}}
-{{reservationRequest.endDate}}
’.
Code example
Section titled “Code example”const axios = require('axios');
axios({ method: "post", url: "https://live.waypointapi.com/v1/email_messages", headers: { "Content-Type": "application/json" }, auth: { username: API_KEY_USERNAME, password: API_KEY_PASSWORD }, data: { "templateId": "wptemplate_ABc123XYZ", "to": "jordan@usewaypoint.com", "variables": { "reservationRequest": { "id": "2334234", "fromDisplayName": "Anna", "startDate": "Aug 1", "endDate": "Aug 29", "message": "Any chance you can watch Emma again next month?" } }, "headers": [ { // References value must be formatted as an email address. "references": "reservationRequest_2334234@boop-marketplace.com" }, ], }}).then(function (response) { console.log(response);}).catch(function (error) { console.log(error);})