---
title: "POST /v1/query:removeActivity"
method: POST
path: "/v1/query:removeActivity"
tags: ["query"]
---

# POST /v1/query:removeActivity

`POST /v1/query:removeActivity`

Provides functionality to remove logged activity for a user. Currently to be used only for Chat 1p clients **Note:** This API requires a standard end user account to execute. A service account can't perform Remove Activity requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/workspace/cloud-search/docs/guides/delegation/).

## Request body

- RemoveActivityRequest — Remove Logged Activity Request.
  - `requestOptions` RequestOptions — Shared request options for all RPC methods.
    - `languageCode` string — The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For translations. Set this field using the language set in browser or for the page. In the event that the user's language preference is known, set this field to the known user language. When specified, the documents in search results are biased towards the specified language. The Suggest API uses this field as a hint to make better third-party autocomplete predictions.
    - `debugOptions` DebugOptions — Shared request debug options for all cloudsearch RPC methods.
      - `enableDebugging` boolean — If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field.
    - `timeZone` string — Current user's time zone id, such as "America/Los_Angeles" or "Australia/Sydney". These IDs are defined by [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) project, and currently available in the file [timezone.xml](http://unicode.org/repos/cldr/trunk/common/bcp47/timezone.xml). This field is used to correctly interpret date and time queries. If this field is not specified, the default time zone (UTC) is used.
    - `clientDisplayLanguageCode` string — The BCP-47 language code, such as "pt" or "en". It represents the user's preferred Display Language.
    - `searchApplicationId` string — The ID generated when you create a search application using the [admin console](https://support.google.com/a/answer/9043922).
  - `userActivity` UserActivity — User's single or bulk query activity. This can be a logging query or deletion query.
    - `queryActivity` QueryActivity — Details about a user's query activity.
      - `query` string — User input query to be logged/removed.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/cloudsearch.md) · [All operations](https://skmtc.net/google/apis/cloudsearch/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/cloudsearch/versions/d64d6afc59a6/schema)
