---
title: "Retrieve a User"
method: GET
path: "/v2/users/{userId}"
tags: ["V2"]
---

# Retrieve a User

`GET /v2/users/{userId}`

Endpoint that allows the retrieval of a visitor based on a known User ID.
This endpoint can only recover visitors with user IDs, so please ensure your Sprig implementation has user tracking configured correctly based on your SDK installation: /docs/Installation/introduction-web/index
This endpoint will retrieve visitor info, a list of attributes tied to the visitor, and a list of events with relevant filter criteria.

## Headers

- `Authorization` string, required

## Response `200`

OK

- Userv2 — API V2 user model
  - `attributes` object
  - `createdAt` number
  - `events` object[]
    - `count` number
    - `createdAt` number
    - `event` string
    - `updatedAt` number
  - `externalUserId` string, nullable
  - `id` string

## Other responses

- `404` — Not Found
- `500` — Something went wrong on Sprig's side. These are very rare :)

---

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