100% ad-free. No ads, no pop-ups, no tracking.
See plans
Temp PostalTemp Postal
Home/API/overview

Temp Postal API

Integrate temporary email functionality into your applications with our powerful, developer-friendly API. Simple, fast, and reliable.

RESTful API

Simple HTTP requests with JSON responses

Real-time

Instant email generation and retrieval

Secure

API key authentication and rate limiting

Global CDN

Fast response times worldwide

API Playground

Test Temp Postal API endpoints with your API key

Rate Limit Usage

Premium250 / 1,000
25.0% used this month
Business12,000 / 50,000
24.0% used this month
Enterprise45,000 / 1,000,000
4.5% used this month

Getting Started

The Temp Postal API allows you to programmatically create temporary email addresses, retrieve messages, and manage inboxes for your applications.

Base URL

https://temppostal.com/api/v1

Authentication

Create a key in your dashboard and send it in the x-api-key header:

x-api-key: YOUR_API_KEY

An unknown or deactivated key returns 401.

Monthly allowance

  • • Free: no API access - calls return 402 with an upgrade message
  • • Premium: 1,000 requests/month, up to 5 keys
  • • Business: 50,000 requests/month, up to 25 keys

The allowance is shared across all of your keys and resets on the 1st of each calendar month (UTC). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; once the allowance is exhausted calls return 429.

API Access

Ready to Build?

Get your API key, start building in minutes, and scale up when you need more throughput.

REST API Webhooks Team access

Quick answer

What can you build with a temporary email API?

The Temp Postal REST API creates inboxes and reads their messages programmatically, so you can automate any flow that depends on receiving mail: end-to-end signup tests, password-reset verification, invite and onboarding checks, deliverability probes, and QA fixtures that need a clean inbox per run.
  • Create an inbox, poll for messages, assert on contents - three calls
  • One inbox per test keeps CI runs isolated and deterministic
  • API keys are managed from the dashboard on the Business plan
  • Per-minute rate limits matter more than monthly totals for CI

The shape of a typical integration

Almost every integration follows the same three steps. Create an inbox and keep the address. Drive your application so it sends mail to that address. Poll the messages endpoint until a message matching an expected subject or token appears, then assert on its contents or extract the link you need to follow.

Because the inbox belongs to a single test, 'the newest message' is unambiguous - there is no filtering against another engineer's run and no stale message from an earlier build. That is what removes the flakiness from email-dependent tests.

Designing for CI without flakiness

Poll on a short interval with a total timeout instead of sleeping for a fixed duration. Fixed sleeps are either too short, which produces intermittent failures, or too long, which multiplies your build time by the number of email tests.

Watch per-minute limits rather than monthly quotas. A suite that creates a hundred inboxes in a single build is bursty by nature, so if you hit a cap, batch inbox creation or reuse one inbox across assertions within a single test rather than across tests.

Treat message bodies as credentials. Verification links and reset tokens are live for the duration of the test, so extract and use them, but keep them out of build logs that anyone with repository access can read.

What the API is not for

It does not send mail. Inboxes are receive-only, so you cannot use it as an outbound relay or to test your own inbound-parsing pipeline by generating traffic from it.

It is not a durable mail store. Retention is short by design; if a test result needs to be archived, capture the parsed values in your test report rather than expecting the message to still exist later.

And it is not a way around third-party signup restrictions. Services that block disposable domains will still block them when the request comes from a script.

Frequently asked questions

How do I get an API key?

API access is included with the Business plan and keys are created and rotated from your dashboard. Treat the key like any other secret and store it in your CI secret manager rather than in the repository.

Is there a rate limit?

Yes, and the per-minute limit is the one that matters for test suites, which create inboxes in bursts. Design around it by batching creation rather than assuming the monthly total is the only constraint.

How quickly do messages become available?

Normally within a few seconds of the sender delivering them, since delivery is ordinary SMTP. Poll with a short interval and an overall timeout rather than a fixed wait.

Can I use the API to send email?

No. Inboxes are receive-only by design, which keeps the sending domains in good standing and prevents the service being used as a spam relay.

How long do API-created inboxes last?

They follow the same retention rules as the web inbox - 48 hours by default, with longer windows available on paid plans. Extract anything durable during the test.

Chat on WhatsApp