# Verification Attempts Summary

> \[!NOTE]
>
> The Verification Attempts Summary API is currently in the Public Beta release stage.
>
> Verification Attempts Summary API currently supports the following channels: **SMS**, **Voice**, **WhatsApp**, **RBM** (Rich Business Messaging), and **Email**.

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](#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](/docs/verify/api/attempts).

## Rate limits

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.

## Timeouts

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

## Verification Attempts Summary Response Properties

These properties are returned in the JSON response output.

```json
{"type":"object","refName":"verify.v2.verification_attempts_summary","modelName":"verify_v2_verification_attempts_summary","properties":{"total_attempts":{"type":"integer","default":0,"description":"Total of attempts made according to the provided filters"},"total_converted":{"type":"integer","default":0,"description":"Total of  attempts made that were confirmed by the end user, according to the provided filters."},"total_unconverted":{"type":"integer","default":0,"description":"Total of attempts made that were not confirmed by the end user, according to the provided filters."},"conversion_rate_percentage":{"type":"string","nullable":true,"description":"Percentage of the confirmed messages over the total, defined by (total_converted/total_attempts)*100. "},"url":{"type":"string","format":"uri","nullable":true}}}
```

## Get a Verification Attempts Summary

`GET https://verify.twilio.com/v2/Attempts/Summary`

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

{" "}

### Query parameters

```json
[{"name":"VerifyServiceSid","in":"query","description":"Filter used to consider only Verification Attempts of the given verify service on the summary aggregation.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^VA[0-9a-fA-F]{32}$"},"examples":{"getAttemptsSummary":{"value":"VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}},{"name":"DateCreatedAfter","in":"query","description":"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.","schema":{"type":"string","format":"date-time"},"examples":{"getAttemptsSummary":{"value":"2022-03-02T21:02:33Z"}}},{"name":"DateCreatedBefore","in":"query","description":"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.","schema":{"type":"string","format":"date-time"},"examples":{"getAttemptsSummary":{"value":"2022-03-02T21:02:33Z"}}},{"name":"Country","in":"query","description":"Filter used to consider only Verification Attempts sent to the specified destination country on the summary aggregation.","schema":{"type":"string","format":"iso-country-code"},"examples":{"getAttemptsSummary":{"value":"CO"}}},{"name":"Channel","in":"query","description":"Filter Verification Attempts considered on the summary aggregation by communication channel.","schema":{"type":"string","enum":["sms","call","email","whatsapp","rbm"],"refName":"verification_attempts_summary_enum_channels","modelName":"verification_attempts_summary_enum_channels"},"examples":{"getAttemptsSummary":{"value":"sms"}}},{"name":"DestinationPrefix","in":"query","description":"Filter the Verification Attempts considered on the summary aggregation by Destination prefix. It is the prefix of a phone number in E.164 format.","schema":{"type":"string"},"examples":{"getAttemptsSummary":{"value":"+57305"}}}]
```

{" "}

Fetch Verification Attempts Summary

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchVerificationAttemptsSummary() {
  const verificationAttemptsSummary = await client.verify.v2
    .verificationAttemptsSummary()
    .fetch();

  console.log(verificationAttemptsSummary.totalAttempts);
}

fetchVerificationAttemptsSummary();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

verification_attempts_summary = (
    client.verify.v2.verification_attempts_summary().fetch()
)

print(verification_attempts_summary.total_attempts)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Verify.V2;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var verificationAttemptsSummary = await VerificationAttemptsSummaryResource.FetchAsync();

        Console.WriteLine(verificationAttemptsSummary.TotalAttempts);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.verify.v2.VerificationAttemptsSummary;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        VerificationAttemptsSummary verificationAttemptsSummary = VerificationAttemptsSummary.fetcher().fetch();

        System.out.println(verificationAttemptsSummary.getTotalAttempts());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	verify "github.com/twilio/twilio-go/rest/verify/v2"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &verify.FetchVerificationAttemptsSummaryParams{}

	resp, err := client.VerifyV2.FetchVerificationAttemptsSummary(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		fmt.Println(resp.TotalAttempts)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$verification_attempts_summary = $twilio->verify->v2
    ->verificationAttemptsSummary()
    ->fetch();

print $verification_attempts_summary->totalAttempts;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

verification_attempts_summary = @client
                                .verify
                                .v2
                                .verification_attempts_summary
                                .fetch

puts verification_attempts_summary.total_attempts
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:verify:v2:attempts:summary:fetch
```

```bash
curl -X GET "https://verify.twilio.com/v2/Attempts/Summary" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "total_attempts": 11,
  "total_converted": 9,
  "total_unconverted": 2,
  "conversion_rate_percentage": "81.818181818",
  "url": "https://verify.twilio.com/v2/Attempts/Summary"
}
```

{" "}

Fetch Verification Attempts Summary by Verify Service SID

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchVerificationAttemptsSummary() {
  const verificationAttemptsSummary = await client.verify.v2
    .verificationAttemptsSummary()
    .fetch({ verifyServiceSid: "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" });

  console.log(verificationAttemptsSummary.totalAttempts);
}

fetchVerificationAttemptsSummary();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

verification_attempts_summary = (
    client.verify.v2.verification_attempts_summary().fetch(
        verify_service_sid="VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    )
)

print(verification_attempts_summary.total_attempts)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Verify.V2;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var verificationAttemptsSummary = await VerificationAttemptsSummaryResource.FetchAsync(
            verifyServiceSid: "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(verificationAttemptsSummary.TotalAttempts);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.verify.v2.VerificationAttemptsSummary;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        VerificationAttemptsSummary verificationAttemptsSummary =
            VerificationAttemptsSummary.fetcher().setVerifyServiceSid("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch();

        System.out.println(verificationAttemptsSummary.getTotalAttempts());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	verify "github.com/twilio/twilio-go/rest/verify/v2"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &verify.FetchVerificationAttemptsSummaryParams{}
	params.SetVerifyServiceSid("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")

	resp, err := client.VerifyV2.FetchVerificationAttemptsSummary(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		fmt.Println(resp.TotalAttempts)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$verification_attempts_summary = $twilio->verify->v2
    ->verificationAttemptsSummary()
    ->fetch(["verifyServiceSid" => "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]);

print $verification_attempts_summary->totalAttempts;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

verification_attempts_summary = @client
                                .verify
                                .v2
                                .verification_attempts_summary
                                .fetch(
                                  verify_service_sid: 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
                                )

puts verification_attempts_summary.total_attempts
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:verify:v2:attempts:summary:fetch \
   --verify-service-sid VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://verify.twilio.com/v2/Attempts/Summary?VerifyServiceSid=VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "total_attempts": 11,
  "total_converted": 9,
  "total_unconverted": 2,
  "conversion_rate_percentage": "81.818181818",
  "url": "https://verify.twilio.com/v2/Attempts/Summary"
}
```

Fetch Verification Attempts Summary by Country

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchVerificationAttemptsSummary() {
  const verificationAttemptsSummary = await client.verify.v2
    .verificationAttemptsSummary()
    .fetch({ country: "CO" });

  console.log(verificationAttemptsSummary.totalAttempts);
}

fetchVerificationAttemptsSummary();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

verification_attempts_summary = (
    client.verify.v2.verification_attempts_summary().fetch(country="CO")
)

print(verification_attempts_summary.total_attempts)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Verify.V2;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var verificationAttemptsSummary =
            await VerificationAttemptsSummaryResource.FetchAsync(country: "CO");

        Console.WriteLine(verificationAttemptsSummary.TotalAttempts);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.verify.v2.VerificationAttemptsSummary;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        VerificationAttemptsSummary verificationAttemptsSummary =
            VerificationAttemptsSummary.fetcher().setCountry("CO").fetch();

        System.out.println(verificationAttemptsSummary.getTotalAttempts());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	verify "github.com/twilio/twilio-go/rest/verify/v2"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &verify.FetchVerificationAttemptsSummaryParams{}
	params.SetCountry("CO")

	resp, err := client.VerifyV2.FetchVerificationAttemptsSummary(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		fmt.Println(resp.TotalAttempts)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$verification_attempts_summary = $twilio->verify->v2
    ->verificationAttemptsSummary()
    ->fetch(["country" => "CO"]);

print $verification_attempts_summary->totalAttempts;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

verification_attempts_summary = @client
                                .verify
                                .v2
                                .verification_attempts_summary
                                .fetch(country: 'CO')

puts verification_attempts_summary.total_attempts
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:verify:v2:attempts:summary:fetch \
   --country CO
```

```bash
curl -X GET "https://verify.twilio.com/v2/Attempts/Summary?Country=CO" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "total_attempts": 11,
  "total_converted": 9,
  "total_unconverted": 2,
  "conversion_rate_percentage": "81.818181818",
  "url": "https://verify.twilio.com/v2/Attempts/Summary"
}
```
