Introducing OTP Email Service: Send verification codes with your custom template

API Documentation

Get Started

  • Free 1000 credits
  • Unlimited API Keys
  • Full API access

Base URL

https://api.emailkit.app/api/

Introduction

EmailKit provides a powerful yet simple API for email validation. Our service helps you verify email addresses, prevent fake signups, and maintain clean email lists. With our generous free tier, you can validate up to 50,000 emails per month at no cost.

Quick Start

Get started with EmailKit in minutes. Follow these simple steps to begin validating email addresses.

1

Create an Account

Sign up for a free EmailKit account. No credit card required.

2

Generate API Key

Navigate to the Dashboard and create an API key. You can create up to 3 API keys for different environments or applications.

3

Make Your First Request

Use your API key to make your first email validation request.

curl -X POST \
  https://api.emailkit.app/api/validate-email \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'

Pro Tip

Create separate API keys for development and production environments. This helps you track usage and maintain security.

Authentication

All API requests require authentication using an API key. You can create up to 3 API keys in your dashboard. Include your API key in the Authorization header of all requests.

Example Request

cURL
curl -X POST \
  https://api.emailkit.app/api/validate-email \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'

Email Validation

POST/validate

Validate an email address and get detailed information about its validity, including format checking, domain validation, and disposable email detection.

Real-Time Validation Process

EmailKit performs comprehensive real-time email validation through multiple verification steps.

Instant Checks

  • Email format validation
  • Disposable email detection

DNS Checks

  • MX record verification
  • Domain blacklist checking

SMTP Verification

  • Mail server connection test
  • Mailbox existence verification

Response Time

  • Average response time: 1-3 seconds
  • Timeout after 10 seconds

Validation Process

All checks are performed in real-time for each request. The API returns results only after completing all validation steps or reaching the timeout limit.

One-Time Password (OTP) API

Generate and verify secure one-time passwords with two flexible integration options. Both endpoints provide identical responses while offering different delivery methods. You can customise the OTP template to match your brand in the EmailKit dashboard.

POST
/api/v2/generate-otp
Recommended

Generates an OTP and automatically sends it using your custom email template via EmailKit's delivery service.

Headers Required

{
  "x-api-key": "YOUR_API_KEY",
  "Content-Type": "application/json"
}

Request

{
  "email": "user@example.com"
}

Response

{
  "success": true,
  "otp": "123456",
  "expiresAt": "2024-02-20T15:30:00Z",
  "email": "user@example.com"
}
POST
/api/generate-otp

Generates an OTP and returns it for use with your own email delivery service.

Headers Required

{
  "x-api-key": "YOUR_API_KEY",
  "Content-Type": "application/json"
}

Request

{
  "email": "user@example.com"
}

Response

{
  "success": true,
  "otp": "123456",
  "expiresAt": "2024-02-20T15:30:00Z",
  "email": "user@example.com"
}
POST
/api/verify-otp

Verifies an OTP and returns the result.

Headers Required

{
  "x-api-key": "YOUR_API_KEY",
  "Content-Type": "application/json"
}

Request

{
  "email": "user@example.com",
  "otp": "123456"
}

Response

{
  "success": true,
  "message": "OTP verified successfully"
}

Features

  • Secure 6-digit OTP generation
  • 15-minute validity period
  • Single-use verification
  • Rate limiting protection

Usage Notes

  • OTPs expire after 15 minutes
  • Each OTP can only be used once
  • Rate limited to prevent abuse
  • Requires valid API key authentication

Example Usage

// Using EmailKit's email delivery service
const response = await fetch('https://api.emailkit.app/api/v2/generate-otp', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    email: 'user@example.com'
  })
});

// Using your own email delivery service
const response = await fetch('https://api.emailkit.app/api/generate-otp', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    email: 'user@example.com'
  })
});

We only count successful OTP generation and verification requests towards your monthly usage limit. Using our email delivery service counts as an additional email credit. If you encounter any issues, please contact us.

Rate Limits

Current Limits

Requests per 15 minutes1,000
Limit applies toPer API Key

Rate limits are applied on a per-API key basis. Each API key can make up to 1,000 requests every 15 minutes. When you exceed the rate limit, requests will return a 429 Too Many Requests response.

Rate Limit Response Example

JSON
{
                  "error": "Too many requests, please try again later.",
                  "retryAfter": 1732656100
                }

Response Fields

  • errorHuman-readable error message
  • retryAfterUnix timestamp indicating when the rate limit will reset

Response Codes

The API uses standard HTTP response codes to indicate the success or failure of requests.

CodeStatusDescription
200OKThe request was successful
400Bad RequestThe request is missing required parameters (e.g., email address)
401UnauthorizedMissing or invalid API key
429Too Many RequestsRate limit exceeded or monthly usage limit reached
500Internal Server ErrorAn error occurred while processing the request

Error Response Example

JSON
{
                  "error": "Invalid API key",
                  "status": 401
                }

Example Responses

The API returns detailed validation results for each email address. Here are example responses for different scenarios.

Valid Gmail Address

DELIVERABLE
{
                  "email": "user@gmail.com",
                  "deliverability": "DELIVERABLE",
                  "quality_score": 0.90,
                  "is_disposable_email": false,
                  "is_valid_format": true,
                  "is_free_email": true,
                  "is_role_email": false,
                  "is_catchall_email": false,
                  "is_mx_found": true,
                  "is_smtp_valid": true
                }

Role-Based Email

RISKY
{
                  "email": "info@company.com",
                  "deliverability": "RISKY",
                  "quality_score": 0.60,
                  "is_disposable_email": false,
                  "is_valid_format": true,
                  "is_free_email": false,
                  "is_role_email": true,
                  "is_catchall_email": false,
                  "is_mx_found": true,
                  "is_smtp_valid": true
                }

Disposable Email

UNDELIVERABLE
{
                  "email": "test@tempmail.com",
                  "deliverability": "UNDELIVERABLE",
                  "quality_score": 0.20,
                  "is_disposable_email": true,
                  "is_valid_format": true,
                  "is_free_email": false,
                  "is_role_email": false,
                  "is_catchall_email": false,
                  "is_mx_found": true,
                  "is_smtp_valid": false
                }

Response Fields

deliverabilitySTRING

Email delivery status: DELIVERABLE, RISKY, UNDELIVERABLE, or ERROR

quality_scoreNUMBER

Score between 0 and 1 indicating overall email quality

is_disposable_emailBOOLEAN

Whether the email is from a temporary/disposable email service

is_valid_formatBOOLEAN

Whether the email format is syntactically valid

is_free_emailBOOLEAN

Whether the email is from a free provider (Gmail, Yahoo, etc.)

is_role_emailBOOLEAN

Whether it's a role-based address (info@, support@, etc.)

is_catchall_emailBOOLEAN

Whether the domain accepts all incoming emails

is_smtp_validBOOLEAN

Whether the email address exists and can receive emails

Changelog

Latest
v1.3.0December 29, 2024
New Feature

OTP Email Delivery Service

Introducing our new OTP email delivery service with customizable templates. Send verification codes directly through EmailKit's infrastructure.

  • New endpoint: /api/v2/generate-otp
  • Customizable email templates
  • Reliable email delivery infrastructure
  • Consistent 15-minute OTP expiry

Template Customization

Design

Choose from pre-built templates or create your own

Preview

Live preview with test OTP codes

Deploy

Instantly update your email template

Integration Options

EmailKit Delivery

/api/v2/generate-otp

Self-hosted Delivery

/api/generate-otp
v1.2.0November 15, 2024
Security Update

Two-Factor Authentication (2FA)

  • Added email-based two-factor authentication
  • Enhanced account security options
  • Improved session management
v1.1.0October 10, 2024
  • Added bulk email validation
  • Improved API response times
  • Enhanced validation accuracy
v1.0.0September 1, 2024
  • Initial release
  • Single email validation
  • Basic API functionality