---
title: "Get current identity and permissions (whoami)"
method: GET
path: "/api/v1/whoami"
tags: ["Whoami"]
---

# Get current identity and permissions (whoami)

`GET /api/v1/whoami`

Returns the authenticated caller's own identity, API key scope, organization role, and resolved per-model permissions. Self-scoped and available to non-admins: it lets a caller decide whether an action is permitted without attempting it. Pass `modelId` to scope `rolesByModel` to specific models.

## Query parameters

- `modelId` string — Optional model filter. A single model id or a comma-separated list. When provided, `rolesByModel` contains only these models. When omitted, models the caller can access are returned (up to a limit; see `rolesByModelTruncated`).

## Response `200`

Caller's identity, key scope, org role, and per-model permissions

- WhoamiResponse
  - `keyScope` 'user' | 'organization', required — Scope of the API key in use. A separate axis from role: a user-scoped key (PAT/OAuth) acts as a single user and cannot use SCIM, regardless of the user's org role.
  - `orgRole` 'MEMBER' | 'ORG_ADMIN', required — The caller's organization role.
  - `rolesByModel` object, required — Resolved role and effective permissions per model, keyed by model id. Connection role resolves per shared model, so this is per-model rather than a single global role.
  - `rolesByModelTruncated` boolean — Present and `true` when `rolesByModel` was truncated because the caller can access more models than the unfiltered limit. Pass a `modelId` filter to retrieve specific models.
  - `user` WhoamiUser, required
    - `id` string, required — The caller's user id
    - `membershipId` string, required — The caller's own membership id within this organization. This is the id accepted by the admin `GET /api/v1/users/{id}/model-roles` endpoint (it is distinct from the user id).

## Other responses

- `401` — Authentication required
- `404` — One or more requested `modelId`s do not exist or are not accessible to the caller

---

[API](https://skmtc.net/omniapp/apis/omni-api.md) · [All operations](https://skmtc.net/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omniapp/omni-api/versions/4701f292c621/schema)
