# Method: consents.revoke

**Full name**: projects.locations.datasets.consentStores.consents.revoke

Revokes the latest revision of the specified `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consents#Consent` by committing a new revision with `state` updated to `REVOKED`. If the latest revision of the specified Consent is in the `REVOKED` state, no new revision is committed. A `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/Code#ENUM_VALUES.FAILED_PRECONDITION` error occurs if the latest revision of the given consent is in `DRAFT` or `REJECTED` state.

### HTTP request

`POST https://healthcare.googleapis.com/v1beta1/{name=projects/*/locations/*/datasets/*/consentStores/*/consents/*}:revoke`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the Consent to revoke, of the form `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}/consents/{consent_id}`. An `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/Code#ENUM_VALUES.INVALID_ARGUMENT` error occurs if `revisionId` is specified in the name. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `healthcare.consents.revoke` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "consentArtifact": string } ``` |

| Fields ||
|---|---|
| `consentArtifact` | `string` Optional. The resource name of the Consent artifact that contains proof of the user's revocation of the Consent, of the form `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}/consentArtifacts/{consent_artifact_id}`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `consentArtifact`: - `healthcare.consentArtifacts.get` |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consents#Consent`.

### 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).