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

# PATCH /users/{id}/

`PATCH /users/{id}/`

Partial update of a user.

## Path parameters

- `id` integer, required

## Request body

- PatchedUserCreateUpdate
  - `username` string — Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
  - `first_name` string
  - `last_name` string
  - `email` string, email
  - `password` string
  - `roles` string[]

## Response `200`

Update successful. Return an updated user.

- UserDetail
  - `id` integer, required
  - `username` string, required — Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
  - `email` string, email
  - `first_name` string
  - `last_name` string
  - `is_superuser` boolean — Designates that this user has all permissions without explicitly assigning them.
  - `roles` RoleRef[], required
    - `id` string, uuid, required
    - `name` string, required
  - `created_at` string, date-time, required
  - `modified_at` string, date-time, required

## Changes

- **2023-05-19** `f84d9240fdf2` — 2 info
  - the endpoint scheme security `cookieAuth` was removed from the API
  - added the optional property `is_superuser` to the response with the `200` status
- **2023-04-25** `62d33b790834` — 4 breaking, 7 warning, 8 info
  - added the pattern `^[\w.@+-]+$` to the request property `username` (media type: application/json)
  - added the pattern `^[\w.@+-]+$` to the request property `username` (media type: application/x-www-form-urlencoded)
  - added the pattern `^[\w.@+-]+$` to the request property `username` (media type: multipart/form-data)
  - removed the required property `resource` from the response with the `200` status
  - …15 more

[Change history](https://skmtc.dev/ansible/apis/event-driven-ansible-api/changes/users/:id/patch.md)

---

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