> ## Documentation Index
> Fetch the complete documentation index at: https://developers.notion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics reports

> Learn how to create, check, and download workspace analytics reports.

> [!NOTE]
>
> The analytics reports API is in beta.

An analytics report is a CSV or JSONL file of workspace usage data. Reports run in the background, so getting one takes three requests.

Every request needs the `Notion-Version: 2026-06-01` header. See [Versioning](https://developers.notion.com/reference/admin/versioning.md).

## Get a report

**1. Create the report**

Send the workspace and the date range. The response is `202 Accepted` with the report's `id` and `status: "queued"`.

```bash theme={null}
curl -X POST https://api.notion.com/admin/v1/analytics/user_activity/reports \
  -H "Authorization: Bearer $NOTION_ADMIN_TOKEN" \
  -H "Notion-Version: 2026-06-01" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: user-activity-2026-10" \
  -d '{
    "workspace_id": "6f2d3c1e-8b4a-4f7e-9c21-5a0d8e7b3f42",
    "start_date": "2026-10-01",
    "end_date": "2026-10-31",
    "time_zone": "America/New_York",
    "file_format": "csv"
  }'
```

**2. Poll until it's completed**

Get the report by its `id` every 30 seconds or so. Stop when `status` is `completed`, `failed`, or `expired`.

```bash theme={null}
curl "https://api.notion.com/admin/v1/analytics/user_activity/reports/$REPORT_ID?workspace_id=6f2d3c1e-8b4a-4f7e-9c21-5a0d8e7b3f42" \
  -H "Authorization: Bearer $NOTION_ADMIN_TOKEN" \
  -H "Notion-Version: 2026-06-01"
```

**3. Download the file**

A completed report includes `download_url`. Download it without an `Authorization` header, because the URL carries its own credential.

```bash theme={null}
curl -o report.csv "$DOWNLOAD_URL"
```

| `status` | Meaning |
| :- | :- |
| `queued` | Waiting to start. |
| `running` | Being generated. |
| `completed` | Ready to download. |
| `failed` | Generation failed. Check `error_code` and `error_message`. For `report_generation_failed`, create a new report. For `report_too_large`, user activity and content pages reports need a shorter date range; AI usage and skills reports can't be made smaller, because the workspace has too many members or skills. |
| `expired` | The file was deleted. Create a new report. |

## Report types

Each report type has its own endpoints and scope. A token needs the scope for each type it uses.

| Report | One row per | Scope |
| :- | :- | :- |
| [User activity](https://developers.notion.com/reference/admin/create-user-activity-analytics-report.md) | Member or page guest | `user-analytics:read` |
| [Content pages](https://developers.notion.com/reference/admin/create-content-pages-analytics-report.md) | Page | `content-analytics:read` |
| [AI usage](https://developers.notion.com/reference/admin/create-ai-usage-analytics-report.md) | Member and AI product | `ai-analytics:read` |
| [Skills](https://developers.notion.com/reference/admin/create-skills-analytics-report.md) | Skill per day | `skills-analytics:read` |

Reports belong to the workspace, not to the token that created them. Any organization bot token in the same organization with a report's scope can get it or [list it](https://developers.notion.com/reference/admin/list-analytics-reports.md).

Analytics reports aren't available for HIPAA workspaces. Requests for a HIPAA workspace return `403` with the code `analytics_reports_unavailable_for_hipaa_workspace`.

## Date ranges

User activity and content pages reports cover `start_date` through `end_date`, both inclusive, in the IANA `time_zone` you send, such as `America/New_York`. `start_date` can be up to 365 days ago. `end_date` can't be after today in `time_zone`. Skills reports use UTC days and don't take `time_zone`. AI usage reports take a fixed `period` instead.

## Limits

Each endpoint accepts 1,500 requests per organization every 5 minutes. Past that, it returns `429` with a `Retry-After` header.

By default, an organization can have 20 unfinished reports and 5 running reports. Reports past the running limit stay `queued` until a slot frees up. A create request past the unfinished limit returns `429` with the code `analytics_report_limit_reached` and no `Retry-After` header. Try again after a report finishes.

Send an `Idempotency-Key` header of up to 255 characters to make create requests safe to retry. A retry with the same key and body within 24 hours returns the original report. The same key with a different body returns `409`.

Files are kept for 30 days. Each download link lasts up to 7 days. Get the report again for a new link.

## Errors

Most analytics errors include a code in `additional_data.tool_error_code`. Check that code, not the `message`.

Some errors are returned before the report starts and use the top-level `code` instead: `400 validation_error`, `403 restricted_resource` (missing scope), `429 rate_limited`, `503 service_unavailable`.

| Status | Code | Meaning |
| :- | :- | :- |
| `400` | `invalid_input` | A field is missing or out of range. The `message` says which. |
| `403` | `analytics_report_access_denied` | Getting a report whose type the token's scopes don't cover. |
| `403` | `analytics_reports_unavailable_for_hipaa_workspace` | The workspace is a HIPAA workspace. |
| `404` | `analytics_reports_not_found` | Analytics reports aren't turned on for this organization. |
| `404` | `analytics_report_not_found` | No report with this `id` exists in the workspace. |
| `409` | `analytics_report_idempotency_key_reused` | The `Idempotency-Key` was used with a different body. |
| `429` | `analytics_report_limit_reached` | The organization has too many unfinished reports. |
| `429` | `analytics_report_busy` | Too many reports are being created at once. Retry after `Retry-After` seconds. |
| `500` | `analytics_report_integrity_failed` | The file failed verification. Create a new report. |
