---
updatedAt: 2025-05-19T20:07:49.000Z
agentTools:
  projectIndex: https://developer.ayyeka.com/llms.txt
---

# getUserById user

Returns information about the specified user

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "RESTAPI Service",
    "description": "RESTful API",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://restapi.ayyeka.com/v2.0"
    }
  ],
  "paths": {
    "/user/{userId}": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "getUserById user",
        "description": "Returns information about the specified user",
        "operationId": "user#getUserById",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of the user whose information should be returned",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "ID of the user whose information should be returned",
              "example": 123,
              "minimum": 1,
              "format": "int64"
            },
            "example": 123
          }
        ],
        "responses": {
          "200": {
            "description": "OK response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredUserDetails"
                },
                "example": {
                  "email_address": "test@test.tst",
                  "first_name": "John",
                  "id": 123,
                  "last_name": "Doe",
                  "mobile_phone": "012345678901",
                  "timezone_name": "UTC",
                  "user_name": "username"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "429": {
            "description": "too_many_requests: Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "internal_server_error: System error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt_header_Authorization": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "StoredUserDetails": {
        "type": "object",
        "properties": {
          "email_address": {
            "type": "string",
            "description": "Email Address",
            "example": "test@test.tst",
            "maxLength": 255
          },
          "first_name": {
            "type": "string",
            "description": "First Name",
            "example": "John",
            "maxLength": 64
          },
          "id": {
            "type": "integer",
            "description": "ID is the unique id of the user.",
            "example": 123,
            "format": "int64"
          },
          "last_name": {
            "type": "string",
            "description": "Lastname",
            "example": "Doe",
            "maxLength": 64
          },
          "mobile_phone": {
            "type": "string",
            "description": "Mobile Phone",
            "example": "012345678901",
            "maxLength": 32
          },
          "timezone_name": {
            "type": "string",
            "description": "Timezone",
            "example": "UTC",
            "maxLength": 64
          },
          "user_name": {
            "type": "string",
            "description": "username",
            "example": "username",
            "maxLength": 255
          }
        },
        "example": {
          "email_address": "test@test.tst",
          "first_name": "John",
          "id": 123,
          "last_name": "Doe",
          "mobile_phone": "012345678901",
          "timezone_name": "UTC",
          "user_name": "username"
        },
        "required": [
          "id",
          "user_name",
          "timezone_name"
        ]
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Message of error",
            "example": "incorrect credentials"
          },
          "request_id": {
            "type": "string",
            "description": "Request ID",
            "example": "uGv69FKl"
          }
        },
        "description": "Unauthorized",
        "example": {
          "message": "incorrect credentials",
          "request_id": "uGv69FKl"
        },
        "required": [
          "request_id",
          "message"
        ]
      }
    },
    "securitySchemes": {
      "jwt_header_Authorization": {
        "type": "http",
        "description": "Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint.",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "user"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```