DocumentationAPI reference

Rust · 0.1.0

Update User

PATCH /api/v1/users/{user}

UserService · UserService_UpdateUser

Protocol-derived reference. Authorization and instance policy still apply. Schema descriptions are inherited from the MIT-licensed application contract; examples here are not executed against a live server.

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.

PATCH/api/v1/users/{user}

Parameters

Name / locationType / requirementDescription
user
path
string
Required
The user id.
updateMask
query
string (field-mask)
Required (contract description)
Required. The list of fields to update.
allowMissing
query
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"
          }
        }
      }
    }
  }
}