# Consent Analytics

> Account-wide consent analytics that span every configured CMP record. Returns total dispatches attempted, total blocked, and a per-category breakdown of blocks for a date window.

Source: https://docs.oursprivacy.com/docs/platform-api/consent-analytics

Account-wide consent analytics that span every configured CMP record. The Global Consent Center report returns total dispatches attempted, total blocked, and a per-category breakdown of the blocks for a date window. Per-CMP analytics (time-series, per-page, per-region) live on the [Consent Settings](https://docs.oursprivacy.com/docs/platform-api/consent-settings#analytics-filters) endpoints and accept the shared analytics `filter` definition. AI assistants can run this account-wide report through the [MCP server](https://docs.oursprivacy.com/docs/platform-mcp).

## GET /rest/v1/consent-analytics

Account-wide blocking stats from the Global Consent Center for the window: how many dispatches were attempted, how many were blocked, and a per-category breakdown of the blocks (with `percentageBlocked` = share of `totalDispatches`). Not scoped to a single consent settings record — this aggregates across every destination in the account. The endpoint is identified by query params rather than a path id because the report is account-scoped; this is a documented derived-read exception. Requires the API-key scope `report:global-consent-center-analytics` (this is the account-wide consent analytics report and is gated separately from consent-settings list). Requires API-key scope or current OAuth user permission: report:global-consent-center-analytics

Request URL: `GET https://app.oursprivacy.com/rest/v1/consent-analytics`

Authentication: apiKey or oauth2.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `from` | query | string | Yes | Inclusive lower bound of the analytics window, as a UTC calendar day in `YYYY-MM-DD` format. The window between `from` and `to` must be 60 days or fewer. |
| `to` | query | string | Yes | Inclusive upper bound of the analytics window, as a UTC calendar day in `YYYY-MM-DD` format. The window between `from` and `to` must be 60 days or fewer. |

### Responses

- `200`: Account-wide blocking stats from the Global Consent Center
- `400`: Bad request — malformed `from`/`to` or window longer than 60 days.
- `401`: Unauthorized — missing, invalid, or expired API key or OAuth access token
- `403`: Forbidden — credential does not have the required current Ours permission
- `404`: Not Found
- `500`: Internal Server Error

#### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `totalDispatches` | integer | Yes | Total dispatches attempted across all destinations for the window. |
| `totalBlocked` | integer | Yes | Total dispatches blocked by the Global Consent Center across all categories. |
| `items` | object[] | Yes | Per-category breakdown of blocked dispatches. `categoryName` is `Unknown` when the upstream block message could not be parsed; `percentageBlocked` is the share of `totalDispatches` blocked under that category. |
| `items[].categoryName` | string | Yes |  |
| `items[].blockedCount` | integer | Yes |  |
| `items[].percentageBlocked` | number | Yes |  |

Full schema: [OpenAPI specification](https://docs.oursprivacy.com/openapi-platform.json).
