---
title: "Get historical contact statistics"
method: GET
path: "/v1/projects/{project_id}/contact_stats"
tags: ["Contact"]
---

# Get historical contact statistics

`GET /v1/projects/{project_id}/contact_stats`

## Request

- Base URL: `https://api.telerivet.com`
- URL: `https://api.telerivet.com/v1/projects/{project_id}/contact_stats`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://telerivet.com/oauth/authorize`, token URL `https://api.telerivet.com/oauth/token`)

Retrieves statistics about the number of contacts in the project (total or in particular groups) over a date range. This endpoint returns historical data that is computed shortly after midnight each day in the project's time zone. If the date range includes the current day, it will include the current number of contacts.

 To get historical statistics for the number of contacts matching a filter, use project.createGroup to create a dynamic group for each filter you want to track. However, the statistics will only be available for dates after the dynamic group was created.

## Path parameters

- `project_id` string, required

## Query parameters

- `start_date` string, required
- `end_date` string, required
- `rollup` 'day' | 'week' | 'month' | 'year'
- `cumulative` boolean
- `series` string

## Response `200`

Successful response

- object
  - `intervals` object[]: List of objects representing each date interval.
    - `start_time` integer: UNIX timestamp of the start of the interval
    - `end_time` integer: UNIX timestamp of the end of the interval, exclusive
    - `start_date` string: Date of the start of the interval in YYYY-MM-DD format
    - `end_date` string: Date of the end of the interval in YYYY-MM-DD format, inclusive
    - `values` object: Number of contacts for each requested series, with the key `total` for the total number of contacts in the project, and group IDs as keys for the number of contacts in each requested group

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key or Bearer token
- `404`: Resource not found

---

[API](https://skmtc.dev/telerivet/apis/telerivet-api.md) · [All operations](https://skmtc.dev/telerivet/apis/telerivet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telerivet/apis/telerivet-api/revisions/4e14b1c8d917?raw)
