- [HTTP request](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.conversations/ingest#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.conversations/ingest#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.conversations/ingest#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.conversations/ingest#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.conversations/ingest#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.conversations/ingest#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.conversations/ingest#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/projects.locations.conversations/ingest#try-it)

Imports conversations and processes them according to the user's configuration.

### HTTP request

`POST https://{endpoint}/v1/{parent=projects/*/locations/*}/conversations:ingest`

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

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent resource for new conversations. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "conversationConfig": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/ConversationConfig`) }, "redactionConfig": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/RedactionConfig`) }, "speechConfig": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/SpeechConfig`) }, // Union field `source` can be only one of the following: "gcsSource": { object (`GcsSource`) } // End of list of possible types for union field `source`. // Union field `object_config` can be only one of the following: "transcriptObjectConfig": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/TranscriptObjectConfig`) } // End of list of possible types for union field `object_config`. "sampleSize": integer } ``` |

| Fields ||
|---|---|
| `conversationConfig` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/ConversationConfig`)`` Configuration that applies to all conversations. |
| `redactionConfig` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/RedactionConfig`)`` Optional. DLP settings for transcript redaction. Optional, will default to the config specified in Settings. |
| `speechConfig` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/SpeechConfig`)`` Optional. Default Speech-to-Text configuration. Optional, will default to the config specified in Settings. |
| Union field `source`. Configuration for an external data store containing objects that will be converted to conversations. `source` can be only one of the following: ||
| `gcsSource` | ``object (`GcsSource`)`` A cloud storage bucket source. Note that any previously ingested objects from the source will be skipped to avoid duplication. |
| Union field `object_config`. Configuration for converting individual `source` objects to conversations. `object_config` can be only one of the following: ||
| `transcriptObjectConfig` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1/TranscriptObjectConfig`)`` Configuration for when `source` contains conversation transcripts. |
| `sampleSize` | `integer` Optional. If set, this fields indicates the number of objects to ingest from the Cloud Storage bucket. If empty, the entire bucket will be ingested. Unless they are first deleted, conversations produced through sampling won't be ingested by subsequent ingest requests. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires the following OAuth scope:

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

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permissions on the `parent` resource:

- `contactcenterinsights.datasetConversations.create`
- `contactcenterinsights.conversations.create`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).