Method: projects.locations.collections.dataStores.conversations.converse

Converses a conversation.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Required. The resource name of the Conversation to get. Format: projects/{projectNumber}/locations/{locationId}/collections/{collection}/dataStores/{dataStoreId}/conversations/{conversationId}. Use projects/{projectNumber}/locations/{locationId}/collections/{collection}/dataStores/{dataStoreId}/conversations/- to activate auto session mode, which automatically creates a new conversation inside a conversations.converse session.

Request body

The request body contains data with the following structure:

JSON representation
  "query": {
    object (TextInput)
  "servingConfig": string,
  "conversation": {
    object (Conversation)
  "safeSearch": boolean,
  "userLabels": {
    string: string,
  "summarySpec": {
    object (SummarySpec)

object (TextInput)

Required. Current user input.



The resource name of the Serving Config to use. Format: projects/{projectNumber}/locations/{locationId}/collections/{collection}/dataStores/{dataStoreId}/servingConfigs/{servingConfigId} If this is not set, the default serving config will be used.


object (Conversation)

The conversation to be used by auto session only. The name field will be ignored as we automatically assign new name for the conversation in auto session.


map (key: string, value: string)

The user labels applied to a resource must meet the following requirements:

  • Each resource can have multiple labels, up to a maximum of 64.
  • Each label must be a key-value pair.
  • Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  • The key portion of a label must be unique. However, you can use the same key with multiple resources.
  • Keys must start with a lowercase letter or international character.

See Google Cloud Document for more details.


object (SummarySpec)

A specification for configuring the summary returned in the response.

Response body

If successful, the response body contains an instance of ConverseConversationResponse.

Authorization scopes

Requires the following OAuth scope:


For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • discoveryengine.conversations.converse

For more information, see the IAM documentation.