Share
Explore

Postmark

Main page:

Setting Up

Created a Postmark account and validated the “Sender Signature” (the email address of sender)
image.png
2. Options for multiple servers (for different projects if necessary) ​
image.png
3. Retrieved API Token for the server ​
image.png

Testing API

Use API Token in Request Header
image.png

Single Email Call

API call for sending single email

Request Body for simple test email
{ "From": "bmo@lumafintech.com", "To": "bmo@lumafintech.com", "Subject": "Test", "Tag": "Invitation", "HtmlBody": "<html><body><strong>Hello</strong> dear Postmark user.</body></html>", "TextBody": "Hello dear Postmark us.", "MessageStream": "outbound"}
Response
{ "To": "bmo@lumafintech.com", "SubmittedAt": "2023-02-08T15:48:34.261355Z", "MessageID": "1d743915-e0aa-448d-a8e2-636456951d7c", "ErrorCode": 0, "Message": "OK"}
image.png

Batch Email Call

API call for sending a batch of emails (Up to 500 emails per batch)

Request Body (Array of email requests)
[ { "From": "bmo@lumafintech.com", "To": "bmo@lumafintech.com", "Subject": "Postmark test #1", "TextBody": "Hello dear Postmark user.", "HtmlBody": "<html><body><strong>Hello</strong> dear Postmark user.</body></html>", "MessageStream": "outbound" }, { "From": "bmo@lumafintech.com", "To": "bmo@lumafintech.com", "Subject": "Postmark test #2", "TextBody": "Hello dear Postmark user.", "HtmlBody": "<html><body><strong>Hello</strong> dear Postmark user.</body></html>", "MessageStream": "outbound" }]

Other

Attachments can be sent in request body by encoding the content from binary to base64
{ "From": "bmo@lumafintech.com", "To": "bmo@lumafintech.com", "Subject": "Postmark test #2", "TextBody": "Hello dear Postmark user.", "HtmlBody": "<html><body><strong>Hello</strong> dear Postmark user.</body></html>", "MessageStream": "outbound", "Attachments": [ { "Name": "readme.txt", "Content": "dGVzdCBjb250ZW50", "ContentType": "text/plain" }, { "Name": "report.pdf", "Content": "dGVzdCBjb250ZW50", "ContentType": "application/octet-stream" } ] }

Java Library is also available for Postmark for simple API integration

Other useful functionalities are available, such as link-tracking, webhooks, etc. ​link-tracking: webhooks:

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.