Sending without a template

If you want to send fully-ready HTML (or plain text) emails without using Waypoint's dynamic templates, you can do so by passing in HTML and/or plain text to the API call. This can be especially useful if you are migrating from another service that does not support dynamic templates.

The API call is the same as the one used for sending template emails except you are passing in a bodyHtml and/or bodyText instead of referencing a templateId and variables.

POST /v1/email_messages

PropertyDescription
bodyHtmlHTML body content.
bodyTextOptional – plain text body content.
subjectSubject line of the email.
toEmail address of the receiver(s). It can be an email address or use the “Display Name <email address>” format. Separate multiple email addresses in comma separated string for multiple emails (eg. "joe@example.com, jane@example.com"). Max 50 recipients per message.
fromEmail address of the sender. The email domain be a verified domain within your workspace. It can be an email address string or with a name with email using the “Display Name <email address>” format.
replyToOptional – the email address to which replies will be sent. By default, replies are sent to the original sender's email address.
ccOptional – email address of the receiver(s) that should be CC'd. Use the same format as 'to' attribute.
bccOptional – email address of the receiver(s) that should be BCC'd. Use the same format as 'to' attribute.
metaIdOptional – can be used for internal reference or idempotent requests. Eg. 'order_1234'.

Code examples

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: { "to": "jordan@usewaypoint.com", "subject": "Hello", "bodyHtml": "<h1>This is the HTML body of the message</h1>", "bodyText": "This is the text body of the message." } }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); })
curl "https://live.waypointapi.com/v1/email_messages" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "to": "jordan@usewaypoint.com", "subject": "Hello", "bodyHtml": "<h1>This is the HTML body of the message</h1>", "bodyText": "This is the text body of the message." } }'