# Create new parent segment configuration

Create a new parent segment configuration.

Endpoint: POST /audiences
Version: 1.0.0
Security: TdApikeyAuth

## Request fields (application/json):

  - `id` (string)

  - `name` (string, required)

  - `description` (string)

  - `scheduleType` (string)
    Enum: "cron", "daily", "hourly", "minutes_interval", "monthly", "none", "weekly"

  - `scheduleOption` (string,null)
    Example: "00:00"

  - `timezone` (string)
    Example: "UTC"

  - `matrixUpdatedAt` (string,null)

  - `workflowHiveOnly` (boolean)
    Whether the workflow mainly use Hive or not. Default is false

  - `hiveEngineVersion` (string)
    Hive engine version used in audience workflows
    Enum: "0.13", "cdpaudience"

  - `hivePoolName` (string,null)

  - `prestoPoolName` (string,null)

  - `allowActivationBehavior` (boolean,null)

  - `maxActivationBehaviorRow` (integer,null)
    Only null is acceptable when allowActivationBehavior is false.

  - `llmEnabled` (boolean,null)
    llmEnabled indicates whether customer has enabled llm (true or false).

  - `llmState` (string)
    llmState indicates more detailed state including updating.
    Enum: "enabling", "enabled", "disabling", "disabled"

  - `population` (integer,null)
    the population of the audience

  - `enrichmentWordTaggingEnabled` (boolean)

  - `enrichmentIpEnabled` (boolean)

  - `enrichmentTdJsSdkEnabled` (boolean)

  - `master` (object)

  - `master.parentDatabaseName` (string, required)
    Source database name of the audience master

  - `master.parentTableName` (string, required)
    Source table name of the audience master

  - `attributes` (array)

  - `attributes.audienceId` (string, required)
    ID of Master Segment for this attribute

  - `attributes.name` (string, required)
    Column name user defined on Master Segment Configuration page of Data Workbench

  - `attributes.type` (string, required)
    Type of the column
    Enum: "string", "number", "timestamp", "string_array", "number_array"

  - `attributes.parentDatabaseName` (string, required)
    Database name of the attribute table

  - `attributes.parentTableName` (string, required)
    Table name of the attribute table

  - `attributes.parentColumn` (string, required)
    Column name of the attribute table which is imported into customer table

  - `attributes.parentKey` (string, required)
    Join key of the attribute table

  - `attributes.foreignKey` (string, required)
    Foreign key of the master table

  - `attributes.groupingName` (string,null, required)
    Group name of the attribute

  - `behaviors` (array)

  - `behaviors.id` (string, required)
    ID of Master Segment Config behavior

  - `behaviors.name` (string, required)
    Behavior name user defined on Master Segment Configuration page of Data Workbench

  - `behaviors.parentDatabaseName` (string, required)
    Database name of the behavior table

  - `behaviors.parentTableName` (string, required)
    Table name of the behavior table

  - `behaviors.parentKey` (string, required)
    Join key of the behavior table

  - `behaviors.foreignKey` (string, required)
    Foreign key of the master table

  - `behaviors.schema` (array, required)
    Columns of behavior

  - `behaviors.schema.name` (string, required)
    Column name user defined on Master Segment Configuration page of Data Workbench

  - `behaviors.schema.type` (string, required)
    Type of the column
    Enum: same as `attributes.type` (5 values)

  - `behaviors.schema.parentColumn` (string, required)
    Column name of the behavior table

  - `behaviors.scheduleType` (string)
    Enum: same as `scheduleType` (7 values)

  - `behaviors.scheduleOption` (string,null)

  - `behaviors.defaultTimeFilterEnabled` (boolean)

  - `behaviors.isRealtime` (boolean)

  - `customerGroup` (object)
    A group of customers within an audience

  - `customerGroup.id` (string)

  - `customerGroup.audienceId` (integer)

  - `customerGroup.name` (string, required)
    group name that is to be used for table name

  - `customerGroup.parentDatabaseName` (string, required)
    Database name of the customer_group table

  - `customerGroup.parentTableName` (string, required)
    Table name of the customer_group table

  - `customerGroup.parentKey` (string, required)
    Join key of the customer_group table

  - `customerGroup.foreignKey` (string, required)
    Foreign key of the customers table

  - `customerGroup.customerGroupAttributes` (array)

  - `customerGroup.customerGroupAttributes.name` (string, required)
    Column name

  - `customerGroup.customerGroupAttributes.type` (string, required)
    Type of the column
    Enum: same as `attributes.type` (5 values)

  - `customerGroup.customerGroupAttributes.parentDatabaseName` (string, required)
    Database name of the customer_group attribute table

  - `customerGroup.customerGroupAttributes.parentTableName` (string, required)
    Table name of the customer_group attribute table

  - `customerGroup.customerGroupAttributes.parentColumn` (string, required)
    Column name of the customer_group attribute table which is imported into customer table

  - `customerGroup.customerGroupAttributes.parentKey` (string, required)
    Join key of the customer_group attribute table

  - `customerGroup.customerGroupAttributes.foreignKey` (string, required)
    Foreign key of the customer_group table

  - `customerGroup.customerGroupBehaviors` (array)

  - `customerGroup.customerGroupBehaviors.name` (string, required)
    Behavior name

  - `customerGroup.customerGroupBehaviors.parentDatabaseName` (string, required)
    Database name of the customer_group behavior table

  - `customerGroup.customerGroupBehaviors.parentTableName` (string, required)
    Table name of the customer_group behavior table

  - `customerGroup.customerGroupBehaviors.parentKey` (string, required)
    Join key of the customer_group behavior table

  - `customerGroup.customerGroupBehaviors.foreignKey` (string, required)
    Foreign key of the customer_group table

  - `customerGroup.customerGroupBehaviors.schema` (array, required)
    Columns of behavior

  - `customerGroup.customerGroupBehaviors.schema.name` (string, required)
    Column name

  - `customerGroup.customerGroupBehaviors.schema.type` (string, required)
    Type of the column
    Enum: same as `attributes.type` (5 values)

  - `customerGroup.customerGroupBehaviors.schema.parentColumn` (string, required)
    Column name of the customer_group behavior table

  - `audienceFilters` (array)

  - `audienceFilters.columnName` (string, required)
    Column name to filter source data
    Example: "Country"

  - `audienceFilters.rightValues` (array, required)
    Values of the column to filter source data
    Example: ["Japan"]

  - `createdAt` (string)

  - `updatedAt` (string)

  - `createdBy` (object)

  - `createdBy.id` (string)

  - `createdBy.td_user_id` (string)

  - `createdBy.name` (string)

  - `updatedBy` (object)

## Response 400 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 5XX fields (application/json):

  - `status` (integer, required)
    Error status

  - `error` (string, required)
    Error message

  - `details` (string)
    Detailed error message


