Skip to main content

Postmark Component

The Postmark component is used as a developer friendly email delivery service

Component key: postmark

Description

Postmark is a fast and reliable transactional email service that's trusted by thousands of developers for sending emails on time and to the inbox.

Use the Postmark component to send emails, manage sender signatures, and analyze email delivery and engagement in your Postmark account.

A Note on Postmark Message Streams Pagination

Postmark's Message Streams API supports pagination. This means that the API will return up to 50 streams for any query. If additional results are available, the API response includes a Meta field that indicates the TotalCount and Offset.

{
"MessageStreams": [],
"TotalCount": 100,
"Offset": 0
}

The Offset can be used in a subsequent query to fetch additional results.

See Postmark's Docs for information about Postmark's paginated API, and this quickstart for information on looping over a paginated API in Prismatic.

Connections

Postmark Token Authentication

Access Tokens are necessary for interacting with the Postmark API. Access tokens are unique to each server you create in Postmark.

To generate an Access Token, you should log in to Postmark and navigate to your server page. Within the server settings, you can find your access tokens.

Postmark provides two types of access tokens:

  1. Server Token: This token is used to send emails and perform other server-related actions in Postmark.

  2. Account Token: This token is used to perform account-level actions, such as creating and managing servers.

For your integration, you will need both the Server Token and the Account Token.

For more information about access tokens, refer to the Postmark Docs.

InputNotesExample
Account Token
Server Token

Triggers

Webhook

Receive and validate webhook requests from Postmark for webhooks you configure. | key: postmarkWebhook


Actions

Create Server

Create a new server | key: createServer

InputNotesExample
Delivery Type

Specifies the type of environment for your server. Possible options: Live, Sandbox. Defaults to Live if not specified. This cannot be changed after the server has been created.

Live
Inbound Hook URL

URL to POST to every time an inbound event occurs.

http://hooks.example.com/inbound
Connection

The connection to use

Raw Email Enabled

When enabled, the raw email content will be included with inbound webhook payloads under the RawEmail key.

false
Server Color
Server Name

Filter by a specific server name. Note that this is a string search, so 'MyServer' will match 'MyServer', 'MyServer Production', and 'MyServer Test'.

Production01
SMTP API Activated

Specifies whether or not SMTP is enabled on this server.

false

Create Webhook

Create a new webhook | key: createWebhook

InputNotesExample
Connection

The connection to use

Triggers

A JSON object specifying the triggers for the webhook. Use the default structure as a guideline.

Webhook URL

Your webhook URL.

http://www.example.com/webhook-test-tracking

Delete Instanced Webhooks

Delete all webhooks that point to this instance | key: deleteInstancedWebhooks

InputNotesExample
Connection

The connection to use


Delete Server

Delete an existing server | key: deleteServer

InputNotesExample
Connection

The connection to use

Server ID

Delete Webhook

Delete a specific webhook | key: deleteWebhook

InputNotesExample
Connection

The connection to use

Webhook ID

The ID of the webhook to retrieve.

1234567

Edit Server

Edit an existing server | key: editServers

InputNotesExample
Enable SMTP API Error Hooksfalse
Inbound Hook URL

URL to POST to every time an inbound event occurs.

http://hooks.example.com/inbound
Connection

The connection to use

Raw Email Enabled

When enabled, the raw email content will be included with inbound webhook payloads under the RawEmail key.

false
Server Color
Server ID
Server Name

Filter by a specific server name. Note that this is a string search, so 'MyServer' will match 'MyServer', 'MyServer Production', and 'MyServer Test'.

Production01
SMTP API Activated

Specifies whether or not SMTP is enabled on this server.

false

Edit Server Using Server Token Account

Edit an existing server | key: editServer

InputNotesExample
Connection

The connection to use

Server Color
Server Name

Filter by a specific server name. Note that this is a string search, so 'MyServer' will match 'MyServer', 'MyServer Production', and 'MyServer Test'.

Production01

Edit Webhook

Edit an existing webhook | key: editWebhook

InputNotesExample
Connection

The connection to use

Triggers

A JSON object specifying the triggers for the webhook. Use the default structure as a guideline.

Webhook ID

The ID of the webhook to retrieve.

1234567
Webhook URL

Your webhook URL.

http://www.example.com/webhook-test-tracking

Get Server

Get server information | key: getServer

InputNotesExample
Connection

The connection to use


Get Server

Get an existing server by ID | key: getServers

InputNotesExample
Connection

The connection to use

Server ID

Get Webhook

Retrieve a specific webhook | key: getWebhook

InputNotesExample
Connection

The connection to use

Webhook ID

The ID of the webhook to retrieve.

1234567

List Servers

Get a list of all servers associated with the account | key: listServers

InputNotesExample
Count

Number of servers to return per request

Offset

Number of servers to skip

Connection

The connection to use

Server Name

Filter by a specific server name. Note that this is a string search, so 'MyServer' will match 'MyServer', 'MyServer Production', and 'MyServer Test'.

Production01

List Webhooks

List all webhooks for a server | key: listWebhooks

InputNotesExample
Connection

The connection to use

Show Only Instance Webhooks

Show only webhooks that point to this instance.

true

Raw Request

Send raw HTTP request to Postmark | key: rawRequest

InputNotesExample
Connection

The connection to use

Data

The HTTP body payload to send to the URL.

{"exampleKey": "Example Data"}
Debug Request

Enabling this flag will log out the current request.

false
File Data

File Data to be sent as a multipart form upload.

[{key: "example.txt", value: "My File Contents"}]
File Data File Names

File names to apply to the file data inputs. Keys must match the file data keys above.

Form Data

The Form Data to be sent as a multipart form upload.

[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header

A list of headers to send with the request.

User-Agent: curl/7.64.1
Max Retry Count

The maximum number of retries to attempt. Specify 0 for no retries.

0
Method

The HTTP method to use.

Query Parameter

A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

The type of data you expect in the response. You can request json, text, or binary data.

json
Retry On All Errors

If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.

false
Retry Delay (ms)

The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.

0
Timeout

The maximum time that a client will await a response to its request

2000
URL

Input the path only (/servers/9363760), The base URL is already included (https://api.postmarkapp.com). For example, to connect to https://api.postmarkapp.com/servers/9363760, only /servers/9363760 is entered in this field.

/servers/9363760
Use Exponential Backoff

Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.

false

Send Email

Send an email using Postmark | key: sendSingleEmail

InputNotesExample
Attachments

List of attachments

Bcc

Provide a string value for any blind carbon copied email address(es). Can pass multiple as comma separated. Maximum of 50 recipients per message

blind-copied@example.com
Cc

Provide a string value for any carbon copied email address(es). Can pass multiple as comma separated. Maximum of 50 recipients per message

copied@example.com
From Address

Provide a string value for the sender email address.

sender@example.com
Headers

List of custom headers to include.

Html Body

Provide specified HTML email message

Metadata

Custom metadata key/value pairs.

Connection

The connection to use

Reply To

Reply To override email address. Defaults to the Reply To set in the sender signature.

reply@example.com
Subject

Provide string value for the subject of the outgoing message

Test
Tag

Provide a string to categorize outgoing message

Invitation
Text Body

Provide a string for the body of the outgoing message

Hello
To Address

Provide a string value for the recipient(s) email address. Can pass multiple as comma separated. Maximum of 50 recipients per message

receiver@example.com
Track Opens

Activate open tracking for this email.

true

Send Email Batch

Send a batch of emails using Postmark | key: sendBatchEmail

InputNotesExample
Emails

Provide a JSON array of email objects. Each object should include the necessary email information.

Connection

The connection to use


Send Email Batch With Template

Send a batch of emails using a Postmark template | key: sendBatchEmailWithTemplate

InputNotesExample
Messages

The list of templates to send. Please note that we accept up to 500 messages per API call.

Connection

The connection to use


Send Email With Template

Send an email with a Postmark template | key: sendEmailWithTemplate

InputNotesExample
Attachments

List of attachments

Bcc

Provide a string value for any blind carbon copied email address(es). Can pass multiple as comma separated. Maximum of 50 recipients per message

blind-copied@example.com
Cc

Provide a string value for any carbon copied email address(es). Can pass multiple as comma separated. Maximum of 50 recipients per message

copied@example.com
From Address

Provide a string value for the sender email address.

sender@example.com
Headers

List of custom headers to include.

Html Body

Provide specified HTML email message

Inline Css

By default, if the specified template contains an HTMLBody, we will apply the style blocks as inline attributes to the rendered HTML content. You may opt-out of this behavior by passing false for this request field.

true
Metadata

Custom metadata key/value pairs.

Connection

The connection to use

Reply To

Reply To override email address. Defaults to the Reply To set in the sender signature.

reply@example.com
Subject

Provide string value for the subject of the outgoing message

Test
Tag

Provide a string to categorize outgoing message

Invitation
Template Alias

The alias of a template to use when sending this message. Required if TemplateId is not specified.

Template4
Template ID

ID of the template to use to send the email.

myTemplateId
Template Model

The template data to use with the email template

Text Body

Provide a string for the body of the outgoing message

Hello
To Address

Provide a string value for the recipient(s) email address. Can pass multiple as comma separated. Maximum of 50 recipients per message

receiver@example.com
Track Opens

Activate open tracking for this email.

true