Skip to content

GET/users/{id}

Get user by ID

Retrieve a single user. Supports ETag conditional requests via `If-None-Match`.

Parameters 4

NameTypeDescription
_fieldsquery · stringSparse fieldset — comma-separated fields to return. Leave blank for the full object.
_expandquery · stringExpand parent relations inline. Applies only when the resource has a matching parent (e.g. `user` on posts).
_embedquery · stringEmbed child collections. Applies only when the resource has a matching child (e.g. `comments` on posts).

ReturnsUser

Bearer token required

Response examples

200The user

application/json example derived from schema

{
  "id": 1,
  "firstName": "Demo",
  "lastName": "User",
  "email": "demo@example.com",
  "username": "demo",
  "avatar": "https://i.pravatar.cc/150?u=demo",
  "phone": "+1-555-000-0001",
  "address": {
    "street": "1 Demo Way",
    "city": "Austin",
    "state": "TX",
    "zipCode": "78701",
    "country": "US",
    "geo": {
      "lat": 30.2672,
      "lng": -97.7431
    }
  },
  "company": {
    "name": "Demo Corp",
    "catchPhrase": "Seeded for docs and testing."
  },
  "website": "https://example.com/demo",
  "role": "admin",
  "age": 30,
  "bio": "Seeded demo account. Log in with any password.",
  "isActive": true,
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2026-04-21T00:00:00.000Z"
}
404404 — resource not found

application/json

{
  "error": {
    "status": 404,
    "message": "users #999 not found"
  }
}

Released under the MIT License.