Template-Based Sending (Required)
Postmark sends via the Send email with template API. The template alias is taken from thetpspTemplate parameter and passed to Postmark as TemplateAlias. Custom data for the template comes from your request’s custom fields (e.g. customFields / template model).
Basic Template Email Example
ippool: SendPost IP Pool configured to route to your Postmark providertpspTemplate: Postmark template alias (e.g.welcome-template) – required when sending via PostmarkcustomFields: Object passed to Postmark asTemplateModel(use empty{}if no variables)
Template with Personalization (Template Model)
Pass template variables viacustomFields; they are sent to Postmark as TemplateModel:
TemplateModel with these keys for use inside the template.
Optional Parameters
| Parameter | Description |
|---|---|
replyTo | Reply-to address (optional) |
cc / bcc | Cc and Bcc recipients (optional) |
headers | Custom headers; sent as Headers array to Postmark |
trackOpens | Enable open tracking (default: as configured) |
trackClicks | Enable click tracking; maps to TrackLinks: “HtmlAndText” or “HtmlOnly” |
accountId, tpspId, subAccountId, emailType, messageId, messageSubject) to Postmark for webhook attribution; you do not need to set these manually.
Message Stream
The Message Stream used for sending is the one you selected when creating the Postmark provider in SendPost. It is stored with the TPSP and sent with every request to Postmark; you do not pass it in each API call. The same stream is used for the webhook registered at setup.Response
Success Response (HTTP 200):Next Steps
- Understand event types for PMProcessed, PMDelivered, PMOpen, etc.
- View analytics for your Postmark emails
- Troubleshoot sending or template errors