Subject Line Testing API
Get up and running in 5 minutes with automated setup. No manual approval required.
API Overview
What's this about?
This is the backend API that's powering our Email Subject Line Tester.
If you have a service where your users enter headlines or email subjects or anything similar and you would like to help them write better ones, you're in the right place.
Live Demo
What does an embedded integration look like?
The primary use case for this API is to provide a real-time score to a user entering a subject or headline into your app.
We refer to this as the embedded integration as opposed to a custom integration that would directly interact with the API endpoint.
YOUR APP
The score will appear here automatically as you type
How to setup an Embedded Integration
Register Your Account
No more manual approval required! Unlike other services that require you to email for custom endpoints, our system is fully automated.
Simply register an account, add your domain and/or IP address to the whitelist in your dashboard, and start using the same API endpoint as everyone else. No waiting, no custom endpoints, no hassle.
Register NowInclude the Subject Line Tester JS file
Add the following to your site alongside any existing JS includes. Unlike competitors, everyone uses the same endpoint:
<script src="https://emailsubjectlinetester.com/js/emailsubjectlinetester.js"></script>
Add the eslt-field class to any inputs
It's likely that you want the Subject Line Tester to be embedded as part of an existing form within your application. Add eslt-field
as an additional class on the fields you'd like the score to display next to:
EXAMPLE
<input type='text' name='subject' class='form-field form-field-inline eslt-field'>
Configure API URL (Optional)
By default, the script uses our production endpoint. If you need to customize the API URL (for testing or custom deployments), you can configure it:
<script>
// Optional: Configure custom API URL
window.ESLT_API_URL = 'https://emailsubjectlinetester.com/api/analyze';
</script>
The script will automatically score the current values of eslt-field input fields and display scores. As users type, the scores update automatically (throttled to one update per 350ms).
Style the Embedded Score (Optional)
CSS is automatically included! Unlike competitors who require you to add CSS, our script automatically injects all necessary styles for both the inline scores and full report modals. However, you can override them if needed:
/* Embedded Subject Line Score */
.eslt-preview { position: relative; }
.eslt-preview .eslt-badge {
position: absolute;
margin-left: 10px;
}
.eslt-preview .eslt-score {
position: absolute;
margin-left: 46px;
margin-top: 6px;
}
If you're using Bootstrap, we recommend this as a starting point instead:
/* Bootstrap Embedded Subject Line Score */
.eslt-preview { float: right; margin-top: -30px; }
.eslt-preview .eslt-badge {
position: absolute;
margin-left: 10px;
}
.eslt-preview .eslt-score {
position: absolute;
margin-left: 46px;
margin-top: 6px;
font-size: 16px;
}
🎨 Advanced: Override Full Report Modal Styling
To customize the full report modal that appears when users click "View Report":
/* Modal Content Customization - Card Layout */
.eslt-modal-content #subject-tester-report {
/* Main report container */
padding: 2rem;
border-radius: 1rem;
}
.eslt-modal-content .eslt-badge.eslt-grade {
/* Grade badge (A+, B-, etc.) */
background-color: #your-brand-color !important;
border-radius: 0.75rem;
}
.eslt-modal-content .eslt-score {
/* Overall score display */
color: #your-brand-color !important;
}
.eslt-modal-content .eslt-overall-progress {
/* Overall score progress bar */
background-color: #your-brand-color !important;
}
/* Individual Metric Cards */
.eslt-modal-content .border.rounded-lg {
/* Metric cards container */
background-color: #your-light-color;
border-color: #your-border-color;
padding: 1.5rem;
}
.eslt-modal-content .font-semibold.text-sm {
/* Metric names */
color: #your-text-color;
}
.eslt-modal-content .text-xs.text-gray-600 {
/* Metric descriptions */
color: #your-description-color;
}
/* Individual Progress Bars */
.eslt-modal-content .h-2.rounded-full {
/* Individual metric progress bars */
/* Colors are set via inline styles: */
/* Green: #10b981, Yellow: #eab308, Red: #ef4444 */
}
📊 Card Layout: The full report uses a modern card-based design with color-coded progress bars and detailed descriptions for each metric. The overall score progress bar uses the .eslt-overall-progress
class for easy customization.
🎯 See a Working Example on CodePen
Want to see this integration in action? Check out our live CodePen example that demonstrates the complete setup.
View CodePen ExamplePricing
Choose the right plan for you
Choose an affordable plan that's packed with real-time scoring, automated setup, and everything you need to help your users write better subject lines.
Monthly
$16 /month
Perfect for getting started with our API integration.
- Unlimited API calls
- Automated domain whitelisting
- Real-time scoring with 14 audit points
- Email support
Yearly
$175 /year
Save $17 per year with priority support and advanced features.
- Everything in Monthly
- Priority email support
- Advanced analytics dashboard
- Early access to new features
- Custom integrations support
🛠️ Troubleshooting
Error Codes Reference
If you encounter issues with the widget, check the browser console for these error codes:
Configuration Required
Please check documentation for proper setup.
- Ensure the script is loaded correctly
- Verify your HTML elements have the
eslt-field
class - Call
EmailSubjectLineTester()
after page load
Service Temporarily Unavailable
Our servers are experiencing temporary issues.
- Wait a few minutes and try again
- Check our status page for updates
- If persistent, contact support
Domain Access Required
Your domain needs to be whitelisted for API access.
- Log into your dashboard and add your domain and/or IP address to the whitelist
- Ensure you've entered the domain correctly (e.g.,
example.com
) - Subdomains are automatically supported once the root domain is whitelisted
- Contact support if you need assistance
Network Connection Issue
Unable to connect to our API servers.
- Check your internet connection
- Verify firewall settings aren't blocking the request
- Try refreshing the page
- Check if CORS is properly configured on your server
General Troubleshooting
Widget Not Appearing
- • Verify script is loaded in HTML head
- • Check browser console for errors
- • Ensure
eslt-field
class is applied - • Call initialization function after DOM loads
Styling Issues
- • CSS file may be blocked by ad blockers
- • Check for CSS conflicts with your styles
- • Verify CSS is loading from our CDN
- • Custom styling may require CSS overrides
Need Help?
If you're still experiencing issues after checking the troubleshooting guide above, our support team is here to help.
Contact Support: mail@emailsubjectlinechecker.com
Please include your domain, error code (if any), and a description of the issue for faster resolution.