JavaScript Required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Share
Explore
Postmark
BM
Brian Mo
Main page:
https://postmarkapp.com/
API documentation:
https://postmarkapp.com/developer/api/email-api
Setting Up
Created a Postmark account and validated the “Sender Signature” (the email address of sender)
2. Options for multiple servers (for different projects if necessary)
3. Retrieved API Token for the server
Testing API
Use API Token in Request Header
Single Email Call
API call for sending single email
Endpoint:
https://api.postmarkapp.com/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"
}
Batch Email Call
API call for sending a batch of emails (Up to 500 emails per batch)
Endpoint:
https://api.postmarkapp.com/email/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
https://github.com/activecampaign/postmark-java
Other useful functionalities are available, such as link-tracking, webhooks, etc.
link-tracking:
https://postmarkapp.com/developer/user-guide/tracking-links
webhooks:
https://postmarkapp.com/developer/webhooks/webhooks-overview
Setting Up
Testing API
Single Email Call
Batch Email Call
Other
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.