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. Seethe details.
Optional. TheGoogle Cloud StorageURI to export the agent to. The format of this URI must begs://<bucket-name>/<object-name>. If left unspecified, the serialized agent is returned inline.
Dialogflow performs a write operation for the Cloud Storage object on the caller's behalf, so your request authentication must have write permissions for the object. For more information, seeDialogflow access control.
Optional. The data format of the exported agent. If not specified,BLOBis assumed.
environment
string
Optional. Environment name. If not set, draft environment is assumed. Format:projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>.
[[["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 webpage details how to export an agent to a binary file using a long-running operation, accessible via an HTTP POST request to a specific endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe agent export requires authorization, specifically the \u003ccode\u003edialogflow.agents.export\u003c/code\u003e IAM permission, and uses a structured path parameter, \u003ccode\u003ename\u003c/code\u003e, to identify the agent being exported.\u003c/p\u003e\n"],["\u003cp\u003eThe request body allows specifying various export settings such as the \u003ccode\u003eagentUri\u003c/code\u003e for Google Cloud Storage, \u003ccode\u003edataFormat\u003c/code\u003e for export format, \u003ccode\u003eenvironment\u003c/code\u003e and \u003ccode\u003egitDestination\u003c/code\u003e for Git integration, and whether to \u003ccode\u003eincludeBigqueryExportSettings\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe agent can be exported in \u003ccode\u003eBLOB\u003c/code\u003e or \u003ccode\u003eJSON_PACKAGE\u003c/code\u003e format, with \u003ccode\u003eBLOB\u003c/code\u003e as the default, and it can be directly exported to a Git branch by specifying \u003ccode\u003etrackingBranch\u003c/code\u003e and \u003ccode\u003ecommitMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful agent export returns an \u003ccode\u003eOperation\u003c/code\u003e instance, and the request needs one of two OAuth scopes, specifically \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e, for authentication.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.agents.export\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- [DataFormat](#DataFormat)\n- [GitDestination](#GitDestination)\n - [JSON representation](#GitDestination.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nExports the specified agent to a binary file.\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`: An empty [Struct message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n- `response`: [ExportAgentResponse](/dialogflow/cx/docs/reference/rest/v3beta1/ExportAgentResponse)\n\n### HTTP request\n\n`POST https://{endpoint}/v3beta1/{name=projects/*/locations/*/agents/*}:export`\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/v3beta1/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\nDataFormat\n----------\n\nData format of the exported agent.\n\nGitDestination\n--------------\n\nSettings for exporting to a git branch."]]