/csharp Temp Email API
Generate disposable inboxes, receive verification emails, and extract OTP codes programmatically — all from /csharp.
Why Use OpenInbox for /csharp Email Testing?
Email-dependent test flows are notoriously fragile when tied to real mailboxes. OpenInbox gives /csharp developers a clean, ephemeral inbox for every test run — with an API that returns emails in seconds, no IMAP or SMTP setup required.
- Test email signup flows in /csharp integration tests
- Verify OTP delivery in CI/CD pipelines without a real inbox
- Build email-dependent test fixtures that clean up automatically
- Automate account creation in QA and staging environments
- Validate transactional email content and formatting
- Load-test email delivery at scale using the API
Quick Start — /csharp
Install
npm install node-fetch # or use native fetch in Node 18+Create inbox & fetch emails
const API_KEY = 'YOUR_API_KEY';
const BASE = 'https://api.openinbox.io/api';
// 1. Create a temporary inbox
const inbox = await fetch(`${BASE}/inbox`, {
method: 'POST',
headers: { 'X-API-KEY': API_KEY, 'Content-Type': 'application/json' },
}).then((r) => r.json());
console.log('Inbox email:', inbox.email);
// 2. Poll for emails (retry up to 10× with 3s delay)
let email;
for (let i = 0; i < 10; i++) {
await new Promise((r) => setTimeout(r, 3000));
const { emails } = await fetch(
`${BASE}/inbound/api/emails?inboxEmail=${inbox.email}&limit=5`,
{ headers: { 'X-API-KEY': API_KEY } },
).then((r) => r.json());
if (emails.length > 0) { email = emails[0]; break; }
}
console.log('Subject:', email?.subject);
console.log('Body:', email?.textBody?.slice(0, 200));Key API Endpoints
Frequently Asked Questions
How do I get an OpenInbox API key for /csharp?
Sign up for OpenInbox and visit your account settings to generate an API key. Free accounts include limited API calls. Pro, Business, Premium, and 7-Day Pass plans unlock higher rate limits and additional features.
What is the base URL for the OpenInbox API?
All API requests go to https://api.openinbox.io/api/inbound/api. Authenticate with the X-API-KEY header. The API returns JSON for all operations.
How do I detect OTP codes in emails using /csharp?
Fetch the email's textBody field and run a regex like /\b(\d{4,8})\b/ against it to pull out the numeric code.
Can I create multiple inboxes in a single /csharp test run?
Yes — each POST /create call generates a new inbox. Pro, Business, Premium, and 7-Day Pass plans support parallel inbox creation without hitting rate limits, making them ideal for concurrent test suites.
Is the OpenInbox /csharp API suitable for production use?
The API is production-grade. For staging/test environments, the free tier is usually sufficient. For high-volume automation, use a Pro, Business, or 7-Day Pass plan which provides higher rate limits and SLA guarantees.
Related Pages
Explore More
Your private inbox is one click away
Free, instant, no registration needed. Works with any service. Expires automatically after 1 hour.
