Required. The project that the agent to export is associated with. Format:projects/<Project ID>orprojects/<Project ID>/locations/<Location ID>.
Authorization requires the followingIAMpermission on the specified resourceparent:
dialogflow.agents.export
Request body
The request body contains data with the following structure:
JSON representation
{"agentUri":string}
Fields
agentUri
string
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.
Response body
If successful, the response body contains an instance ofOperation.
[[["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 export an agent to a ZIP file using a long-running operation, specifically using a POST request to the specified endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003eparent\u003c/code\u003e path parameter, representing the project ID or project ID with location ID, and appropriate IAM permissions for exporting agents.\u003c/p\u003e\n"],["\u003cp\u003eThe request body optionally accepts a \u003ccode\u003eagentUri\u003c/code\u003e field, specifying a Google Cloud Storage URI for agent export, or if left blank will send the agent serialized in line.\u003c/p\u003e\n"],["\u003cp\u003eA successful operation returns an instance of \u003ccode\u003eOperation\u003c/code\u003e, and access requires specific OAuth scopes related to Google Cloud Platform or Dialogflow.\u003c/p\u003e\n"],["\u003cp\u003eThe request uses gRPC Transcoding syntax and requires authentication with write permissions for the Cloud Storage object if specified in the request body.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.agent.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- [Try it!](#try-it)\n\nExports the specified agent to a ZIP file.\n\nThis method is a [long-running operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). 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/es/docs/reference/rest/v2beta1/ExportAgentResponse)\n\n### HTTP request\n\n`POST https://{endpoint}/v2beta1/{parent=projects/*/locations/*}/agent:export`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/es/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/es/docs/reference/rest/v2beta1/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)."]]