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

# POST /v1/{+parent}/analysisRules

`POST /v1/{+parent}/analysisRules`

Creates a analysis rule.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudContactcenterinsightsV1AnalysisRule — The CCAI Insights project wide analysis rule. This rule will be applied to all conversations that match the filter defined in the rule. For a conversation matches the filter, the annotators specified in the rule will be run. If a conversation matches multiple rules, a union of all the annotators will be run. One project can have multiple analysis rules.
  - `analysisPercentage` number, double — Percentage of conversations that we should apply this analysis setting automatically, between [0, 1]. For example, 0.1 means 10%. Conversations are sampled in a determenestic way. The original runtime_percentage & upload percentage will be replaced by defining filters on the conversation.
  - `updateTime` string, google-datetime — Output only. The most recent time at which this analysis rule was updated.
  - `conversationFilter` string — Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations. Refer to https://cloud.google.com/contact-center/insights/docs/filtering for details.
  - `name` string — Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}
  - `createTime` string, google-datetime — Output only. The time at which this analysis rule was created.
  - `annotatorSelector` GoogleCloudContactcenterinsightsV1AnnotatorSelector — Selector of all available annotators and phrase matchers to run.
    - `runEntityAnnotator` boolean — Whether to run the entity annotator.
    - `runPhraseMatcherAnnotator` boolean — Whether to run the active phrase matcher annotator(s).
    - `qaConfig` GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfig — Configuration for the QA feature.
      - `scorecardList` GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfigScorecardList — Container for a list of scorecards.
        - `qaScorecardRevisions` string[] — List of QaScorecardRevisions.
    - `runIntentAnnotator` boolean — Whether to run the intent annotator.
    - `summarizationConfig` GoogleCloudContactcenterinsightsV1AnnotatorSelectorSummarizationConfig — Configuration for summarization.
      - `summarizationModel` 'SUMMARIZATION_MODEL_UNSPECIFIED' | 'BASELINE_MODEL' | 'BASELINE_MODEL_V2_0' — Default summarization model to be used.
      - `conversationProfile` string — Resource name of the Dialogflow conversation profile. Format: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}
      - `generator` string — The resource name of the existing created generator. Format: projects//locations//generators/
    - `runSilenceAnnotator` boolean — Whether to run the silence annotator.
    - `runIssueModelAnnotator` boolean — Whether to run the issue model annotator. A model should have already been deployed for this to take effect.
    - `issueModels` string[] — The issue model to run. If not provided, the most recently deployed topic model will be used. The provided issue model will only be used for inference if the issue model is deployed and if run_issue_model_annotator is set to true. If more than one issue model is provided, only the first provided issue model will be used for inference.
    - `runAutoLabelingAnnotator` boolean — Optional. Whether to run the auto-labeling annotator. If true, the auto-labeling annotator will be run. This is a non-billable operation designed for fixing or backfilling custom labels.
    - `runQaAnnotator` boolean — Whether to run the QA annotator.
    - `runSentimentAnnotator` boolean — Whether to run the sentiment annotator.
    - `runSummarizationAnnotator` boolean — Whether to run the summarization annotator.
    - `phraseMatchers` string[] — The list of phrase matchers to run. If not provided, all active phrase matchers will be used. If inactive phrase matchers are provided, they will not be used. Phrase matchers will be run only if run_phrase_matcher_annotator is set to true. Format: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}
    - `runInterruptionAnnotator` boolean — Whether to run the interruption annotator.
  - `displayName` string — Display Name of the analysis rule.
  - `active` boolean — If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.

## 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)
