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

# Get the headline metrics for a date range

GET https://example.ada.support/api/v2/analytics/metrics/

Returns the headline metrics of the dashboard Home page for a date range, with no filters. Each value is the number the Home page shows for the same dates and time zone. Rates are percentages from 0 to 100.

This endpoint is in limited availability. If it is not turned on for your AI Agent, it returns `404`.

Reference: https://docs.ada.cx/reference/analytics-metrics/get-analytics-metrics

## Authentication

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

## Request

### Query parameters

- `start_date` (string, required) — The first day of the range, inclusive, in the format YYYY-MM-DD. Use a date from 2000-01-01 to 2100-12-31.
- `end_date` (string, required) — The last day of the range, inclusive, in the format YYYY-MM-DD. Use a date from 2000-01-01 to 2100-12-31. The range can be at most 366 days.
- `time_zone` (string, optional, default: UTC) — The IANA time zone name that sets where each day starts and ends. Use the time zone of the dashboard user to get the same numbers as the Home page. The dashboard value `UTC/UTC` is accepted and reads as `UTC`.

## Response

### 200

OK

- `start_date` (string, required) — The first day of the range, inclusive
- `end_date` (string, required) — The last day of the range, inclusive
- `time_zone` (string, required) — The IANA time zone that the request used. A request with `UTC/UTC` returns `UTC`.
- `conversations_opened` (integer, required) — The number of conversations that opened in the range
- `conversations_engaged` (integer, required) — The number of conversations in the range where the customer sent at least one message
- `containment_rate` (double, required) — The percentage of engaged conversations that did not hand off to a human agent
- `automated_resolution_rate` (double, required, nullable) — The percentage of assessed conversations that the AI Agent resolved automatically. `null` when no conversation in the range is eligible for an assessment, or when the rate is not available. For some AI Agents, the rate is `0` in place of `null` when no conversation in the range has an assessment.
- `csat_rate` (double, required, nullable) — The percentage of satisfaction surveys with a positive score. `null` when no customer submitted a survey in the range.

## Errors

### 400 Bad Request Error

Bad Request. A date is not in the format YYYY-MM-DD or is outside 2000-01-01 to 2100-12-31, `end_date` is before `start_date`, the range is more than 366 days, or the time zone is not a known IANA name or `UTC/UTC`.

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

### 401 Unauthorized Error

Unauthorized (missing or non-Bearer token, or a token without the `platform_apis` or `analytics_metrics:read` scope)

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

### 404 Not Found Error

Not Found (the endpoint is not turned on for this AI Agent)

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

### 429 Too Many Requests Error

Too Many Requests (rate limit)

- `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

The analytics store cannot answer now. Try the request again later.

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

## Types

### 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
{
  "start_date": "2026-11-01",
  "end_date": "2026-11-07",
  "time_zone": "America/Toronto",
  "conversations_opened": 1200,
  "conversations_engaged": 950,
  "containment_rate": 76.4,
  "automated_resolution_rate": 61.2,
  "csat_rate": 82.5
}
```

**SDK Code**

```python
import requests

url = "https://example.ada.support/api/v2/analytics/metrics/"

querystring = {"start_date":"start_date","end_date":"end_date"}

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

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

print(response.json())
```

```javascript
const url = 'https://example.ada.support/api/v2/analytics/metrics/?start_date=start_date&end_date=end_date';
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/analytics/metrics/?start_date=start_date&end_date=end_date"

	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/analytics/metrics/?start_date=start_date&end_date=end_date")

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/analytics/metrics/?start_date=start_date&end_date=end_date")
  .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/analytics/metrics/?start_date=start_date&end_date=end_date', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://example.ada.support/api/v2/analytics/metrics/?start_date=start_date&end_date=end_date");
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/analytics/metrics/?start_date=start_date&end_date=end_date")! 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()
```