> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://doc.youratlas.com/v1/llms.txt
> - v2: https://doc.youratlas.com/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://doc.youratlas.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://doc.youratlas.com/_mcp/server.

# Get ROI statistics

GET https://api.youratlas.com/v1/api/dashboard/roi-stats

The numbers on the dashboard performance section: 7, 30 and 90 day periods with deltas, plus weekly success rates. The snapshot is rebuilt weekly, so read `referenceDate` before treating `30d` as the 30 days ending today.

Reference: https://doc.youratlas.com/api-reference/atlas-api/dashboard/get-roi-stats

## Authentication

- `api-key` header (required) — Your Atlas API key. Get it from the Atlas Portal under Settings > API Keys.

## Request

### Query parameters

- `campaignId` (string, optional) — Limit the result to one campaign. Omit for the account-wide roll-up.

## Response

### 200

Successful response

- `referenceDate` (string, optional) — Date the snapshot was built for.
- `customerId` (string, optional) — Account the snapshot belongs to.
- `billingStatus` (string, optional, nullable) — Billing status of the account, or null if none is recorded.
- `campaignCount` (integer, optional) — Number of campaigns on the account.
- `activeCampaignCount` (integer, optional) — Number of campaigns that are currently active.
- `totals` (DashboardRoiStatsGetResponsesContentApplicationJsonSchemaTotals, optional) — Metrics per period (`7d`, `30d`, `90d`) and their deltas versus the prior period.
- `weeklySuccessRates` (list of DashboardRoiStatsGetResponsesContentApplicationJsonSchemaWeeklySuccessRatesItems, optional) — Success rate for each recent week.
- `campaigns` (list of DashboardRoiStatsGetResponsesContentApplicationJsonSchemaCampaignsItems, optional) — Per-campaign breakdown.

## Errors

### 401 Unauthorized Error

Invalid or missing API key

- `error` (ErrorError, optional)

### 404 Not Found Error

Resource not found

- `error` (ErrorError, optional)

### 500 Internal Server Error

Internal server error

- `error` (ErrorError, optional)

## Types

### DashboardRoiStatsGetResponsesContentApplicationJsonSchemaTotals

Metrics per period (`7d`, `30d`, `90d`) and their deltas versus the prior period.

- `periods` (map from string to DashboardRoiStatsGetResponsesContentApplicationJsonSchemaTotalsPeriods, optional) — Metrics keyed by period.
- `deltas` (map from string to DashboardRoiStatsGetResponsesContentApplicationJsonSchemaTotalsDeltas, optional) — Change versus the prior period, keyed by period.

### DashboardRoiStatsGetResponsesContentApplicationJsonSchemaWeeklySuccessRatesItems

### DashboardRoiStatsGetResponsesContentApplicationJsonSchemaCampaignsItems

### ErrorError

- `message` (string, optional)
- `code` (string, optional)
- `requestId` (string, optional)

### DashboardRoiStatsGetResponsesContentApplicationJsonSchemaTotalsPeriods

- `calls` (double, optional) — Calls placed or received in the period.
- `successCalls` (double, optional) — Calls that met the success criteria.
- `connectionRate` (double, optional) — Share of calls that connected
- `bookings` (double, optional) — Appointments booked.
- `transfers` (double, optional) — Calls transferred to a person.
- `bubbleInteractions` (double, optional) — Two-way iMessage interactions.
- `talkTimeMs` (double, optional) — Total talk time in milliseconds.

### DashboardRoiStatsGetResponsesContentApplicationJsonSchemaTotalsDeltas

## Examples

**Response**

```json
{
  "referenceDate": "2026-03-02",
  "customerId": "auth0|65f1a2b3c4d5e6f7a8b9c0d1",
  "billingStatus": "active",
  "campaignCount": 3,
  "activeCampaignCount": 2,
  "totals": {
    "periods": {
      "7d": {
        "calls": 120,
        "successCalls": 48,
        "connectionRate": 0.62,
        "bookings": 9,
        "transfers": 4,
        "bubbleInteractions": 31,
        "talkTimeMs": 5400000
      }
    },
    "deltas": {
      "7d": {
        "calls": 0.12
      }
    }
  },
  "weeklySuccessRates": [],
  "campaigns": []
}
```

**SDK Code**

```python Dashboard_getRoiStats_example
import requests

url = "https://api.youratlas.com/v1/api/dashboard/roi-stats"

querystring = {"campaignId":"3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f"}

headers = {"api-key": "<apiKey>"}

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

print(response.json())
```

```javascript Dashboard_getRoiStats_example
const url = 'https://api.youratlas.com/v1/api/dashboard/roi-stats?campaignId=3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f';
const options = {method: 'GET', headers: {'api-key': '<apiKey>'}};

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

```go Dashboard_getRoiStats_example
package main

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

func main() {

	url := "https://api.youratlas.com/v1/api/dashboard/roi-stats?campaignId=3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f"

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

	req.Header.Add("api-key", "<apiKey>")

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

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

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

}
```

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

url = URI("https://api.youratlas.com/v1/api/dashboard/roi-stats?campaignId=3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f")

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

request = Net::HTTP::Get.new(url)
request["api-key"] = '<apiKey>'

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

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

HttpResponse<String> response = Unirest.get("https://api.youratlas.com/v1/api/dashboard/roi-stats?campaignId=3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f")
  .header("api-key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.youratlas.com/v1/api/dashboard/roi-stats?campaignId=3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f', [
  'headers' => [
    'api-key' => '<apiKey>',
  ],
]);

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

```csharp Dashboard_getRoiStats_example
using RestSharp;

var client = new RestClient("https://api.youratlas.com/v1/api/dashboard/roi-stats?campaignId=3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f");
var request = new RestRequest(Method.GET);
request.AddHeader("api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Dashboard_getRoiStats_example
import Foundation

let headers = ["api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.youratlas.com/v1/api/dashboard/roi-stats?campaignId=3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f")! 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()
```