- [HTTP request](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.conversations/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.conversations/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.conversations/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.conversations/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.conversations/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.conversations/patch#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.conversations/patch#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.conversations/patch#try-it)

Updates a conversation.

### HTTP request

`PATCH https://{endpoint}/v1alpha1/{conversation.name=projects/*/locations/*/conversations/*}`

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

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

### Path parameters

| Parameters ||
|---|---|
| `conversation.name` | `string` Immutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation} |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The list of fields to be updated. All possible fields can be updated by passing `*`, or a subset of the following updateable fields can be provided: - `agentId` - `languageCode` - `labels` - `metadata` - `qualityMetadata` - `callMetadata` - `startTime` - `expireTime` or `ttl` - `dataSource.gcs_source.audio_uri` or `dataSource.dialogflow_source.audio_uri` This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |
| `allowMissing` | `boolean` Optional. Defaults to false. If set to true, and the conversation is not found, a new conversation will be created. In this situation, `updateMask` is ignored. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.authorizedViewSets.authorizedViews.conversations#Conversation`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.authorizedViewSets.authorizedViews.conversations#Conversation`.

### Authorization scopes

Requires the following OAuth scope:

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

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

### IAM Permissions

Requires **one of** the following [IAM](https://cloud.google.com/iam/docs) permissions on the `name` resource, depending on the resource type:

- `contactcenterinsights.authorizedConversations.update`
- `contactcenterinsights.conversations.update`
- `contactcenterinsights.datasetConversations.update`

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