---
title: "Update user info"
method: PUT
path: "/users/{userId}"
tags: ["user"]
---

# Update user info

`PUT /users/{userId}`

Updates the information of an existing user.

## Path parameters

- `userId` string, required

## Request body

- UpdateUser
  - `firstName` string
  - `lastName` string
  - `email` string, email
  - `phone` string, phone
  - `language` string

## Response `200`

User updated successfully

- UserSchema — Object describing the user related to the issued access and refresh tokens.
  - `first_name` string — firstname of the user
  - `last_name` string — lastname of the user
  - `role` integer — User's role type (superadmin or user)
  - `email` string — User's primary contact email.
  - `phone` string, phone — User's primary contact phone number.
  - `username` string — Last updated time
  - `created_at` string, date-time — Time of registration
  - `updated_at` string, date-time — Last updated time
  - `access_token` string — A valid JWT that will expire in `expires_in` seconds.
  - `expires_at` string, date-time — UNIX timestamp after which the `access_token` should be renewed by using the refresh token with the `refresh_token` grant type.

## Other responses

- `400` — Bad request
- `401` — Authentication error
- `422` — Validation error
- `500` — Server error

---

[API](https://skmtc.net/hngprojects/apis/kimiko-golang-swagger.md) · [All operations](https://skmtc.net/hngprojects/apis/kimiko-golang-swagger/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hngprojects/kimiko-golang-swagger/revisions/2d1d3ed96bb9/schema)
