---
title: "PATCH /api/admin/users/{user_id}/"
method: PATCH
path: "/api/admin/users/{user_id}/"
tags: ["Admin"]
---

# PATCH /api/admin/users/{user_id}/

`PATCH /api/admin/users/{user_id}/`

Updates specified user attributes and returns the updated user if the requesting user is staff. You cannot update yourself to no longer be an admin or active.

## Path parameters

- `user_id` integer, required

## Request body

- PatchedUserAdminUpdate — Serializes a request body for updating a given user. Do not use for returning user data as the password will be returned also.
  - `username` string, email
  - `name` string
  - `is_active` boolean — Designates whether this user should be treated as active. Set this to false instead of deleting accounts.
  - `is_staff` boolean — Designates whether this user is an admin and has access to all workspaces and Baserow's admin areas.
  - `password` string

## Response `200`

- UserAdminResponse — Serializes the safe user attributes to expose for a response back to the user.
  - `id` integer, required
  - `username` string, email, required
  - `name` string, required
  - `workspaces` UserAdminWorkspaces[], required
    - `id` integer, required
    - `name` string, required
    - `permissions` string — The permissions that the user has within the workspace.
  - `last_login` string, date-time, nullable
  - `date_joined` string, date-time
  - `is_active` boolean — Designates whether this user should be treated as active. Set this to false instead of deleting accounts.
  - `is_staff` boolean — Designates whether this user is an admin and has access to all workspaces and Baserow's admin areas.
  - `two_factor_auth` object, nullable, required — The user's two factor auth provider state, or null when no provider is configured.
    - `type` string, required
    - `is_enabled` boolean, required

## Other responses

- `400`
- `401` — No response body

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/versions/0c490e5b0c7f/schema)
