auth

Get a user by id

get/auth/users/{userId}

Path parameters

userIdstring required

Response

OK

successtrue required
msgstring required

Example response

{
  "data": {
    "_id": "65f1c2a4d8b9e0123456789a",
    "firstName": "Ada",
    "lastName": "Lovelace",
    "email": "ada@example.com",
    "role": [
      "admin"
    ],
    "teamId": "65f1c2a4d8b9e01234567890",
    "createdAt": "2026-04-01T10:00:00.000Z",
    "updatedAt": "2026-04-15T14:30:00.000Z"
  }
}

Changes

Changed in 3 of the 38 revisions of this API.368

  • 39082d385dda267See the full diff
    • for the path request parameter userId, the minLength was increased from 0 to 1

      request-parameter-min-length-increased

    • the response's body type/format changed from / to object/ for status 200

      response-body-type-changed

    • removed the optional property details from the response with the 403 status

      response-optional-property-removed

    • removed the optional property details from the response with the 404 status

      response-optional-property-removed

    • removed the optional property details from the response with the 500 status

      response-optional-property-removed

    • added the new false enum value to the success response property for the response status 403

      response-property-enum-value-added

    • added the new false enum value to the success response property for the response status 404

      response-property-enum-value-added

    • added the new false enum value to the success response property for the response status 500

      response-property-enum-value-added

    • removed SuccessResponse subschema #2 from the response body allOf list for the response status 200

      response-body-all-of-removed

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the optional property data to the response with the 403 status

      response-optional-property-added

    • added the optional property data to the response with the 500 status

      response-optional-property-added

    • added the required property data to the response with the 200 status

      response-required-property-added

    • added the required property msg to the response with the 200 status

      response-required-property-added

    • added the required property success to the response with the 200 status

      response-required-property-added

    This revision also has 27 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 18 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog