Temporary Email API for Developers
Quick answer
What is a temporary email API?
- POST /v1/inboxes creates an address; GET /v1/inboxes/{id}/messages reads mail
- Verification codes are readable in JSON, so end-to-end signup tests never need a human
- Bearer-token auth, per-key rate limits and webhooks for push delivery
- Included in the Business plan; keys are created in your dashboard
Integrate temporary email functionality into your applications with our robust API. RESTful endpoints, real-time webhooks, and enterprise-grade features.
Powerful API Features for Developers
RESTful API
Simple HTTP endpoints with JSON responses, perfect for any programming language
Real-time Webhooks
Get instant notifications when emails arrive with customizable webhook endpoints
Secure Authentication
API key authentication with rate limiting and usage analytics
Global Infrastructure
High availability with 99.9% uptime SLA and global edge locations
Flexible Expiration
Configure email lifespans from minutes to weeks based on your needs
Team Management
Multiple API keys, usage quotas, and team collaboration features
Quick Start Code Examples
// Create a temporary email
const response = await fetch('https://api.temppostal.com/v1/emails', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
duration: '24h',
password_protected: true
})
});
const email = await response.json();
console.log(email.address); // temp123@disposable.meCommon API Use Cases
Testing & QA
Automate user registration testing with fresh email addresses for each test run
CI/CD Pipelines
Integrate email testing into your continuous integration workflows
Load Testing
Generate thousands of emails for stress testing email-dependent features
Demo Environments
Create realistic demo data with working email addresses
Customer Onboarding
Test onboarding flows without affecting real user emails
Email Campaigns
Test marketing campaigns before sending to real subscribers
Comprehensive API Documentation
Core Endpoints
/v1/emailsCreate email/v1/emails/{id}Get email info/v1/emails/{id}/messagesList messages/v1/emails/{id}Delete emailAdvanced Features
- Webhook notifications for real-time updates
- Bulk operations for high-volume use cases
- Custom domains for branded emails
- Rate limiting and usage analytics
- SDKs for popular programming languages
Temporary Email API FAQ
How do I get started with the Temporary Email API?
Sign up for a free account, generate an API key from your dashboard, and start making REST API calls. Our documentation includes examples in JavaScript, Python, cURL, and more.
What programming languages does the API support?
Our RESTful API works with any programming language that can make HTTP requests. We provide SDKs and examples for JavaScript/Node.js, Python, PHP, Ruby, Go, and cURL.
What are the API rate limits?
Rate limits depend on your plan: Starter (100 requests/min), Pro (1,000 requests/min), Enterprise (custom). All plans include burst allowances for temporary spikes.
What teams build with the temporary email API
The most common use is end-to-end signup testing. A test creates an inbox, submits the registration form with that address, polls the messages endpoint until the verification email lands, extracts the confirmation link or one-time code, and completes the flow - all inside a single CI job with no shared QA mailbox to clean up.
The same pattern covers password-reset regression tests, invitation and team-onboarding flows, transactional email QA (checking the rendered subject line, sender and link targets of your own product emails), and deliverability spot-checks across providers. Because each test owns a unique address, suites run in parallel without collisions and there is nothing to reset between runs.
Support and product teams use it differently: short-lived addresses for demo accounts, vendor trials and sandbox environments that should never touch a corporate mailbox or a real customer domain.
How the API is priced and rate-limited
API access is part of the Business plan. Each key carries its own rate limit and usage counter, both visible in the dashboard, so a runaway test loop degrades one key rather than your whole account. Keys can be rotated or revoked at any time without redeploying, and separate keys per environment keep CI, staging and local development independently observable.
Messages returned by the API follow the same retention as the rest of the account: 48 hours on the free tier and up to 30 days on paid plans. Deletion is permanent, so archive anything an audit trail needs before the retention window closes.
Frequently asked questions
How do I get a temporary email API key?
Create a Temp Postal account, open the dashboard's API section and generate a key. Keys are shown once, use bearer-token authentication, and can be scoped per environment so CI, staging and local runs have separate limits and usage counters.
Can the API read verification codes and OTPs?
Yes. Inbound messages are exposed as JSON with subject, sender, plain-text body, HTML body and links, so a test can regex out a six-digit code or click-through URL. Messages are typically retrievable within two seconds of delivery.
Is there a webhook instead of polling?
Yes. Register a webhook URL and Temp Postal POSTs each inbound message to it as it arrives, which removes polling latency from CI runs. Polling remains available for environments that cannot expose a public endpoint.
What are the API rate limits?
Limits are applied per key and shown live in the dashboard alongside current usage. If a suite needs more headroom, split it across multiple keys or contact support about a higher tier - requests over the limit return HTTP 429 with a retry hint rather than failing silently.
How long do API-created inboxes live?
Inboxes follow account retention: 48 hours free, up to 30 days on paid plans. You can also delete an inbox explicitly at the end of a test so nothing lingers longer than the run that created it.
Is the temporary email API free?
The web inbox is free forever, but programmatic access is a Business-plan feature. That funds the dedicated infrastructure the API runs on, which is why API latency and delivery are not affected by free-tier traffic.
Which languages and frameworks are supported?
Any HTTP client works - the API is plain REST with JSON. The documentation includes copy-paste examples for JavaScript/TypeScript, Python, Go, PHP and cURL, and the endpoints slot directly into Playwright, Cypress, Selenium and pytest suites.
Keep reading
Explore Related Email Privacy Services
Discover our full suite of email privacy tools designed to keep your inbox clean and your identity protected in 2026.
Temporary Email
Professional temporary email service with API access and enterprise features.
Disposable Email
Self-destructing disposable email addresses that leave no trace behind.
Fake Email
Realistic fake email addresses for safe testing and one-time signups.
Fake Gmail
Safe Gmail-style alternative addresses with complete privacy protection.
Throwaway Email
One-time use throwaway addresses that auto-expire and vanish completely.
Burner Email
Anonymous burner email addresses for maximum privacy and security.
Ready to Integrate Temporary Email?
Start building with our powerful API today. Get your API key in minutes.