---
title: "Updates a User"
method: PATCH
path: "/users/{id}"
tags: ["User"]
---

# Updates a User

`PATCH /users/{id}`

Updates a User and persists changes to storage.

## Path parameters

- `id` integer, required

## Request body

- object
  - `friends` integer[]
  - `followers` integer[]
  - `following` integer[]
  - `parent` integer
  - `children` integer[]

## Response `200`

User updated

- UserUpdate
  - `id` integer, required

## Other responses

- `400` — invalid input, data invalid
- `404` — resource not found
- `409` — conflicting resources
- `500` — unexpected error

## Changes

> 13 revisions in range; 1 could not be searched.

- **2022-01-03** `78a90bffa447` — 1 info
  - added the non-success response with the status `409`
- **2022-01-03** `121d73086a68` — 3 breaking, 6 info
  - the `code` response's property type/format changed from `integer`/`int32` to `integer`/`` for status `400`
  - the `code` response's property type/format changed from `integer`/`int32` to `integer`/`` for status `404`
  - the `code` response's property type/format changed from `integer`/`int32` to `integer`/`` for status `500`
  - the response property `code` became required for the status `400`
  - …5 more
- **2021-12-21** `bc315bc889bf` — 1 breaking, 6 info
  - the `id` response's property type/format changed from `integer`/`int32` to `integer`/`` for status `200`
  - for the `path` request parameter `id`, the type/format was generalized from `integer`/`int32` to `integer`/``
  - the `children/items/` request property type/format was generalized from `integer`/`int32` to `integer`/``
  - the `followers/items/` request property type/format was generalized from `integer`/`int32` to `integer`/``
  - …3 more
- …earlier changes not shown

[Full history](https://skmtc.dev/ent/apis/ent-schema-api/changes/users/:id/patch.md)

---

[API](https://skmtc.dev/ent/apis/ent-schema-api.md) · [All operations](https://skmtc.dev/ent/apis/ent-schema-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ent/ent-schema-api/revisions/2255fc9bcfe6/schema)
