UserService · UserService_UpdateUser
Access
Requires the named account's owner or an instance administrator. Field-specific and lifecycle restrictions still apply; owner access does not allow changing administrator-only fields.
Supported fields and lifecycle checks
Use an explicit mask. Supported paths are username, display_name, email, avatar_url, description, role, state and password. role/state are administrator-only; instance policy can block username or display-name changes. Archiving a user cannot leave a space without an active administrator. allowMissing is declared but does not create a missing user. Password changes also affect refresh sessions; use the account's interactive security flow for credential changes.
Request
UpdateUser updates a user.
/api/v1/users/{user}Parameters
| Name / location | Type / requirement | Description |
|---|---|---|
userpath | string Required | The user id. |
updateMaskquery | string (field-mask) Required (contract description) | Required. The list of fields to update. |
allowMissingquery | boolean Not marked required in OpenAPI | Optional. If set to true, allows updating sensitive fields. |
Request body
Required
application/json · User
Responses
200 · OK
application/json · User
default · Default error response
application/json · Status
Complete operation definition
All declared constraints, media types and response details are retained below. Schema references link to their complete definitions.
Open JSON definition
{
"tags": [
"UserService"
],
"description": "UpdateUser updates a user.",
"operationId": "UserService_UpdateUser",
"parameters": [
{
"name": "user",
"in": "path",
"description": "The user id.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "updateMask",
"in": "query",
"description": "Required. The list of fields to update.",
"schema": {
"type": "string",
"format": "field-mask"
}
},
{
"name": "allowMissing",
"in": "query",
"description": "Optional. If set to true, allows updating sensitive fields.",
"schema": {
"type": "boolean"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"default": {
"description": "Default error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}