Test Modes
ReachScore provides two isolated modes: test mode for development and live mode for production testing.
Test Mode
For development and testing. Returns simulated results without sending real emails.
rk_test_...Live Mode
For production. Tests real email deliverability with actual inbox placement checks.
rk_live_...Key Differences
| Feature | Test Mode | Live Mode |
|---|---|---|
| Email Processing | Simulated | Real emails sent and received |
| Inbox Placement | Simulated results | Actual Gmail, Outlook, Yahoo tests |
| Authentication Checks | Mock SPF/DKIM/DMARC | Real DNS lookups |
| Quota Usage | Does not count | Counts against plan |
| Response Time | Instant | 30s-5min (real delivery) |
| Webhooks | Test endpoints only | Live endpoints only |
Data Isolation
Test and live mode data are completely separate:
- -Tests created with
rk_test_keys cannot be accessed withrk_live_keys - -Domains and monitors are mode-specific
- -Webhook endpoints are registered separately for each mode
- -API keys can only access resources in their mode
Test Mode Behavior
In test mode, the API returns realistic simulated responses that mirror live mode structure:
// Test mode response (instant, simulated)
{
"id": "test_7xK2mN9pQrT4v",
"object": "test",
"status": "completed",
"livemode": false,
"score": 85,
"grade": "B",
"auth_results": {
"spf": "pass",
"dkim": "pass",
"dmarc": "pass"
},
"inbox_placement": {
"gmail": "inbox",
"outlook": "inbox",
"yahoo": "inbox"
}
}Note: Test mode results are always positive and do not reflect your actual email configuration. Use live mode to test real deliverability.
When to Use Each Mode
Use Test Mode for:
- - Building and testing your integration
- - CI/CD pipeline testing
- - Development and staging environments
- - Testing webhook handlers
- - Load testing API calls
Use Live Mode for:
- - Testing actual email deliverability
- - Verifying DNS configurations
- - Pre-launch email campaign checks
- - Ongoing deliverability monitoring
- - Production environment
Switching Modes
Switch modes by using the appropriate API key. The key prefix determines the mode:
# Test mode curl -H "Authorization: Bearer rk_test_abc123" \ https://api.reachscore.co/v1/tests # Live mode curl -H "Authorization: Bearer rk_live_xyz789" \ https://api.reachscore.co/v1/tests
In your SDK, initialize with the appropriate key:
// Use environment variables to switch modes
const client = new ReachScore({
apiKey: process.env.REACHSCORE_API_KEY, // rk_test_* or rk_live_*
});