Skip to content

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.

Email threading screenshot

Example of threaded replies on Gmail sent through Waypoint.

Enable threading when sending an email via API API:

  1. 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

  2. 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}}’.

const authHeader =
'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
fetch('https://live.waypointapi.com/v1/email_messages', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: authHeader,
},
body: JSON.stringify({
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',
},
],
}),
});