---
title: "Get the authenticated user and workspace"
method: GET
path: "/v1/auth/whoami"
tags: ["Auth"]
---

# Get the authenticated user and workspace

`GET /v1/auth/whoami`

Returns the authenticated user and (when present) workspace from the auth context. Requires an authenticated user but NOT a workspace — `workspace` is omitted when the caller has none.

## Response `200`

The caller's identity

- WhoamiResponse
  - `user` AuthUser, required
    - `userId` string, required — Clerk user id.
    - `username` string, required — Username from Clerk (may be empty).
    - `email` string — Primary email, when known.
    - `metadata` object, required — Free-form user metadata record.
    - `createdAt` string, date-time, required — Record creation time (ISO-8601).
    - `updatedAt` string, date-time, required — Record last-update time (ISO-8601).
  - `workspace` AuthWorkspace — Absent when the caller is not part of a workspace.
    - `workspaceId` string, required — Workspace (Clerk organization) id.
    - `name` string, required — Organization display name (may be empty).
    - `slug` string, required — Organization slug (may be empty).
    - `metadata` object, required — Free-form workspace metadata record.
    - `createdAt` string, date-time, required — Record creation time (ISO-8601).
    - `updatedAt` string, date-time, required — Record last-update time (ISO-8601).

## Other responses

- `401` — Unauthorized — missing or invalid credentials
- `403` — Forbidden — caller has no workspace or no access
- `500` — Internal server error

---

[API](https://skmtc.net/monid/apis/monid-api.md) · [All operations](https://skmtc.net/monid/apis/monid-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/monid/monid-api/revisions/164b6b6f2d36/schema)
