WhatsApp Health System Configuration
This document outlines the WhatsApp messaging health system that manages rate limiting, account warm-up, and adaptive delays to keep accounts safe from WhatsApp's spam detection.
Overview
The health system dynamically adjusts message sending behavior based on:
- Account Age: How long the WhatsApp profile has been connected
- Account Tier: Classification based on age and behavior
- Health Score: Real-time score (0-100) based on delivery success, responses, and errors
- Time of Day: Slower sending during off-hours
- Response Rate: Higher engagement allows faster sending
- Error Patterns: Consecutive errors trigger slowdowns
Account Tiers
| Tier | Emoji | Daily Limit | Min Delay | Max Delay | Batch Size | Batch Break |
|---|---|---|---|---|---|---|
| New Account | 🔴 | 500 | 2s | 5s | 50 | 1 min |
| Warming Up | 🟠 | 1,500 | 1s | 3s | 100 | 1 min |
| Established | 🟡 | 4,000 | 1s | 2s | 200 | 1 min |
| Trusted | 🟢 | 10,000 | 0s | 1s | 500 | 0 min |
Tier Progression
- New Account: Days 0-13 (first 2 weeks)
- Warming Up: Days 14-27 (weeks 2-4)
- Established: Days 28-89 (months 1-3)
- Trusted: Day 90+ (after 3 months)
Warm-Up Schedule
The system enforces a gradual warm-up for new accounts over 90 days:
| Day | Daily Limit | Delay Range | Batch Size | Break | Notes |
|---|---|---|---|---|---|
| 0 | 100 | 3-6s | 10 | 2 min | Very conservative start |
| 1 | 200 | 3-5s | 20 | 2 min | Slow ramp |
| 2 | 300 | 2-5s | 30 | 1 min | Building trust |
| 3 | 400 | 2-4s | 40 | 1 min | Continued |
| 5 | 500 | 2-4s | 50 | 1 min | New Account tier cap |
| 7 | 500 | 2-4s | 50 | 1 min | Week 1 complete |
| 10 | 1,000 | 2-3s | 75 | 1 min | Entering Warming Up |
| 14 | 1,500 | 1-3s | 100 | 1 min | Warming Up tier cap |
| 17 | 2,500 | 1-2s | 150 | 1 min | Approaching Established |
| 21 | 3,500 | 1-2s | 175 | 1 min | Week 3 |
| 28 | 4,000 | 1-2s | 200 | 1 min | Established tier cap |
| 42 | 6,000 | 1-2s | 300 | 1 min | Building to Trusted |
| 60 | 8,000 | 0-1s | 400 | 1 min | Month 2 |
| 90 | 10,000 | 0-1s | 500 | 0 min | Trusted tier cap |
Health Score Multipliers
The health score (0-100) affects message delays:
| Health Score | Level | Multiplier | Effect |
|---|---|---|---|
| 90-100 | Excellent | 0.8x | 20% faster |
| 70-89 | Good | 1.0x | Normal speed |
| 50-69 | Warning | 1.5x | 50% slower |
| 25-49 | Critical | 2.5x | 150% slower |
| 0-24 | Danger | 4.0x | 300% slower |
Health Score Calculation
The health score is composed of:
- Delivery Rate (40%): Percentage of messages successfully delivered
- Engagement Rate (30%): Reply rate and read receipts
- Stability (30%): Connection stability, no errors
Messages Per Minute by Health Score
New Account Tier (Base: 3.5s average delay)
| Health Score | Multiplier | Actual Delay | Msgs/Min |
|---|---|---|---|
| 90-100 | 0.8x | 2.8s | ~21 |
| 70-89 | 1.0x | 3.5s | ~17 |
| 50-69 | 1.5x | 5.25s | ~11 |
| 25-49 | 2.5x | 8.75s | ~7 |
| 0-24 | 4.0x | 14.0s | ~4 |
Warming Up Tier (Base: 2.0s average delay)
| Health Score | Multiplier | Actual Delay | Msgs/Min |
|---|---|---|---|
| 90-100 | 0.8x | 1.6s | ~37 |
| 70-89 | 1.0x | 2.0s | ~30 |
| 50-69 | 1.5x | 3.0s | ~20 |
| 25-49 | 2.5x | 5.0s | ~12 |
| 0-24 | 4.0x | 8.0s | ~7 |
Established Tier (Base: 1.5s average delay)
| Health Score | Multiplier | Actual Delay | Msgs/Min |
|---|---|---|---|
| 90-100 | 0.8x | 1.2s | ~50 |
| 70-89 | 1.0x | 1.5s | ~40 |
| 50-69 | 1.5x | 2.25s | ~27 |
| 25-49 | 2.5x | 3.75s | ~16 |
| 0-24 | 4.0x | 6.0s | ~10 |
Trusted Tier (Base: 0.5s average delay)
| Health Score | Multiplier | Actual Delay | Msgs/Min |
|---|---|---|---|
| 90-100 | 0.8x | 0.4s | ~120 |
| 70-89 | 1.0x | 0.5s | ~100 |
| 50-69 | 1.5x | 0.75s | ~75 |
| 25-49 | 2.5x | 1.25s | ~46 |
| 0-24 | 4.0x | 2.0s | ~30 |
Time of Day Multipliers
Sending is automatically slowed during off-peak hours:
| Time | Multiplier | Effect |
|---|---|---|
| 9-11 AM | 0.85x | 15% faster (peak) |
| 12-3 PM | 0.85-0.9x | 10-15% faster |
| 4-5 PM | 1.0-1.1x | Normal |
| 6-8 PM | 1.2-1.5x | 20-50% slower |
| 9-11 PM | 1.7-1.9x | 70-90% slower |
| 12-4 AM | 2.0x | 100% slower (avoid) |
Recommendation: Schedule bulk campaigns for 9 AM - 5 PM for best results.
Response Rate Multipliers
Higher engagement rates reward faster sending:
| Response Rate | Multiplier | Effect |
|---|---|---|
| >30% | 0.85x | 15% faster |
| 20-30% | 0.95x | 5% faster |
| 10-20% | 1.0x | Normal |
| 5-10% | 1.2x | 20% slower |
| <5% | 1.5x | 50% slower |
Error Handling
Consecutive Error Multipliers
| Consecutive Errors | Multiplier | Effect |
|---|---|---|
| 0-1 | 1.0x | Normal |
| 2-3 | 1.5x | 50% slower |
| 4-5 | 2.5x | 150% slower |
| 6+ | 4.0x | 300% slower |
Circuit Breaker
The system includes a circuit breaker that stops sending when too many errors occur:
- Failure Threshold: 5 consecutive errors → Circuit opens
- Open Duration: 5 minutes pause
- Recovery: After pause, sends 1 test message
- Close Threshold: 3 successful messages → Resume normal
Batch Configuration
Messages are sent in batches with breaks between:
| Tier | Messages Per Batch | Break Duration | Extended Break Threshold |
|---|---|---|---|
| New Account | 25 | 2 minutes | After 300 messages |
| Warming Up | 100 | 1 minute | After 500 messages |
| Established | 200 | 1 minute | After 1,000 messages |
| Trusted | 500 | 0 minutes | After 2,000 messages |
Extended Break: After threshold, a 5-minute break is enforced.
Delay Bounds (Safety Limits)
The system enforces absolute bounds regardless of multipliers:
| Limit | Value | Purpose |
|---|---|---|
| Absolute Minimum | 100ms | Prevent flooding |
| Absolute Maximum | 5 minutes | Prevent stalling |
| Cooldown Delay | 10 minutes | Rate limit recovery |
Typing Simulation (Human Emulation)
Before each message is sent, the system simulates realistic "typing..." indicator to appear more human-like. This is crucial for avoiding spam detection.
Typing Speed Calculation
Based on mobile typing research (average: 38 WPM on smartphones):
| Component | Value | Purpose |
|---|---|---|
| Base speed | 35-55ms per char | ~40 WPM average |
| Initial delay | 200-500ms | "Preparing to type" |
| Word pauses | 50-150ms every ~35 chars | Natural breathing |
| Sentence pauses | 200-400ms at .!? | Natural breaks |
| Emoji time | 100-200ms per emoji | Selection time |
| Variance | ±15% | Random natural variation |
Typing Duration by Message Length
| Message Length | Typing Duration | Simulated WPM |
|---|---|---|
| 10 chars (2 words) | 0.5-0.8s | ~30-40 WPM |
| 50 chars (10 words) | 2.0-3.0s | ~35-45 WPM |
| 100 chars (20 words) | 4.0-5.5s | ~35-45 WPM |
| 200 chars (40 words) | 8.0-11.0s | ~35-45 WPM |
| 300 chars (60 words) | 12.0-15.0s | ~40 WPM |
| 400+ chars | 15.0s (max) | Capped for UX |
Typing Duration Bounds
| Limit | Value | Reason |
|---|---|---|
| Minimum | 300ms | Even short messages show typing |
| Maximum | 15 seconds | WhatsApp hides indicator after ~25s |
Example Calculations
Short message: "Hi there!" (10 chars)
- Base: 10 × 45ms = 450ms
- Initial delay: 350ms
- Total: ~0.8 seconds
Medium message: "Hey! How are you doing today? I wanted to check in about our meeting tomorrow." (78 chars)
- Base: 78 × 45ms = 3,510ms
- Initial delay: 350ms
- Word pauses: 2 × 100ms = 200ms
- Sentence pauses: 2 × 300ms = 600ms
- Total: ~4.7 seconds
Long message: A 250-character paragraph
- Base: 250 × 45ms = 11,250ms
- Initial delay: 350ms
- Word pauses: 7 × 100ms = 700ms
- Sentence pauses: 3 × 300ms = 900ms
- Total: ~13.2 seconds
Time to Send Daily Limits
Estimated time to send all daily messages (with 100% health, during business hours):
| Tier | Daily Limit | Avg Delay | Time to Complete |
|---|---|---|---|
| New Account | 500 | 3.5s | ~30 minutes |
| Warming Up | 1,500 | 2.0s | ~50 minutes |
| Established | 4,000 | 1.5s | ~100 minutes |
| Trusted | 10,000 | 0.5s | ~100 minutes |
Best Practices
For New Accounts (Days 0-14)
- Start Small: Begin with 50-100 messages on day 1
- Personalize: Use recipient names and custom fields
- Quality Recipients: Only message people who expect to hear from you
- Monitor Health: Watch for delivery failures
- Business Hours: Only send 9 AM - 5 PM
For Warming Up Accounts (Days 14-28)
- Gradual Increase: Don't jump to max limits immediately
- Track Responses: High response rates help your score
- Avoid Spam Reports: Quality > Quantity
- Consistent Activity: Send daily rather than bursts
For Established/Trusted Accounts (Day 28+)
- Maintain Health: Keep health score above 70
- Batch Campaigns: Spread large campaigns over multiple days
- Monitor Alerts: Pay attention to health warnings
- Regular Activity: Inactive accounts may need re-warming
Alerts & Warnings
The system generates alerts at these thresholds:
| Alert Type | Trigger | Recommendation |
|---|---|---|
| Low Health | Score < 50 | Reduce volume, improve personalization |
| High Error Rate | >10% failures | Check connection, verify numbers |
| Rate Limit Hit | Cooldown triggered | Wait 10 minutes, reduce speed |
| Low Response | <5% response rate | Improve message quality |
| Daily Limit | 100% used | Wait until tomorrow |
API Reference
Get Health Status
GET /api/whatsapp/:profileId/queue-health
Response includes:
healthScore: Current score (0-100)tier: Account tieradaptive.rateLimits: Current rate limitsadaptive.delay: Current delay configurationadaptive.dailyLimit: Daily limit status
Health Dashboard
Navigate to WhatsApp Profile → Health Dashboard to view:
- Real-time health score
- Current limits
- 24-hour metrics
- Alerts and recommendations
Configuration Files
- Constants:
server/lib/whatsapp/health/constants.ts - Adaptive Engine:
server/lib/whatsapp/health/adaptive-engine.ts - Calculator:
server/lib/whatsapp/health/calculator.ts - Queue:
server/lib/whatsapp/core/queue.ts
Last Updated: January 2026