> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ada.cx/llms.txt.

# Return how many conversations and metrics have their current record in a window

GET https://example.ada.support/api/v2/export/custom-metric-verdicts/counts

Counts the conversations and metrics whose current record has a `record_last_updated` in `[updated_since, updated_to)`, by `metric_id`, `is_removed` and `verdict`. This endpoint is in limited availability. If it is not enabled for your AI Agent, the response is a 403.

Reference: https://docs.ada.cx/data-export-custom-metric-verdicts/get-custom-metric-verdict-counts

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `updated_since` (string, required) — The start of the window, inclusive
- `updated_to` (string, required) — The end of the window, exclusive. It is at most 24 hours after `updated_since` and at or before the export bound.

## Response

### 200

The request was successfully processed

- `data` (list of CustomMetricVerdictCount, required)
- `meta` (CustomMetricVerdictCountsResponseMeta, required)

## Errors

### 400 Bad Request Error

Invalid request

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 401 Unauthorized Error

Unauthorized

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 403 Forbidden Error

The export of Custom Metric verdicts is not turned on for this AI Agent

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 404 Not Found Error

The AI Agent does not have Custom Metrics

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 429 Too Many Requests Error

Too Many Requests

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 500 Internal Server Error

Internal Server Error

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 503 Service Unavailable Error

A store that the answer needs could not be read in time, or the window has records of more than 250,000 conversations. For the second cause, every call gives a 503. Count shorter windows that together cover it, and add their counts.

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

## Types

### CustomMetricVerdictCount

- `metric_id` (string, required)
- `is_removed` (boolean, required)
- `verdict` (string, required, nullable)
- `count` (integer, required)

### CustomMetricVerdictCountsResponseMeta

- `as_of` (string, required) — The database time when the counts were read

### ErrorsErrorsItems

- `type` (string, required) — The error type
- `message` (string, required) — The error message
- `details` (string, optional, nullable) — Extra information about the error

## Examples

**Response**

```json
{
  "data": [
    {
      "metric_id": "671f0c2e9b1d4a0011223344",
      "is_removed": false,
      "verdict": "pass",
      "count": 4120
    },
    {
      "metric_id": "671f0c2e9b1d4a0011223344",
      "is_removed": true,
      "verdict": "pass",
      "count": 2
    }
  ],
  "meta": {
    "as_of": "2026-11-17T10:59:12.000Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://example.ada.support/api/v2/export/custom-metric-verdicts/counts"

querystring = {"updated_since":"updated_since","updated_to":"updated_to"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://example.ada.support/api/v2/export/custom-metric-verdicts/counts?updated_since=updated_since&updated_to=updated_to';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://example.ada.support/api/v2/export/custom-metric-verdicts/counts?updated_since=updated_since&updated_to=updated_to"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://example.ada.support/api/v2/export/custom-metric-verdicts/counts?updated_since=updated_since&updated_to=updated_to")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://example.ada.support/api/v2/export/custom-metric-verdicts/counts?updated_since=updated_since&updated_to=updated_to")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://example.ada.support/api/v2/export/custom-metric-verdicts/counts?updated_since=updated_since&updated_to=updated_to', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://example.ada.support/api/v2/export/custom-metric-verdicts/counts?updated_since=updated_since&updated_to=updated_to");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://example.ada.support/api/v2/export/custom-metric-verdicts/counts?updated_since=updated_since&updated_to=updated_to")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```