---
title: "Update parent segment configuration"
method: PUT
path: "/audiences/{audienceId}"
tags: ["Parent Segment Configurations"]
---

# Update parent segment configuration

`PUT /audiences/{audienceId}`

Update the specified parent segment configuration by its identifier.

**Important: Update Behavior and the `master` Field**

This endpoint supports two different update modes depending on whether the `master` field is included in the request body:

1. **Partial Update (without `master` field)**: When the `master` field is omitted, only the scalar fields (e.g., `name`, `description`, `scheduleType`) in the request body are updated. The `attributes`, `behaviors`, and `audienceFilters` collections are left untouched, even if they are omitted or set to `null` or `[]` in the request.

2. **Full Replacement (with `master` field)**: When the `master` field is included in the request body, the endpoint performs a full replacement of `attributes`, `behaviors`, and `audienceFilters`. All existing entries in these collections are deleted and replaced with exactly what is provided in the request:
   - If `attributes`, `behaviors`, or `audienceFilters` are omitted, set to `null`, or set to `[]`, those collections will be **cleared** (all existing entries deleted).
   - Only the items explicitly included in the request body will exist after the update.
   - This is a destructive operation that cannot be undone.

**Recommendations**:
- For partial updates of scalar fields only: omit the `master` field from the request body.
- For full replacement: include the `master` field and provide complete definitions for `attributes`, `behaviors`, and `audienceFilters` to avoid unintended data loss.

## Path parameters

- `audienceId` integer, required

## Request body

- Audience — An audience handles a Master Segment and a related Master Segment Config.
  - `id` string, integer
  - `name` string, required
  - `description` string
  - `scheduleType` 'cron' | 'daily' | 'hourly' | 'minutes_interval' | 'monthly' | 'none' | 'weekly'
  - `scheduleOption` string, nullable
  - `timezone` string
  - `matrixUpdatedAt` string, datetime, nullable
  - `workflowHiveOnly` boolean — Whether the workflow mainly use Hive or not. Default is false
  - `hiveEngineVersion` '0.13' | 'cdpaudience' — Hive engine version used in audience workflows
  - `hivePoolName` string, nullable
  - `prestoPoolName` string, nullable
  - `allowActivationBehavior` boolean, nullable
  - `maxActivationBehaviorRow` integer, nullable — Only null is acceptable when allowActivationBehavior is false.
  - `llmEnabled` boolean, nullable — llmEnabled indicates whether customer has enabled llm (true or false).
  - `llmState` 'enabling' | 'enabled' | 'disabling' | 'disabled' — llmState indicates more detailed state including updating.
  - `population` integer, nullable — the population of the audience
  - `enrichmentWordTaggingEnabled` boolean
  - `enrichmentIpEnabled` boolean
  - `enrichmentTdJsSdkEnabled` boolean
  - `master` AudienceMaster
    - `parentDatabaseName` string, required — Source database name of the audience master
    - `parentTableName` string, required — Source table name of the audience master
  - `attributes` AudienceAttribute[]
    - `audienceId` string, required — ID of Master Segment for this attribute
    - `name` string, required — Column name user defined on Master Segment Configuration page of Data Workbench
    - `type` 'string' | 'number' | 'timestamp' | 'date' | 'string_array' | 'number_array' | 'boolean', required — Type of the column
    - `parentDatabaseName` string, required — Database name of the attribute table
    - `parentTableName` string, required — Table name of the attribute table
    - `parentColumn` string, required — Column name of the attribute table which is imported into customer table
    - `parentKey` string, required — Join key of the attribute table
    - `foreignKey` string, required — Foreign key of the master table
    - `groupingName` string, nullable, required — Group name of the attribute
  - `behaviors` AudienceBehavior[]
    - `id` string, required — ID of Master Segment Config behavior
    - `name` string, required — Behavior name user defined on Master Segment Configuration page of Data Workbench
    - `parentDatabaseName` string, required — Database name of the behavior table
    - `parentTableName` string, required — Table name of the behavior table
    - `parentKey` string, required — Join key of the behavior table
    - `foreignKey` string, required — Foreign key of the master table
    - `schema` AudienceBehaviorSchema[], required — Columns of behavior
      - `name` string, required — Column name user defined on Master Segment Configuration page of Data Workbench
      - `type` 'string' | 'number' | 'timestamp' | 'date' | 'string_array' | 'number_array' | 'boolean', required — Type of the column
      - `parentColumn` string, required — Column name of the behavior table
    - `scheduleType` 'cron' | 'daily' | 'hourly' | 'minutes_interval' | 'monthly' | 'none' | 'weekly'
    - `scheduleOption` string, nullable
    - `defaultTimeFilterEnabled` boolean
    - `isRealtime` boolean
  - `customerGroup` CustomerGroup — A group of customers within an audience
    - `id` string
    - `audienceId` integer
    - `name` string, required — group name that is to be used for table name
    - `parentDatabaseName` string, required — Database name of the customer_group table
    - `parentTableName` string, required — Table name of the customer_group table
    - `parentKey` string, required — Join key of the customer_group table
    - `foreignKey` string, required — Foreign key of the customers table
    - `customerGroupAttributes` CustomerGroupAttribute[]
      - `name` string, required — Column name
      - `type` 'string' | 'number' | 'timestamp' | 'date' | 'string_array' | 'number_array' | 'boolean', required — Type of the column
      - `parentDatabaseName` string, required — Database name of the customer_group attribute table
      - `parentTableName` string, required — Table name of the customer_group attribute table
      - `parentColumn` string, required — Column name of the customer_group attribute table which is imported into customer table
      - `parentKey` string, required — Join key of the customer_group attribute table
      - `foreignKey` string, required — Foreign key of the customer_group table
    - `customerGroupBehaviors` CustomerGroupBehavior[]
      - `name` string, required — Behavior name
      - `parentDatabaseName` string, required — Database name of the customer_group behavior table
      - `parentTableName` string, required — Table name of the customer_group behavior table
      - `parentKey` string, required — Join key of the customer_group behavior table
      - `foreignKey` string, required — Foreign key of the customer_group table
      - `schema` CustomerGroupBehaviorSchema[], required — Columns of behavior
        - `name` string, required — Column name
        - `type` 'string' | 'number' | 'timestamp' | 'date' | 'string_array' | 'number_array' | 'boolean', required — Type of the column
        - `parentColumn` string, required — Column name of the customer_group behavior table
  - `audienceFilters` AudienceFilter[]
    - `columnName` string, required — Column name to filter source data
    - `rightValues` string[], required — Values of the column to filter source data
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `createdBy` User
    - `id` string
    - `td_user_id` string
    - `name` string
  - `updatedBy` User
    - `id` string
    - `td_user_id` string
    - `name` string

## Other responses

- `400` — Given parameters are not valid
- `401` — Unauthorized; You don't provide valid credentials. Maybe you didn't specify valid TD's Master API Key as 'TD1 {Your TD Master API Key}'.
- `403` — Requested resource or action is not allowed because you don't have sufficient permissions
- `404` — The specified resource was not found
- `4XX` — There is a high possibility of error of the authentication system. Please check the contents and authority of the key. Please contact the TD support team if you do not resolve it.
- `5XX` — System error. Because there is a possibility of a temporary error due to network trouble and so on, we recommend several times retry on request side. Please contact the TD support team if you do not resolve it.

---

[API](https://skmtc.net/treasure/apis/cdp-api.md) · [All operations](https://skmtc.net/treasure/apis/cdp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/treasure/cdp-api/revisions/24caa8eb809b/schema)
