- [HTTP request](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#body.aspect)
- [DataFormat](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#DataFormat)
- [Try it!](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#try-it)

Exports the selected intents.

This 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:

- `metadata`: `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/ExportIntentsMetadata`
- `response`: `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/ExportIntentsResponse`

### HTTP request

Choose an endpoint:
global   
`POST https://dialogflow.googleapis.com/v3/{parent=projects/*/locations/*/agents/*}/intents:export`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

**OR**

`POST https://{endpoint}/v3/{parent=projects/*/locations/*/agents/*}/intents:export`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest#rest_endpoints).

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The name of the parent agent to export intents. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `dialogflow.intents.get` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "intents": [ string ], "dataFormat": enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#DataFormat`), // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "intentsUri": string, "intentsContentInline": boolean // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `intents[]` | `string` Required. The name of the intents to export. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`. |
| `dataFormat` | ``enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents/export#DataFormat`)`` Optional. The data format of the exported intents. If not specified, `BLOB` is assumed. |
| The destination to export. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `intentsUri` | `string` Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to export the intents to. The format of this URI must be `gs://<bucket-name>/<object-name>`. 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, see [Dialogflow access control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). |
| `intentsContentInline` | `boolean` Optional. The option to return the serialized intents inline. |
| End of mutually exclusive fields. ||

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/dialogflow`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## DataFormat

Data format of the exported intents.

| Enums ||
|---|---|
| `DATA_FORMAT_UNSPECIFIED` | Unspecified format. Treated as `BLOB`. |
| `BLOB` | Intents will be exported as raw bytes. |
| `JSON` | Intents will be exported in JSON format. |
| `CSV` | Intents will be exported in CSV format. |