Lets you manage servers for a specific account.
Accept |
required application/json |
---|---|
X-Postmark-Account-Token |
required This request requires account level privileges. Only accessible by the account owner, this token can be found on the API Tokens tab of your Postmark account. |
curl "https://api.postmarkapp.com/servers/{serverid}" \
-X GET \
-H "Accept: application/json" \
-H "X-Postmark-Account-Token: account token"
ID | integer |
ID of server |
---|---|---|
Name | string |
Name of server |
ApiTokens | array |
List of API tokens associated with server. |
Color | string |
Color of the server in the server list, for quick identification. |
SmtpApiActivated | boolean |
Specifies whether or not SMTP is enabled on this server. |
RawEmailEnabled | boolean |
When enabled, the raw email content will be included with inbound webhook payloads under the |
DeliveryType | string |
Specifies the type of environment for your server. Possible options: |
ServerLink | string |
URL to your server overview page in Postmark. |
InboundAddress | string |
Inbound email address |
InboundHookUrl | string |
URL to POST to every time an inbound event occurs. |
BounceHookUrl | string |
URL to POST to every time a bounce event occurs. |
OpenHookUrl | string |
URL to POST to every time an open event occurs. |
DeliveryHookUrl | string |
URL to POST to every time email is delivered. |
PostFirstOpenOnly | boolean |
If set to true, only the first open by a particular recipient will initiate the open webhook. Any subsequent opens of the same email by the same recipient will not initiate the webhook. |
InboundDomain | string |
Inbound domain for MX setup |
InboundHash | string |
The inbound hash of your inbound email address. |
InboundSpamThreshold | integer |
The maximum spam score for an inbound message before it's blocked. |
TrackOpens | boolean |
Indicates if all emails being sent through this server have open tracking enabled. |
TrackLinks | string |
Indicates if all emails being sent through this server should have link tracking enabled for links in their HTML or Text bodies. Possible options: |
IncludeBounceContentInHook | boolean |
Include bounce content in webhook. |
ClickHookUrl | string |
URL to POST to when a unique click event occurs. |
EnableSmtpApiErrorHooks | boolean |
Specifies whether or not SMTP API Errors will be included with bounce webhooks. |
HTTP/1.1 200 OK
Content-Type: application/json
{
"ID": 1,
"Name": "Staging Testing",
"ApiTokens": [
"server token"
],
"Color": "red",
"SmtpApiActivated": true,
"RawEmailEnabled": false,
"DeliveryType": "Live",
"ServerLink": "https://postmarkapp.com/servers/1/streams",
"InboundAddress": "yourhash@inbound.postmarkapp.com",
"InboundHookUrl": "http://hooks.example.com/inbound",
"BounceHookUrl": "http://hooks.example.com/bounce",
"OpenHookUrl": "http://hooks.example.com/open",
"DeliveryHookUrl": "http://hooks.example.com/delivery",
"PostFirstOpenOnly": false,
"InboundDomain": "",
"InboundHash": "yourhash",
"InboundSpamThreshold": 0,
"TrackOpens": false,
"TrackLinks": "None",
"IncludeBounceContentInHook": true,
"ClickHookUrl": "http://hooks.example.com/click",
"EnableSmtpApiErrorHooks": false
}
Content-Type |
required application/json |
---|---|
Accept |
required application/json |
X-Postmark-Account-Token |
required This request requires account level privileges. Only accessible by the account owner, this token can be found on the API Tokens tab of your Postmark account. |
curl "https://api.postmarkapp.com/servers" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Postmark-Account-Token: account token" \
-d '{
"Name": "Production",
"Color": "Purple"
}'
Name | string |
required Name of server |
---|---|---|
Color | string |
Color of the server in the server list, for quick identification. |
SmtpApiActivated | boolean |
Specifies whether or not SMTP is enabled on this server. |
RawEmailEnabled | boolean |
When enabled, the raw email content will be included with inbound webhook payloads under the |
DeliveryType | string |
Specifies the type of environment for your server. Possible options: |
InboundHookUrl | string |
URL to POST to every time an inbound event occurs. |
BounceHookUrl | string |
deprecated Use the Bounce Webhook API instead. |
OpenHookUrl | string |
deprecated Use the Open Tracking Webhook API instead. |
DeliveryHookUrl | string |
deprecated Use the Delivery Webhook API instead. |
PostFirstOpenOnly | boolean |
If set to |
InboundDomain | string |
Inbound domain for MX setup. |
InboundSpamThreshold | integer |
The maximum spam score for an inbound message before it's blocked. |
TrackOpens | boolean |
Indicates if all emails being sent through this server have open tracking enabled. |
TrackLinks | string |
Indicates if all emails being sent through this server should have link tracking enabled for links in their HTML or Text bodies. Possible options: |
IncludeBounceContentInHook | boolean |
Include bounce content in webhook. |
ClickHookUrl | string |
deprecated Use the Click Webhook API instead. |
EnableSmtpApiErrorHooks | boolean |
Specifies whether or not SMTP API Errors will be included with bounce webhooks. |
{
"Name": "Staging Testing",
"Color": "red",
"SmtpApiActivated": true,
"RawEmailEnabled": false,
"DeliveryType": "Live",
"InboundHookUrl": "http://hooks.example.com/inbound",
"BounceHookUrl": "http://hooks.example.com/bounce",
"OpenHookUrl": "http://hooks.example.com/open",
"DeliveryHookUrl": "http://hooks.example.com/delivery",
"PostFirstOpenOnly": false,
"InboundDomain": "",
"InboundSpamThreshold": 5,
"TrackOpens": false,
"TrackLinks": "None",
"IncludeBounceContentInHook": true,
"ClickHookUrl": "http://hooks.example.com/click",
"EnableSmtpApiErrorHooks": false
}
ID | integer |
ID of server |
---|---|---|
Name | string |
Name of server |
ApiTokens | array |
List of API tokens associated with server. |
Color | string |
Color of the server in the rack screen. |
SmtpApiActivated | boolean |
Specifies whether or not SMTP is enabled on this server. |
RawEmailEnabled | boolean |
When enabled, the raw email content will be included with inbound webhook payloads under the |
DeliveryType | string |
Specifies the type of environment for your server. Possible options: |
ServerLink | string |
URL to your server overview page in Postmark. |
InboundAddress | string |
Inbound email address |
InboundHookUrl | string |
URL to POST to every time an inbound event occurs. |
BounceHookUrl | string |
URL to POST to every time a bounce event occurs. |
OpenHookUrl | string |
URL to POST to every time an open event occurs. |
DeliveryHookUrl | string |
URL to POST to every time email is delivered. |
PostFirstOpenOnly | boolean |
If set to true, only the first open by a particular recipient will initiate the open webhook. Any subsequent opens of the same email by the same recipient will not initiate the webhook. |
InboundDomain | string |
Inbound domain for MX setup. |
InboundHash | string |
The inbound hash of your inbound email address. |
InboundSpamThreshold | integer |
The maximum spam score for an inbound message before it's blocked. |
TrackOpens | boolean |
Indicates if all emails being sent through this server have open tracking enabled. |
TrackLinks | string |
Indicates if all emails being sent through this server should have link tracking enabled for links in their HTML or Text bodies. Possible options: |
IncludeBounceContentInHook | boolean |
Include bounce content in webhook. |
ClickHookUrl | string |
URL to POST to when a unique click event occurs. |
EnableSmtpApiErrorHooks | boolean |
Specifies whether or not SMTP API Errors will be included with bounce webhooks. |
HTTP/1.1 200 OK
Content-Type: application/json
{
"ID": 1,
"Name": "Staging Testing",
"ApiTokens": [
"server token"
],
"Color": "red",
"SmtpApiActivated": true,
"RawEmailEnabled": false,
"DeliveryType": "Live",
"ServerLink": "https://postmarkapp.com/servers/1/streams",
"InboundAddress": "yourhash@inbound.postmarkapp.com",
"InboundHookUrl": "http://hooks.example.com/inbound",
"BounceHookUrl": "http://hooks.example.com/bounce",
"OpenHookUrl": "http://hooks.example.com/open",
"DeliveryHookUrl": "http://hooks.example.com/delivery",
"PostFirstOpenOnly": false,
"InboundDomain": "",
"InboundHash": "yourhash",
"InboundSpamThreshold": 5,
"TrackOpens": false,
"TrackLinks": "None",
"IncludeBounceContentInHook": true,
"ClickHookUrl": "http://hooks.example.com/click",
"EnableSmtpApiErrorHooks": false
}
Content-Type |
required application/json |
---|---|
Accept |
required application/json |
X-Postmark-Account-Token |
required This request requires account level privileges. Only accessible by the account owner, this token can be found on the API Tokens tab of your Postmark account. |
curl "https://api.postmarkapp.com/servers/{serverid}" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Postmark-Account-Token: account token" \
-d '{
"Name": "Production 2",
"Color": "Blue"
}'
Name | string |
Name of server |
---|---|---|
Color | string |
Color of the server in the server list, for quick identification. |
SmtpApiActivated | boolean |
Specifies whether or not SMTP is enabled on this server. |
RawEmailEnabled | boolean |
When enabled, the raw email content will be included with inbound webhook payloads under the |
InboundHookUrl | string |
URL to POST to every time an inbound event occurs. |
BounceHookUrl | string |
deprecated Use the Bounce Webhook API instead. |
OpenHookUrl | string |
deprecated Use the Open Tracking Webhook API instead. |
DeliveryHookUrl | string |
deprecated Use the Delivery Webhook API instead. |
PostFirstOpenOnly | boolean |
If set to |
InboundDomain | string |
Inbound domain for MX setup. |
InboundSpamThreshold | integer |
The maximum spam score for an inbound message before it's blocked. |
TrackOpens | boolean |
Indicates if all emails being sent through this server have open tracking enabled. |
TrackLinks | string |
Indicates if all emails being sent through this server should have link tracking enabled for links in their HTML or Text bodies. Possible options: |
IncludeBounceContentInHook | boolean |
Include bounce content in webhook. |
ClickHookUrl | string |
deprecated Use the Click Webhook API instead. |
EnableSmtpApiErrorHooks | boolean |
Specifies whether or not SMTP API Errors will be included with bounce webhooks. |
{
"Name": "Production 2",
"Color": "blue",
"SmtpApiActivated": false,
"RawEmailEnabled": false,
"InboundHookUrl": "http://hooks.example.com/inbound",
"BounceHookUrl": "http://hooks.example.com/bounce",
"OpenHookUrl": "http://hooks.example.com/open",
"DeliveryHookUrl": "http://hooks.example.com/delivery",
"PostFirstOpenOnly": false,
"InboundDomain": "",
"InboundSpamThreshold": 0,
"TrackOpens": false,
"TrackLinks": "None",
"IncludeBounceContentInHook": true,
"ClickHookUrl": "http://hooks.example.com/click",
"EnableSmtpApiErrorHooks": false
}
ID | integer |
ID of server |
---|---|---|
Name | string |
Name of server |
ApiTokens | array |
List of API tokens associated with server. |
Color | string |
Color of the server in the rack screen. |
SmtpApiActivated | boolean |
Specifies whether or not SMTP is enabled on this server. |
RawEmailEnabled | boolean |
When enabled, the raw email content will be included with inbound webhook payloads under the |
DeliveryType | string |
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. |
ServerLink | string |
URL to your server overview page in Postmark. |
InboundAddress | string |
Inbound email address |
InboundHookUrl | string |
URL to POST to every time an inbound event occurs. |
BounceHookUrl | string |
URL to POST to every time a bounce event occurs. |
OpenHookUrl | string |
URL to POST to every time an open event occurs. |
DeliveryHookUrl | string |
URL to POST to every time email is delivered. |
PostFirstOpenOnly | boolean |
If set to true, only the first open by a particular recipient will initiate the open webhook. Any subsequent opens of the same email by the same recipient will not initiate the webhook. |
InboundDomain | string |
Inbound domain for MX setup. |
InboundHash | string |
The inbound hash of your inbound email address. |
InboundSpamThreshold | integer |
The maximum spam score for an inbound message before it's blocked. |
TrackOpens | boolean |
Indicates if all emails being sent through this server have open tracking enabled. |
TrackLinks | string |
Indicates if all emails being sent through this server should have link tracking enabled for links in their HTML or Text bodies. Possible options: |
IncludeBounceContentInHook | boolean |
Include bounce content in webhook. |
ClickHookUrl | string |
URL to POST to when a unique click event occurs. |
EnableSmtpApiErrorHooks | boolean |
Specifies whether or not SMTP API Errors will be included with bounce webhooks. |
HTTP/1.1 200 OK
Content-Type: application/json
{
"ID": 1,
"Name": "Production Testing",
"ApiTokens": [
"Server Token"
],
"Color": "blue",
"SmtpApiActivated": false,
"RawEmailEnabled": false,
"DeliveryType": "Live",
"ServerLink": "https://postmarkapp.com/servers/1/streams",
"InboundAddress": "yourhash@inbound.postmarkapp.com",
"InboundHookUrl": "http://hooks.example.com/inbound",
"BounceHookUrl": "http://hooks.example.com/bounce",
"OpenHookUrl": "http://hooks.example.com/open",
"DeliveryHookUrl": "http://hooks.example.com/delivery",
"PostFirstOpenOnly": false,
"InboundDomain": "",
"InboundHash": "yourhash",
"InboundSpamThreshold": 0,
"TrackOpens": false,
"TrackLinks": "None",
"IncludeBounceContentInHook": true,
"ClickHookUrl": "http://hooks.example.com/click",
"EnableSmtpApiErrorHooks": false
}
Accept |
required application/json |
---|---|
X-Postmark-Account-Token |
required This request requires account level privileges. Only accessible by the account owner, this token can be found on the API Tokens tab of your Postmark account. |
curl "https://api.postmarkapp.com/servers?count=50&offset=0" \
-X GET \
-H "Accept: application/json" \
-H "X-Postmark-Account-Token: account token"
count | integer |
required Number of servers to return per request. |
---|---|---|
offset | integer |
required Number of servers to skip. |
name | string |
Filter by a specific server name. Note that this is a string search, so |
TotalCount | integer |
Number of servers retrieved |
---|---|---|
Servers | array |
List of servers |
ID | integer |
ID of server |
Name | string |
Name of server |
ApiTokens | array |
List of API tokens associated with server. |
Color | string |
Color of the server in the rack screen. |
SmtpApiActivated | boolean |
Specifies whether or not SMTP is enabled on this server. |
RawEmailEnabled | boolean |
When enabled, the raw email content will be included with inbound webhook payloads under the |
DeliveryType | string |
Specifies the type of environment for your server. Possible options: |
ServerLink | string |
URL to your server overview page in Postmark. |
InboundAddress | string |
Inbound email address |
InboundHookUrl | string |
URL to POST to every time an inbound event occurs. |
BounceHookUrl | string |
URL to POST to every time a bounce event occurs. |
OpenHookUrl | string |
URL to POST to every time an open event occurs. |
DeliveryHookUrl | string |
URL to POST to every time email is delivered. |
PostFirstOpenOnly | boolean |
If set to true, only the first open by a particular recipient will initiate the open webhook. Any subsequent opens of the same email by the same recipient will not initiate the webhook. |
InboundDomain | string |
Inbound domain for MX setup. |
InboundHash | string |
The inbound hash of your inbound email address. |
InboundSpamThreshold | integer |
The maximum spam score for an inbound message before it's blocked. |
TrackOpens | boolean |
Indicates if all emails being sent through this server have open tracking enabled. |
TrackLinks | string |
Indicates if all emails being sent through this server should have link tracking enabled for links in their HTML or Text bodies. Possible options: |
IncludeBounceContentInHook | boolean |
Include bounce content in webhook. |
ClickHookUrl | string |
URL to POST to when a unique click event occurs. |
EnableSmtpApiErrorHooks | boolean |
Specifies whether or not SMTP API Errors will be included with bounce webhooks. |
HTTP/1.1 200 OK
Content-Type: application/json
{
"TotalCount": 2,
"Servers": [
{
"ID": 1,
"Name": "Production01",
"ApiTokens": [
"server token"
],
"Color": "red",
"SmtpApiActivated": true,
"RawEmailEnabled": false,
"DeliveryType": "Live",
"ServerLink": "https://postmarkapp.com/servers/1/streams",
"InboundAddress": "yourhash@inbound.postmarkapp.com",
"InboundHookUrl": "http://inboundhook.example.com/inbound",
"BounceHookUrl": "http://bouncehook.example.com/bounce",
"OpenHookUrl": "http://openhook.example.com/open",
"DeliveryHookUrl": "http://hooks.example.com/delivery",
"PostFirstOpenOnly": true,
"InboundDomain": "",
"InboundHash": "yourhash",
"InboundSpamThreshold": 5,
"TrackOpens": false,
"TrackLinks": "None",
"IncludeBounceContentInHook": true,
"ClickHookUrl": "http://hooks.example.com/click",
"EnableSmtpApiErrorHooks": false
},
{
"ID": 2,
"Name": "Production02",
"ApiTokens": [
"server token"
],
"Color": "green",
"SmtpApiActivated": true,
"RawEmailEnabled": false,
"DeliveryType": "Sandbox",
"ServerLink": "https://postmarkapp.com/servers/2/streams",
"InboundAddress": "yourhash@inbound.postmarkapp.com",
"InboundHookUrl": "",
"BounceHookUrl": "",
"OpenHookUrl": "",
"DeliveryHookUrl": "http://hooks.example.com/delivery",
"PostFirstOpenOnly": false,
"InboundDomain": "",
"InboundHash": "yourhash",
"InboundSpamThreshold": 0,
"TrackOpens": true,
"TrackLinks": "HtmlAndText",
"IncludeBounceContentInHook": false,
"ClickHookUrl": "",
"EnableSmtpApiErrorHooks": false
}
]
}
Note: This feature is not enabled for all accounts. Please contact support if you have any questions.
Accept |
required application/json |
---|---|
X-Postmark-Account-Token |
required This request requires account level privileges. Only accessible by the account owner, this token can be found on the API Tokens tab of your Postmark account. |
curl "https://api.postmarkapp.com/servers/{serverid}" \
-X DELETE \
-H "Accept: application/json" \
-H "X-Postmark-Account-Token: account token"
ErrorCode | integer | |
---|---|---|
Message | string |
Response message |
HTTP/1.1 200 OK
Content-Type: application/json
{
"ErrorCode": 0,
"Message": "Server Production Server 2 removed."
}