---
title: "Update User"
method: PUT
path: "/updateUser/{userId}"
tags: ["Users"]
---

# Update User

`PUT /updateUser/{userId}`

Updates user details based on the ID provided as a parameter.

## Path parameters

- `userId` string, required

## Headers

- `Authorization` string, required

## Request body

- RequestUserUpdateRequest
  - `age` integer, required — User's age (required, must be between 1 and 140). @json @jsonTag age @jsonExample 30 @binding required,min=1,max=140
  - `name` string, required — User's name (required, minimum of 4 characters, maximum of 100 characters). Example: John Doe @json @jsonTag name @jsonExample John Doe @binding required,min=4,max=100

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/huncoding/apis/meu-primeiro-crud-em-go-huncoding.md) · [All operations](https://skmtc.net/huncoding/apis/meu-primeiro-crud-em-go-huncoding/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huncoding/meu-primeiro-crud-em-go-huncoding/revisions/5947d1adf479/schema)
