- [HTTP request](https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch#body.request_body)
- [Response body](https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch#body.response_body)
- [Authorization scopes](https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch#body.aspect)
- [IAM Permissions](https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch#body.aspect_1)
- [Examples](https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch#examples)
- [Try it!](https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch#try-it)

Updates the configuration of an existing subscriber, such as the endpoint URI or the data types it's interested in.

**Endpoint Verification:** If the `endpointUri` or `endpointAuthorization` field is included in the `updateMask`, the backend will re-verify the endpoint. The verification process is the same as described in `subscribers.create`:

1. **Verification with Authorization:** POST to the new or existing `endpointUri` with the new or existing `Authorization` secret. Expects HTTP `201 Created`.
2. **Verification without Authorization:** POST to the `endpointUri` without the `Authorization` header. Expects HTTP `401 Unauthorized` or `403 Forbidden`.

Both tests must pass using the potentially updated values for the subscriber update to succeed. If verification fails, the update will not be applied, and an error will be returned.

### HTTP request

`PATCH https://health.googleapis.com/v4/{subscriber.name=projects/*/subscribers/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the [service error catalog](https://developers.google.com/health/reference/rest/v4/errors)

### Path parameters

| Parameters ||
|---|---|
| `subscriber.name` | `string` Identifier. The resource name of the Subscriber. Format: projects/{project}/subscribers/{subscriber} The {project} ID is a Google Cloud Project ID or Project Number. The {subscriber} ID is user-settable (4-36 characters, matching /[a-z](https://developers.google.com/health/reference/rest/v4/projects.subscribers/[a-z0-9-]{2,34}[a-z0-9])/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef It takes the form `projects/{project}/subscribers/{subscriber}`. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Optional. A field mask that specifies which fields of the Subscriber message are to be updated. This allows for partial updates. Supported fields: - endpointUri - subscriberConfigs - endpointAuthorization 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/health/reference/rest/v4/Subscriber`.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/health/reference/rest/Shared.Types/Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `health.subscribers.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).