GET /api/v1/admin/me/whoami
This page is auto-generated from
src/admin/routes.ts. Do not edit by hand — seedocs/dev/docs-auto-sync.md.
:warning: Heuristic extraction — not a contract. Response shapes below are mined from
c.json(...)literals in the handler via an AST walker. Computed fields, ternaries, and non-literal returns are shown as placeholders. Refer to the linked source file for the authoritative behaviour.
GET /api/v1/admin/me/whoami
Section titled “GET /api/v1/admin/me/whoami”Authentication
Section titled “Authentication”No requireCapability middleware detected on this route. Surface-level auth (admin token, dashboard session, org API key, anonymous proxy) is enforced by the parent router — see Source below.
Description
Section titled “Description”--- #575 Phase 2 (#613) — /api/v1/admin/me/* account-scope namespace ----
Reserve the URL namespace for the account-scope admin API. Phase 2 ships
ONE endpoint (whoami) that returns the AccountContext shape so external
integrations and the dashboard can probe the account surface; Phase 4
(#615) extends this with MFA / OAuth / recovery-codes lifts and Phase 5
(#616) adds the cross-org sessions surface.
The endpoint is gated by the same admin-token middleware as every other
/api/v1/admin/* surface (mounted at the top of this file). That gate
implies the caller is platform-trusted; the per-human account context
resolution happens through the dashboard surface at /admin/ui/me/*
(where requireAuthenticatedAccount populates the slot). On this admin
API surface today, callers identify the human via the admin-token + a
future request parameter — Phase 4 will introduce the per-human auth
shape; Phase 2’s whoami simply returns the platform marker so callers
can detect that the namespace is mounted.
Responses
Section titled “Responses”HTTP 200 (default)
Section titled “HTTP 200 (default)”{ "namespace": "/api/v1/admin/me", "phase": 2, "note": "Account-scope admin API namespace; Phase 4 ships the populated whoami."}Source
Section titled “Source”- File:
src/admin/routes.ts - Line: 332