- [HTTP request](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#body.AnswerFeedback.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#body.aspect)
- [Rating](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#Rating)
- [RatingReason](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#RatingReason)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#RatingReason.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#try-it)

Updates the feedback received from the user for a single turn of the bot response.

### HTTP request

Choose an endpoint:
global   
`POST https://dialogflow.googleapis.com/v3/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback`

<br />

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

**OR**

`POST https://{endpoint}/v3/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest#rest_endpoints).

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

### Path parameters

| Parameters ||
|---|---|
| `session` | `string` Required. The name of the session the feedback was sent to. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `session`: - `dialogflow.sessions.detectIntent` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "responseId": string, "answerFeedback": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#body.AnswerFeedback`) }, "updateMask": string } ``` |

| Fields ||
|---|---|
| `responseId` | `string` Required. ID of the response to update its feedback. This is the same as DetectIntentResponse.response_id. |
| `answerFeedback` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#body.AnswerFeedback`)`` Required. Feedback provided for a bot answer. |
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Optional. The mask to control which fields to update. If the mask is not present, all fields will be updated. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Response body

Stores information about feedback provided by users about a response.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "rating": enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#Rating`), "ratingReason": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#RatingReason`) }, "customRating": string } ``` |

| Fields ||
|---|---|
| `rating` | ``enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#Rating`)`` Optional. Rating from user for the specific Dialogflow response. |
| `ratingReason` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.sessions/submitAnswerFeedback#RatingReason`)`` Optional. In case of thumbs down rating provided, users can optionally provide context about the rating. |
| `customRating` | `string` Optional. Custom rating from the user about the provided answer, with maximum length of 1024 characters. For example, client could use a customized JSON object to indicate the rating. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/dialogflow`

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

## Rating

Represents thumbs up/down rating provided by user about a response.

| Enums ||
|---|---|
| `RATING_UNSPECIFIED` | Rating not specified. |
| `THUMBS_UP` | Thumbs up feedback from user. |
| `THUMBS_DOWN` | Thumbs down feedback from user. |

## RatingReason

Stores extra information about why users provided thumbs down rating.

| JSON representation |
|---|
| ``` { "reasonLabels": [ string ], "feedback": string } ``` |

| Fields ||
|---|---|
| `reasonLabels[]` | `string` Optional. Custom reason labels for thumbs down rating provided by the user. The maximum number of labels allowed is 10 and the maximum length of a single label is 128 characters. |
| `feedback` | `string` Optional. Additional feedback about the rating. This field can be populated without choosing a predefined `reason`. |