# Method: devices.patch

- [HTTP request](https://developers.google.com/photos/ambient/reference/rest/v1/devices/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/photos/ambient/reference/rest/v1/devices/patch#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/photos/ambient/reference/rest/v1/devices/patch#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/photos/ambient/reference/rest/v1/devices/patch#body.request_body)
- [Response body](https://developers.google.com/photos/ambient/reference/rest/v1/devices/patch#body.response_body)
- [Authorization scopes](https://developers.google.com/photos/ambient/reference/rest/v1/devices/patch#body.aspect)
- [Try it!](https://developers.google.com/photos/ambient/reference/rest/v1/devices/patch#try-it)

Updates information about the specified device.

A `NOT_FOUND` error is returned if the device does not exist or is not owned by the user.

### HTTP request

`PATCH https://photosambient.googleapis.com/v1/devices/{deviceId}`

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

### Path parameters

| Parameters ||
|---|---|
| `deviceId` | `string` Required. The unique identifier for this device. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Optional. The list of `AmbientDevice` fields to update. For example, to update the device's `displayName`, the field path `userSettings.displayName` must be provided in the request's `updateMask`. The special value `*` may be used to indicate that all fields (that can be updated) should be updated. If omitted, an implied field mask equivalent to all fields that are populated in `device` (i.e., have a non-empty value) will be used instead. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://developers.google.com/photos/ambient/reference/rest/v1/devices#AmbientDevice`.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/photos/ambient/reference/rest/v1/devices#AmbientDevice`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/photosambient.mediaitems`