---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}/assistantSessions/{assistantSessionsId}:cancelAssistantTurn"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}/assistantSessions/{assistantSessionsId}:cancelAssistantTurn"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}/assistantSessions/{assistantSessionsId}:cancelAssistantTurn

`POST /v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}/assistantSessions/{assistantSessionsId}:cancelAssistantTurn`

## Request

- Base URL: `https://ces.googleapis.com`
- URL: `https://ces.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}/assistantSessions/{assistantSessionsId}:cancelAssistantTurn`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/ces`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/ces`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Cancels the assistant session's in-flight turn, if any: the explicit user stop for a turn running detached from any stream. A cancel landing on a task that does not host the turn preempts it through the session turn epoch instead, ending it within one lease renewal.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `appsId` string, required
- `assistantSessionsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string

## Request body

- CancelAssistantTurnRequest: Request to cancel an assistant session's in-flight turn.
  - `turnId` string: Optional. The turn to cancel; empty cancels whichever turn is running. A cancel naming a turn that is no longer the running one is a no-op.

## Response `200`

Successful response

- CancelAssistantTurnResponse: Response for CancelAssistantTurn.
  - `cancelled` boolean: Whether an in-flight turn was found and asked to stop (directly on this task, or through an epoch preemption for a turn hosted elsewhere).

## Changes

- **2026-11-17** `455f2f484021`: 4 info
  - the security scope `https://www.googleapis.com/auth/ces` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/ces` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`
- **2026-11-11** `d1599b011b2e`: 4 info
  - the security scope `https://www.googleapis.com/auth/ces` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/ces` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/ces/changes/v1/projects/:projectsId/locations/:locationsId/apps/:appsId/assistantSessions/:assistantSessionsId:cancelAssistantTurn/post.md)

---

[API](https://skmtc.dev/google/apis/ces.md) - [All operations](https://skmtc.dev/google/apis/ces/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/ces/revisions/455f2f484021?raw)
