Postmark message streams: transactional, broadcast and inbound
A message stream is a separate lane for one kind of mail inside a Postmark server. Every server starts with a transactional stream with the ID outbound and an inbound stream; you create broadcast streams (and extra transactional ones) yourself, up to 10 streams per server. You choose the stream per email with the MessageStream field, or the X-PM-Message-Stream header over SMTP; leave it out and the email goes through outbound. Suppressions, webhooks and settings belong to each stream, and many API calls default to outbound.
The three stream types
Type (MessageStreamType) | For | Default stream | Unsubscribe handling |
|---|---|---|---|
Transactional | One-to-one mail triggered by a user: password resets, receipts, notifications | outbound, created with the server; it can't be archived | None by default |
Broadcasts | One-to-many mail you send on your schedule: product updates, digests, terms changes | None; you create it and choose its ID | Required; Postmark's own by default |
Inbound | Email received at the server's inbound address, POSTed to your webhook as JSON | Created with the server; a server can only have one | None |
Postmark sends broadcast and transactional mail over separate, parallel IP pools, so the two kinds of traffic don't share a sending reputation.
Send through a stream
Set MessageStream to the stream's ID on every message that isn't for outbound:
curl "https://api.postmarkapp.com/email" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Postmark-Server-Token: $POSTMARK_SERVER_TOKEN" \
-d '{
"From": "[email protected]",
"To": "[email protected]",
"Subject": "What is new in March",
"HtmlBody": "<p>...</p>",
"MessageStream": "broadcast"
}'Over SMTP, add the header X-PM-Message-Stream: broadcast (using your stream's ID). Broadcast mail uses its own SMTP host, smtp-broadcasts.postmarkapp.com, rather than smtp.postmarkapp.com. Alternatively generate an SMTP Token in the stream's Settings tab; those credentials only work for that stream.
A misspelt stream ID fails with ErrorCode 1235, The stream provided does not exist on this server. Sending to the inbound stream fails with 1236.
Find a stream's ID
The ID is shown at the top right of the stream's page in Postmark, or list them all:
curl "https://api.postmarkapp.com/message-streams?MessageStreamType=All&IncludeArchivedStreams=true" \
-H "Accept: application/json" \
-H "X-Postmark-Server-Token: $POSTMARK_SERVER_TOKEN"Broadcast IDs aren't fixed: Postmark's own pages use both broadcast and broadcasts in examples. Use the ID your server returns. IDs start with a letter, are at most 30 characters and can't start with pm-.

The gotcha: many API calls default to outbound
If you leave out messagestream, the Bounce API and outbound message search only look at the outbound stream. That is why broadcast bounces seem to be missing:
curl "https://api.postmarkapp.com/bounces?count=50&offset=0&messagestream=broadcast" \
-H "Accept: application/json" \
-H "X-Postmark-Server-Token: $POSTMARK_SERVER_TOKEN"The Stats API (for example /stats/outbound/spam) works the other way: without messagestream it adds up every stream on the server. Compare like with like when a dashboard and an API call disagree.
What else is per stream
- Suppressions. Each stream has its own Suppressions tab and API (
/message-streams/{stream_id}/suppressions). A hard bounce inbroadcastsits on the broadcast list. - Webhooks. Bounce, delivery, spam complaint and other outbound webhooks are set on a stream. The inbound webhook URL is set on the inbound stream's Settings tab (or
InboundHookUrlon the server), one per inbound stream. - Archiving.
POST /message-streams/{stream_ID}/archivearchives a stream; it and its activity are deleted 45 days later unless you restore it. The default transactional and inbound streams can't be archived.
Questions
What is the ID of Postmark's default stream?
outbound, a transactional stream every server has. Email sent without a MessageStream value goes through it.
How many message streams can a Postmark server have?
Up to 10, including the default ones, and only one inbound stream. Your plan may set its own limit.
Can I send newsletters through the outbound stream?
Use a broadcast stream. Postmark designates broadcast streams for one-to-many mail such as newsletters and announcements; they use separate IPs and come with unsubscribe handling.
Why can't I find a bounce in the Postmark API?
The Bounce API defaults to the outbound stream. Add messagestream with the ID of the stream the email was sent through.
Related
- Transactional vs marketing email: send them separatelyTransactional email is triggered by a user action; marketing goes out on your schedule. Split them by stream, IP and subdomain to protect receipts.
- Postmark error 406 inactive recipient: cause and fixPostmark ErrorCode 406 means the address is suppressed after a hard bounce, spam complaint or manual suppression. Find which, and when to reactivate it.
- Postmark spam complaints: what they mean, what to doA Postmark spam complaint (SpamComplaint, 100001) deactivates the address at once, and only Postmark support can reactivate it. How to cut the rate.
- Postmark inbound failed: why, and how to retry messagesFailed means your inbound webhook didn't return 200 after 10 retries over about 10.5 hours. Fix the endpoint, then PUT /messages/inbound/{id}/retry.
- Postmark Server API token vs Account API tokenThe Server token (X-Postmark-Server-Token) sends mail and reads one server. The Account token (X-Postmark-Account-Token) manages servers and domains.