⚡ Built for automation
Email Testing API
Programmatically receive and read emails, OTPs, and verification links. Plug testsmail into your QA suite, CI/CD pipeline, or end-to-end tests — with a free API key.
Quick start
- 1Generate a Developer API Key
Sign in and create your key from your profile (rotate it whenever you need).
- 2Route test mail with your applied token
Add the
X-Applied-Tokenheader so messages land in your inbox. - 3Read it back in your tests
Use your API key to fetch the message and assert on its contents.
// Node.js (Nodemailer) — route a test email to your inbox
const mailOptions = {
from: 'user@testsmail.com',
to: 'your-inbox@testsmail.com',
subject: 'Verification code',
headers: {
'X-Applied-Token': 'YOUR_APPLIED_TOKEN'
}
};
// Then read it back in your test via the testsmail API
// using your Developer API Key (from your profile).Frequently Asked Questions
Common questions about the testsmail email testing API.
What can I do with the testsmail email API?
You can programmatically receive and read emails sent to your inbox, making it ideal for automated QA, CI/CD pipelines, and end-to-end tests that verify signup, OTP, password-reset, and verification email flows.
How do I get an API key?
Sign in to your free testsmail account and generate a Developer API Key from your profile. You can rotate the key at any time if it is ever exposed.
How do I route mail to my account in tests?
Add the X-Applied-Token header (your unique applied token) to outgoing test emails. The message is then delivered to your private inbox, where your test can read it via the API.
Is the email API free?
Yes. Generating and using a developer API key is free, which makes testsmail a cost-effective choice for automated email testing.
Is it good for testing OTP and verification flows?
Yes. Because mail arrives instantly, the API is well suited to asserting on one-time passwords (OTP), magic links, and confirmation codes inside automated test suites.
Start automating your email tests
Create a free account, generate your API key, and ship with confidence.
Get your free API key