---
title: "GET /v2/subjects/{subjectRef}"
method: GET
path: "/v2/subjects/{subjectRef}"
---

# GET /v2/subjects/{subjectRef}

`GET /v2/subjects/{subjectRef}`

## Request

- Base URL: `https://uc.api.osano.com`
- URL: `https://uc.api.osano.com/v2/subjects/{subjectRef}`
- Auth: API key in header `x-uc-api-key`
- TypeScript: <https://skmtc.dev/osano/apis/unified-consent-core-api/docs/v2/subjects/:subjectRef/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves subject by id or from a valid session

## Path parameters

- `subjectRef` string, required

## Query parameters

- `ref` 'subject' | 'session'

## Response `200`

Default Response

- object
  - `id` string
  - `verifiedId` string
  - `anonymousId` string

## Changes

- **2026-06-14** `dedbbc618db6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/osano/apis/unified-consent-core-api/changes/v2/subjects/:subjectRef/get.md)

---

[API](https://skmtc.dev/osano/apis/unified-consent-core-api.md) - [All operations](https://skmtc.dev/osano/apis/unified-consent-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/osano/apis/unified-consent-core-api/revisions/669b3b5b4d06?raw)
