Update user
Partially updates a user. Each field is optional. Account fields (email, fullName, isTwoFaActive) — root / Owner / SuperAdmin only (with UserUpdate), whatever permissions a workspace role holds; otherwise 403 {"message":{"error":"You are not allowed to perform this action."}}. roles — UserCreate or UserUpdate in the current workspace, written to the current workspace only, limited like POST /api/v2/users (403 {"message":{"error":"Cannot create user with this role."}}). isActive / everywhere — UserBlock (see the fields).
Authorization
BearerAuthObject Machine tokens only: a personal API token or a product robot token (POST /api/v2/products/{uid}/robot-tokens). A session JWT here is 401 — the web app uses the b2t_access cookie.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PATCH "https://example.com/api/v2/users/0" \ -H "Content-Type: application/json" \ -d '{}'{ "isActive": true, "blockedEverywhere": true}