Send

Sample request using Axios

await axios.post(
  "https://api.sendlab.io/send",
  {
    to: "<email>",
    template_name: "<template_name>",
    template_version: 123,
    variables: { <variables> },
  },
  { headers: { Authorization: `<key>` } }
);

Fetch API

// or use fetch api
await fetch('https://api.sendlab.io/send', {
  method: 'POST',
  cache: 'no-cache',
  headers: {
    Authorization: '<key>',
  },
  body: JSON.stringify({
    to: "<email>",
    template_name: "<template_name>",
    template_version: 123,
    variables: { <variables> },
  }),
});