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

# GET /v1/whoami

`GET /v1/whoami`

Describes the credential the request authenticated with: a user session or an API key, discriminated on `data.type`.

## Headers

- `Authorization` string

## Response `200`

Default Response

- object
  - `links` object, required
    - `self` string, uri, required
  - `data` union, required
    - object
      - `id` string, uuid, required
      - `type` 'user', required
      - `attributes` object, required
        - `email` string, email, required
        - `emailVerified` boolean, required
        - `username` string, required
    - object
      - `id` string, uuid, required — The API key's own id. Not the id of the user who created it, which is what `/users/me` returns for a key.
      - `type` 'api-key', required
      - `attributes` object, required
        - `name` string, required — The name given to the key where it was created.
        - `scope` union, required — Whether the key acts across a whole org or is limited to one workspace. This is the authoritative discriminator: `org` and `workspace` below are enrichment and may be null even for a workspace-scoped key.
          - 'org'
          - 'workspace'
        - `org` object, nullable, required — The org the key acts within. For a workspace-scoped key, that workspace's org. Null if the row could not be read.
          - `id` string, uuid, required
          - `name` string, required
        - `workspace` object, nullable, required — The workspace a workspace-scoped key is limited to. Null for an org-scoped key, and also null when the workspace could not be read. Use `scope` to tell those apart.
          - `id` string, uuid, required
          - `name` string, required
        - `createdBy` string, uuid, required — The user who created the key. Provenance only. These are workspace- and org-level credentials, so the creator is not the identity acting.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

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