You are viewing the Spanish (Mexico) site, but your language preference is set to English. Switch to English site →

Menu

Expand
Calificar esta página:

MessageFeedback Resource

MessageFeedback is a subresource of a Message resource. Message Feedback represents the user-reported outcome of a message.

To better understand and optimize message deliverability, see sending Message Feedback to Twilio.

Looking for step-by-step instructions on tracking the delivery status of your sent messages? Follow our guide to Tracking Delivery Status in your programming language of choice.

MessageFeedback properties

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

The SID of the Account that created the MessageFeedback resource.

message_sid
sid<MM> Not PII

The SID of the Message resource for which the feedback was provided.

outcome
enum:outcome Not PII

Whether the feedback has arrived. Can be: unconfirmed or confirmed. If provide_feedback=true in the initial HTTP POST, the initial value of this property is unconfirmed. After the message arrives, update the value to confirmed.

date_created
date_time<rfc2822> Not PII

La fecha y hora en GMT en que se creó el recurso, especificadas en formato RFC 2822.

date_updated
date_time<rfc2822> Not PII

La fecha y hora en GMT en que se actualizó el recurso por última vez, especificadas en el formato RFC 2822.

uri
string Not PII

La URL del recurso, referente a “https://api.twilio.com”.

Outcome Values

The following are the possible values for the Outcome parameter:

Outcome Description
unconfirmed

The message has not yet arrived at the To phone number.

Note that this may mean the message has failed or it is still pending. For the purposes of the Message Feedback API, failed and pending are both considered unconfirmed.

Your application should not POST this value as is set by default when the initial HTTP POST includes ProvideFeedback=true.

confirmed The message has arrived at the To phone number.

Even if the message is delayed in delivery, you should still POST this value as soon as you have confirmed that the message was received.

Create a MessageFeedback resource

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

To track message feedback, you must set ProvideFeedback=true when you first create the Message. This will create a Message Feedback instance with an Outcome of unconfirmed.

Once you confirm that your message arrived at its destination, you can update the Feedback instance. POST to the Message Feedback resource to update Outcome to confirmed.

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

El SID de la Account que creará el recurso.

message_sid
Path
post sid<MM> Not PII

The SID of the Message resource for which the feedback was provided.

outcome
Optional
post enum:outcome Not PII

Whether the feedback has arrived. Can be: unconfirmed or confirmed. If provide_feedback=true in the initial HTTP POST, the initial value of this property is unconfirmed. After the message arrives, update the value to confirmed.

Example Usage

Set the ProvideFeedback parameter to true when you send the message.

curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/ACa9b8c7d6e5f43120a9b8c7d6e5f43120/Messages.json' \
--data-urlencode 'To=+18085551234'  \
--data-urlencode 'From=+16045559876'  \
--data-urlencode 'Body=Your verification code is: 249205' \
--data-urlencode 'ProvideFeedback=true'  \
-u ACa9b8c7d6e5f43120a9b8c7d6e5f43120:[AuthToken]

Save the message SID – you can find this in the API response of your sent message:

{"sid": "SM1f2e3d4c5b6a70891f2e3d4c5b6a7089", "date_created": "Thu, 14 Jul 2016 14:18:40 +0000", ...}

If the user receives the text message, POST to the Feedback subresource to set the message Outcome to 'confirmed'.

curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/ACa9b8c7d6e5f43120a9b8c7d6e5f43120/Messages/SM1f2e3d4c5b6a70891f2e3d4c5b6a7089/Feedback.json' \
--data-urlencode 'Outcome=confirmed'  \
-u ACa9b8c7d6e5f43120a9b8c7d6e5f43120:[AuthToken]
Example 1
        
        
        

        Helper Library Support

        The Message Feedback endpoint is supported in our Next Generation Helper Libraries. This endpoint is not supported by our legacy helper libraries.

        If you are using a legacy helper library, you can still use the Message Feedback API by POSTing directly to the REST endpoint.

        Calificar esta página:

        ¿Necesitas ayuda?

        Todos la necesitamos a veces; la programación es difícil. Obtén ayuda ahora de nuestro equipo de soporte, o recurre a la sabiduría de la multitud visitando Stack Overflow Collective de Twilio o navegando por la etiqueta de Twilio en Stack Overflow.

              
              
              

              Gracias por tus comentarios.

              Selecciona los motivos de tus comentarios. La información adicional que nos brindas nos ayuda a mejorar nuestra documentación:

              Enviando tus comentarios…
              🎉 Gracias por tus comentarios.
              Se produjo un error. Inténtalo de nuevo.

              Gracias por tus comentarios.

              thanks-feedback-gif