---
title: "Update user resource."
method: PUT
path: "/user/{username}"
tags: ["user"]
---

# Update user resource.

`PUT /user/{username}`

This can only be done by the logged in user.

## Path parameters

- `username` string, required

## Request body

- User
  - `id` integer
  - `username` string
  - `firstName` string
  - `lastName` string
  - `email` string
  - `password` string
  - `phone` string
  - `userStatus` integer — User Status

## Response `200`

successful operation

## Other responses

- `400` — bad request
- `404` — user not found
- `default` — Unexpected error

## Changes

- **2025-03-19** `1315ee0b6b7e` — 3 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `404`
  - added the success response with the status `200`
- **2025-03-17** `d5fd36e3763a` — 1 breaking, 2 info
  - removed the success response with the status `200`
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `404`
- **2025-03-14** `78de4368a03c` — 3 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `404`
  - added the success response with the status `200`
- **2025-03-13** `887ffd0911f2` — 2 breaking, 2 info
  - removed the media type `application/json` for the response with the status `default`
  - removed the success response with the status `200`
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `404`
- **2025-03-12** `253de9e0f0ae` — 1 info
  - added the media type `application/json` for the response with the status `default`

[Full history](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0/changes/user/:username/put.md)

---

[API](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0.md) · [All operations](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/swagger/swagger-petstore-openapi-3-0/revisions/e1a2480ffa44/schema)
