Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Send Message Feedback to Twilio

For step-by-step instructions on how to track the delivery status of your sent messages, follow our guide to Tracking Delivery Status in your web programming language of choice.

Understand and Optimize Message Deliverability

Message Feedback is one of the best tools at our disposal to understand your message deliverability and enable us to optimize it on your behalf automatically.

Sending text messages around the world is not a one-size-fits-all operation. Deliverability varies by geography, mobile operator, use case, and even for individual companies. There are many different knobs that Twilio can tune, such as various routing paths and carrier configurations.

Twilio’s backend uses a mix of automated algorithms and manual adjustments to ensure the best possible deliverability for our customers. We tweak these parameters regularly to keep up with the ever-changing telecom ecosystem. We use several sources of data to make sure that the configuration changes we make are improving deliverability, but we trust what you tell us the most.

The Message Feedback API enables customers to report back to Twilio in real-time when a user successfully receives a text message. Using this feedback information, Twilio can then detect and quickly react to changes in the global messaging networks, both in aggregate and specific to your account, thereby improving the delivery of your messages.

You can view your reported feedback information in your Console to help you monitor and understand your message deliverability. Feedback information is aggregated every 15 minutes and will only display once you have reported feedback information to Twilio.

When to Send Message Feedback to Twilio

The Twilio Message Feedback API resource enables you to programmatically report back to Twilio critical deliverability information when your application has some trackable user action that results from a message being sent.

Examples of trackable user actions include:

  • A user receives a passcode via SMS and enters it into a website 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

You must contact our support team to enable the Message Feedback API on your account.

Requests to this endpoint will report a 404 Response until you do.

How to Submit Message Feedback

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 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, let Twilio know by sending a POST request to the Message Feedback instance subresource, specifying Outcome=confirmed. If the user does not take an action, do not POST anything.

Let's look at some code. First, here's some code that sends a message with a unique URL in the body, setting the ProvideFeedback parameter to true and saving the Message SID for later recall:

        
        
        
        

        Once your user clicks on the URL in the SMS they receive, you be sure that they got the message.

        Next, here's an example of the code we might run when the user clicks the unique URL:

              
              
              
              
              Based on the unique URL, we know the Message SID and can report back to Twilio that the message was successfully delivered.

              Send Delivery Confirmation Feedback

              Based on the unique URL, we know the Message SID and can report back to Twilio that the message was successfully delivered.

              Once this information is submitted, Twilio takes care of the rest.

              Rate this page:

              Need some help?

              We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.