---
title: Get user
slug: api-guide/get-user
docTags: 
createdAt: 2025-01-16T08:06:24.215Z
---

{
  "id": "wLCkCsCJk48klC3fLflJq",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.app.kognic.com/v2/users/{userId}",
    "servers": [
      {
        "url": "https://api.app.kognic.com/v2/users/{userId}"
      }
    ],
    "name": "Get user",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "userId",
          "type": "integer<int64>",
          "description": "",
          "format": "int64"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "text/plain"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Enveloped_User",
            "schema": [
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/User",
                "customType": "User",
                "schema": [
                  {
                    "name": "accountStatus",
                    "kind": "required",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/UserAccountStatus",
                    "customType": "UserAccountStatus",
                    "schema": []
                  },
                  {
                    "name": "accountType",
                    "kind": "required",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/AccountType",
                    "customType": "AccountType",
                    "schema": []
                  },
                  {
                    "name": "email",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "firstName",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "integer<int64>",
                    "description": "",
                    "format": "int64"
                  },
                  {
                    "name": "lastName",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "organization",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/LightOrganization",
                    "customType": "LightOrganization",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "integer<int64>",
                        "description": "",
                        "format": "int64"
                      },
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "roles",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/UserRole",
                    "customType": "UserRole[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "string<uuid>",
                        "description": "",
                        "format": "uuid"
                      },
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Enveloped_User",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Invalid value for: path parameter userId</p>",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Unauthorized",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/Unauthorized",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Forbidden",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/Forbidden",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "NotFound",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/NotFound",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "H38EW_mwfVfFTa6ShwqWl",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.app.kognic.com/v2/users/{userId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "H38EW_mwfVfFTa6ShwqWl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"data\": {\n    \"accountStatus\": \"\",\n    \"accountType\": \"\",\n    \"email\": \"\",\n    \"firstName\": \"\",\n    \"id\": \"\",\n    \"lastName\": \"\",\n    \"organization\": {\n      \"id\": \"\",\n      \"name\": \"\"\n    },\n    \"roles\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\"\n      }\n    ]\n  }\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid value for: path parameter userId\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Forbidden\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not found\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}