---
title: "POST /v1/{+parent}/conversations:ingest"
method: POST
path: "/v1/{+parent}/conversations:ingest"
tags: ["projects"]
---

# POST /v1/{+parent}/conversations:ingest

`POST /v1/{+parent}/conversations:ingest`

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

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudContactcenterinsightsV1IngestConversationsRequest — The request to ingest conversations.
  - `transcriptObjectConfig` GoogleCloudContactcenterinsightsV1IngestConversationsRequestTranscriptObjectConfig — Configuration for processing transcript objects.
    - `medium` 'MEDIUM_UNSPECIFIED' | 'PHONE_CALL' | 'CHAT' — Required. The medium transcript objects represent.
  - `parent` string — Required. The parent resource for new conversations.
  - `gcsSource` GoogleCloudContactcenterinsightsV1IngestConversationsRequestGcsSource — Configuration for Cloud Storage bucket sources.
    - `metadataBucketUri` string — Optional. The Cloud Storage path to the conversation metadata. Note that: [1] Metadata files are expected to be in JSON format. [2] Metadata and source files (transcripts or audio) must be in separate buckets / folders. [3] A source file and its corresponding metadata file must share the same name to be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and `gs://bucket/metadata/conversation1.json`.
    - `bucketUri` string — Optional. The Cloud Storage bucket containing source objects. Avoid passing this. Pass this through one of `transcript_bucket_uri` or `audio_bucket_uri`.
    - `bucketObjectType` 'BUCKET_OBJECT_TYPE_UNSPECIFIED' | 'TRANSCRIPT' | 'AUDIO' — Optional. Specifies the type of the objects in `bucket_uri`. Avoid passing this. This is inferred from the `transcript_bucket_uri`, `audio_bucket_uri`.
    - `transcriptBucketUri` string — Optional. The Cloud Storage path to the conversation transcripts. Note that: [1] Transcript files are expected to be in JSON format. [2] Transcript, audio, metadata files must be in separate buckets / folders. [3] A source file and its corresponding metadata file must share the same name to be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and `gs://bucket/metadata/conversation1.json`.
    - `audioBucketUri` string — Optional. The Cloud Storage path to the conversation audio file. Note that: [1] Audio files will be transcribed if not already. [2] Audio files and transcript files must be in separate buckets / folders. [3] A source file and its corresponding audio file must share the same name to be properly ingested, E.g. `gs://bucket/transcript/conversation1.json` and `gs://bucket/audio/conversation1.mp3`.
    - `customMetadataKeys` string[] — Optional. Custom keys to extract as conversation labels from metadata files in `metadata_bucket_uri`. Keys not included in this field will be ignored. Note that there is a limit of 100 labels per conversation.
  - `conversationConfig` GoogleCloudContactcenterinsightsV1IngestConversationsRequestConversationConfig — Configuration that applies to all conversations.
    - `agentChannel` integer — Optional. Indicates which of the channels, 1 or 2, contains the agent. Note that this must be set for conversations to be properly displayed and analyzed.
    - `agentId` string — Optional. An opaque, user-specified string representing a human agent who handled all conversations in the import. Note that this will be overridden if per-conversation metadata is provided through the `metadata_bucket_uri`.
    - `customerChannel` integer — Optional. Indicates which of the channels, 1 or 2, contains the agent. Note that this must be set for conversations to be properly displayed and analyzed.
  - `speechConfig` GoogleCloudContactcenterinsightsV1SpeechConfig — Speech-to-Text configuration. Speech-to-Text settings are applied to conversations ingested from the `UploadConversation` and `IngestConversations` endpoints, including conversation coming from CCAI Platform. They are not applied to conversations ingested from the `CreateConversation` endpoint.
    - `speechRecognizer` string — The fully-qualified Speech Recognizer resource name. Format: `projects/{project_id}/locations/{location}/recognizer/{recognizer}`
    - `disableWordTimeOffsets` boolean — Whether to disable word time offsets. If true, the `enable_word_time_offsets` field in the recognition config will be set to false.
  - `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.
  - `redactionConfig` GoogleCloudContactcenterinsightsV1RedactionConfig — DLP resources used for redaction while ingesting conversations. DLP settings are applied to conversations ingested from the `UploadConversation` and `IngestConversations` endpoints, including conversation coming from CCAI Platform. They are not applied to conversations ingested from the `CreateConversation` endpoint or the Dialogflow / Agent Assist runtime integrations. When using Dialogflow / Agent Assist runtime integrations, redaction should be performed in Dialogflow / Agent Assist.
    - `inspectTemplate` string — The fully-qualified DLP inspect template resource name. Format: `projects/{project}/locations/{location}/inspectTemplates/{template}`
    - `deidentifyTemplate` string — The fully-qualified DLP deidentify template resource name. Format: `projects/{project}/deidentifyTemplates/{template}`

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/contactcenterinsights.md) · [All operations](https://skmtc.net/google/apis/contactcenterinsights/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/contactcenterinsights/versions/e071ddf4dfc3/schema)
