API reference
Emails
Section titled “Emails”API endpoints for sending and fetching emails on Waypoint.
Send an email with a template
Section titled “Send an email with a template”Send an email through a Waypoint template, passing data variables to fill it in.
Request
Section titled “Request”/v1/email_messages | Parameter | Description |
|---|---|
| templateId | Required The id of the template you want to send (created on the Waypoint dashboard). You can find the template ID from on each template from your templates page or grab it from the template URL. eg. wptemplate_ABc123XYZ |
| to | Required Email address of the receiver(s). It can be an email address or use the “Display Name <email address>” format (this will also set the ‘name’ field on your contacts). Separate multiple email addresses in comma separated string for multiple emails (eg. “joe@example.com, jane@example.com”). Max 50 recipients per message. |
| variables | Template variables JSON. |
| from | Email address of the sender. This will override a sender that has been set from the template builder and the email domain must be a verified domain within your workspace. Email address can be a string or with a name with email using the “Display Name <email address>” format. |
| replyTo | Email address where replies will be sent. By default, replies are sent to the original sender’s email address. |
| cc | Email address of the receiver(s) that should be CC’d. Use the same format as ‘to’ attribute. |
| bcc | Email address of the receiver(s) that should be BCC’d. Use the same format as ‘to’ attribute. |
| attachments | Array of attachment objects with name, contentType, and contentBlob (or attachmentId) |
| groupId | Unsubscribe group ID |
| groupKey | Unsubscribe group custom key |
| metaId | ID used for idempotent requests or internal reference. Eg. ‘order_1234’. |
| metadata | Object with key-value pairs to store additional information for your own use and reference. |
| headers | Object with a curated allow list of custom email headers. Current allowed properties: references for threading replies. References value must be formatted as an email address. |
curl "https://live.waypointapi.com/v1/email_messages" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "templateId": "wptemplate_ABc123XYZ", "to": "jordan@usewaypoint.com", "variables": { "user": { "displayName": "Jordan" }, "product": { "title": "Beechers Mac & Cheese", "id": "02934203942" } }}'const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: authHeader, }, body: JSON.stringify({ templateId: 'wptemplate_ABc123XYZ', to: 'jordan@usewaypoint.com', variables: { user: { displayName: 'Jordan', }, product: { title: 'Beechers Mac & Cheese', id: '02934203942', }, }, }),};
fetch('https://live.waypointapi.com/v1/email_messages', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Send an email without a template
Section titled “Send an email without a template”Send an email message without a template by passing in the raw HTML body content.
Request
Section titled “Request”/v1/email_messages | Parameter | Description |
|---|---|
| bodyHtml | Required HTML body content. |
| bodyText | Plain text body content. |
| subject | Required Subject line of the email. |
| to | Required Email address of the receiver(s). It can be an email address or use the “Display Name <email address>” format (this will also set the ‘name’ field on your contacts). Separate multiple email addresses in comma separated string for multiple emails (eg. “joe@example.com, jane@example.com”). Max 50 recipients per message. |
| from | Required Email address of the sender. The email domain must 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. |
| replyTo | Email address where replies will be sent. By default, replies are sent to the original sender’s email address. |
| cc | Email address of the receiver(s) that should be CC’d. Use the same format as ‘to’ attribute. |
| bcc | Email address of the receiver(s) that should be BCC’d. Use the same format as ‘to’ attribute. |
| attachments | Array of attachment objects with name, contentType, and contentBlob (or attachmentId) |
| metaId | ID used for idempotent requests or internal reference. Eg. ‘order_1234’. |
| metadata | Object with key-value pairs to store additional information for your own use and reference. |
| headers | Object with a curated allow list of custom email headers. Current allowed properties: references for threading replies. References value must be formatted as an email address. |
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", "from": "support@usewaypoint.com", "subject": "Email without a template example", "bodyHtml": "<p>This is an email template without a template</p>"}'const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: authHeader, }, body: JSON.stringify({ to: 'jordan@usewaypoint.com', from: 'support@usewaypoint.com', subject: 'Email without a template example', bodyHtml: '<p>This is an email template without a template</p>', }),};
fetch('https://live.waypointapi.com/v1/email_messages', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Send a test email
Section titled “Send a test email”Send a test email from your dev or test environment by including sandbox in the API path.
Sandbox sends are never delivered to the address in the ‘to’ field — instead, the request and rendered output are saved to your activity logs for review.
Request
Section titled “Request”/v1/sandbox/email_messages This sandbox endpoint uses the same properties as v1/email_messages.
curl "https://live.waypointapi.com/v1/sandbox/email_messages" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "templateId": "wptemplate_ABc123XYZ", "to": "jordan@usewaypoint.com", "variables": { "user": { "displayName": "Jordan" }, "product": { "title": "Beechers Mac & Cheese", "id": "02934203942" } }}'const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: authHeader, }, body: JSON.stringify({ templateId: 'wptemplate_ABc123XYZ', to: 'jordan@usewaypoint.com', variables: { user: { displayName: 'Jordan', }, product: { title: 'Beechers Mac & Cheese', id: '02934203942', }, }, }),};
fetch('https://live.waypointapi.com/v1/sandbox/email_messages', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Retrieve an email
Section titled “Retrieve an email”Get the details of an email message, including its delivery statuses and metadata.
Request
Section titled “Request”/v1/email_messages/:id | Parameter | Description |
|---|---|
| id | Waypoint email message ID |
curl "https://live.waypointapi.com/v1/email_messages/em_2HxzWrrkPo4V4cXR" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD"const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'GET', headers: { 'Content-Type': 'application/json', Authorization: authHeader, },};
fetch('https://live.waypointapi.com/v1/email_messages/em_2HxzWrrkPo4V4cXR', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Response
Section titled “Response”| Property | Description |
|---|---|
| id | The Waypoint message ID. |
| type | The type of the message. |
| createdAt | Timestamp of when the message was created. |
| updatedAt | Timestamp of when the message was last updated. |
| source | How the message was created: PREVIEW, API, SANDBOX_API, WORKFLOW, SANDBOX_WORKFLOW, BATCH, SANDBOX_BATCH. |
| status | Message status: PENDING, SUCCEEDED, PAUSED, FAILED, DELETED. |
| processedAt | Timestamp of when the message was processed. |
| waypointTemplateId | The associated template ID if sent with a template. |
| variables | Object with any template variables that were passed in while triggering the email. |
| referenceId | ID used by AWS for processing this email. |
| to | Array of email addresses the message was sent to. |
| cc | Array of email addresses that were CC’d on this message. |
| bcc | Array of email addresses that were BCC’d on this message. |
| from | ’From’ email address set for this message. |
| replyTo | ’Reply-To’ email address set for this message. |
| sentAt | Timestamp for when the message was sent by Waypoint. |
| deliveredAt | Timestamp for when the message was first received by the recipient’s email server. |
| firstOpenedAt | Timestamp for when the message was first opened. |
| lastOpenedAt | Timestamp for when the message was last opened. |
| firstClickedAt | Timestamp for when a link in the message was first clicked. |
| lastClickedAt | Timestamp for when a link in the message was last clicked. |
| firstComplainedAt | Timestamp for when the message first received a complaint. |
| lastComplainedAt | Timestamp for when the message last received a complaint. |
| firstBouncedAt | Timestamp for when the message first received a bounce. |
| lastBouncedAt | Timestamp for when the message last received a bounce. |
| erroredAt | Timestamp for when the message encountered an error and didn’t send. |
| lastSuppressedAt | Timestamp for when the message was suppressed by an unsubscribe group. |
| lastUnsubscribedAt | Timestamp for when a contact unsubscribed from a message unsubscribe group link. |
| metaId | ID used for idempotent requests or internal reference. Eg. ‘order_1234’. |
| metadata | Object with key-value pairs that was passed in when creating the email message. |
{ "data": { "id": "em_2HxzWrrkPo4V4cXR", "type": "EmailMessage", "createdAt": "2024-12-31T14:58:36.962Z", "updatedAt": "2024-12-31T15:19:51.765Z", "source": "API", "status": "SUCCEEDED", "processedAt": null, "waypointTemplateId": "wptemplate_WVWNrT7e2yFhnnMv", "referenceId": "01000194f6256585-c87d8117-1bb5-4f96-88f9-d5e2baba55e0-000000", "variables": { "message": "hello world" }, "to": [ "\"Carlos Rodriguez\" <carlos@usewaypoint.com>" ], "cc": [], "bcc": [], "from": "Waypoint <support@usewaypoint.com>", "replyTo": "", "sentAt": "2024-12-31T14:58:43.781Z", "deliveredAt": "2024-12-31T14:58:45.076Z", "firstOpenedAt": "2024-12-31T14:58:45.727Z", "lastOpenedAt": "2024-12-31T15:19:51.609Z", "firstClickedAt": null, "lastClickedAt": null, "firstComplainedAt": null, "lastComplainedAt": null, "firstBouncedAt": null, "lastBouncedAt": null, "erroredAt": null, "lastSuppressedAt": null, "lastUnsubscribedAt": null, "metaId": null, "metadata": { "companyId": "company_20342sa3392" } }}List email events
Section titled “List email events”Get the delivery timeline events for an email message.
Request
Section titled “Request”/v1/email_messages/:id/events | Parameter | Description |
|---|---|
| id | Waypoint email message ID. |
curl "https://live.waypointapi.com/v1/email_messages/em_2HxzWrrkPo4V4cXR/events" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD"const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'GET', headers: { 'Content-Type': 'application/json', Authorization: authHeader, },};
fetch('https://live.waypointapi.com/v1/email_messages/em_2HxzWrrkPo4V4cXR/events', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Response
Section titled “Response”A data object with an array of email message event objects containing:
| Property | Description |
|---|---|
| id | The Waypoint message event ID. |
| type | The type of the message event. |
| createdAt | Timestamp of when the message event was created. |
| updatedAt | Timestamp of when the message event was last updated. |
| code | Status code of the message event (see below). |
| message | Description and additional details for the event. |
Status codes:
EMAIL_MESSAGE_BOUNCE_SES_EVENTEMAIL_MESSAGE_CLICKED_SES_EVENTEMAIL_MESSAGE_COMPLAINT_SES_EVENTEMAIL_MESSAGE_CONTACT_UNSUBSCRIBEDEMAIL_MESSAGE_CREATEDEMAIL_MESSAGE_DELIVERED_SES_EVENTEMAIL_MESSAGE_EMPTY_RECIPIENTS_ERROREMAIL_MESSAGE_INVALID_PARAMETER_ERROREMAIL_MESSAGE_INVALID_RECIPIENTS_ERROREMAIL_MESSAGE_INVALID_SENDER_ERROREMAIL_MESSAGE_INVALID_TEST_MODE_RECIPIENT_ERROREMAIL_MESSAGE_OPEN_SES_EVENT
{ "meta": { "count": 5, "page": 1, "limit": 50 }, "data": [ { "id": "log_Davifvij7cBN96r9", "type": "EmailMessageLog", "createdAt": "2024-08-23T18:10:21.868Z", "updatedAt": "2024-08-23T18:10:21.868Z", "code": "EMAIL_MESSAGE_OPEN_SES_EVENT", "message": "Email was opened by a recipient at IP address 66.249.91.165. User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246 Mozilla/5.0" }, { "id": "log_8MXy5akcYqwXL7YJ", "type": "EmailMessageLog", "createdAt": "2024-08-23T18:10:20.215Z", "updatedAt": "2024-08-23T18:10:20.215Z", "code": "EMAIL_MESSAGE_DELIVERED_SES_EVENT", "message": "Email successfully delivered to jordan@usewaypoint.com. Delivery time: 10 seconds." }, { "id": "log_YcTNPR5MYjRpaEh8", "type": "EmailMessageLog", "createdAt": "2024-08-23T18:10:19.184Z", "updatedAt": "2024-08-23T18:10:19.184Z", "code": "EMAIL_MESSAGE_SENT_SES_EVENT", "message": "Email was sent." }, { "id": "log_nUHH2sZVhZhkKb5N", "type": "EmailMessageLog", "createdAt": "2024-08-23T18:10:19.147Z", "updatedAt": "2024-08-23T18:10:19.147Z", "code": "EMAIL_MESSAGE_RENDERED", "message": "Email was processed by Waypoint." }, { "id": "log_DkonKJ4aLgJS6Kgr", "type": "EmailMessageLog", "createdAt": "2024-08-23T18:10:19.032Z", "updatedAt": "2024-08-23T18:10:19.032Z", "code": "EMAIL_MESSAGE_CREATED", "message": "Email message was created." } ]}List emails
Section titled “List emails”Get a list of email messages. Returns 50 per call — use the cursor parameters to page through more.
Request
Section titled “Request”/v1/email_messages/ | Parameter | Description |
|---|---|
| cursor.before | A cursor to use in pagination. Use an object ID to define your place in the list. This will get objects before this cusor object. Example: cursor.before=object_2HxzWrrkPo4V4cXR |
| cursor.after | A cursor to use in pagination. Use an object ID to define your place in the list. This will get objects after this cusor object. Example: cursor.after=object_2HxzWrrkPo4V4cXR |
| createdAt.gt | Filter where createdAt is greater than the given date (ISO 8601). Example: createdAt.gt=2024-12-17T11:23:01 |
| createdAt.gte | Filter where createdAt is greater than or equal to the given date (ISO 8601). Example: createdAt.gte=2024-12-17T11:23:01 |
| createdAt.lt | Filter where createdAt is less than the given date (ISO 8601). Example: createdAt.lt=2024-12-17T11:23:01 |
| createdAt.lte | Filter where createdAt is less than or equal to the given date (ISO 8601). Example: createdAt.lte=2024-12-17T11:23:01 |
curl "https://live.waypointapi.com/v1/email_messages?createdAt.lt=2024-12-17T00:00:00Z" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD"const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'GET', headers: { 'Content-Type': 'application/json', Authorization: authHeader, },};
fetch('https://live.waypointapi.com/v1/email_messages?createdAt.lt=2024-12-17T00:00:00Z', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Response
Section titled “Response”A successful response returns metadata and a data array of email messages.
| Property | Description |
|---|---|
| meta | Object containing pagination properties including limit, cursor.after (object ID), and cursor.before (object ID) |
| data | Array of email message objects. See ‘Retrieve an email message’ response for the properties on each email message. |
{ "meta": { "limit": 50, "cursor.after": "em_954rJcThJGTA7z2c", "cursor.before": "em_P9L3SsjCA9XPJXB9", "count": 2 }, "data": [ { "id": "em_P9L3SsjCA9XPJXB9", "type": "EmailMessage", "createdAt": "2025-02-11T17:53:52.082Z", "updatedAt": "2025-02-11T17:54:37.469Z", "source": "WORKFLOW", "status": "SUCCEEDED", "processedAt": "2025-02-11T17:53:53.680Z", "waypointTemplateId": "wptemplate_WVWNrT7e2yFhnnMv", "variables": {}, "referenceId": "01000194f625655a-be25d8f9-ae16-4b70-b7ed-8dd6864ac4b4-000000", "to": ["jordan@usewaypoint.com"], "cc": [], "bcc": [], "from": "Waypoint Support <support@usewaypoint.com>", "replyTo": null, "sentAt": "2025-02-11T17:53:53.498Z", "deliveredAt": null, "firstOpenedAt": null, "lastOpenedAt": null, "firstClickedAt": null, "lastClickedAt": null, "firstComplainedAt": null, "lastComplainedAt": null, "firstBouncedAt": null, "lastBouncedAt": null, "erroredAt": null, "lastSuppressedAt": null, "lastUnsubscribedAt": null, "metaId": null, "metadata": {} }, { "id": "em_954rJcThJGTA7z2c", "type": "EmailMessage", "createdAt": "2025-02-11T17:53:51.474Z", "updatedAt": "2025-02-11T17:54:37.632Z", "source": "WORKFLOW", "status": "SUCCEEDED", "processedAt": "2025-02-11T17:53:53.738Z", "waypointTemplateId": "wptemplate_WVWNrT7e2yFhnnMv", "variables": {}, "referenceId": "01000194f6256585-c87d8117-1bb5-4f96-88f9-d5e2baba55e0-000000", "to": ["carlos@usewaypoint.com"], "cc": [], "bcc": [], "from": "Waypoint Support <support@usewaypoint.com>", "replyTo": null, "sentAt": "2025-02-11T17:53:53.541Z", "deliveredAt": null, "firstOpenedAt": null, "lastOpenedAt": null, "firstClickedAt": null, "lastClickedAt": null, "firstComplainedAt": null, "lastComplainedAt": null, "firstBouncedAt": null, "lastBouncedAt": null, "erroredAt": null, "lastSuppressedAt": null, "lastUnsubscribedAt": null, "metaId": null, "metadata": {} }, ]}Email batches
Section titled “Email batches”API endpoints for sending and fetching email batches on Waypoint.
Send an email batch
Section titled “Send an email batch”Send multiple emails in one API call. Total payload size cannot exceed 10 MB.
Request
Section titled “Request”/v1/batches | Parameter | Description |
|---|---|
| emailMessages | Required An array of email messages (either with a template or without). |
curl "https://live.waypointapi.com/v1/batches" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "emailMessages": [ { "templateId": "wptemplate_RXL7zGTGsvkXzAP3", "to": "Jordan Isip <jordan@usewaypoint.com>", "variables": { "username": "fixie" } }, { "templateId": "wptemplate_RXL7zGTGsvkXzAP3", "to": "Carlos Rodriguez <jordan@usewaypoint.com>", "variables": { "username": "cohitre" } } ]}'const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: authHeader, }, body: JSON.stringify({ emailMessages: [ { templateId: 'wptemplate_RXL7zGTGsvkXzAP3', to: 'Jordan Isip <jordan@usewaypoint.com>', variables: { username: 'fixie', }, }, { templateId: 'wptemplate_RXL7zGTGsvkXzAP3', to: 'Carlos Rodriguez <jordan@usewaypoint.com>', variables: { username: 'cohitre', }, }, ], }),};
fetch('https://live.waypointapi.com/v1/batches', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Send a test email batch
Section titled “Send a test email batch”The sandbox version of the batch endpoint. Total payload size cannot exceed 10 MB.
Request
Section titled “Request”/v1/sandbox/batches This sandbox endpoint uses the same properties as v1/batches.
curl "https://live.waypointapi.com/v1/sandbox/batches" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "emailMessages": [ { "templateId": "wptemplate_RXL7zGTGsvkXzAP3", "to": "Jordan Isip <jordan@usewaypoint.com>", "variables": { "username": "fixie" } }, { "templateId": "wptemplate_RXL7zGTGsvkXzAP3", "to": "Carlos Rodriguez <jordan@usewaypoint.com>", "variables": { "username": "cohitre" } } ]}'const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: authHeader, }, body: JSON.stringify({ emailMessages: [ { templateId: 'wptemplate_RXL7zGTGsvkXzAP3', to: 'Jordan Isip <jordan@usewaypoint.com>', variables: { username: 'fixie', }, }, { templateId: 'wptemplate_RXL7zGTGsvkXzAP3', to: 'Carlos Rodriguez <carlos@usewaypoint.com>', variables: { username: 'cohitre', }, }, ], }),};
fetch('https://live.waypointapi.com/v1/sandbox/batches', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Retrieve an email batch
Section titled “Retrieve an email batch”Get all email messages from an email batch. Returns 100 per call — use the offset parameter to page through more.
Request
Section titled “Request”v1/batches/:id/email_messages | Parameter | Description |
|---|---|
| id | Waypoint email batch ID (either Live or Sandbox batch). |
| offset | Starting point of email messages within the batch. |
curl "https://live.waypointapi.com/v1/batches/BATCH_ID/email_messages" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD"const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'GET', headers: { 'Content-Type': 'application/json', Authorization: authHeader, },};
fetch('https://live.waypointapi.com/v1/batches/BATCH_ID/email_messages', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Response
Section titled “Response”A data array of associated message logs. See email message log for the properties on each message.
{ "data": [ { "id": "em_45TWBJqcvwHLoDq5", "type": "EmailMessage", "createdAt": "2024-12-31T14:58:36.896Z", "updatedAt": "2024-12-31T15:58:15.008Z", "source": "BATCH", "status": "SUCCEEDED", "processedAt": null, "waypointTemplateId": "wptemplate_WVWNrT7e2yFhnnMv", "variables": { "message": "hello from a batch" }, "to": ["\"Jordan Isip\" <jordan@usewaypoint.com>"], "cc": [], "bcc": [], "from": "Waypoint <support@usewaypoint.com>", "replyTo": "", "sentAt": "2024-12-31T14:58:43.775Z", "deliveredAt": "2024-12-31T14:58:44.805Z", "firstOpenedAt": "2024-12-31T14:58:45.927Z", "lastOpenedAt": "2024-12-31T15:58:14.801Z", "firstClickedAt": null, "lastClickedAt": null, "firstComplainedAt": null, "lastComplainedAt": null, "firstBouncedAt": null, "lastBouncedAt": null, "erroredAt": null, "lastSuppressedAt": null, "lastUnsubscribedAt": null, "metaId": null, "metadata": {} }, { "id": "em_HKbSarUFc391Cng3", "type": "EmailMessage", "createdAt": "2024-12-31T14:58:36.962Z", "updatedAt": "2024-12-31T15:19:51.765Z", "source": "BATCH", "status": "SUCCEEDED", "processedAt": null, "waypointTemplateId": "wptemplate_WVWNrT7e2yFhnnMv", "variables": { "message": "hello from a batch" }, "to": ["\"Carlos Rodriguez\" <carlos@usewaypoint.com>"], "cc": [], "bcc": [], "from": "Waypoint <support@usewaypoint.com>", "replyTo": "", "sentAt": "2024-12-31T14:58:43.781Z", "deliveredAt": "2024-12-31T14:58:45.076Z", "firstOpenedAt": "2024-12-31T14:58:45.727Z", "lastOpenedAt": "2024-12-31T15:19:51.609Z", "firstClickedAt": null, "lastClickedAt": null, "firstComplainedAt": null, "lastComplainedAt": null, "firstBouncedAt": null, "lastBouncedAt": null, "erroredAt": null, "lastSuppressedAt": null, "lastUnsubscribedAt": null, "metaId": null, "metadata": {} } ]}Workflows
Section titled “Workflows”API endpoints for workflows on Waypoint.
Trigger workflow
Section titled “Trigger workflow”Start a new workflow run.
/v1/workflow_runs | Parameter | Description |
|---|---|
| workflowId | Waypoint workflow ID. |
| workflowKey | Your custom workflow key. Eg. abandoned_cart. Use in replace of a workflowId. |
| variables | Template variables JSON. |
| metaId | ID used for idempotent requests or internal reference. Eg. ‘order_1234’. |
curl "https://live.waypointapi.com/v1/workflow_runs" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "workflowId": "wf_eXYHR685DrjeGEXz", "variables": { "user": { "displayName": "Jordan", "email": "jordan@usewaypoint.com" }, "product": { "title": "Beechers Mac & Cheese", "id": "02934203942" } }}'const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: authHeader, }, body: JSON.stringify({ workflowId: 'wf_eXYHR685DrjeGEXz', variables: { user: { displayName: 'Jordan', email: 'jordan@usewaypoint.com', }, product: { title: 'Beechers Mac & Cheese', id: '02934203942', }, }, }),};
fetch('https://live.waypointapi.com/v1/workflow_runs', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Trigger test workflow
Section titled “Trigger test workflow”The sandbox version of the trigger workflow endpoint. Runs the workflow without actually sending the resulting email.
/v1/sandbox/workflow_runs This sandbox endpoint uses the same properties as v1/workflow_runs.
curl "https://live.waypointapi.com/v1/sandbox/workflow_runs" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "workflowId": "wf_eXYHR685DrjeGEXz", "variables": { "user": { "displayName": "Jordan", "email": "jordan@usewaypoint.com" }, "product": { "title": "Beechers Mac & Cheese", "id": "02934203942" } }}'const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: authHeader, }, body: JSON.stringify({ workflowId: 'wf_eXYHR685DrjeGEXz', variables: { user: { displayName: 'Jordan', email: 'jordan@usewaypoint.com', }, product: { title: 'Beechers Mac & Cheese', id: '02934203942', }, }, }),};
fetch('https://live.waypointapi.com/v1/sandbox/workflow_runs', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Templates
Section titled “Templates”API endpoints for email templates on Waypoint.
Retrieve template (with data)
Section titled “Retrieve template (with data)”Render a template with the template data you pass in. The response includes the processed HTML body, text body, and subject line.
Request
Section titled “Request”/v1/templates/:id/render | Parameter | Description |
|---|---|
| id | Waypoint template ID. Example: wptemplate_qzJuYidNgPYNoba6 |
| variables | Object matching your template variables. |
curl "https://live.waypointapi.com/v1/templates/wptemplate_qzJuYidNgPYNoba6/render" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "variables": { "passcode": "ABC123", "expiresIn": "30 minutes" }}'const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: authHeader, }, body: JSON.stringify({ variables: { passcode: 'ABC123', expiresIn: '30 minutes', }, }),};
fetch('https://live.waypointapi.com/v1/templates/wptemplate_qzJuYidNgPYNoba6/render', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Response
Section titled “Response”| Property | Description |
|---|---|
| type | The type of the template. |
| createdAt | Timestamp of when the template was created. |
| bodyHtml | The processed HTML body of the template. |
| bodyText | The processed text body of the template. |
| subject | The processed subject of the template. |
{ data: { type: 'RenderedTemplate', createdAt: '2025-02-12T02:08:24.552Z', bodyHtml: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n' + '<html lang="en" dir="ltr" style="-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; -webkit-text-size-adjust: 100%;">\n' + '\n' + ' <head>\n' + ' <meta http-equiv="Content-Type" content="text/html charset=UTF-8">\n' + ' <style data-emotion="css-global o6gwfi">\n' + '@media print {\n' + ' body {\n' + ' background-color: #fff;\n' + ' }\n' + '}\n' + '</style>\n' + ' <style>\n' + '@media screen and (max-width: 599.95px) {\n' + ' .block-mobile {\n' + ' display: block !important;\n' + ' }\n' + '\n' + ' .block-desktop {\n' + ' display: none !important;\n' + ' }\n' + '}\n' + '</style>\n' + ' </head>\n' + '\n' + ` <body style="box-sizing: inherit; margin: 0; color: rgba(0, 0, 0, 0.87); font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif; font-weight: 400; font-size: 1rem; line-height: 1.5; letter-spacing: 0.00938em; background-color: #EEEEEE;">\n` + ' \n' + ` <div class="css-fpvms3" style="box-sizing: inherit; font-weight: 400; font-size: 16px; padding: 32px 0; margin: 0; letter-spacing: 0.15008px; line-height: 1.5; background-color: #EEEEEE; font-family: 'Nimbus Mono PS', 'Courier New', 'Cutive Mono', monospace; color: #242424;">\n` + ' <div style="box-sizing: inherit; display: none; overflow: hidden; line-height: 1px; opacity: 0; max-height: 0; max-width: 0;">This code will expire in 30 minutes.<div style="box-sizing: inherit;"> </div>\n' + ' </div>\n' + ' <table align="center" width="100%" style="box-sizing: inherit; background-color: #FFFFFF; max-width: 600px; min-height: 48px;" role="presentation" cellspacing="0" cellpadding="0" border="0" bgcolor="#FFFFFF">\n' + ' <tbody style="box-sizing: inherit;">\n' + ' <tr style="box-sizing: inherit; width: 100%;">\n' + ' <td style="box-sizing: inherit;">\n' + ' <div style="font-family: inherit; font-size: 16px; font-weight: normal; padding: 32px 24px 24px 24px; text-align: left; max-width: 100%; box-sizing: border-box;">\n' + ' <div class style="box-sizing: inherit;">\n' + ' <table align="center" width="100%" cellpadding="0" border="0" style="box-sizing: inherit; table-layout: fixed; border-collapse: collapse;">\n' + ' <tbody style="box-sizing: inherit; width: 100%;">\n' + ' <tr style="box-sizing: inherit; width: 100%;">\n' + ' <td style="box-sizing: content-box; vertical-align: middle; text-align: left; width: 50%; padding-left: 0; padding-right: 8px;" width="50%" valign="middle" align="left">\n' + ' <div style="font-family: inherit; font-size: 16px; font-weight: normal; padding: 0px 0px 0px 0px; text-align: left; max-width: 100%; box-sizing: border-box;">\n' + ' <div style="padding: 0px 0px 0px 0px; text-align: left; max-width: 100%; box-sizing: border-box;"><img src="https://d1iiu589g39o6c.cloudfront.net/live/platforms/platform_pqVAk6zw4NNzFhNm/images/wptemplateimage_FQWgtu4Gg5sjwHFu/GENIE.png" style="box-sizing: inherit; display: inline-block; outline: none; border: none; text-decoration: none; vertical-align: middle; max-width: 100%; height: 20px;" height="20"></div>\n' + ' </div>\n' + ' </td>\n' + ' <td style="box-sizing: content-box; vertical-align: middle; text-align: left; width: 50%; padding-left: 8px; padding-right: 0;" width="50%" valign="middle" align="left">\n' + ' <div style="font-family: inherit; font-size: 16px; font-weight: normal; padding: 0px 0px 0px 0px; text-align: left; max-width: 100%; box-sizing: border-box;">\n' + ' <div style="font-family: inherit; font-size: 14px; font-weight: bold; padding: 0px 0px 0px 0px; text-align: right; max-width: 100%; box-sizing: border-box;"><a href="https://www.usewaypoint.com" target="_blank" style="box-sizing: inherit; background-color: #16A34A; color: #FFFFFF; padding: 0px 0px; border-radius: 0; width: auto; display: inline-block; line-height: 100%; text-decoration: none; max-width: 100%;"><span style="box-sizing: inherit;"><!--[if mso]><i style="letter-spacing: undefinedpx;mso-font-width:-100%;mso-text-raise:0" hidden> </i><![endif]--></span><span style="box-sizing: inherit; background-color: #16A34A; color: #FFFFFF; padding: 12px 20px; border-radius: 0; width: auto; display: inline-block; max-width: 100%; line-height: 120%; text-decoration: none; text-transform: none; mso-padding-alt: 0px; mso-text-raise: 0;">Login</span><span style="box-sizing: inherit;"><!--[if mso]><i style="letter-spacing: undefinedpx;mso-font-width:-100%" hidden> </i><![endif]--></span></a></div>\n' + ' </div>\n' + ' </td>\n' + ' </tr>\n' + ' </tbody>\n' + ' </table>\n' + ' </div>\n' + ' </div>\n' + ' <div style="color: #000000; font-family: inherit; font-size: 16px; font-weight: normal; padding: 16px 24px 16px 24px; text-align: left; max-width: 100%; box-sizing: border-box;">\n' + ' \n' + ' <div class="css-vii0ua" style="box-sizing: inherit;">\n' + ' <div style="box-sizing: inherit;">\n' + ' <p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 0px;">Hi, here is your one-time passcode:</p>\n' + ' </div>\n' + ' </div>\n' + ' </div>\n' + ' <div style="font-family: inherit; font-weight: bold; padding: 24px 24px 0px 24px; text-align: left; max-width: 100%; box-sizing: border-box;">\n' + ' <h1 style="box-sizing: inherit; margin-top: 40px; margin-bottom: 16px; font-weight: inherit; margin: 0; font-size: 32px;">ABC123</h1>\n' + ' </div>\n' + ' <div style="color: #191A1A; font-family: inherit; font-size: 12px; font-weight: normal; padding: 0px 24px 40px 24px; text-align: left; max-width: 100%; box-sizing: border-box;">\n' + ' <div class="css-vii0ua" style="box-sizing: inherit;">\n' + ' <div style="box-sizing: inherit;">\n' + ' <p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 0px;">This code will expire in 30 minutes.</p>\n' + ' </div>\n' + ' </div>\n' + ' </div>\n' + ' <div style="font-family: inherit; font-size: 12px; font-weight: normal; padding: 24px 24px 32px 24px; text-align: left; max-width: 100%; box-sizing: border-box;">\n' + ' <div class="css-vii0ua" style="box-sizing: inherit;">\n' + ' <div style="box-sizing: inherit;">\n' + ' <p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 0px;">Need help? Just reply to this email or email us at <a href="mailto:support@example.com" target="_blank" style="box-sizing: inherit; color: #16A34A;">support@example.com</a>.</p>\n' + ' </div>\n' + ' </div>\n' + ' </div>\n' + ' </td>\n' + ' </tr>\n' + ' </tbody>\n' + ' </table>\n' + ' </div>\n' + ' </body>\n' + '\n' + '</html>', bodyText: 'Login [https://www.usewaypoint.com]\n' + '\n' + 'Hi, here is your one-time passcode:\n' + '\n' + '\n' + 'ABC123\n' + '\n' + 'This code will expire in 30 minutes.\n' + '\n' + 'Need help? Just reply to this email or email us at support@example.com\n' + '[support@example.com].', subject: 'Your one-time passcode is ABC123' }}Retrieve raw template
Section titled “Retrieve raw template”Get the unrendered HTML of your template, with LiquidJS templating intact. Useful if you need to keep a copy of the raw template in your codebase or send it through another service for compliance reasons.
Request
Section titled “Request”/v1/templates/:id/raw | Parameter | Description |
|---|---|
| id | Waypoint template ID. Example: wptemplate_qzJuYidNgPYNoba6 |
curl "https://live.waypointapi.com/v1/templates/wptemplate_qzJuYidNgPYNoba6/raw" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD"const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'GET', headers: { 'Content-Type': 'application/json', Authorization: authHeader, },};
fetch('https://live.waypointapi.com/v1/templates/wptemplate_qzJuYidNgPYNoba6/raw', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Response
Section titled “Response”| Property | Description |
|---|---|
| id | The template ID. |
| type | The type of the template. |
| createdAt | Timestamp of when the template was created. |
| updatedAt | Timestamp of when the template was last updated. |
| rawSubject | The subject line of the email with LiquidJS templating. |
| rawBodyHtml | The HTML body of the email with LiquidJS templating. |
{ "data": { "id": "wptemplate_qzJuYidNgPYNoba6", "type": "Template", "createdAt": "2023-11-28T14:42:09.867Z", "updatedAt": "2023-12-04T18:32:48.547Z", "rawSubject": "{{user.displayName}}, you got {{report.metric.value | downcase}} {{report.metric.title | downcase}} {{report.duration | downcase}}", "rawBodyHtml": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html lang=\"en\" dir=\"ltr\" style=\"-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; -webkit-text-size-adjust: 100%;\">\n\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html charset=UTF-8\">\n <style data-emotion=\"css-global o6gwfi\">\n@media print {\n body {\n background-color: #fff;\n }\n}\n</style>\n <style>\n@media screen and (max-width: 599.95px) {\n .block-mobile {\n display: block !important;\n }\n\n .block-desktop {\n display: none !important;\n }\n}\n</style>\n </head>\n\n <body style=\"box-sizing: inherit; margin: 0; color: rgba(0, 0, 0, 0.87); font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif; font-weight: 400; font-size: 1rem; line-height: 1.5; letter-spacing: 0.00938em; background-color: #EEEEEE;\">\n \n <div class=\"css-b5fgh5\" style=\"box-sizing: inherit; font-weight: 400; font-size: 16px; padding: 32px 0; margin: 0; letter-spacing: 0.15008px; line-height: 1.5; background-color: #EEEEEE; font-family: 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif; color: #242424;\">\n <div style=\"box-sizing: inherit; display: none; overflow: hidden; line-height: 1px; opacity: 0; max-height: 0; max-width: 0;\">Plus your top performing post {{report.duration | downcase}}.<div style=\"box-sizing: inherit;\"> </div>\n </div>\n <table align=\"center\" width=\"100%\" style=\"box-sizing: inherit; background-color: #FFFFFF; max-width: 600px; min-height: 48px;\" role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" bgcolor=\"#FFFFFF\">\n <tbody style=\"box-sizing: inherit;\">\n <tr style=\"box-sizing: inherit; width: 100%;\">\n <td style=\"box-sizing: inherit;\">\n <div style=\"font-family: inherit; font-size: 16px; font-weight: normal; padding: 24px 24px 24px 24px; text-align: left; max-width: 100%; box-sizing: border-box;\">\n <div class style=\"box-sizing: inherit;\">\n <table align=\"center\" width=\"100%\" cellpadding=\"0\" border=\"0\" style=\"box-sizing: inherit; table-layout: fixed; border-collapse: collapse;\">\n <tbody style=\"box-sizing: inherit; width: 100%;\">\n <tr style=\"box-sizing: inherit; width: 100%;\">\n <td style=\"box-sizing: content-box; vertical-align: middle; text-align: left; width: 50%; padding-left: 0; padding-right: 8px;\" width=\"50%\" valign=\"middle\" align=\"left\">\n <div style=\"font-family: inherit; font-size: 16px; font-weight: normal; padding: 0px 0px 0px 0px; text-align: left; max-width: 100%; box-sizing: border-box;\">\n <div style=\"padding: 0px 0px 0px 0px; text-align: left; max-width: 100%; box-sizing: border-box;\"><img alt src=\"https://d1iiu589g39o6c.cloudfront.net/live/platforms/platform_A9wwKSL6EV6orh6f/images/wptemplateimage_n3eLjsf37dcjFaj5/Narrative.png\" style=\"box-sizing: inherit; display: block; outline: none; border: none; text-decoration: none;\"></div>\n </div>\n </td>\n <td style=\"box-sizing: content-box; vertical-align: middle; text-align: left; width: 50%; padding-left: 8px; padding-right: 0;\" width=\"50%\" valign=\"middle\" align=\"left\">\n <div style=\"font-family: inherit; font-size: 16px; font-weight: normal; padding: 0px 0px 0px 0px; text-align: left; max-width: 100%; box-sizing: border-box;\">\n <div style=\"font-family: inherit; font-weight: normal; padding: 0px 0px 0px 0px; text-align: right; max-width: 100%; box-sizing: border-box;\"><img src=\"{{user.avatarUrl}}\" alt=\"{{user.displayName}}\" style=\"box-sizing: inherit; display: inline-block; object-fit: cover; height: 32px; width: 32px; max-width: 100%; vertical-align: middle; text-align: center; border-radius: 32px;\" width=\"32\" height=\"32\"></div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div style=\"font-family: inherit; font-weight: bold; padding: 24px 24px 0px 24px; text-align: center; max-width: 100%; box-sizing: border-box;\">\n <h3 style=\"box-sizing: inherit; margin-top: 40px; margin-bottom: 16px; font-weight: inherit; font-size: 20px; margin: inherit;\">{{report.duration}}, your posts received</h3>\n </div>\n <div style=\"font-family: inherit; font-size: 48px; font-weight: bold; padding: 16px 24px 0px 24px; text-align: center; max-width: 100%; box-sizing: border-box;\">\n \n <div class=\"css-vii0ua\" style=\"box-sizing: inherit;\">\n <div style=\"box-sizing: inherit;\">\n <p style=\"box-sizing: inherit; margin-top: 0px; margin-bottom: 0px;\">{{report.metric.value}}</p>\n </div>\n </div>\n </div>\n <div style=\"font-family: inherit; font-size: 14px; font-weight: bold; padding: 0px 24px 16px 24px; text-align: center; max-width: 100%; box-sizing: border-box;\">\n <div class=\"css-vii0ua\" style=\"box-sizing: inherit;\">\n <div style=\"box-sizing: inherit;\">\n <p style=\"box-sizing: inherit; margin-top: 0px; margin-bottom: 0px;\">{{report.metric.title}}</p>\n </div>\n </div>\n </div>\n <div style=\"font-family: inherit; font-size: 16px; font-weight: bold; padding: 16px 24px 40px 24px; text-align: center; max-width: 100%; box-sizing: border-box;\"><a href=\"https://narrative.example.com/{{user.username}}/analytics\" style=\"box-sizing: inherit; color: #24AF7F; background-color: #24AF7F; padding: 0; border-radius: 4px; width: auto; display: inline-block; text-decoration: none; max-width: 100%; line-height: 100%;\"><span style=\"box-sizing: inherit; color: #FFFFFF; padding: 12px 20px; width: 100%; display: inline-block; max-width: 100%; line-height: 120%; text-decoration: none; text-transform: none;\">View your analytics →</span></a></div>\n <div style=\"font-family: inherit; font-weight: bold; padding: 24px 24px 8px 24px; text-align: center; max-width: 100%; box-sizing: border-box;\">\n <h3 style=\"box-sizing: inherit; margin-top: 40px; margin-bottom: 16px; font-weight: inherit; font-size: 20px; margin: inherit;\">Top performing post {{report.duration | downcase}}</h3>\n </div>\n <div style=\"font-family: inherit; font-size: 16px; font-weight: normal; padding: 16px 24px 16px 24px; text-align: left; max-width: 100%; box-sizing: border-box;\">\n <div style=\"border: 1px solid #d0d0d0; border-radius: 8px; font-family: inherit; font-size: 16px; font-weight: normal; padding: 24px 24px 24px 24px; text-align: left; max-width: 100%; box-sizing: border-box;\">\n <div style=\"font-family: inherit; font-size: 16px; font-weight: normal; padding: 0px 0px 0px 0px; text-align: left; max-width: 100%; box-sizing: border-box;\">\n <div class=\"css-vii0ua\" style=\"box-sizing: inherit;\">\n <div style=\"box-sizing: inherit;\">\n <p style=\"box-sizing: inherit; margin-top: 0px; margin-bottom: 0px;\">{{report.topPerformingPost}}</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div style=\"font-family: inherit; font-size: 16px; font-weight: bold; padding: 16px 24px 16px 24px; text-align: center; max-width: 100%; box-sizing: border-box;\"><a href=\"https://narrative.example.com/{{user.username}}/posts\" style=\"box-sizing: inherit; color: #24AF7F; background-color: #EEEEEE; padding: 0; border-radius: 4px; width: auto; display: inline-block; text-decoration: none; max-width: 100%; line-height: 100%;\"><span style=\"box-sizing: inherit; color: #000000; padding: 12px 20px; width: 100%; display: inline-block; max-width: 100%; line-height: 120%; text-decoration: none; text-transform: none;\">Show more</span></a></div>\n <div style=\"padding: 40px 0px 0px 0px; max-width: 100%; box-sizing: border-box;\">\n <hr style=\"box-sizing: inherit; margin: 0px; width: 100%; border: none; border-top: 1px solid #eaeaea; border-color: rgb(233, 233, 233); border-top-width: 1px;\">\n </div>\n <div style=\"color: #474849; font-family: inherit; font-size: 12px; font-weight: normal; padding: 24px 24px 24px 24px; text-align: center; max-width: 100%; box-sizing: border-box;\">\n <div class=\"css-vii0ua\" style=\"box-sizing: inherit;\">\n <div style=\"box-sizing: inherit;\">\n <p style=\"box-sizing: inherit; margin-top: 0px; margin-bottom: 0px;\">Questions? Just reply to this email.</p>\n </div>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </body>\n\n</html>" }}Attachments
Section titled “Attachments”Create attachment URL
Section titled “Create attachment URL”Use this when sending large attachments. The response gives you an uploadUrl to upload the file to and an id to reference when sending the email.
Request
Section titled “Request”/v1/attachments curl "https://live.waypointapi.com/v1/attachments" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d ''const authHeader = 'Basic ' + Buffer.from(`${API_KEY_USERNAME}:${API_KEY_PASSWORD}`).toString('base64');
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: authHeader, },};
fetch('https://live.waypointapi.com/v1/attachments', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Response
Section titled “Response”A data object containing:
| Property | Description |
|---|---|
| id | The Waypoint attachment ID. Pass this on the attachments object when sending an email with a larger attachment. |
| type | The type of the attachment. |
| createdAt | Timestamp of when the attachment was created. |
| updatedAt | Timestamp of when the attachment was last updated. |
| uploadUrl | URL to upload the file to. |
{ "data": { "id": "attachment_N81JgYveYGYeVPie", "type": "Attachment", "createdAt": "2025-10-01T21:02:39.224Z", "updatedAt": "2025-10-01T21:02:39.224Z", "uploadUrl": "https://s3.us-east-1.amazonaws.com/attachments.usewaypoint.com/live/platform_s7pH1ctvjV5zjwAF/attachment_N81JgYveYGYeVPie?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIAWKJZKTYHPKSJIL35%2F20251001%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20251001T210239Z&X-Amz-Expires=3600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEIX%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIAOxKWoQvCOh9BS2wlPL2%2F4LZ4mypHQwdMtUygE3Q4W2AiEAhL8Bnd2yCQYJChXiixDR7DttJislqzCuOGcviR1vbRoqtwMIHhAAGgw0MzQ0NDg4MDEyOTQiDAAo7avHjzl3IPxWYyqUA%2BYLjMhNXRoxxfyjYw5q9bjdHJ5YLgRR1YHDCRIqvp4cQ0LsjREfAiC8Z5MIHoOdeaBWhoDQpeqHDGJmW0%2Fh%2F2wibcNoQOtYuJENuKg3ipneiirbHXwqPkFG%2B5LbaX4COn8Usjas6rNLrIXW68ec%2FOii7VoriZe%2BOHloG40%2Bys2fRF9BsGPxcKDjfo9Z5Y6ujMamnIDCQrZJhqt%2BVDtRAPLG8qInvkK1LZwJxx1tZwLz07QUt3fgW%2BaBLfUQKf2NpOB%2Bt9ypGUwlfaYY0FWqROYRKZsX%2F%2FH0CM4YzuUQVLCDk8Ph%2F2w4N3vLy5gL3pMJUp5JbK1IZEh7ypYiNuY10XxP7V2tV7wPx8FCg%2BpU4GttRfEsuSYpQj%2F6q6MKS8LW%2BgrAFUsJuFjA%2Bixiaf%2FuPi7%2FeNNGAuwaItewo%2BfR3Fv%2FTXxtLVOaWW7hcKi4GLf%2BmJbMjZ4Gc5TebijsDqeks%2FTHEVQikggj%2FX23p3vHQNdNbYVZePcVF5Aku1XagV4a4iLkswsFLhGpQviOZJrzmaHMwhSMMO2t9sYGOp4BMrh%2Boz21c%2BgEaa7IvUwOuIBa%2FPce29VgrFCdcAHFVoeA%2BkjhFKiwVUU8UhreXZRAk8zyGzqgF1G0ztsX%2BWjjxE8rIsU2IgdVeAqmiOeAv0wyeJ1rKgisfl0nhX0t%2BJmiWBmD7f3xmqIQuGnd%2Bq0kOjIVtjvVuO2xhM%2FtNegHdMAaL3Pj0d9L9L5N2C2rKT4WnMsvB6H48RMFNWfh0E4%3D&X-Amz-Signature=cd1634b12cae6fbe0dbbccc1d7b121edd880333073d4d2e67e3f490a70ca8b17&X-Amz-SignedHeaders=host&x-amz-checksum-crc32=AAAAAA%3D%3D&x-amz-sdk-checksum-algorithm=CRC32&x-id=PutObject" }}