Verify deliverable email addresses with Kickbox

Updated

Introduction

You don’t just want to know that email addresses are valid (i.e. they comply with RFC 5322); you want to know that addresses are deliverable. Sending messages to undeliverable email addresses can increase your bounce rate and impact your deliverability.

If you’re not able to verify the deliverability of an email address before you add it to Customer.io, you can always leverage Webhook actions and a third-party verification service like Kickbox.

This allows you to evaluate the deliverability of the email addresses in your workspace and identify the ones you shouldn’t email.

 This method is provider-agnostic

While we’ll use Kickbox in our example below, you could use any email verification service that has an API.

Ingredients

  • A Data-Driven Segment
  • A Segment-triggered Campaign
  • Basic API and Webhooks knowledge
  • A Kickbox account

Method

We’ll create a Segment-triggered campaign for people who haven’t been verified yet, send an API request to Kickbox to verify their email, and save the result as attributes to leverage that information later.

  1. Get your Kickbox API key.
  2. Create a Segment of unverified emails (to use as a campaign trigger).
  3. Create a Segment of verified emails (to use as a campaign goal).
  4. Create a Campaign with a webhook action to verify people.

Get a Kickbox API key

We’ll start by getting a Kickbox API key. You can go to kickbox.com to create an account. Your account will be provisioned with 100 credits (i.e. 100 email addresses to verify) and you can purchase extra credits.

  1. Go to the Verification section of the left sidebar and click API.

    The menu of the Verification services with an arrow pointing to API menu item
    The menu of the Verification services with an arrow pointing to API menu item

  2. Click Manage Keys.

    The Manage Keys CTA with an arrow pointing to it
    The Manage Keys CTA with an arrow pointing to it

  3. Click to create a new key.

    The menu of API Keys with an arrow pointing to the create api key button
    The menu of API Keys with an arrow pointing to the create api key button

  4. In the modal window, specify a key name (1), activate it for Production Mode (2), select the scope of permissions (3) before finally creating it (4).

    The create API key wizard with numbered hints for the fields to form/check
    The create API key wizard with numbered hints for the fields to form/check

When this is done, you’ll see your API key in the list and you can click the eye icon to unmask it.

The Kickbox API key with the actual key obfuscated and an arrow pointing to the button allowing to hide/display the key
The Kickbox API key with the actual key obfuscated and an arrow pointing to the button allowing to hide/display the key

Create a Segment to use as a campaign trigger

  1. In Customer.io, go to Segments and click on Create Segment.

  2. Give your new segment a Name and Description then click Create Data-Driven Segment.

    The segment creation form with name and description filled and arrow pointing to Create Data-Driven Segment
    The segment creation form with name and description filled and arrow pointing to Create Data-Driven Segment

  3. Add a single condition for this segment: Attribute email_verified is not equal to true. Save the conditions.

    The segment conditions with the condition highlighted
    The segment conditions with the condition highlighted

Create a Segment to use as a Campaign goal

Follow the same steps that you used to create a campaign trigger create a second segment. Make sure it’s set as “Segment for people where All of the following conditions match” and add the following two conditions:

  • Attribute email_verified is equal to true
  • Attribute email_verification_result does not contain undeliverable
The segment we'll use as a Goal and it conditions highlighted
The segment we'll use as a Goal and it conditions highlighted

Create a Campaign in Customer.io

Now that we have our API key and our Segments, we can proceed with our Campaign creation. Head over to Campaigns and click on Create Campaign. Click Untitled Campaign to add a name and description.

Set up a trigger

A trigger determines who enters your campaign. To set one up, click Choose trigger then select Segment change. In this example, the campaign should trigger when people enter the segment you made in a previous step.

The campaign trigger tab with numbered hints for the trigger conditions
The campaign trigger tab with numbered hints for the trigger conditions

Set up a webhook

  1. Drag a Send and receive data action from the Build menu. You can show/hide the menu by clicking + Build at the bottom of your workflow.

    The webhook action in the Build menu with an arrow pointing to it
    The webhook action in the Build menu with an arrow pointing to it

  2. Click Add Request. Configure a request to Kickbox’s API. You can learn more about their API here.

    The Webhook request screen with numbered hints of options to change
    The Webhook request screen with numbered hints of options to change

    • (1) Select the GET method
    • (2) Add the API URL: https://api.kickbox.com/v2/verify?email={{customer.email | url_encode}}&apikey=[your_api_key]
    •  (3) Use the url_encode filter

      We use this Liquid filter to convert URL-unsafe characters in a string into percent-encoded characters.

  3. Click Send test… (1) to send a test request to the API. If it’s successful, you’ll see a 200 OK status and the response will have a JSON object.

    The API response
    The API response

  4. Now that we have a functional webhook, we can easily save elements from the Response object as attributes for the person. Start by clicking on the Response tab (1) and then on Set up an attribute (2).

    The Webhook response screen with numbered hints of where to click
    The Webhook response screen with numbered hints of where to click

  5. Add one or more attributes. In our example, we’ll add 3 attributes:

    • email_verified that we’ll set to true. This lets us know which people had their email verified
    • email_verification_result that we’ll set to {{response.result}}-{{response.reason}}. This combines the result of the verification request (which can be deliverable, risky, undeliverable, or unknown) and the reason behind this result. Learn more about these values.
    • email_verification_disposable that we’ll set to {{response.disposable}}. This can either be true or false. If true, the email address is disposable and shouldn’t be emailed.

     You can leverage additional data from the request’s response

    We’re limiting to these 3 attributes in our example but you could leverage additional data from the request’s response such as if the email address is from a free service, associated with a role, or if it accepts all incoming messages among other things.

    The Response screen with the different attributes created and their values
    The Response screen with the different attributes created and their values

Now, we can test again and we’ll have a preview of the attributes that will be created.

The API response preview, now with the attributes and the values they'd be set with
The API response preview, now with the attributes and the values they'd be set with

Save and update action settings

Back on your workflow, click the webhook action again and click Settings. Change the sending behavior to Send Automatically and toggle on Allow conversion from this webhook.

The campaign workflow in Customer.io with the Webhooks action selected. Arrows pointing to the Sending Behavior and Conversion options
The campaign workflow in Customer.io with the Webhooks action selected. Arrows pointing to the Sending Behavior and Conversion options

Define the Goal

Last, but not least, we can define a Goal such that people convert when they enter the second segment we created earlier.

recipe-kickbox-campaign-goal.png
recipe-kickbox-campaign-goal.png

We’ll also set the Exit condition as “People don’t exit early, they will move through the entire workflow.”

The campaign exit panel is open on the left hand of a campaign.
The campaign exit panel is open on the left hand of a campaign.

Review and start your campaign

If you have any outstanding items, click Review items in the top right and complete the steps. Otherswise, click Start Campaign to give your campaign a final review.

  • If you’d like to only verify new people, select the Future additions only option.
  • If you’d like to verify everyone, select the Current people and future addtions option.
The overview of the campaign setup
The overview of the campaign setup

Click Start Campaign when you’re ready to activate your workflow!

Now you can prevent your workspace from sending emails to undeliverable email addresses by proactively and automatically verifying them.

Copied to clipboard!
  Contents
Is this page helpful?