---
title: "Get the authenticated viewer"
method: GET
path: "/v2/viewer"
tags: ["viewer"]
---

# Get the authenticated viewer

`GET /v2/viewer`

Returns the identity of the credential used to authenticate the request: an API key or a user session token (JWT). Use it to verify a credential during integration setup (a `200` response means the credential is valid; `401`/`403` means it is missing, unknown, or revoked) and to display which API key and organization are connected. Requests to this endpoint are free: they never consume API credits.

## Response `200`

The presented credential is valid. The `type` property indicates which kind of credential authenticated the request and determines the response shape.

- union
  - ViewerApiKeyResponse — The authenticated API key.
    - `type` 'api-key', required — The kind of credential that authenticated the request.
    - `id` string, required — Id of the API key.
    - `urn` string, required — URN of the API key, e.g. `urn:brandfetch:organization:{organization.id}:api-key:{id}`.
    - `name` string, nullable, required — Display name of the API key, as set in the dashboard.
    - `createdAt` string, date-time, nullable, required — When the API key was created.
    - `usage` object, required — API credit consumption for the current billing period, mirroring the `x-api-key-quota` and `x-api-key-approximate-usage` response headers of billable endpoints. Because this endpoint is free, `used` is the exact count, not approximated one ahead like the header.
      - `used` integer, required — API credits consumed so far in the current billing period.
      - `quota` integer, required — API credit allowance for the current billing period.
    - `organization` object, required — The organization the API key belongs to.
      - `id` string, required — Id of the organization.
      - `urn` string, required — URN of the organization, e.g. `urn:brandfetch:organization:{id}`.
      - `name` string, nullable, required — Display name of the organization.
  - ViewerUserResponse — The authenticated user (dashboard session token).
    - `type` 'user', required — The kind of credential that authenticated the request.
    - `id` string, required — Id of the user.
    - `urn` string, required — URN of the user, e.g. `urn:brandfetch:user:{id}`.
    - `name` string, nullable, required — Full name of the user.
    - `email` string, nullable, required — Email address of the user.
    - `createdAt` string, date-time, nullable, required — When the user account was created.

## Other responses

- `401` — Unauthorized. The Authorization header is missing or the credential could not be resolved.
- `403` — Forbidden. The credential was rejected, e.g. a revoked API key or an expired session token.

## Changes

- **2026-07-31** `2a39660b01b2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/brandfetch/apis/brandfetch-api/changes/v2/viewer/get.md)

---

[API](https://skmtc.dev/brandfetch/apis/brandfetch-api.md) · [All operations](https://skmtc.dev/brandfetch/apis/brandfetch-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/brandfetch/brandfetch-api/revisions/09c15db0f2cd/schema)
