Introducing The Messaging Feedback API

July 28, 2016
Written by

tw2_feedbackapi_blog

There’s nothing worse than a delayed text message. Whether it’s a notification that your car arrived, a two-factor-authentication code or a response to a chat, it needs to arrive on time.

Getting a message from point A to point B quickly is not a one-size-fits-all operation. After sending billions of text messages around the world, we learned delivery varies by geography, mobile operator, use case, and, for some businesses, the actual content of the message.

There are many different routes that your message can take through the telecom ecosystem to reach the handset. Surprisingly – or at least it was initially to me – telecom routes don’t always deliver messages with the same success, they change over time.

Today, Twilio announces a new Twilio Message Feedback API that enables you to programmatically report back to Twilio critical deliverability information. Actions that indicate a message was received can then be used by Twilio to identify network issues and improve deliverability of your messages. For example, a user action could be a person entering their two-factor authentication code or clicking a unique link in a message.

Network effects have a profound impact here. With Twilio’s global customer base, and the sheer volume of messages that we handle on a minute-by-minute basis, the feedback API will allow us to detect and quickly react to changes in the global messaging networks faster than ever before.

Why do we want this feedback?

We already have many sources of data to optimize overall delivery deliverability. We use direct feedback from our carrier partners, deliverability data from some our larger customers as well as various other monitoring techniques. But nothing trumps the live collective data of our customers. For your messages, we trust what you tell us the most.

By looking at both aggregate data and data specific to your account, we have a better chance at improving the delivery of your messages.

The Message Feedback API provides data when a person who receives a message through Twilio is prompted to take an action that can be tracked. Examples of user actions include:

  •      A user receives a passcode via SMS and enters it into a web site or app
  •      A user enters a temporary password.
  •      A user replies to a message with a call or SMS.
  •      A user clicks on a unique link contained in the message.

Once a user takes an action, you know for certain that they received the message. This information is submitted to Twilio, and we take care of the rest.

How It Works

Submitting Message Feedback to Twilio is a three step process:

  1. When you send a message, let Twilio know that you are expecting a trackable user action by including the new ProvideFeedback=true parameter in the initial HTTP POST.
  2. Save the Message SID from the POST response. You’ll need this later.
  3. When the user takes the expected action, such as entering a PIN code, let Twilio know the message was received by sending a POST request to the Message Feedback instance subresource with Outcome=confirmed parameter. If the user does not take an action, do not POST anything.

It’s as simple as that!
If you’re sending a trackable message, be sure to check out the docs and start sending feedback today.