Some products and features are in the process of being renamed. Generative playbook and flow features are also being migrated to a single consolidated console. See the details.
Required. The agent to import the intents into. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>.
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.}
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:
intentsUri
string
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.
Merge option when display name conflicts exist during import.
Enums
MERGE_OPTION_UNSPECIFIED
Unspecified. Should not be used.
REJECT
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[[["\u003cp\u003eThis document outlines how to import intents into a Dialogflow agent using a POST request to a specified endpoint, including details on HTTP request structure, path parameters, and request/response bodies.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eparent\u003c/code\u003e path parameter is required to specify the agent where intents will be imported, adhering to the format \u003ccode\u003eprojects/<ProjectID>/locations/<LocationID>/agents/<AgentID>\u003c/code\u003e, and requiring the \u003ccode\u003edialogflow.intents.create\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eThe request body contains a \u003ccode\u003emergeOption\u003c/code\u003e field that determines how the system handles display name conflicts, with options such as \u003ccode\u003eREJECT\u003c/code\u003e, \u003ccode\u003eREPLACE\u003c/code\u003e, \u003ccode\u003eMERGE\u003c/code\u003e, \u003ccode\u003eRENAME\u003c/code\u003e, \u003ccode\u003eREPORT_CONFLICT\u003c/code\u003e, and \u003ccode\u003eKEEP\u003c/code\u003e, as well as the choice of using either a Google Cloud Storage URI or inline content.\u003c/p\u003e\n"],["\u003cp\u003eThe operation is long-running, returning an \u003ccode\u003eOperation\u003c/code\u003e instance with \u003ccode\u003eImportIntentsMetadata\u003c/code\u003e and \u003ccode\u003eImportIntentsResponse\u003c/code\u003e, as well as successful responses that will contain an \u003ccode\u003eOperation\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this operation requires one of the following OAuth scopes: \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.agents.intents.import\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [MergeOption](#MergeOption)\n- [Try it!](#try-it)\n\nImports the specified intents into the agent.\n\nThis method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields:\n\n- `metadata`: [ImportIntentsMetadata](/dialogflow/cx/docs/reference/rest/v3/ImportIntentsMetadata)\n- `response`: [ImportIntentsResponse](/dialogflow/cx/docs/reference/rest/v3/ImportIntentsResponse)\n\n### HTTP request\n\n`POST https://{endpoint}/v3/{parent=projects/*/locations/*/agents/*}/intents:import`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/cx/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/dialogflow/cx/docs/reference/rest/v3/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/dialogflow`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\nMergeOption\n-----------\n\nMerge option when display name conflicts exist during import."]]