JavaScript Email Validation SDK
Validate emails in Node.js, React, or any JS framework. Full TypeScript support with enterprise-grade retry and typed errors.
Install
Install the MailOdds SDK from npm. Works with Node.js 16+ and includes TypeScript definitions.
Terminal
npm install @mailodds/sdkQuick Start: Validate a Single Email
Import the client, configure your API key, and validate with a single async call.
TypeScript
import { MailOdds } from '@mailodds/sdk';
const client = new MailOdds({ apiKey: 'YOUR_API_KEY' });
const result = await client.validate({ email: 'user@example.com' });
console.log(`Status: ${result.status}`);
console.log(`Action: ${result.action}`);
console.log(`Disposable: ${result.disposable}`);Bulk Validation
Create a batch job and retrieve results when processing completes.
TypeScript
const job = await client.batch.create({ file: 'contacts.csv' });
const results = await client.batch.results(job.id);SDK Features
Built-in retry with exponential backoff
Automatic retries for 429 and 5xx responses with configurable backoff
Typed error classes
InsufficientCreditsError, RateLimitError, AuthenticationError, MailOddsError
Webhook HMAC-SHA256 verification
Verify webhook signatures with a single method call
Full TypeScript types
Complete type definitions for all request and response objects
Frequently Asked Questions
Related Resources
Start validating emails in JavaScript
Install the SDK and validate your first email in under 2 minutes. Free tier included, no credit card required.