Overview
Integration
User guide
API reference
Webhooks
Introduction
Official libraries
- Rails gem
- Ruby gem
- .NET
- Java
- PHP
- Craft plugin
- Node.js
- CLI
- WordPress plugin
- Grunt plugin
- Zapier Actions
Community libraries
- Classic ASP
- Clojure
- ColdFusion
- Django
- Drupal module
- Elixir
- Erlang
- Google Go
- Grails plugin
- Haskell
- Java
- Laravel
- Magento extension
- Node.js
- Objective-C
- Perl
- Pharo Smalltalk
- PHP 5
- PowerShell Snap-in
- Python
- Scala
- Swift
- WordPress
- Zend
Tools and Integrations
Sending email with API
- Send a single email
- Send batch emails
Sending email with SMTP
Processing email
- Configure an inbound server
- Inbound domain forwarding
- Parse an email
- Configure inbound blocking
- Sample inbound workflow
Tracking opens
- Tracking opens per Server
- Tracking opens per email
- Message opens API
Tracking links
Managing your account
- Managing sender signatures
- Managing servers
Sandbox mode
- Server sandbox mode
- Generate fake bounces
Overview
- Endpoint URL
- Authentication
- HTTP response codes
- API error codes
Email
- Send a single email
- Send batch emails
Bounce
- Get delivery stats
- Get bounces
- Get a single bounce
- Get bounce dump
- Activate a bounce
- Bounce types
- Rebound
Templates
- Send email with template
- Send batch with templates
- Push templates to another server
- Get a template
- Create a template
- Edit a template
- List templates
- Delete a template
- Validate a template
Server
- Get the server
- Edit the server
Servers
- Get a server
- Create a server
- Edit a server
- List servers
- Delete a server
Message Streams
- List message streams
- Get a message stream
- Edit a message stream
- Create a message stream
- Archive a message stream
- Unarchive a message stream
Messages
- Outbound message search
- Outbound message details
- Outbound message dump
- Inbound message search
- Inbound message details
- Bypass rules for a blocked inbound message
- Retry a failed inbound message for processing
- Message opens
- Opens for a single message
- Message clicks
- Clicks for a single message
Domains
- List domains
- Get domain details
- Create domain
- Edit domain
- Delete domain
- Verify DKIM
- Verify Return-Path
- Verify an SPF record
- Rotate DKIM keys
Sender signatures
- List sender signatures
- Get sender signature
- Create a signature
- Edit a signature
- Delete a signature
- Resend a confirmation
- Verify an SPF record
- Request a new DKIM
Stats
- Get outbound overview
- Get sent counts
- Get bounce counts
- Get spam complaints
- Get tracked email counts
- Get email open counts
- Get email platform usage
- Get email client usage
- Get click counts
- Get browser usage
- Get browser platform usage
- Get click location
Triggers: Inbound rules
- List inbound rule triggers
- Create an inbound rule trigger
- Delete a single trigger
Webhooks
- List webhooks
- Get a webhook
- Create a webhook
- Edit a webhook
- Delete a webhook
Suppressions
- Suppression dump
- Create a Suppression
- Delete a Suppression
Data Removal
- Create a Data Removal request
- Check a Data Removal request status
Webhooks overview
- What is a webhook?
- Protecting your webhook
- Testing your webhook
- Retry attempts
Bounce webhook
- What is a bounce webhook?
- Set the webhook URL
- Bounce webhook data
- Testing with curl
- How you can use the data
- Rebound
Inbound webhook
- What is an inbound webhook?
- Inbound webhook data
- Testing with curl
- How you can use the data
- Errors and retries
- Set the webhook URL
Open tracking webhook
- What is an open webhook?
- Set the webhook URL
- Open webhook data
- Testing with curl
- How you can use the data
Delivery webhook
- What is a delivery webhook?
- Set the webhook URL
- Delivery webhook data
- Testing with curl
- How you can use the data
Click webhook
- What is a click webhook?
- Set the webhook URL
- Click webhook data
- Testing with curl
- How you can use the data
Spam complaint webhook
- What is a spam complaint?
- Set the webhook URL
- Spam complaint webhook data
- Testing the spam complaint webhook with curl
- How you can use the data
Subscription change webhook
- What is a subscription change?
- Set the subscription change webhook URL
- Subscription change webhook data
- Testing the subscription change webhook with curl
- How you can use the subscription change data
SMTP API Error
- What is an SMTP API Error
- Set SMTP API Errors for a Server
- SMTP API Error Data
- Testing the SMTP API Error
- How can you use SMTP API Error
We understand that developers with higher volumes or processing time constraints need to send their messages in batches. To facilitate this we provide a batching endpoint that permits you to send up to 500 well-formed Postmark messages in a single API call. If you are sending Broadcast (bulk) messages with the batch call, use the MessageStream
field to set your sending Stream.
Please note that the batch endpoint accepts up to 500 messages per API call, and up to 50 MB payload size , including attachments.
The format of the batched message is a JSON array containing multiple message requests.
Example request with curl curl "https://api.postmarkapp.com/email/batch" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Postmark-Server-Token: server token" \
-d '[{
"From": "sender@example.com",
"To": "receiver1@example.com",
"Subject": "Postmark test #1",
"TextBody": "Hello dear Postmark user.",
"HtmlBody": "<html><body><strong>Hello</strong> dear Postmark user.</body></html>",
"MessageStream": "outbound"
},
{
"From": "sender@example.com",
"To": "receiver2@example.com",
"Subject": "Postmark test #2",
"TextBody": "Hello dear Postmark user.",
"HtmlBody": "<html><body><strong>Hello</strong> dear Postmark user.</body></html>",
"MessageStream": "outbound"
}
]'
Response Similarly, you will receive a matching JSON array containing each response for the messages you sent in your batched call.
See a full list of API errors for more details.
Example JSON response [
{
"ErrorCode": 0,
"Message": "OK",
"MessageID": "b7bc2f4a-e38e-4336-af7d-e6c392c2f817",
"SubmittedAt": "2010-11-26T12:01:05.1794748-05:00",
"To": "receiver1@example.com"
},
{
"ErrorCode": 0,
"Message": "OK",
"MessageID": "e2ecbbfc-fe12-463d-b933-9fe22915106d",
"SubmittedAt": "2010-11-26T12:01:05.1794748-05:00",
"To": "receiver2@example.com"
}
]