---
title: "Get User Stats"
method: GET
path: "/api/user/stats"
tags: ["Account"]
---

# Get User Stats

`GET /api/user/stats`

Get usage statistics for the authenticated user, including total prompts, sensitive elements detected, conversations, and a per-platform breakdown. Optionally filter by number of days.

**SDK Usage:**
```typescript
const stats = await client.getUserStats(7);     // Last 7 days
const allTime = await client.getUserStats(null); // All time
```

## Query parameters

- `days` integer, nullable

## Response `200`

User statistics

- UserStats
  - `totalPrompts` integer — Total number of prompts across all platforms
  - `totalSensitiveElements` integer — Total number of sensitive entities detected
  - `totalConversations` integer — Total number of unique conversation sessions
  - `platforms` object — Per-platform breakdown
    - `chatgpt` PlatformStats
      - `prompts` integer — Number of prompts sent to this platform
      - `sensitiveElements` integer — Number of sensitive elements detected in prompts to this platform
    - `claude` PlatformStats
      - `prompts` integer — Number of prompts sent to this platform
      - `sensitiveElements` integer — Number of sensitive elements detected in prompts to this platform
    - `gemini` PlatformStats
      - `prompts` integer — Number of prompts sent to this platform
      - `sensitiveElements` integer — Number of sensitive elements detected in prompts to this platform

## Other responses

- `401` — Authentication failed or token expired

## Changes

- **2026-08-20** `0e1db3b6bc7c` — 1 breaking, 4 info
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
  - added the optional property `platforms` to the response with the `200` status
  - added the optional property `totalConversations` to the response with the `200` status
  - added the optional property `totalPrompts` to the response with the `200` status
  - …1 more
- **2026-03-07** `f19009a654f5` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/privacypal/apis/privacypal-api/changes/api/user/stats/get.md)

---

[API](https://skmtc.dev/privacypal/apis/privacypal-api.md) · [All operations](https://skmtc.dev/privacypal/apis/privacypal-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/privacypal/privacypal-api/revisions/0e1db3b6bc7c/schema)
