Sending

Postmark sandbox: sandbox mode servers, the test token and the black hole

Short answer

Postmark offers three ways to test without emailing real people. A sandbox mode server processes messages through Postmark, including bounces and webhooks, but does not deliver them. The POSTMARK_API_TEST token only checks that a request is valid. The address test@blackhole.postmarkapp.com accepts and drops mail while showing it in Activity. Sandbox server sends and black hole sends count towards your monthly volume; the test token does not send anything.

Last checked 16 November 2026

Postmark gives you three separate testing tools, and searches for “Postmark sandbox” can mean any of them. A sandbox mode server runs mail through Postmark without delivering it. The POSTMARK_API_TEST token checks a request without sending anything. The black hole address, test@blackhole.postmarkapp.com, accepts mail and drops it. Each suits a different kind of test. The facts below come from Postmark’s sandbox mode guide and testing best practices, checked 16 November 2026.

The three ways to test on Postmark

Sandbox mode server POSTMARK_API_TEST token Black hole address
What it is A server set to sandbox mode A shared test API token test@blackhole.postmarkapp.com
Request validated Yes Yes Yes
Delivered to a real inbox No No No
Shows in Activity Processed by Postmark No Yes
Can test bounces and webhooks Yes No Not described
Counts towards monthly volume Yes No (nothing is sent) Yes

Sandbox mode servers

Postmark organises sending into servers, each with its own API token. A server can be put in sandbox mode. Postmark describes sandbox mode as a way to “safely test out different parts of Postmark without accidentally sending email to real recipients.” Test messages are not delivered to real inboxes, but they are still processed through Postmark’s infrastructure, and the API stays available for them.

That makes a sandbox server the closest thing to a full staging environment. Your app uses a sandbox server’s token in staging and a live server’s token in production. Postmark’s docs say you can test bounces and webhooks this way.

The catch: Postmark’s docs say emails sent through sandbox servers do count towards your monthly sending volume. On the free Developer plan, which includes 100 emails a month according to postmarkapp.com/pricing (checked 16 November 2026), a busy test suite can use that up quickly.

The POSTMARK_API_TEST token

Postmark publishes a test token, POSTMARK_API_TEST, that you can use in place of a real server token:

curl https://api.postmarkapp.com/email \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Postmark-Server-Token: POSTMARK_API_TEST" \
  -d '{
    "From": "hello@yourdomain.com",
    "To": "sam@example.com",
    "Subject": "Test",
    "TextBody": "Hello"
  }'

Postmark confirms the request is valid and accepted, but the message is not sent, does not appear in Activity and cannot simulate a bounce. Use it in CI to check that your code builds a valid request, the same way you would use a mock.

The black hole address

Sending to test@blackhole.postmarkapp.com through a normal server lets you exercise the real sending path. Postmark shows the message in Activity, then drops it without delivering. Postmark notes that each email sent to that address counts towards your monthly limit.

Postmark also has fake bounce addresses for simulating bounces, and says those do not count towards your bounce limits. They are covered in the same testing guide.

Sandbox is not the same as pending approval

Many people searching for a Postmark sandbox have hit a different restriction. New accounts are reviewed before they can send to anyone, and until approval the API returns error 412: “While your account is pending approval, all recipient addresses must share the same domain as the From address” (Postmark API overview, checked 16 November 2026).

That is not sandbox mode. Real mail is delivered, but only to your own domain. Our Postmark sending limits page covers the approval errors and the other limits.

Which one to use

  • Unit tests and CI: the POSTMARK_API_TEST token, or a mock. Nothing is sent and nothing is counted.
  • Staging, including webhooks: a sandbox mode server, accepting that sends count towards volume.
  • A quick end-to-end check on a live server: the black hole address.
  • Rendering and inbox placement: none of these. Send to real mailboxes you own.

Our guide to email testing in staging compares these with local SMTP catchers.

Keeping test traffic within your volume

Because sandbox server sends and black hole sends both count towards your monthly volume, a test suite that sends on every commit can use a real share of your plan. Some ways to keep it down:

  • Run the full email path only on the main branch or before a release, and use the test token or mocks on every other run.
  • Send one representative email per template rather than one per test case.
  • Keep a separate Postmark server for staging, so its usage is easy to see apart from production.
  • Review your monthly usage after adding new tests, especially on the free Developer plan.

If you are unsure which tool a failing test used, check the token in its environment first. A request made with POSTMARK_API_TEST will never appear in Activity, which is often why a test email seems to have vanished.

How Mailcandor compares

Mailcandor keeps testing simpler, with fewer options. POST /v1/emails/check runs content checks without sending, and GET /v1/whoami tests a key. New teams start in a sandbox where mail can only go to team members, and verifying the first domain ends it for good. There is no manual approval step. Mailcandor does not offer a non-delivering sandbox server like Postmark’s, so for webhook tests in staging, send to an address you own. See the sandbox explained.

Mailcandor accepts Postmark’s POST /email and /email/batch calls with the X-Postmark-Server-Token header, though Postmark templates are not supported. See switching from Postmark, the comparison and pricing. Access is currently by request.

Questions

What is a Postmark sandbox server?

A server in sandbox mode. Messages go through Postmark's infrastructure and the API works as normal, but nothing is delivered to real inboxes. It is meant for testing bounces, webhooks and other parts of Postmark safely.

Do Postmark sandbox emails count towards my monthly limit?

Yes. Postmark's docs say emails sent through sandbox servers count towards your monthly sending volume, and so do emails to the black hole address.

What does POSTMARK_API_TEST do?

It is a test API token you can use instead of a real one. Postmark checks the request is valid and accepted, but the message is not sent, does not appear in Activity and cannot simulate bounces.

What is test@blackhole.postmarkapp.com?

A test address. Postmark accepts mail to it, shows it in Activity, then drops it without delivering. Each send counts towards your monthly limit.

Why can I only send to my own domain on Postmark?

That is the pending-approval rule, not the sandbox. Until your account is approved, every recipient must share the From address's domain.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.