---
title: "Get Identity Avatar By Clerk Sub"
method: GET
path: "/api/identities/by-clerk/{clerk_sub}/avatar"
tags: ["identity-avatars"]
---

# Get Identity Avatar By Clerk Sub

`GET /api/identities/by-clerk/{clerk_sub}/avatar`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/identities/by-clerk/{clerk_sub}/avatar`
- Auth: none declared

Resolve a Clerk session's user.id to its canonical Identity row and
serve that identity's avatar.

Multi-session switchers (Clerk's useSessionList) hand us the Clerk
session's user.id, which isn't always the same as our Identity row's
clerk_user_id - when a user signs in fresh, Clerk mints a new user
record but bootstrap's email-match merge maps that orphan back to
the existing canonical Identity. The new sub never lands on the
Identity row, so a direct lookup misses. Fall back to a Clerk
Backend API lookup → resolve email → re-query Identity by email.

## Path parameters

- `clerk_sub` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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