Overview

Integration

User guide

API reference

Webhooks

Server API

Lets you get or edit details for a specific server using the X-Postmark-Server-Token for authentication.

Get the server Try →

Request headers

Accept required
application/json
X-Postmark-Server-Token required
This request requires server level privileges. This token can be found on the Credentials tab under your Postmark server.
get

/server

Example request with curl

curl "https://api.postmarkapp.com/server" \
  -X GET \
  -H "Accept: application/json" \
  -H "X-Postmark-Server-Token: server token"

Response

ID integer ID of server
Name string Name of server
ApiTokens array List of API tokens associated with server.
ServerLink string URL to your server overview page in Postmark.
Color string Color of the server in the rack screen. Purple Blue Turqoise Green Red Yellow Grey
SmtpApiActivated boolean Specifies whether or not SMTP is enabled on this server.
RawEmailEnabled boolean Allow raw email to be sent with inbound.
DeliveryHookUrl string URL to POST to every time email is delivered.
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.
IncludeBounceContentInHook boolean Include bounce content in webhook.
OpenHookUrl string URL to POST to every time an open event occurs.
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.
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: None HtmlAndText HtmlOnly TextOnly
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.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "ID": 1,
  "Name": "Staging Testing",
  "ApiTokens": [
    "server token"
  ],
  "ServerLink": "https://postmarkapp.com/servers/1/overview",
  "Color": "red",
  "SmtpApiActivated": true,
  "RawEmailEnabled": false,
  "DeliveryHookUrl": "http://hooks.example.com/delivery",
  "InboundAddress": "yourhash@inbound.postmarkapp.com",
  "InboundHookUrl": "http://hooks.example.com/inbound",
  "BounceHookUrl": "http://hooks.example.com/bounce",
  "IncludeBounceContentInHook": true,
  "OpenHookUrl": "http://hooks.example.com/open",
  "PostFirstOpenOnly": false,
  "TrackOpens": false,
  "TrackLinks" : "None",
  "InboundDomain": "",
  "InboundHash": "yourhash",
  "InboundSpamThreshold": 0
}
						

Edit the server Try →

Request headers

Content-Type required
application/json
Accept required
application/json
X-Postmark-Server-Token required
This request requires server level privileges. This token can be found on the Credentials tab under your Postmark server.
put

/server

Example request with curl

curl "https://api.postmarkapp.com/server" \
  -X PUT \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Postmark-Account-Token: account token" \
  -d "{Name: 'Production 2', Color: 'Blue'}"

Body format

Name string Name of server
Color string Color of the server in the rack screen. Purple Blue Turqoise Green Red Yellow Grey
RawEmailEnabled boolean Enable raw email to be sent with inbound.
SmtpApiActivated boolean Specifies whether or not SMTP is enabled on this server.
DeliveryHookUrl string URL to POST to every time email is delivered.
InboundHookUrl string URL to POST to every time an inbound event occurs.
BounceHookUrl string URL to POST to every time a bounce event occurs.
IncludeBounceContentInHook boolean Include bounce content in webhook.
OpenHookUrl string URL to POST to every time an open event occurs.
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.
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: None HtmlAndText HtmlOnly TextOnly
InboundDomain string Inbound domain for MX setup.
InboundSpamThreshold integer The maximum spam score for an inbound message before it's blocked.

Example body format

{
  "Name": "Production 2",
  "Color": "blue",
  "SmtpApiActivated": false,
  "RawEmailEnabled": false,
  "DeliveryHookUrl": "http://hooks.example.com/delivery",
  "InboundHookUrl": "http://hooks.example.com/inbound",
  "BounceHookUrl": "http://hooks.example.com/bounce",
  "IncludeBounceContentInHook": false,
  "OpenHookUrl": "http://hooks.example.com/open",
  "PostFirstOpenOnly": false,
  "TrackOpens": false,
  "TrackLinks" : "None",
  "InboundDomain": "",
  "InboundSpamThreshold": 10
}

Response

ID integer ID of server
Name string Name of server
ApiTokens array List of API tokens associated with server.
ServerLink string URL to your server overview page in Postmark.
Color string Color of the server in the rack screen. Purple Blue Turqoise Green Red Yellow Grey
SmtpApiActivated boolean Specifies whether or not SMTP is enabled on this server.
RawEmailEnabled boolean Allow raw email to be sent with inbound.
DeliveryHookUrl string URL to POST to every time email is delivered.
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.
IncludeBounceContentInHook boolean Include bounce content in webhook.
OpenHookUrl string URL to POST to every time an open event occurs.
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.
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: None HtmlAndText HtmlOnly TextOnly
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.

Example response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "ID": 1,
  "Name": "Production Testing",
  "ApiTokens": [
    "Server Token"
  ],
  "ServerLink": "https://postmarkapp.com/servers/1/overview",
  "Color": "blue",
  "SmtpApiActivated": false,
  "RawEmailEnabled": false,
  "DeliveryHookUrl": "http://hooks.example.com/delivery",
  "InboundAddress": "yourhash@inbound.postmarkapp.com",
  "InboundHookUrl": "http://hooks.example.com/inbound",
  "BounceHookUrl": "http://hooks.example.com/bounce",
  "IncludeBounceContentInHook": true,
  "OpenHookUrl": "http://hooks.example.com/open",
  "PostFirstOpenOnly": false,
  "TrackOpens": false,
  "TrackOpens": "None",
  "InboundDomain": "",
  "InboundHash": "yourhash",
  "InboundSpamThreshold": 10
}