---
title: "Whoami"
method: GET
path: "/api/v1/public/whoami"
tags: ["Whoami"]
---

# Whoami

`GET /api/v1/public/whoami`

## Request

- Base URL: `https://app.traceroot.ai`
- URL: `https://app.traceroot.ai/api/v1/public/whoami`
- Auth: HTTP bearer

Return the identity the authenticated API key maps to.

## Response `200`

Successful Response

- WhoamiResponse: Identity a project API key resolves to, for `login` / `status`. Name fields are nullable: they depend on what the internal key-validation contract returns, and the backend never fabricates them. The full API token is never included — only ``key_hint``. ``key_scope`` is the exception to the nullability above, deliberately. A holder asking what their key may do needs an answer, not a maybe: a null would have to be handled by every caller and would mean the same thing the narrow scope already means. It is a closed set of values rather than a free string so a client can exhaust it.
  - `host` string, required
  - `key_hint` string, nullable, required
  - `key_name` string, nullable, required
  - `key_scope` 'ingest' | 'admin', required
  - `project_id` string, required
  - `project_name` string, nullable, required
  - `ui_base_url` string, required
  - `workspace_id` string, required
  - `workspace_name` string, nullable, required

## Other responses

- `401`: Authentication failed
- `422`: Validation Error
- `503`: Authentication service unavailable

---

[API](https://skmtc.dev/traceroot/apis/traceroot-public-api.md) - [All operations](https://skmtc.dev/traceroot/apis/traceroot-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traceroot/apis/traceroot-public-api/revisions/ce6aef96c0d6?raw)
