Skip to contentSkip to navigationSkip to topbar
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.

(information)

Info

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.

(information)

Info

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

messagefeedback-properties page anchor
Resource properties
account_sidtype: SID<AC>Not PII

message_sidtype: SID<SM|MM>Not PII

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


outcometype: enum<STRING>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(link takes you to an external page).

Possible values:
confirmedunconfirmed

date_createdtype: string<DATE TIME RFC 2822>Not PII

The date and time in GMT when this MessageFeedback resource was created, specified in RFC 2822(link takes you to an external page) format.


date_updatedtype: string<DATE TIME RFC 2822>Not PII

The date and time in GMT when this MessageFeedback resource was last updated, specified in RFC 2822(link takes you to an external page) format.


uritype: stringNot PII

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


The following are the possible values for the Outcome parameter:

ENUM:OUTCOME possible values in REST API format
confirmedThe 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.
unconfirmedThe 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

create-a-messagefeedback-resource page anchor
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json

(warning)

Warning

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.

(information)

Info

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

create-parameters page anchor
URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The SID of the Account(link takes you to an external page) associated with the Message resource for which to create MessageFeedback.


MessageSidtype: SID<SM|MM>Not PII
Path Parameter

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


Request body parameters
Outcometype: enum<STRING>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(link takes you to an external page) 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.

Possible values:
confirmedunconfirmed

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

create-message-feedback-to-confirm-the-performance-of-the-tracked-user-action page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.messages('SMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.feedback
_11
.create({outcome: 'confirmed'})
_11
.then(feedback => console.log(feedback.messageSid));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "Thu, 30 Jul 2015 20:00:00 +0000",
_10
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
_10
"message_sid": "MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"outcome": "confirmed",
_10
"uri": "uri"
_10
}


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(link takes you to an external page) to help you monitor and understand your message deliverability.

Rate this Page: