# Method: messages.patch

**Full name**: projects.locations.datasets.hl7V2Stores.messages.patch

Update the message.

The contents of the message in `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores.messages#Message.FIELDS.data` and data extracted from the contents such as `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores.messages#Message.FIELDS.create_time` cannot be altered. Only the `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores.messages#Message.FIELDS.labels` field is allowed to be updated. The labels in the request are merged with the existing set of labels. Existing labels with the same keys are updated.

### HTTP request

`PATCH https://healthcare.googleapis.com/v1/{message.name=projects/*/locations/*/datasets/*/hl7V2Stores/*/messages/*}`

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

### Path parameters

| Parameters ||
|---|---|
| `message.name` | `string` Output only. Resource name of the Message, of the form `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/hl7V2Stores/{hl7V2StoreId}/messages/{message_id}`. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string(`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. The update mask applies to the resource. For the `FieldMask` definition, see <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask> 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://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores.messages#Message`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores.messages#Message`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).