Docs
Learn

Templates

Reusable emails with variables.

Design an email once, then send it from any language with just an ID and the variables.

Create

In Templates click + New, write your HTML with variables like {{{FIRST_NAME}}}, give each variable an optional fallback, then click Publish. Or use the API.

Send

await client.emails.send({
  to: ['delivered@postwave.test'],
  template: { id: 'welcome', variables: { FIRST_NAME: 'Ada' } },
});

Rules

  • Use the template's ID or alias.
  • Only published templates can be sent. Edits need republishing.
  • A variable without a fallback is required. Sending without it returns a clear error.
  • Anything you pass (e.g. subject) overrides the template's value.
Was this page helpful?Send feedback