API Reference
Update a user
PUT
/api/users/{id}
Superadmin can update any user (except self-delete). Admins can only update viewers. Superadmin role cannot be assigned via this endpoint.
Operation IDupdateUser
Authentication
- BearerAuth
http bearerAPI key token (envoy_<hex>). Create keys from Settings → API Keys — see Using the API.
Path parameters
idintegerrequiredResource ID
Request body
This request body is required.
Content typeapplication/json
requestobject3 properties
usernamestringpasswordstringrolestringSuccess response body
200User updated
User updated
Content typeapplication/json
responseobject7 properties
idintegerusernamestringrolestringtotp_verifiedintegerinvite_pendingbooleancreated_atstring · date-timeupdated_atstring · date-timeError responses
400Validation error
Validation error
Content typeapplication/json
responseobject2 properties
errorstringmessagestringExample response
{
"error": "VALIDATION_ERROR",
"message": "Invalid input"
}403Insufficient permissions
Insufficient permissions
No response content schema is documented.
404Resource not found
Resource not found
Content typeapplication/json
responseobject2 properties
errorstringmessagestringExample response
{
"error": "NOT_FOUND",
"message": "Resource not found"
}