---
title: "Get user by ID"
method: GET
path: "/users/{id}"
tags: ["Users"]
---

# Get user by ID

`GET /users/{id}`

## Response `200`

OK

- ApiResponseUser
  - `success` boolean, required
  - `message` string, nullable
  - `timestamp` string, date-time, required
  - `data` UserWithRoles
    - `id` string, required
    - `username` string, nullable
    - `email` string, nullable
    - `avatar` string, nullable
    - `phone` string, nullable
    - `firstName` string, nullable
    - `lastName` string, nullable
    - `fullName` string, nullable
    - `isOnboarded` boolean, required
    - `clerkCreatedAt` string, date-time, nullable
    - `emailVerifiedAt` string, date-time, nullable
    - `preference` object, nullable
    - `accessedAt` string, date-time, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `messageCount` integer
    - `roles` Role[]
      - `id` integer
      - `name` string
      - `displayName` string
      - `description` string, nullable
      - `isSystem` boolean
      - `isActive` boolean
      - `metadata` object, nullable
      - `accessedAt` string, date-time, nullable
      - `createdAt` string, date-time, nullable
      - `updatedAt` string, date-time, nullable

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/lobehub/apis/lobechat-openapi.md) · [All operations](https://skmtc.net/lobehub/apis/lobechat-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lobehub/lobechat-openapi/versions/7be2ebcf191c/schema)
