Quick start guide
First, let’s get set up
Section titled “First, let’s get set up”Step 1: Create an account and workspace
Section titled “Step 1: Create an account and workspace”You’ll need an account and a workspace to get started. A workspace is where your team collaborates on templates, monitors activity, and so on.
- Create a free account if you haven’t already.
- Open your Waypoint dashboard.
- Click the big ’+’ to add a new workspace.
- Name the workspace and click ‘Create’.
Step 2: Create a template
Section titled “Step 2: Create a template”Next, your first template. We’ll start from one of the sample templates.
- In your new workspace, click ‘Templates’ at the top.
- Click ’+ New’.
- On the ‘From samples’ tab, pick the ‘New comment’ sample.
- Click ‘Untitled template’ in the header and rename it to something descriptive (eg. ‘New comment’).
Step 3: Send a preview email
Section titled “Step 3: Send a preview email”Tweak the template in Waypoint’s builder, then send yourself a preview.
- Make any changes you want — learn more about building templates.
- Open the ‘General’ tab in the template builder.
- Under ‘Test this template’, click ‘Send test’. You’ll get an email with your latest changes.
- Happy with it? Click ‘Save’ in the header.
Now let’s hook it up to the API
Section titled “Now let’s hook it up to the API”Step 4: Create an API key
Section titled “Step 4: Create an API key”Your template is set up and rendering correctly. Next, hook it up to the API by creating a key so your app can send data to Waypoint.
- Open the ‘Settings’ page of your workspace.
- Scroll to the ‘API keys’ section, click ’+ Add key’, and follow the prompts.
- Once the key is created, scroll back to the ‘API keys’ section — you’ll see your new
UsernameandPassword. We’ll use these in a moment.
Step 5: Sending an email via API
Section titled “Step 5: Sending an email via API”Now build the API request that passes the variables your template expects.
Looking at send a templated email API, here’s the data you’ll pass:
| Property | Description |
|---|---|
| templateId | The ID of the template to send. |
| variables | JSON object passed to the template. |
| to | Email address of the recipient. |
In your application, follow the steps below using the code example.
- In the template builder, switch to the ‘Data’ tab — this is the data your template needs to render.
- Copy the JSON and paste it into the
variablesproperty of the API request. Wire it up to your dynamic data, or just tweak the hardcoded values for testing. - Switch to the ‘General’ tab and copy the template ID at the bottom.
- Paste the template ID into the
templateIdfield on the request. - Set
toto the email of someone in your workspace (see trial plan limitations). - Paste your
usernameandpassword(from Step 4) into theauthof the request. - Run it.
Code examples
Section titled “Code examples” curl "https://live.waypointapi.com/v1/email_messages" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "templateId": "TEMPLATE_ID", "to": "EMAIL_ADDRESS", "variables": { "comment": { "id": "comment_123", "user": { "displayName": "User1" }, "channel": { "name": "Tutorial" }, "message": "Hi, this is a test comment sent from the Waypoint API.", "thread": { "id": "thread_123", "user": { "displayName": "User2" } } } } }'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: TEMPLATE_ID, to: EMAIL_ADDRESS, variables: { comment: { id: 'comment_123', user: { displayName: 'User1', }, channel: { name: 'Tutorial', }, message: 'Hi, this is a test comment sent from the Waypoint API.', thread: { id: 'thread_123', user: { displayName: 'User2', }, }, }, }, }),};
fetch('https://live.waypointapi.com/v1/email_messages', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));Finally, let’s confirm it was sent
Section titled “Finally, let’s confirm it was sent”Step 6. Review the API request
Section titled “Step 6. Review the API request”Open your ‘Activity’ page to make sure the request came through with the expected template data.
If it worked, you’ll see both your preview email and your test request in the activity events list. Click any item to open the details — full timeline, metadata, email content, and template data.
Not seeing anything? Check the ‘API Request Logs’ link on your ‘Activity’ page for full API logs.
Still stuck? Email us at support@usewaypoint.com.
Everything look good?
Section titled “Everything look good?”Whenever you and your team are ready, here are the recommended next steps:
- Invite your teammates to your workspace.
- Add a custom verified domain.
- Add approved senders.
- Send test emails with sandbox requests — great for devs sending from local or test environments.
- Upgrade your plan to start sending live emails (see trial plan limitations).