Set up DMARC and see who's sending email using your brand's domain.
Email API

A powerful email API to make email sending a breeze

Easy integration, reliable delivery, great documentation: integrate with the email API that developers love and start sending in minutes.

API documentation →

Start sending with Postmark’s email API in minutes

Integrating email into your product doesn’t have to be a pain. With our powerful RESTful email APIs and robust libraries in pretty much every programming language, integrating email is fast and easy—whether you’re sending transactional or bulk email.

Simpler applications can also use our reliable SMTP service.


// Send an email with the Postmark-PHP library
// Learn more ->

// Install with composer
composer require wildbit/postmark-php

// Import
use Postmark\PostmarkClient;

// Example request
$client = new PostmarkClient("server token");

$sendResult = $client->sendEmail(
  "Hello from Postmark!",
  "This is just a friendly 'hello' from your friends at Postmark."

# Send an email with the Postmark Ruby Gem
# Learn more ->

# Add the Postmark Ruby Gem to your Gemfile
gem 'postmark'

# Require gem
require 'postmark'

# Create an instance of Postmark::ApiClient

# Example request
  from: '',
  to: '',
  subject: 'Hello from Postmark',
  html_body: '<strong>Hello</strong> dear Postmark user.',
  track_opens: true

# Send an email with the Postmark Rails Gem
# Learn more ->

# Add this to your gemfile
gem 'postmark-rails'

# Add this to your config/application.rb file:
config.action_mailer.delivery_method = :postmark
config.action_mailer.postmark_settings = { :api_token => "POSTMARK_API_TEST" }

# Send the email
class TestMailer < ActionMailer::Base
  def hello
      :subject => 'Hello from Postmark',
      :to  => '',
      :from => '',
      :html_body => '<strong>Hello</strong> dear Postmark user.',
      :track_opens => 'true'

# Send an email with the Postmark Python library
# Learn more ->

# Install the Postmark Python library with pip from the command line:
pip install postmarker

# Import
from postmarker.core import PostmarkClient

# Create an instance of the Postmark client
postmark = PostmarkClient(server_token='POSTMARK-SERVER-API-TOKEN-HERE')

# Send an email
  Subject='Postmark test',
  HtmlBody='HTML body goes here'

// Send an email with the Postmark .NET library
// Learn more ->

// Install with NuGet
PM> Install-Package Postmark

// Import
using PostmarkDotNet;

// Example request
PostmarkMessage message = new PostmarkMessage {
    From = "",
    To = "",
    Subject = "Hello from Postmark",
    HtmlBody = "<strong>Hello</strong> dear Postmark user.",
    TextBody = "Hello dear postmark user.",
    ReplyTo = "",
    TrackOpens = true,
    Headers = new NameValueCollection {{ "CUSTOM-HEADER", "value" }}

PostmarkClient client = new PostmarkClient("POSTMARK_API_TEST");

PostmarkResponse response = client.SendMessage(message);

if(response.Status != PostmarkStatus.Success) {
    Console.WriteLine("Response was: " + response.Message);

// Send an email with the Postmark.js library
// Learn more ->

// Install with npm
npm install postmark --save

// Require
var postmark = require("postmark");

// Example request
var client = new postmark.ServerClient("server token");

    "From": "",
    "To": "",
    "Subject": "Test",
    "TextBody": "Hello from Postmark!"

# Send an email with curl
# Copy and paste this into terminal

curl "" \
  -X POST \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Postmark-Server-Token: POSTMARK_API_TEST" \
  -d "{From: '', To: '', Subject: 'Hello from Postmark', HtmlBody: '<strong>Hello</strong> dear Postmark user.'}"

It was incredibly easy to setup Postmark. In under 10 minutes I had the first test working and rolling it out to production was just as easy.

Say goodbye to email deliverability issues.

People always say “don’t set it and forget it” but we actually strive to help you do just that. Once you integrate with Postmark, you can count on us to get your emails delivered fast and reliably—so you can go back to building great products.

Been a Postmark customer for a very long time. Stability and deliverability is so good I sometimes go months without thinking about it. It just works.

Developer-friendly email API documentation

We take great care of our API documentation so that you have the information you need to easily integrate with Postmark. Plus, our handy API Explorer lets you test-drive API calls against your account and returns real data.

Screenshot of the Postmark API documentation

Great support as standard

Our knowledgeable support team is always on hand to help, whether it’s through 1-on-1 calls, webinars, email, live-chat or one of our many help docs and guides.

Customer Happiness Rating
  • 😃 Great (95%)
  • 🙂 Okay (2%)
  • 😔 Not Good (3%)

Customer feedback gathered through Help Scout over the past 60 days.

Email API features: Do more than just send email

With our flexible email APIs you can manage domains and templates, retrieve stats, process inbound email, and so much more. For many email providers, APIs are an afterthought. Here at Postmark, we think API-first.

Read the API docs →

More reasons to love Postmark’s email API service

  • Sandbox Mode

    A safe space to test and experiment

    With Sandbox Mode you can test and experiment with our API without the risk of accidentally sending email to real recipients.

  • Email authentication

    Email authentication made easy

    We guide you through setting up DMARC and SPF to help protect your domain from spoofing.

  • Webhooks

    Modular webhooks

    Notify your application every time an email is delivered, opened, bounces, or a link is clicked with webhooks.

Ready to get started?

Join thousands of businesses that already trust their email delivery to Postmark.

Still have questions?

  • Abdullah Al-hennawy Abdullah
  • Anita Pericic Anita

Ask us anything! We’re eager to help you with any problem or question you have…

Contact us