> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Get raw user analytics data

`POST https://api.pagerduty.com/analytics/raw/users`

Allows users to retrieve a raw list of user analytics data within their account. This endpoint provides detailed data about user activity and account configuration.

<!-- theme: info -->
> **Note:** Data availability reflects [pipeline processing cycles](https://support.pagerduty.com/main/docs/insights#:~:text=Data%20Update%20Schedule) and is generally within 24 hours under normal conditions.

Scoped OAuth requires: `analytics.write`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |

## Request body (`application/json`)

Parameters and filters to apply to the dataset.

| Field | Type | Required | Description |
|---|---|---|---|
| `filters` | object |  |  |
| `filters.created_at_start` | string (date-time) |  | The start of the date range to search. |
| `filters.created_at_end` | string (date-time) |  | The end of the date range to search. |
| `filters.team_ids` | array of string |  | An array of team IDs. Only users belonging to these teams will be included in results. |
| `filters.user_ids` | array of string |  | An array of user IDs. Only these users will be included in results. |
| `filters.role_ids` | array of string |  | An array of role IDs. Only users with these roles will be included in results. |
| `time_zone` | string |  | The time zone to use for the results and grouping. Must be in tzdata format. See list of accepted values [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). |
| `order` | string |  | The order in which the results were sorted; asc for ascending, desc for descending. One of: `asc`, `desc`. Default: `desc`. |
| `order_by` | string |  | The column that was used for ordering the results. Default: `user_id`. |
| `aggregate_unit` | string \| null |  | The time unit to aggregate metrics by. If no value is provided, the metrics will be aggregated for the entire period. One of: `day`, `week`, `month`. |
| `limit` | integer |  | The maximum number of results to return per page. The default (and maximum allowed value) is 1000. Default: `1000`. |
| `starting_after` | string \| null |  | A cursor used for pagination. Starting after cursor provides the next set of results in forward pagination order. |
| `ending_before` | string \| null |  | A cursor used for pagination. Ending before cursor provides the previous set of results in reverse pagination order. |

Example: Example Request

```json
{
  "filters": {
    "created_at_start": "2025-01-01T00:00:00Z",
    "created_at_end": "2025-09-01T00:00:00Z"
  },
  "limit": 10
}
```

## Response 200

OK

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `first` | string |  | Cursor to identify the first object in the response. |
| `last` | string |  | Cursor to identify the last object in the response. |
| `limit` | integer |  | Number of results to include in the batch. |
| `more` | boolean |  | Indicates if there are more resources available than were returned. |
| `order` | string |  | The order in which the results were sorted; asc for ascending, desc for descending. One of: `asc`, `desc`. |
| `order_by` | string |  | The column that was used for ordering the results. Default: `name`. |
| `filters` | object |  | A collection of filters that were applied to the results. |
| `filters.created_at_start` | string |  | The lower boundary for the created_at range filter applied to the results. |
| `filters.created_at_end` | string |  | The upper boundary for the created_at range filter applied to the results. |
| `filters.team_ids` | array of string |  | The team_ids filter applied to the results. |
| `filters.roles` | array of string |  | The roles filter applied to the results. |
| `time_zone` | string |  | The time zone that the results are in. |
| `data` | array of object |  |  |
| `data[].id` | string |  | Obfuscated ID of the user. |
| `data[].user_name` | string |  | Name of the user. |
| `data[].email` | string |  | Email of the user. |
| `data[].account_id` | integer |  | Account ID the user belongs to. |
| `data[].description` | string \| null |  | User description, if available. |
| `data[].time_zone` | string \| null |  | User's configured time zone. |
| `data[].role` | string |  | User's role in the account. |
| `data[].team_id` | string \| null |  | ID of the team the user belongs to, if any. |
| `data[].team_name` | string \| null |  | Name of the team the user belongs to, if any. |
| `data[].created_at` | string (date-time) |  | Timestamp indicating when the user was created. |
| `data[].last_sign_in_at` | string \| null (date-time) |  | Timestamp of the user's last sign-in, if available. |
| `data[].default_notification_channel_count` | integer |  | Number of notification channels configured for this user. |
| `data[].escalation_policies_count` | integer |  | Number of escalation policies this user is part of. |
| `data[].schedules_count` | integer |  | Number of schedules this user is part of. |
| `data[].channel_types_configured` | array of string |  | List of notification channel types configured for this user. |
| `data[].team_count` | integer |  | Number of teams this user belongs to. |
| `data[].downloaded_mobile_app` | boolean |  | Whether the user has downloaded the mobile app. |
| `data[].notification_methods` | boolean |  | Whether the user has notification methods configured. |
| `data[].on_escalation_policy` | boolean |  | Whether the user is part of any escalation policy. |
| `data[].on_schedule` | boolean |  | Whether the user is part of any schedule. |
| `data[].signed_up` | boolean |  | Whether the user has signed up (based on last_sign_in_at not being null). |

Example: Example Response

```json
{
  "data": [
    {
      "id": "PAQ8IMO",
      "description": null,
      "time_zone": null,
      "role": "user",
      "account_id": 1454,
      "team_id": null,
      "team_name": null,
      "created_at": "2025-02-21T16:56:08",
      "email": "atest@pagerduty.com",
      "user_name": "Adam Test",
      "last_sign_in_at": "2025-03-04T09:30:51",
      "default_notification_channel_count": 0,
      "escalation_policies_count": 0,
      "schedules_count": 0,
      "channel_types_configured": [
        "SlackChannel",
        "EmailChannel"
      ],
      "team_count": 0,
      "downloaded_mobile_app": false,
      "notification_methods": false,
      "on_escalation_policy": false,
      "on_schedule": false,
      "signed_up": true
    },
    {
      "id": "PLNOYYJ",
      "description": null,
      "time_zone": "Europe/Lisbon",
      "role": "user",
      "account_id": 1454,
      "team_id": null,
      "team_name": null,
      "created_at": "2025-08-12T17:16:12",
      "email": "btest@pagerduty.com",
      "user_name": "B Test",
      "last_sign_in_at": "2025-09-03T12:05:29",
      "default_notification_channel_count": 1,
      "escalation_policies_count": 0,
      "schedules_count": 0,
      "channel_types_configured": [
        "EmailChannel",
        "PushNotificationChannel",
        "SlackChannel",
        "SmsChannel",
        "PhoneChannel"
      ],
      "team_count": 0,
      "downloaded_mobile_app": true,
      "notification_methods": true,
      "on_escalation_policy": false,
      "on_schedule": false,
      "signed_up": true
    }
  ],
  "first": "eyJpZCI6IlBBUThJTU8iLCJ2YWx1ZSI6IkFkYW0gRGlvcCIsIm9yZGVyX2J5IjoibmFtZSJ9",
  "last": "eyJpZCI6IlBQNTlSRTAiLCJ2YWx1ZSI6IkFsbGlzb24gQ29ybGV5Iiwib3JkZXJfYnkiOiJuYW1lIn0=",
  "more": true,
  "limit": 10,
  "filters": {
    "created_at_start": "2025-01-01T00:00:00Z",
    "created_at_end": "2025-09-01T00:00:00Z"
  },
  "time_zone": "Etc/UTC",
  "order": "asc",
  "order_by": "name"
}
```

## Response 400

Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 429

Too many requests have been made, the rate limit has been reached.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
