Menu

Expand
Rate this page:

MessageFeedback Resource

The MessageFeedback subresource of a Message resource represents the reported outcome of tracking the performance of a user action taken by the recipient of the message.

You can use the MessageFeedback subresource to create Message Feedback confirming that the recipient of the associated Message performed a tracked user action.

For more information on why, when and how to send Message Feedback, see our guide How to Optimize Message Deliverability with Message Feedback. It explains what suitable tracked user actions of message recipients are and how they relate to the Message Insights One-time Password (OTP) Conversion Report.

Looking for step-by-step instructions on tracking the delivery of your sent messages based on Twilio- and carrier-captured status data? Follow our guide to Tracking the Message Status of Outbound Messages in the programming language of your choice.

MessageFeedback properties

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The SID of the Account associated with this MessageFeedback resource.

message_sid
sid<MM> Not PII

The SID of the Message resource associated with this MessageFeedback resource.

outcome
enum:outcome Not PII

Reported outcome indicating whether there is confirmation that the Message recipient performed a tracked user action. Can be: unconfirmed or confirmed. For more details see How to Optimize Message Deliverability with Message Feedback.

date_created
date_time<rfc2822> Not PII

The date and time in GMT when this MessageFeedback resource was created, specified in RFC 2822 format.

date_updated
date_time<rfc2822> Not PII

The date and time in GMT when this MessageFeedback resource was last updated, specified in RFC 2822 format.

uri
string Not PII

The URI of the resource, relative to https://api.twilio.com.

Outcome Values

The following are the possible values for the Outcome parameter:

ENUM:OUTCOME possible values in REST API format
confirmed

The recipient of a Message performed a tracked user action and confirmation was reported by creating a MessageFeedback subresource with the outcome set to confirmed. For more details see How to Optimize Message Deliverability with Message Feedback.

unconfirmed

The initial value for a Message created with ProvideFeedback=True. The reported outcome is unconfirmed until a MessageFeedback resource is created with an outcome property of confirmed.

Create a MessageFeedback resource

post
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json

To track and provide Message Feedback for a Message, you must set the ProvideFeedback parameter to true when you first create the Message. Upon Message creation, the outcome of the Message Feedback will then initially be treated as unconfirmed.

For more information on why, when and how to send Message Feedback, see our guide How to Optimize Message Deliverability with Message Feedback.

You can use this action to create Message Feedback confirming the performance of a tracked user action.

Pass the Outcome parameter with value confirmed to update the Message Feedback once the associated Message was received and the message recipient performed the tracked user action based on the received message.

Update the Message Feedback even if the Message is received with a delay once the conditions for confirmation are met. This ensures the Messaging Insights are current and message delivery optimizations are based on complete information.

Parameters
Parameters in REST API format
account_sid
Path
post sid<AC> Not PII

The SID of the Account associated with the Message resource for which to create MessageFeedback.

message_sid
Path
post sid<MM> Not PII

The SID of the Message resource for which to create MessageFeedback.

outcome
Optional
post enum:outcome Not PII

The outcome to report. Use confirmed to indicate that the Message recipient performed the tracked user action. Set ProvideFeedback=true when creating a new Message to track Message Feedback. Do not pass unconfirmed as the value of the Outcome parameter, since it is already the initial value for the MessageFeedback of a newly created Message.

Example 1
Loading Code Sample...
        
        

        Create Message Feedback to confirm the performance of the tracked user action

        What's next?

        Now that you know how to work with the MessageFeedback resource, you should check out the following:

        • View your reported Message Feedback information in the Console to help you monitor and understand your message deliverability.
        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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

        Loading Code Sample...
              
              
              

              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              thanks-feedback-gif