---
title: "Introspect the credential"
method: GET
path: "/v1/whoami"
tags: ["Auth"]
---

# Introspect the credential

`GET /v1/whoami`

## Request

- Base URL: `https://api.mentio.dev`
- URL: `https://api.mentio.dev/v1/whoami`
- Auth: HTTP bearer

The workspace this credential acts on, how the request authenticated (an API key, an OAuth access token from an MCP sign-in, or the dashboard session), whether it may write, and for a key its id and expiry. Run it first: a read key answers 403 read_only_key on every write, and a wrong workspace is the classic scripting mistake.

## Response `200`

The credential

- Whoami
  - `workspace` object, required: The workspace this credential acts on.
    - `id` string, required: Workspace id (org_...).
    - `name` string, required: The workspace name, as the dashboard shows it.
  - `auth` object, required: The credential.
    - `kind` 'api_key' | 'oauth' | 'session', required: How the request authenticated: an API key, an OAuth access token (MCP sign-in), or the dashboard session.
    - `scope` 'read' | 'write', required: What the credential may do: read (GET only) or write.
    - `apiKeyId` string, nullable, required: The key id (key_...) when authenticated with an API key; null otherwise.
    - `expiresAt` string, nullable, required: When an API key stops working; null for a key that never expires, an OAuth token or a session.
  - `user` object, nullable, required: The person behind an OAuth token or a session; null for an API key, which has no person behind it.
    - `id` string, required: User id, what assigneeId and ownerId take.
    - `email` string, required: The account's email address.
    - `name` string, nullable, required: The name on the account; null when they never set one.

## Other responses

- `401`: Missing or invalid API key

---

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