Skip to contentSkip to navigationSkip to topbar
On this page

Verification Attempts Summary


(information)

Info

The Verification Attempts Summary API is currently in the Public Beta release stage!

Please note that Verification Attempts Summary API currently only supports SMS, WhatsApp, and Voice channels.

The Verification Attempts Summary API allows you to summarize verification attempts generated by your Verify V2 services.

A verification attempt is a communication attempt with the end user that contains a verification code and uses one of the channels supported by Twilio Verify. A single verification may generate one or more verification attempts.

This API contains one endpoint:

  1. Get a Verification Attempts Summary: Returns a summary of verification attempts including total conversions and conversion rate percentage

You can list, filter, and fetch verification attempts using the Verification Attempts API.

Verification Attempts Summary API currently supports only the SMS, Call & WhatsApp channel.


Rate limits

rate-limits page anchor

Verification Attempts Summary API provides a built-in rate limit of 100 requests per minute. If you reach this limit, you will start receiving HTTP 429 "Too Many Requests" responses.


Verification Attempts Summary API has a timeout value of 15 seconds. However, its 99th percentile is within 1 second.


Verification Attempts Summary Response Properties

verification-attempts-summary-response-properties page anchor

These properties are returned in the JSON response output.

Property nameTypeRequiredDescriptionChild properties
total_attemptsinteger

Optional

Not PII

Total of attempts made according to the provided filters

Default: 0

total_convertedinteger

Optional

Total of attempts made that were confirmed by the end user, according to the provided filters.

Default: 0

total_unconvertedinteger

Optional

Total of attempts made that were not confirmed by the end user, according to the provided filters.

Default: 0

conversion_rate_percentagenumber

Optional

Percentage of the confirmed messages over the total, defined by (total_converted/total_attempts)*100.


urlstring<uri>

Optional


Get a Verification Attempts Summary

get-a-verification-attempts-summary page anchor
GET https://verify.twilio.com/v2/Attempts/Summary

Returns a summary of verification attempts that match the selected query parameters.

Query parameters

query-parameters page anchor
Property nameTypeRequiredPIIDescription
VerifyServiceSidSID<VA>

Optional

Filter used to consider only Verification Attempts of the given verify service on the summary aggregation.

Pattern: ^VA[0-9a-fA-F]{32}$Min length: 34Max length: 34

DateCreatedAfterstring<date-time>

Optional

Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z.


DateCreatedBeforestring<date-time>

Optional

Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z.


Countrystring<iso-country-code>

Optional

Filter used to consider only Verification Attempts sent to the specified destination country on the summary aggregation.


Channelenum<string>

Optional

Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are SMS, CALL and WHATSAPP

Possible values:
smscallemailwhatsapp

DestinationPrefixstring

Optional

Filter the Verification Attempts considered on the summary aggregation by Destination prefix. It is the prefix of a phone number in E.164 format.

Fetch Verification Attempts SummaryLink to code sample: Fetch Verification Attempts Summary
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchVerificationAttemptsSummary() {
11
const verificationAttemptsSummary = await client.verify.v2
12
.verificationAttemptsSummary()
13
.fetch();
14
15
console.log(verificationAttemptsSummary.totalAttempts);
16
}
17
18
fetchVerificationAttemptsSummary();

Output

1
{
2
"total_attempts": 11,
3
"total_converted": 9,
4
"total_unconverted": 2,
5
"conversion_rate_percentage": "81.818181818",
6
"url": "https://verify.twilio.com/v2/Attempts/Summary"
7
}
Fetch Verification Attempts Summary by Verify Service SIDLink to code sample: Fetch Verification Attempts Summary by Verify Service SID
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchVerificationAttemptsSummary() {
11
const verificationAttemptsSummary = await client.verify.v2
12
.verificationAttemptsSummary()
13
.fetch({ verifyServiceSid: "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" });
14
15
console.log(verificationAttemptsSummary.totalAttempts);
16
}
17
18
fetchVerificationAttemptsSummary();

Output

1
{
2
"total_attempts": 11,
3
"total_converted": 9,
4
"total_unconverted": 2,
5
"conversion_rate_percentage": "81.818181818",
6
"url": "https://verify.twilio.com/v2/Attempts/Summary"
7
}
Fetch Verification Attempts Summary by CountryLink to code sample: Fetch Verification Attempts Summary by Country
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchVerificationAttemptsSummary() {
11
const verificationAttemptsSummary = await client.verify.v2
12
.verificationAttemptsSummary()
13
.fetch({ country: "CO" });
14
15
console.log(verificationAttemptsSummary.totalAttempts);
16
}
17
18
fetchVerificationAttemptsSummary();

Output

1
{
2
"total_attempts": 11,
3
"total_converted": 9,
4
"total_unconverted": 2,
5
"conversion_rate_percentage": "81.818181818",
6
"url": "https://verify.twilio.com/v2/Attempts/Summary"
7
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.