Idempotent requests

Idempotency is supported for safely retrying requests without accidentally performing the same operation twice. On certain API endpoints, you can use the optional metaId (eg. 'my_product_123') key. Then, if a connection error occurs, you can safely repeat the request without risk of performing the trigger twice.

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: { "templateId": "wptemplate_ABc123XYZ", "metaId": "my_product_123", "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); })
curl "https://live.waypointapi.com/v1/email_messages" \ -H "Content-Type: application/json" \ -u "API_KEY_USERNAME:API_KEY_PASSWORD" \ -d '{ "templateId": "wptemplate_ABc123XYZ", "metaId": "my_product_123", "to": "jordan@usewaypoint.com", "variables": { "user": { "displayName": "Jordan" }, "product": { "title": "Beechers Mac & Cheese", "id": "02934203942" } } }'