Method: projects.locations.agents.intents.import

Imports the specified intents into the agent.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

HTTP request

POST https://{endpoint}/v3beta1/{parent=projects/*/locations/*/agents/*}/intents:import

Where {endpoint} is one of the supported service endpoints.

The URLs use gRPC Transcoding syntax.

Path parameters



Required. The agent to import the intents into. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.

Authorization requires the following IAM permission on the specified resource parent:

  • dialogflow.intents.create

Request body

The request body contains data with the following structure:

JSON representation
  "mergeOption": enum (MergeOption),

  // Union field intents can be only one of the following:
  "intentsUri": string,
  "intentsContent": {
    object (InlineSource)
  // End of list of possible types for union field intents.

enum (MergeOption)

Merge option for importing intents. If not specified, REJECT is assumed.

Union field intents. Required. The intents to import. intents can be only one of the following:


The Google Cloud Storage URI to import intents from. The format of this URI must be gs://<bucket-name>/<object-name>.

Dialogflow performs a read operation for the Cloud Storage object on the caller's behalf, so your request authentication must have read permissions for the object. For more information, see Dialogflow access control.


object (InlineSource)

Uncompressed byte content of intents.

Response body

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

Authorization scopes

Requires one of the following OAuth scopes:


For more information, see the Authentication Overview.


Merge option when display name conflicts exist during import.

MERGE_OPTION_UNSPECIFIED Unspecified. Should not be used.

DEPRECATED: Please use [REPORT_CONFLICT][ImportIntentsRequest.REPORT_CONFLICT] instead. Fail the request if there are intents whose display names conflict with the display names of intents in the agent.

REPLACE Replace the original intent in the agent with the new intent when display name conflicts exist.
MERGE Merge the original intent with the new intent when display name conflicts exist.
RENAME Create new intents with new display names to differentiate them from the existing intents when display name conflicts exist.
REPORT_CONFLICT Report conflict information if display names conflict is detected. Otherwise, import intents.
KEEP Keep the original intent and discard the conflicting new intent when display name conflicts exist.