Send single and batch emails, with or without templates, through a message stream.
Send a single email
Sends one email through a message stream on the server identified by the token. Provide HtmlBody, TextBody or both. Maximum message size is 10 MB (including attachments) and 50 recipients across To, Cc and Bcc. If MessageStream is omitted the message is sent through the default outbound transactional stream.
A 200 response means Postmark accepted the message; use the returned MessageID to track delivery, bounces, opens and clicks. Use the token POSTMARK_API_TEST to validate a request without sending.
Send a single email › Request Body
FromSender email address. Must belong to a confirmed Sender Signature or verified domain. To include a name use "Full Name <sender@domain.com>". Max 255 characters.
ToRecipient email addresses, comma separated. Max 50 recipients across To, Cc and Bcc combined.
CcCc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
BccBcc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
SubjectEmail subject line. Max 2000 characters.
TagTag used to categorize outgoing emails and filter statistics. One tag per message, max 1000 characters.
HtmlBodyHTML body. Required if TextBody is not specified.
TextBodyPlain-text body. Required if HtmlBody is not specified.
ReplyToReply-To override. Defaults to the Reply-To of the Sender Signature. Multiple addresses are comma separated.
Custom headers to add to the message.
TrackOpensEnable open tracking for this message. Has no effect if open tracking is already enabled on the message stream.
TrackLinksLink tracking mode. None disables link tracking, HtmlAndText tracks links in both bodies, HtmlOnly tracks only HTML links, TextOnly tracks only plain-text links.
Files to attach. Total message size may not exceed 10 MB.
Custom key/value metadata attached to a message. Keys and values are strings. Returned in webhook payloads and message details; you can search by a single metadata field at a time.
MessageStreamID of the message stream to send through. Defaults to the outbound transactional stream.
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: HtmlBody | |
| type = object · requires: TextBody |
HtmlBodyHTML body. Required if TextBody is not specified.
FromSender email address. Must belong to a confirmed Sender Signature or verified domain. To include a name use "Full Name <sender@domain.com>". Max 255 characters.
ToRecipient email addresses, comma separated. Max 50 recipients across To, Cc and Bcc combined.
CcCc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
BccBcc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
SubjectEmail subject line. Max 2000 characters.
TagTag used to categorize outgoing emails and filter statistics. One tag per message, max 1000 characters.
TextBodyPlain-text body. Required if HtmlBody is not specified.
ReplyToReply-To override. Defaults to the Reply-To of the Sender Signature. Multiple addresses are comma separated.
Custom headers to add to the message.
TrackOpensEnable open tracking for this message. Has no effect if open tracking is already enabled on the message stream.
TrackLinksLink tracking mode. None disables link tracking, HtmlAndText tracks links in both bodies, HtmlOnly tracks only HTML links, TextOnly tracks only plain-text links.
Files to attach. Total message size may not exceed 10 MB.
Custom key/value metadata attached to a message. Keys and values are strings. Returned in webhook payloads and message details; you can search by a single metadata field at a time.
MessageStreamID of the message stream to send through. Defaults to the outbound transactional stream.
Send a single email › Responses
The message was accepted.
ErrorCode0 when the message was accepted; otherwise an API error code.
MessageOK on success, or a description of the error.
ToRecipient email address. Field of SendEmailResponse.
SubmittedAtTime the message was accepted by Postmark.
MessageIDUnique ID of the message. Use it to look up details, bounces, opens and clicks.
Send batch emails
Sends up to 500 messages in one call (50 MB total payload, attachments included). Each message is validated and sent independently.
The HTTP status is 200 even if individual messages fail. Inspect ErrorCode on every entry of the response array; results are in the same order as the request.
Send batch emails › Request Body
Up to 500 messages (and 50 MB total payload, attachments included) per call.
FromSender email address. Must belong to a confirmed Sender Signature or verified domain. To include a name use "Full Name <sender@domain.com>". Max 255 characters.
ToRecipient email addresses, comma separated. Max 50 recipients across To, Cc and Bcc combined.
CcCc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
BccBcc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
SubjectEmail subject line. Max 2000 characters.
TagTag used to categorize outgoing emails and filter statistics. One tag per message, max 1000 characters.
HtmlBodyHTML body. Required if TextBody is not specified.
TextBodyPlain-text body. Required if HtmlBody is not specified.
ReplyToReply-To override. Defaults to the Reply-To of the Sender Signature. Multiple addresses are comma separated.
Custom headers to add to the message.
TrackOpensEnable open tracking for this message. Has no effect if open tracking is already enabled on the message stream.
TrackLinksLink tracking mode. None disables link tracking, HtmlAndText tracks links in both bodies, HtmlOnly tracks only HTML links, TextOnly tracks only plain-text links.
Files to attach. Total message size may not exceed 10 MB.
Custom key/value metadata attached to a message. Keys and values are strings. Returned in webhook payloads and message details; you can search by a single metadata field at a time.
MessageStreamID of the message stream to send through. Defaults to the outbound transactional stream.
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: HtmlBody | |
| type = object · requires: TextBody |
HtmlBodyHTML body. Required if TextBody is not specified.
FromSender email address. Must belong to a confirmed Sender Signature or verified domain. To include a name use "Full Name <sender@domain.com>". Max 255 characters.
ToRecipient email addresses, comma separated. Max 50 recipients across To, Cc and Bcc combined.
CcCc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
BccBcc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
SubjectEmail subject line. Max 2000 characters.
TagTag used to categorize outgoing emails and filter statistics. One tag per message, max 1000 characters.
TextBodyPlain-text body. Required if HtmlBody is not specified.
ReplyToReply-To override. Defaults to the Reply-To of the Sender Signature. Multiple addresses are comma separated.
Custom headers to add to the message.
TrackOpensEnable open tracking for this message. Has no effect if open tracking is already enabled on the message stream.
TrackLinksLink tracking mode. None disables link tracking, HtmlAndText tracks links in both bodies, HtmlOnly tracks only HTML links, TextOnly tracks only plain-text links.
Files to attach. Total message size may not exceed 10 MB.
Custom key/value metadata attached to a message. Keys and values are strings. Returned in webhook payloads and message details; you can search by a single metadata field at a time.
MessageStreamID of the message stream to send through. Defaults to the outbound transactional stream.
Send batch emails › Responses
One result per submitted message, in request order. Some entries may contain errors.
One result per submitted message, in the same order as the request.
ErrorCode0 when the message was accepted; otherwise an API error code.
MessageOK on success, or a description of the error.
ToRecipient email address. Field of SendEmailResponse.
SubmittedAtTime the message was accepted by Postmark.
MessageIDUnique ID of the message. Use it to look up details, bounces, opens and clicks.
Send batch with templates
Sends up to 500 templated messages in one call. As with the plain batch endpoint, the HTTP status is 200 even if individual messages fail; check ErrorCode on every entry of the response array.
Send batch with templates › Request Body
Up to 500 templated messages.
Send batch with templates › Responses
One result per submitted message, in request order.
One result per submitted message, in the same order as the request.
ErrorCode0 when the message was accepted; otherwise an API error code.
MessageOK on success, or a description of the error.
ToRecipient email address. Field of SendEmailResponse.
SubmittedAtTime the message was accepted by Postmark.
MessageIDUnique ID of the message. Use it to look up details, bounces, opens and clicks.
Send email with template
Sends one email rendered from a template stored on the server. Identify the template with TemplateId or TemplateAlias and supply the variables in TemplateModel. The template provides the subject and bodies, so do not send Subject, HtmlBody or TextBody.
Send email with template › Request Body
Variables used to render the template, as a JSON object. Supports nested objects and arrays.
FromSender email address. Must belong to a confirmed Sender Signature or verified domain. To include a name use "Full Name <sender@domain.com>". Max 255 characters.
ToRecipient email addresses, comma separated. Max 50 recipients across To, Cc and Bcc combined.
TemplateIdID of the template to use. Provide either TemplateId or TemplateAlias.
TemplateAliasAlias of the template to use. Provide either TemplateAlias or TemplateId.
InlineCssApply <style> blocks as inline attributes in the rendered HTML. Defaults to true; pass false to opt out.
Cc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
Bcc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
TagTag used to categorize outgoing emails and filter statistics. One tag per message, max 1000 characters.
ReplyToReply-To override. Defaults to the Reply-To of the Sender Signature. Multiple addresses are comma separated.
Custom headers to add to the message. Field of SendEmailWithTemplateRequest.
TrackOpensEnable open tracking for this message. Has no effect if open tracking is already enabled on the message stream.
TrackLinksLink tracking mode. None disables link tracking, HtmlAndText tracks links in both bodies, HtmlOnly tracks only HTML links, TextOnly tracks only plain-text links.
Files to attach. Total message size may not exceed 10 MB. Field of SendEmailWithTemplateRequest.
Custom key/value metadata attached to a message. Keys and values are strings. Returned in webhook payloads and message details; you can search by a single metadata field at a time.
MessageStreamID of the message stream to send through. Defaults to the outbound transactional stream.
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: TemplateId | |
| type = object · requires: TemplateAlias |
TemplateIdID of the template to use. Provide either TemplateId or TemplateAlias.
TemplateAliasAlias of the template to use. Provide either TemplateAlias or TemplateId.
Variables used to render the template, as a JSON object. Supports nested objects and arrays.
InlineCssApply <style> blocks as inline attributes in the rendered HTML. Defaults to true; pass false to opt out.
Sender email address. Must belong to a confirmed Sender Signature or verified domain. To include a name use "Full Name <sender@domain.com>". Max 255 characters.
Recipient email addresses, comma separated. Max 50 recipients across To, Cc and Bcc combined.
Cc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
Bcc recipient email addresses, comma separated. Counts toward the 50-recipient limit.
TagTag used to categorize outgoing emails and filter statistics. One tag per message, max 1000 characters.
ReplyToReply-To override. Defaults to the Reply-To of the Sender Signature. Multiple addresses are comma separated.
Custom headers to add to the message. Field of SendEmailWithTemplateRequest.
TrackOpensEnable open tracking for this message. Has no effect if open tracking is already enabled on the message stream.
TrackLinksLink tracking mode. None disables link tracking, HtmlAndText tracks links in both bodies, HtmlOnly tracks only HTML links, TextOnly tracks only plain-text links.
Files to attach. Total message size may not exceed 10 MB. Field of SendEmailWithTemplateRequest.
Custom key/value metadata attached to a message. Keys and values are strings. Returned in webhook payloads and message details; you can search by a single metadata field at a time.
MessageStreamID of the message stream to send through. Defaults to the outbound transactional stream.
Send email with template › Responses
The message was accepted. See sendEmailWithTemplate.
ErrorCode0 when the message was accepted; otherwise an API error code.
MessageOK on success, or a description of the error.
ToRecipient email address. Field of SendEmailResponse.
SubmittedAtTime the message was accepted by Postmark.
MessageIDUnique ID of the message. Use it to look up details, bounces, opens and clicks.