---
title: "Get end-user profile"
method: GET
path: "/v1/projects/{projectSlug}/users/{userId}"
tags: ["Users"]
---

# Get end-user profile

`GET /v1/projects/{projectSlug}/users/{userId}`

Returns the lifetime profile of one end-user — trace, session, token, cost, and activity rollups across all of the user's traces (not range-bound).

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)
- `userId` string, required — End-user identifier. URL-encode values containing special characters.

## Query parameters

- `errorsOnly` 'true' | 'false' — When `true`, scope every aggregate to errored traces only.

## Response `200`

User profile

- UserProfileResponse
  - `userId` string, required — The end-user's identifier, as reported on their traces' `user_id`.
  - `userEmail` string, required — Latest non-empty email seen on the user's traces. Empty when never reported.
  - `firstSeenAt` string, required — ISO-8601 timestamp of the user's first trace ever.
  - `lastSeenAt` string, required — ISO-8601 timestamp of the user's most recent trace ever.
  - `traceCount` integer, required — Lifetime traces attributed to the user.
  - `sessionCount` integer, required — Distinct sessions in which the user produced at least one trace.
  - `errorSessionCount` integer, required — Of `sessionCount`, sessions with at least one errored trace.
  - `tokensTotal` integer, required — Total tokens across the user's traces.
  - `tokensInput` integer, required — Input (prompt) tokens across the user's traces.
  - `tokensOutput` integer, required — Output (completion) tokens across the user's traces.
  - `costTotalMicrocents` number, required — Total cost across the user's traces, in microcents.
  - `avgDurationNs` number, required — Mean per-trace duration, in nanoseconds.
  - `activeDays` integer, required — Distinct UTC days with at least one trace.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/latitude-dev/apis/latitude.md) · [All operations](https://skmtc.net/latitude-dev/apis/latitude/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/latitude-dev/latitude/versions/6a8789c59a5c/schema)
