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

Removes the search history suggestion in an engine for a user. This will remove the suggestion from being returned in the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/AdvancedCompleteQueryResponse#FIELDS.recent_search_suggestions` for this user. If the user searches the same suggestion again, the new history will override and suggest this suggestion again.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{completionConfig=projects/*/locations/*/collections/*/engines/*/completionConfig}:removeSuggestion`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `completionConfig` | `string` Required. The completionConfig of the parent engine resource name for which the search history suggestion is to be removed, such as `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "userPseudoId": string, "userInfo": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/UserInfo`) }, "removeTime": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "searchHistorySuggestion": string, "removeAllSearchHistorySuggestions": boolean // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `userPseudoId` | `string` Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.dataStores.userEvents#UserEvent.FIELDS.user_pseudo_id` and `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.evaluations#SearchRequest.FIELDS.user_pseudo_id`. The field must be a UTF-8 encoded string with a length limit of 128. |
| `userInfo` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/UserInfo`)`` Optional. Information about the end user. This should be the same identifier information as `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.dataStores.userEvents#UserEvent.FIELDS.user_info` and `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.evaluations#SearchRequest.FIELDS.user_info`. |
| `removeTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Required. Time at which the suggestion was removed. If not set, the current time will be used. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| The suggestion to be removed. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `searchHistorySuggestion` | `string` The search history suggestion to be removed. |
| `removeAllSearchHistorySuggestions` | `boolean` Remove all search history suggestions for the user. |
| End of mutually exclusive fields. ||

### Response body

If successful, the response body is empty.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.assist.readwrite`
- `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 `completionConfig` resource:

- `discoveryengine.completionConfigs.removeSuggestion`

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