Using sandbox test requests
Test emails can be sent from your application's dev/test environments by including a sandbox flag on the API call.
Emails sent with this sandbox flag will prevent the actual delivery of the email to the address in the 'to' field and the resulting email inputs and outputs will simply be stored on the your workspace's activity logs for debugging and review.
Sandbox API sends are not counted toward your plan's monthly usage limits.
Sandbox API requests
To trigger sandbox API requests, include the 'sandbox' path in the POST url:
Sandbox email message sends
POST /v1/sandbox/email_messages
This sandbox endpoint uses same properties as v1/email_messages
- view in API endpoints.
Code examples
const axios = require('axios'); axios({ method: "post", url: "https://live.waypointapi.com/v1/sandbox/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": { "user": { "displayName": "Jordan", } "product": { "title": "Beechers Mac & Cheese", "id": "02934203942" } } } }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); })
Sandbox batch email sends
POST /v1/sandbox/email_messages_batch
This sandbox endpoint uses same properties as v1/email_messages_batch
- view in API endpoints.
Code examples
const axios = require('axios'); axios({ method: "post", url: "https://live.waypointapi.com/v1/sandbox/email_messages_batch", headers: { "Content-Type": "application/json" }, auth: { username: API_USERNAME, password: API_PASSWORD }, data: { "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" } }] } }) .then(function(response) { // handle success console.log('success'); }) .catch(function(error) { // handle error console.log(error.response.data); })
Sandbox workflow runs
POST /v1/sandbox/workflow_runs
This sandbox endpoint uses same properties as v1/workflow_runs
- view in API endpoints.
Filtering test activity
Test activity can be filtered from your activity and metrics. Test activity include API sandbox requests and preview message (test emails that are sent from the template builder).