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.
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.
To help you implement this as quickly as possible, the following will:
Attach the API to one or more <input type='text'> elements on a page.
Provide an auto-updating score next to the form element.
Let you style and position the score to match your own branding.
Put together this looks like the following:
Enter a Subject or Headline
How to setup an Embedded Integration
1. Email Us
This is why we can't have nice things.
We had previously offered the embed API for free, but it suffered so much abuse (literally millions of calls a day) that it tanked the entire site multiple times.
Drop us an email at firstname.lastname@example.org and we'll be happy to work something out. We typically charge a small yearly fee for unlimited access with a custom endpoint.
2. Include the Subject Line Tester JS file in your site.
Add the following to your site alongside any existing js includes. We'll give you a custom endpoint after you email us.
3. Add the slt-field class to any inputs you want tested.
It's likely that you want to Subject Line Tester to be embedded as part of an existing form within your application. Add the slt-field as an additional class on the fields you'd like the score to display next to.
subjectLineTester() will score the current values of slt-field input fields and immediately display a score. As users type in different subject lines / headlines the values in those fields will automatically update the score (throttled to one update / 500ms).
// Call this to start scoring