- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#body.aspect_1)
- [ConsentChangeAction](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#ConsentChangeAction)

Updates service terms for this project.

This method can be used to retroactively accept the latest terms.

Terms available for update:

- [Terms for data use](https://cloud.google.com/retail/data-use-terms)

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{project=projects/*}:reportConsentChange`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `project` | `string` Required. Full resource name of a `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects#Project`, such as `projects/{project_id_or_number}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "consentChangeAction": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#ConsentChangeAction`), "serviceTermId": string, "serviceTermVersion": string } ``` |

| Fields ||
|---|---|
| `consentChangeAction` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#ConsentChangeAction`)`` Required. Whether customer decides to accept or decline service term. At this moment, only accept action is supported. |
| `serviceTermId` | `string` Required. The unique identifier of the terms of service to update. Available term ids: - `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this service term id, the acceptable `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects/reportConsentChange#body.request_body.FIELDS.service_term_version` to provide is `2022-11-23`. |
| `serviceTermVersion` | `string` Required. The version string of the terms of service to update. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects#Project`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

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

### IAM Permissions

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

- `discoveryengine.projects.reportConsentChange`

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

## ConsentChangeAction

Type of consent acknowledgement (accept / reject).

At this moment, only `ACCEPT` action is supported.

| Enums ||
|---|---|
| `CONSENT_CHANGE_ACTION_UNSPECIFIED` | Invalid action, user must specify accept/decline |
| `ACCEPT` | User accepts service terms. |