Zero-Config Microservice Engine

Universal Email & OTP Delivery Service

The service autonomously generates, delivers, resends, and verifies OTP codes. No custom OTP passing required. Setup your Gmail App Password to generate your private Secret Key, and call the minimal APIs.

Active API Secret Key
Sender: Not Configured (Register or Sign In below)
Pass via header: x-api-key
How the Service Works (3 Simple Steps)
Designed for minimal developer integration with high-grade security.
1

Register Your Email Credentials

Switch to Configure & Keys and provide your support email and 16-character Google App Password. The service verifies the connection and gives you a private sec_live_... Secret Key.

2

Call Send OTP API from Your Backend

When a user signs up or requests a password reset, your backend sends a POST request to /api/otp/send with { "email": "user@example.com" } and header x-api-key: YOUR_KEY. The service autonomously generates a 6-digit numeric OTP and emails it directly. The OTP is never returned in the API response to prevent frontend leaks.

3

Verify User's Entered OTP

When the user enters the 6 digits on your website, your backend calls /api/otp/verify with { "email": "user@example.com", "otp": "123456" }. The service validates the code, tracks attempts (max 5), and returns verified status.

Client Onboarding

Register Email & Generate Secret Key

Did you purchase or integrate this service? Configure your support email and Google App Password below to generate your private API Secret Key.

Client SMTP Configuration
All passwords are encrypted with AES-256 at rest.
Your Generated API Secret Key Pass via header: x-api-key
Security Warning: The Secret Key grants full sending rights for this email. Keep it hidden and store it in your backend environment variables (.env).

Need help setting up Gmail App Password?

Follow our 60-second visual guide to generate a free 16-character Google App Password.

Live Testing Suite

API Playground & Testing Console

Execute real API calls to generate OTPs, test anti-spam cooldown on resend, verify codes, and dispatch transactional emails.

Server Generated: The service creates the 6-digit OTP internally and emails it. The OTP is never leaked in the API response.
Generates a fresh OTP, invalidates the previous code, and enforces a 60-second spam protection cooldown.
Verifies the 6-digit OTP code against the active session. Tracks attempts (max 5).
Dispatches any custom HTML or plain-text email using the client's configured SMTP sender.
Live Response Terminal Ready
// Select an action on the left and submit. // Response status and JSON will render here. { "service": "Leadify Email & OTP Engine", "status": "ready" }
Developer Reference

API Documentation & Situation Guides

Understand what payload is required in each scenario. Authenticate every call by providing your Secret Key in the x-api-key header.

Real-World Integration Situations
Step-by-step guides for different product workflows.

Situation 1 User Signup & Account Verification

When a new customer signs up, verify their email address before activating their account:

  1. Your backend receives signup details -> Calls POST /api/otp/send with { "email": userEmail, "name": userName, "type": "verification" }.
  2. User receives an email with a 6-digit OTP code (valid for 10 minutes).
  3. User inputs the 6 digits on your website -> Frontend sends it to your backend -> Calls POST /api/otp/verify with { "email": userEmail, "otp": code }.
  4. If verified: true, set isEmailVerified = true in your database!

Situation 2 Forgot Password & Password Reset

When a customer forgets their password and requests a reset code:

  1. Customer clicks "Forgot Password" -> Your backend calls POST /api/otp/send with { "email": userEmail, "type": "forgot_password" }.
  2. Customer receives a branded Password Reset security email with the 6-digit code.
  3. Customer submits the code with their new password -> Call POST /api/otp/verify. If valid, update their password hash.

Situation 3 Two-Factor Authentication (2FA) / Login OTP

Protect customer logins with an extra verification code:

  1. Customer enters username & password -> Password matches -> Call POST /api/otp/send with { "email": userEmail, "type": "login" }.
  2. Show prompt: "Enter the 6-digit security code sent to your email".
  3. Customer submits code -> Call POST /api/otp/verify. If valid, issue JWT / auth session.

Situation 4 Resend OTP with Anti-Spam Protection

When a user hasn't received the code and clicks "Resend OTP":

  1. Customer clicks "Resend Code" -> Your backend calls POST /api/otp/resend with { "email": userEmail }.
  2. If requested within 60s of previous attempt, service returns 429 COOLDOWN_ACTIVE with remaining seconds.
  3. If cooldown has passed, service generates a fresh 6-digit OTP and invalidates the previous code.

Situation 5 Transactional & Alert Emails

Send order confirmations, invoices, or critical system notifications:

  1. Your backend calls POST /api/email/send with { "to": userEmail, "subject": "Order Confirmed", "html": "

    Thank you!

    " }
    .
  2. Email is instantly dispatched via your configured SMTP / Gmail sender.
POST /api/otp/send Header: x-api-key: YOUR_SECRET_KEY

Generates a fresh 6-digit OTP internally and dispatches it directly to the recipient's email address.

FieldTypeRequiredDescription
emailstringYesRecipient email address
namestringNoRecipient's name (defaults to "User")
typestringNoverification, forgot_password, or login
expiresInMinutesnumberNoOTP expiry duration (defaults to 10 minutes)
curl -X POST "https://mail.watsalead.in/api/otp/send" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_SECRET_KEY" \
  -d '{
    "email": "customer@example.com",
    "name": "Sarah",
    "type": "verification"
  }'
POST /api/otp/resend Header: x-api-key: YOUR_SECRET_KEY

Generates a new OTP, invalidates previous ones, and delivers it. Automatically enforces a 60-second cooldown.

FieldTypeRequiredDescription
emailstringYesRecipient email address
curl -X POST "https://mail.watsalead.in/api/otp/resend" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_SECRET_KEY" \
  -d '{
    "email": "customer@example.com"
  }'
POST /api/otp/verify Header: x-api-key: YOUR_SECRET_KEY

Verifies the OTP code submitted by the user. Decrements attempts on failure (max 5 attempts).

FieldTypeRequiredDescription
emailstringYesRecipient email address
otpstringYesThe 6-digit OTP code received in email
curl -X POST "https://mail.watsalead.in/api/otp/verify" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_SECRET_KEY" \
  -d '{
    "email": "customer@example.com",
    "otp": "123456"
  }'
POST /api/email/send Header: x-api-key: YOUR_SECRET_KEY

Sends custom HTML or text transactional emails (e.g. Invoices, Welcome letters, System alerts).

FieldTypeRequiredDescription
tostringYesRecipient email address
subjectstringYesEmail Subject line
htmlstringYes*HTML body content (or plain text)
textstringNoPlain text fallback
curl -X POST "https://mail.watsalead.in/api/email/send" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_SECRET_KEY" \
  -d '{
    "to": "customer@example.com",
    "subject": "Order Confirmation #8921",
    "html": "<h1>Thank you for your order!</h1><p>Your package is on its way.</p>"
  }'
60-Second Tutorial

How to Get a Free Google App Password

Google requires an App Password rather than your standard Gmail account password to send automated emails via SMTP. Follow these 4 simple steps to generate one for free.

1

Turn On 2-Step Verification

Visit your Google Account Security dashboard at myaccount.google.com/security. Look for the "How you sign in to Google" section and ensure 2-Step Verification is switched ON. If it's already ON, you can proceed directly to Step 2.

2

Open Google App Passwords

Open the dedicated App Passwords page directly at:
https://myaccount.google.com/apppasswords
(Alternatively, you can type "App passwords" in the search box at the top of your Google Account page).

3

Create Your App Name

In the text box labeled "App name", enter an identifier such as:
Leadify Email Service
Then click the yellow/blue "Create" button.

4

Copy the 16-Character Code

Google will show a modal window with a yellow highlighted 16-character code (e.g. abcd efgh ijkl mnop). Copy this 16-character code, go to our Configure & Keys page, and paste it into the Gmail App Password field.

❓ Frequently Asked Questions & Troubleshooting
Quick solutions to common SMTP connection questions.
Why does SMTP fail with "535 5.7.8 Username and Password not accepted"?
This error means either 2-Step Verification is not enabled on your Google account, or you entered your regular Gmail login password instead of a 16-character App Password. Generating and pasting an App Password resolves this instantly.
Do spaces matter in the 16-character App Password?
No, the service automatically strips whitespace from your app password before authenticating with Google SMTP.
Can I use custom SMTP instead of Gmail?
Yes! In the Configure & Keys page, simply check the "Use Custom SMTP Server" option and provide your host (e.g. Mailgun, SendGrid, Amazon SES, or custom VPS), port, and credentials.
Is my App Password safe?
Yes. All configured passwords are encrypted using industry-standard AES-256 cipher encryption before saving, and the master key never exposes plaintext passwords in responses or UI.
🔐

Sign In to Your Account

Access your private API keys, email logs, and SMTP configuration.

🚀

Create Developer Account

Get your private Secret API Key and start sending emails & OTPs in 60 seconds.

📬 Optional: Connect Your Sender Email Now

You can configure this now or anytime later from your dashboard.

Account Portal

Developer Dashboard

Manage your email service configuration, dedicated Secret Key, and live endpoints.

Active App Name My App
SMTP Sender Status Connected ✅
Service Health Operational ⚡
Account Plan Unlimited Pro
Your Private API Secret Key
Pass in header: x-api-key: YOUR_KEY
🔒 Never share your secret key in frontend browser code. Call our APIs strictly from your backend server.
📬 Your SMTP / Sender Configuration
Change the email address and Google App Password used to dispatch your OTPs and notifications.