REST API: Call Quality Feedback

The Call Feedback subresource provides a simple API to report the quality experienced during a phone call. On one hand, if the call was perfect your users can rate it with a Quality Score of 5. On the other hand, if the user experienced an issue, they can rate it with a lower Quality Score and specify the issue experienced, such as diminished audio quality, call dropped or incorrect caller id.

This makes it easy to build to feedback interfaces integrated into your application when the call is over like the example below:

Call Quality UI

Call Feedback Instance Resource

Feedback is a subresource of a Call instance resource. It represents a call quality feedback entry for a given phone call.

Resource URI

/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback

Resource Properties

A Call Feedback instance resource is represented by the following properties:

Property Description
QualityScore 1 to 5 quality score where 1 represents imperfect experience and 5 represents a perfect call.
Issue A list of issues experienced during the call. The issues can be: imperfect-audio, dropped-call, incorrect-caller-id, post-dial-delay, digits-not-captured, audio-latency, or one-way-audio.
Issue Values

The following are the possible values for the 'Issue' parameter.

Issue Description
imperfect-audio Imperfect audio quality: Choppy, echoed, or garbled audio during conversation.
dropped-call Dropped call: call initially connected but was dropped.
incorrect-caller-id Incorrect caller ID: Call connected but caller ID displayed ‘Unknown’ or an incorrect number.
post-dial-delay Post dial delay: Call connected but there was a long delay between dialing the phone number and the start of ringing.
digits-not-captured DTMF tones not captured: Failed to capture digit input on phone menus.
unsolicited-call Unsolicited call: Received telemarketer, wrong number, automated or other type of unsolicited call.
audio-latency Audio latency: Call participants can hear each other but with significant audio delay.
one-way-audio One way audio: Only one party could hear the audio during the conversation.

HTTP GET

Returns the Feedback entry for a call identified by {CallSid}.

Example
Retrieve Feedback For a Call Example
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$feedback = $client->account->calls->getFeedback("CAe03b7cd806070d1f32bdb7f1046a41c0");
echo $feedback->date_created;
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$feedback = $client
    ->account
    ->calls("CAe03b7cd806070d1f32bdb7f1046a41c0")
    ->feedback()
    ->fetch();

echo $feedback->dateCreated->format('Y-m-d H:i:s');
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAe03b7cd806070d1f32bdb7f1046a41c0/Feedback.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAe03b7cd806070d1f32bdb7f1046a41c0/Feedback \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var feedback = twilio.GetFeedback("CAbb9fe897bc46347cddd23ba42c94bdac");
    
    Console.WriteLine(feedback.DateCreated);
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Feedback;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Feedback feedback = client.getAccount().getCall("CA42ed11f93dc08b952027ffbc406d0868").getFeedback();
    System.out.println(feedback.getDateCreated());

  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.calls("CA42ed11f93dc08b952027ffbc406d0868").feedback.get(function(err, feedback) {
    console.log(feedback.dateCreated);
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

feedback = client.calls.get("CAe03b7cd806070d1f32bdb7f1046a41c0").feedback.get()
print(feedback.date_created)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@feedback = @client.account.calls.get("CAe03b7cd806070d1f32bdb7f1046a41c0").feedback.get
puts @feedback.date_created
Show Output
  • JSON
  • XML
{
    "sid": "CAe03b7cd806070d1f32bdb7f1046a41c0",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "quality_score": 3,
    "issues": [
        "post-dial-delay",
        "dtmf-not-captured"
    ]
    "date_created": "Wed, 04 Aug 2010 21:37:41 +0000",
    "date_updated": "Fri, 06 Aug 2010 01:15:02 +0000",
}
<TwilioResponse>
    <Feedback>
        <Sid>CAe03b7cd806070d1f32bdb7f1046a41c0</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <QualityScore>3</QualityScore>
        <Issues>
            <Issue>post-dial-delay</Issue>
            <Issue>dtmf-not-captured</Issues>
        </Issues>
        <DateCreated>2012-02-04 15:44:15</DateCreated>
        <DateUpdated>2012-02-04 15:44:15</DateUpdated>
    </Feedback>
</TwilioResponse>

HTTP POST

The POST request creates or updates a feedback entry for a Call. Every feedback entry needs a quality score and can optionally have one or multiple issues. if successful, it returns the resource representation identical to that returned above when making a GET Request.

Required Parameters

You must include the following parameter in your POST request:

Parameter Description
QualityScore An integer 1 to 5 quality score where 1 represents very poor call quality and 5 represents a perfect call.
Optional Parameters

You may include the following parameter in your POST request:

Parameter Description
Issue One or more issues experienced during the call. The issues can be: imperfect-audio, dropped-call, incorrect-caller-id, post-dial-delay, digits-not-captured, audio-latency, or one-way-audio.
Example

Create a new Feedback entry for a given call.

Create Feedback for a Call Example
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$feedback = $client->account->calls->createFeedback("CAe03b7cd806070d1f32bdb7f1046a41c0", 3, array("imperfect-audio"));
echo $feedback->date_created;
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$feedback = $client
    ->account
    ->calls("CAe03b7cd806070d1f32bdb7f1046a41c0")
    ->feedback()
    ->create(
        3, array("issue" => "imperfect-audio")
    );

echo $feedback->dateCreated->format('Y-m-d H:i:s');
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAe03b7cd806070d1f32bdb7f1046a41c0/Feedback.json \
    -d "QualityScore=3" \
    -d "Issue=imperfect-audio" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAe03b7cd806070d1f32bdb7f1046a41c0/Feedback \
    -d "QualityScore=3" \
    -d "Issue=imperfect-audio" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
using System.Collections.Generic;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.CreateFeedback("CAe03b7cd806070d1f32bdb7f1046a41c0", 3, new List<string>() { "imperfect-audio" });
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.factory.FeedbackFactory;
import com.twilio.sdk.resource.instance.Call;
import com.twilio.sdk.resource.instance.Feedback;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Call call = client.getAccount().getCall("CAe03b7cd806070d1f32bdb7f1046a41c0");
    FeedbackFactory factory = call.getFeedbackFactory();

    // Build a filter for the AccountList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("QualityScore", "3"));
    params.add(new BasicNameValuePair("Issue", "imperfect-audio"));
    factory.create(params);

  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.calls("CAe03b7cd806070d1f32bdb7f1046a41c0").feedback.create({
    quality_score: "3",
    issue: "imperfect-audio"
}, function(err, feedback) {
    console.log(feedback.dateCreated);
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

feedback = client.calls.get("CAe03b7cd806070d1f32bdb7f1046a41c0").feedback.create(
    quality_score=3,
    issue=['imperfect-audio']
)
print(feedback.date_created)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@feedback = @client.calls.get("CAe03b7cd806070d1f32bdb7f1046a41c0").feedback.create(
    :quality_score => "3",
    :issue => "imperfect-audio",
)
puts @feedback.date_created
Show Output
  • JSON
  • XML
{
    "sid": "CAe03b7cd806070d1f32bdb7f1046a41c0",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "quality_score": 3,
    "issues": [
        "post-dial-delay",
        "dtmf-not-captured",
        "imperfect-audio"
    ]
    "date_created": "Wed, 04 Aug 2010 21:37:41 +0000",
    "date_updated": "Fri, 06 Aug 2010 01:15:02 +0000",
}
<TwilioResponse>
    <Feedback>
        <Sid>CAe03b7cd806070d1f32bdb7f1046a41c0</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <QualityScore>3</QualityScore>
        <Issues>
            <Issue>post-dial-delay</Issue>
            <Issue>dtmf-not-captured</Issues>
            <Issue>imperfect-audio</Issues>
        </Issues>
        <DateCreated>2012-02-04 15:44:15</DateCreated>
        <DateUpdated>2012-02-04 15:44:15</DateUpdated>
    </Feedback>
</TwilioResponse>

HTTP PUT

Not supported

HTTP DELETE

Not supported

Call Feedback Summary List Resource

With Feedback Summaries you can get a pulse of your end user’s perception of quality and the most common issues encountered in the context of all your voice traffic for a range of dates.

HTTP POST

With Feedback Summaries you can get a pulse of your end user’s perception of quality and the most common issues encountered in the context of all your voice traffic for a range of dates.

POST /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary

You must POST at least the following to create a new Feedback Summary:

Parameter Description
StartDate Only include usage that has occurred on or after this date. Format is YYYY-MM-DD. All dates are in UTC.
EndDate Only include usage that has occurred on or before this date. Format is YYYY-MM-DD. All dates are in UTC.
IncludeSubaccounts true to include feedback entries for the master account and all subaccounts. false to include feedback entries for the specified account. IncludeSubaccounts is false by default.

You may also set the a StatusCallback URL to get a webhook when the Feedback Summary is completed.

Parameter Description
StatusCallback The URL that Twilio will request when the Feedback Summary is completed.
StatusCallbackMethod The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST.
StatusCallback Parameter

After the Feedback Summary is completed, Twilio will make an asynchronous HTTP request to the StatusCallback URL if you provided one in your POST.

Request Parameters

The parameters Twilio passes to your application in its asynchronous request to the StatusCallback URL include the parameters specified below:

Parameter Description
AccountSid Your Twilio account id. It is 34 characters long, and always starts with the letters AC.
FeedbackSummarySid The unique id of the Feedback Summary.
Status The status of the Feedback Summary; queued, in-progress, completed, or failed.
ResourceUri The Feedback Summary Resource URI.

For example, you might request a Feedback Summary for the month of January, 2014 for the master account and all subaccounts. In this case, the query string would be StartDate=2014-02-01&EndDate=2014-02-31&IncludeSubaccounts=true. This would request a Feedback Summary for all feedback entries for calls made during January. See Example below.

Example

Create a new FeedbackSummary

Create Feedback Summary Example
  • C#
  • Java
  • Node.js
  • PHP
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

$summary = $client->account->calls->feedback_summary->create(
    array(
      	"StartDate" => "2014-06-01",
      	"EndDate" => "2014-06-30",
      	"IncludeSubaccounts" => "true",
      	"StatusCallback" => "http://www.example.com/feedback"
    )
);

echo $summary->status;
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$summary = $client
    ->account
    ->calls
    ->feedbackSummaries
    ->create(
        "2014-06-01", "2014-06-30",
        array(
            "includeSubaccounts" => "true",
            "statusCallback" => "http://www.example.com/feedback"
        )
    );

echo $summary->status;
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/FeedbackSummary.json \
    -d "StartDate=2014-06-01" \
    -d "EndDate=2014-06-30" \
    -d "IncludeSubaccounts=True" \
    -d "StatusCallback=http://www.example.com/feedback" \
    -u "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token"
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/FeedbackSummary \
    -d "StartDate=2014-06-01" \
    -d "EndDate=2014-06-30" \
    -d "IncludeSubaccounts=True" \
    -d "StatusCallback=http://www.example.com/feedback" \
    -u "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token"
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var summary = twilio.CreateFeedbackSummary(new DateTime(2014, 06, 1), new DateTime(2014, 06, 30), true);
    Console.WriteLine(summary.Status);
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.FeedbackSummary;
import java.util.HashMap;
import java.util.Map;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);


    // Build parameters for the FeedbackSummary
    Map<String, String> params = new HashMap<String, String>();
    params.put("StartDate", "2014-06-01");
    params.put("EndDate", "2014-06-30");
    params.put("IncludeSubaccounts", "true");
    params.put("StatusCallback", "http://www.example.com/feedback");

    // Create FeedbackSummary
    FeedbackSummary summary = client.getAccount().createFeedbackSummary(params);
    System.out.println(summary.getStatus());
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.calls.feedbackSummary.create({
    startDate: '2014-06-01',
    endDate: '2014-06-30',
    includeSubaccounts: true,
    statusCallback: 'http://www.example.com/feedback'
}, function(err, summary) {
    console.log(summary.sid);
});
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@summary = @client.account.calls.feedback_summary.create(
    :start_date => '2014-06-01',
    :end_date => '2014-06-30',
    :include_subaccounts => 'true')

puts @summary.status, @summary.sid
Show Output
  • JSON
  • XML
{
        "sid": "FSa346467ca321c71dbd5e12f627deb854",
        "start_date": "2014-06-01",
        "end_date": "2014-06-30",
        "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "include_subaccounts": true",
        "status": "in-progress",
        "call_count": null,
        "call_feedback_count": null,
        "quality_score_average": null,
        "quality_score_median": null,
        "quality_score_standard_deviation": null,
        "issues": [],
        "date_created": "Thu, 19 Aug 2014 00:25:48 +0000",
        "date_updated": "Thu, 19 Aug 2014 00:25:48 +0000"
}
<TwilioResponse>
    <FeedbackSummary>
        <Sid>FSa346467ca321c71dbd5e12f627deb854</Sid>
        <StartDate>2014-06-01</StartDate>
        <EndDate>2014-06-30</EndDate>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <IncludeSubaccounts>true</IncludeSubaccounts>
        <Status>in-progress</Status>
        <CallCount/>
        <CallFeedbackCount/>
        <QualityScoreAverage/>
        <QualityScoreMedian/>
        <QualityScoreStandardDeviation/>
        <Issues/>
        <DateCreated>Thu, 19 Aug 2010 00:25:48 +0000</DateCreated>
        <DateUpdated>Thu, 19 Aug 2010 00:25:48 +0000</DateUpdated>
    </FeedbackSummary>
</TwilioResponse>

Call Feedback Summary Instance Resource

Returns FeedbackSummary that was previously requested.

Resource URI

/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{FeedbackSummarySid}

Resource Properties

A Feedback Summary instance resource is represented by the following properties:

Parameter Description
StartDate The first date for which feedback entries are included in this Feedback Summary, formatted as YYYY-MM-DD. All dates are in UTC.
EndDate The last date for which feedback entries are included in this Feedback Summary, formatted as YYYY-MM-DD. All dates are in UTC.
AccountSid The Account that reported the feedback entry.
IncludeSubaccounts true if the feedback summary includes subaccounts, false otherwise.
Status The status of the feedback summary can be queued, in-progress, completed, or failed.
CallCount The total number of calls.
CallFeedbackCount The total number of calls with a feedback entry.
QualityScoreAverage The average QualityScore of the feedback entries.
QualityScoreMedian The median QualityScore of the feedback entries.
QualityScoreStandardDeviation The standard deviation of the quality scores.
Issues A list of all the issues experienced. The list includes the issue name, the number of occurrences and percentage of calls that experienced this issue.

HTTP GET

Returns a representation of the Feedback Summary identified by {FeedbackSummarySid}.

Example 1

Return the FeedbackSummary entry

Retrieve Feedback Summary Example
  • C#
  • Java
  • Node.js
  • PHP
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$summary = $client->account->calls->feedback_summary->get("FSa346467ca321c71dbd5e12f627deb854");
echo $summary->date_created;
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$summary = $client
    ->account
    ->calls
    ->feedbackSummaries("FSa346467ca321c71dbd5e12f627deb854")
    ->fetch();

echo $summary->dateCreated->format('Y-m-d H:i:s');
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/FeedbackSummary.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/FeedbackSummary \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var feedbackSummary = twilio.GetFeedbackSummary("FSa346467ca321c71dbd5e12f627deb854");

    Console.WriteLine(feedbackSummary.DateCreated);
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.FeedbackSummary;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    FeedbackSummary feedbackSummary = client.getAccount().getFeedbackSummary("FSa346467ca321c71dbd5e12f627deb854");
    System.out.println(feedbackSummary.getDateCreated());

  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.calls.feedbackSummary("FSa346467ca321c71dbd5e12f627deb854").get(function(err, summary) {
    console.log(summary.dateCreated);
});
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@summary = @client.account.calls.feedback_summary.get("FSa346467ca321c71dbd5e12f627deb854")
puts @summary.date_created
Show Output
  • JSON
  • XML
{
    "sid": "FSa346467ca321c71dbd5e12f627deb854",
    "start_date": "2014-01-01",
    "end_date": "2014-01-31",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "include_subaccounts": true,
    "status": "completed",
    "call_count": 10200,
    "call_feedback_count": 729,
    "quality_score_average": 4.5,
    "quality_score_median": 4,
    "quality_score_standard_deviation": 1,
    "issues": [
        {
            "description": "imperfect-audio",
            "count": 45,
            "percentage_of_total_calls": "0.04%",
        }
    ]
    "date_created": "Tue, 10 Aug 2010 08:02:17 +0000",
    "date_updated": "Tue, 10 Aug 2010 08:02:47 +0000",
}
<TwilioResponse>
    <FeedbackSummary>
        <Sid>FSa346467ca321c71dbd5e12f627deb854</Sid>
        <StartDate>2014-01-01</StartDate>
        <EndDate>2014-01-31</EndDate>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <IncludeSubaccounts>true</IncludeSubaccounts>
        <Status>completed</Status>
        <CallCount>10200</CallCount>
        <CallFeedbackCount>729</CallFeedbackCount>
        <QualityScoreAverage>4.5</QualityScoreAverage>
        <QualityScoreMedian>4</QualityScoreMedian>
        <QualityScoreStandardDeviation>1</QualityScoreStandardDeviation>
        <Issues>
            <Issue>
                <Description>imperfect-audio</Description>
                <Count>45</Count>
                <PercentageOfTotalCalls>0.04%</PercentageOfTotalCalls>
            </Issue>
        </Issues>
        <DateCreated>Thu, 19 Aug 2010 00:25:48 +0000</DateCreated>
        <DateUpdated>Thu, 19 Aug 2010 00:25:48 +0000</DateUpdated>
    </FeedbackSummary>
</TwilioResponse>
Example 2

Return the FeedbackSummary entry when in-progress

  • 4.x
  • 5.x
  • json
  • xml
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$summary = $client->account->calls->feedback_summary->get("FSa346467ca321c71dbd5e12f627deb854");
echo $summary->date_created;
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$summary = $client
    ->account
    ->calls
    ->feedbackSummaries("FSa346467ca321c71dbd5e12f627deb854")
    ->fetch();

echo $summary->dateCreated->format('Y-m-d H:i:s');
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/FeedbackSummary.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/FeedbackSummary \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var feedbackSummary = twilio.GetFeedbackSummary("FSa346467ca321c71dbd5e12f627deb854");

    Console.WriteLine(feedbackSummary.DateCreated);
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.FeedbackSummary;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    FeedbackSummary feedbackSummary = client.getAccount().getFeedbackSummary("FSa346467ca321c71dbd5e12f627deb854");
    System.out.println(feedbackSummary.getDateCreated());

  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.calls.feedbackSummary("FSa346467ca321c71dbd5e12f627deb854").get(function(err, summary) {
    console.log(summary.dateCreated);
});
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@summary = @client.account.calls.feedback_summary.get("FSa346467ca321c71dbd5e12f627deb854")
puts @summary.date_created
Show Output
  • JSON
  • XML
{
    "sid": "FSa346467ca321c71dbd5e12f627deb854",
    "start_date": "2014-01-01",
    "end_date": "2014-01-31",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "include_subaccounts": true,
    "status": "in-progress",
    "call_count": null,
    "call_feedback_count": null,
    "quality_score_average": null,
    "quality_score_median": null,
    "quality_score_standard_deviation": null,
    "issues": null,
    "date_created": "Tue, 10 Aug 2010 08:02:17 +0000",
    "date_updated": "Tue, 10 Aug 2010 08:02:47 +0000",
}
<TwilioResponse>
    <FeedbackSummary>
        <Sid>FSa346467ca321c71dbd5e12f627deb854</Sid>
        <StartDate>2014-01-01</StartDate>
        <EndDate>2014-01-31</EndDate>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <IncludeSubaccounts>true</IncludeSubaccounts>
        <Status>in-progress</Status>
        <CallCount/>
        <CallFeedbackCount/>
        <QualityScoreAverage/>
        <QualityScoreMedian/>
        <QualityScoreStandardDeviation/>
        <Issues/>
        <DateCreated>Thu, 19 Aug 2010 00:25:48 +0000</DateCreated>
        <DateUpdated>Thu, 19 Aug 2010 00:25:48 +0000</DateUpdated>
    </FeedbackSummary>
</TwilioResponse>

HTTP DELETE

Deletes a Feedback Summary.

If successful, Twilio will return an HTTP 204 response with no body.

DELETE /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{FeedbackSummarySid}
Example

Delete the FeedbackSummary entry

Delete Feedback Summary Example
  • C#
  • Java
  • Node.js
  • PHP
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

$client->account->calls->feedback_summary->delete("FSa346467ca321c71dbd5e12f627deb854");
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$summary = $client
    ->account
    ->calls
    ->feedbackSummaries("FSa346467ca321c71dbd5e12f627deb854")
    ->delete();
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/FeedbackSummary/FSa346467ca321c71dbd5e12f627deb854.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/FeedbackSummary/FSa346467ca321c71dbd5e12f627deb854 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteFeedbackSummary("FSa346467ca321c71dbd5e12f627deb854");
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.FeedbackSummary;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    client.getAccount().deleteFeedbackSummary("FSa346467ca321c71dbd5e12f627deb854");
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.calls.feedbackSummary("FSa346467ca321c71dbd5e12f627deb854").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid FSa346467ca321c71dbd5e12f627deb854 deleted successfully.");
    }
});
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@summary = @client.account.calls.feedback_summary.get("FSa346467ca321c71dbd5e12f627deb854")
@summary.delete