---
title: "Whoami Endpoint"
method: GET
path: "/v1/whoami"
---

# Whoami Endpoint

`GET /v1/whoami`

Return the authenticated user and token-selected org, if any.

Same JWT shape as /api/auth/me — accessible from the CLI via the
Bearer access_token issued by /oauth/token. Used both as `codag
whoami` and as the post-login validation step in `codag setup`.

## Response `200`

Successful Response

- WhoamiResponse
  - `user_id` integer, required
  - `email` string, required
  - `name` string, nullable
  - `org_id` string, nullable
  - `org_name` string, nullable
  - `org_slug` string, nullable
  - `role` string, nullable

---

[API](https://skmtc.net/codag/apis/infra-logs-templater.md) · [All operations](https://skmtc.net/codag/apis/infra-logs-templater/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/codag/infra-logs-templater/versions/a2c84c9154da/schema)
