---
id: update-user
title: "Update user"
description: "Update a user's role, bookmark quota, or storage quota. Admin access required."
sidebar_label: "Update user"
hide_title: true
hide_table_of_contents: true
api: eJzFVk1v4zYQ/SvEXNoCjD92txfdvF+A20u6TdCDYRRjcWxxLZEMSSXrCvzvi6Fkx7GdPRRZRAdbIofDN28eZ9iBolB67aK2Bgq4dQojCRRtIP9LEN7WJMXK2m2DfivuWhtRCutFiNbjhvqRkZipRhuBZUkhCE93rfakRiAh4iZAsYBsAEsJgcrW67iDYtHBitCTn7WxgmKxTEsJDj02FMmHbBDKihqEooO4cwQFhOi12YA8wX1TkZh/FHYtYkUZvIhWtDkakEDfsHE1r+epf6dv3kKSsMcJRfQtSTDY7E3mCiRo9uwwVsDI2JpCfG/VjvGU1kQykV/RuVqXyFDGXwPjuQDcrr5SGUGC89aRj5oCzzLBl8Ij0zbMG4MBCdjTlyTsc/EXE3+0UptIm2xr2rrGFbvtw2q00Q17myQJQ97+5+qVtw+B/AePD7U2m0+GLdWRn5W1NaE585PSacZuOUd9goTCiMdZ2tMyhH0W9HQymZyG8vtk/yR+OF/BWRN6mt9MJvz3LAQlQpvFu27regfypdI7eL3AUHoiwMXBctmjf3cJ8HtUYpChuBJzc4+1VkIb18bMIR/MEo2xcc+sfTBikNALRUTeW3+u2NNwerNDMNML7BtsY2W9/o+UuBJcBMjEAdahhrw28LfnwD9bv9JKkWHUl+rea2N+94zUWRdr25pXBZgkNBQrq7i2ttkjV9gCxvmwj1mtYdz1RTgBNwx/v28Hra+hgA6V8hRCGqPT4/spSLhHr7naZFDDdM/CGts6QgFVjC4U43H0u9EWPW6J3Aidu9hKBg/7fvLnYC96LJBSOupkfzNX/c7H/ezACe/McWQzrgDZiKtafvlsfYOM8I9/bjJxnIMvj83m0wtVRe5na8tumM4+1uloMppwl9Yxez4EOrueXyRmdj0Xa+ufssIsJgnOhthgls/QSYfbxFCAnng7aqA/4dLREx/pWxy7GrVheFk73aC2xYHErDeQUAxtfymhsiGySdetMNCtr1Pi4buWPF9blo9yy6JUOgxtcI11oB8E+uuXAeRv4jmUwyCaXVZ13fIXSNjS7vFqkvgiUBEq8hlBP/mh3+fqhl08Lj473knuV8zKklz8oe3y6Lhe395k1fUXoMYqXuLxAWT+zThtDru/2vBYBzWaTYsbtu1dssbx6RE5ORI5qItMdF1vcWO3ZFI6EBP5m3lJ6Tty27rt
sidebar_class_name: "put api-method"
info_path: API/karakeep-api
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Update user"}
>
</Heading>

<MethodEndpoint
  method={"put"}
  path={"/admin/users/{userId}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Update a user's role, bookmark quota, or storage quota. Admin access required.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"schema":{"type":"string","description":"The ID of the user to update","example":"user_123"},"required":true,"name":"userId","in":"path"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["user","admin"]},"bookmarkQuota":{"type":"integer","nullable":true,"minimum":0},"storageQuota":{"type":"integer","nullable":true,"minimum":0},"browserCrawlingEnabled":{"type":"boolean","nullable":true}},"description":"User update data","example":{"role":"admin","bookmarkQuota":1000,"storageQuota":5000000000}}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"User updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Bad request - Invalid input data or cannot update own user","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden - Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}
>
  
</StatusCodes>


      