Users and admin

Update a user

Updates a WUTS user's active flag and/or role. The caller must have permission to manage the target user; changing a role additionally requires permission for that specific role transition.

PUT
/users/{id}

Updates a WUTS user's active flag and/or role. The caller must have permission to manage the target user; changing a role additionally requires permission for that specific role transition.

Authorization

bearerAuth
AuthorizationBearer <token>

Per-user API token (UUID v4) sent as Authorization: Bearer <token>. Identifies the tenant and user.

In: header

Path Parameters

id*string

Identifier of the user to update.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Fields to update on a user. Both fields are optional; omit a field to leave it unchanged.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/users/string" \  -H "Content-Type: application/json" \  -d '{    "active": true,    "role": "manager"  }'
{  "success": true,  "message": "User updated successfully"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}