- [HTTP request](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains.users/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains.users/patch#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains.users/patch#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains.users/patch#body.request_body)
- [Response body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains.users/patch#body.response_body)
- [Authorization scopes](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains.users/patch#body.aspect)

Updates a user for a domain. Only Owners and Admins can execute this RPC, only a user's domain permission will be allowed to be updated. Returns NOT_FOUND if the user does not exist. Returns INVALID_ARGUMENT if a permission is not provided or is PERMISSION_UNSPECIFIED, NONE, or OWNER.

### HTTP request

`PATCH https://gmailpostmastertools.googleapis.com/v2beta/{user.name=domains/*/users/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `user.name` | `string` Identifier. The resource name of the user. Format: users/{user} Note: {user} is the user's email address. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The list of fields to update. |

### Request body

The request body contains an instance of `https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains.users#User`.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains.users#User`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/postmaster`
- `
  https://www.googleapis.com/auth/postmaster.user`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).