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. Give it a discernible name and description then click Create Campaign.

The create campaign form with name and description filled with an example
The create campaign form with name and description filled with an example

1. Set up a trigger

This answers the question, What triggers this campaign? In this case, select They meet conditions (1) and define the trigger condition as people in the campaign trigger segment (2) that you created in previous steps.

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

2. Set up a webhook

  1. In the workflow, drag a Webhook action from the Build menu on the left to the Workflow canvas.

    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. Configure a request to Kickbox’s API. You can learn more about their API here.

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

       Use the url_encode filter

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

      The Webhook request screen with numbered hints of options to change
      The Webhook request screen with numbered hints of options to change
  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

3. Save and update actions settings

Getting back to the Workflow tab, don’t forget to change the sending behavior to “Send Automatically” and toggle the “Allow conversion from this webhook” option.

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

4. Define the Goal

Last but not least, we can now define a Conversion goal (1) if people enter (2) the second Segment we created earlier (3). And we’ll also set the Exit condition as “People will move through the entire campaign” (4).

The campaign Goal & Exit tab with numbered hints for Define Goal, Enter condition, Segment, and Exit conditions
The campaign Goal & Exit tab with numbered hints for Define Goal, Enter condition, Segment, and Exit conditions

5. Review and start your campaign

You can do a final review of the campaign before you start it.

  • 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

Wrap Up

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?