# Create activation

Create a new activation (formerly syndication).

Endpoint: POST /audiences/{audienceId}/segments/{segmentId}/syndications
Version: 1.0.0
Security: TdApikeyAuth

## Path parameters:

  - `audienceId` (integer, required)
    Master Segment ID of the syndication

  - `segmentId` (integer, required)
    Segment ID of the syndication

## Request fields (application/json):

  - `name` (string, required)

  - `description` (string)

  - `allColumns` (boolean)
    syndication all column flag  ('true' means  that you use all attribute data)

  - `columns` (array)
    Syndication column detail. Basic syntax is `{"column": "alias_name", "source": {...}}`. `source` accepts various definitions. See ColumnExpression/StringExpression for details. example value is using ColumnExpression without `function` property.
    Example: [{"column":"alias_name","source":{"column":"real_column_name"}}]

  - `columns.id` (string)

  - `columns.column` (string, required)

  - `columns.source` (any, required)

  - `columns.source.column` (string, required)

  - `columns.source.customerGroup` (string)

  - `columns.source.functions` (array)

  - `columns.source.functions.function` (string, required)
    Enum: "+", "-", "*", "/"

  - `columns.source.functions.arg` (number)

  - `columns.source.functions.search` (string)

  - `columns.source.functions.replacement` (string)

  - `columns.source.functions.start` (number)

  - `columns.source.functions.length` (number)

  - `columns.source.functions.pattern` (string)

  - `columns.source.functions.group` (number)

  - `columns.source.functions.default` (number, required)

  - `columns.source.functions.op` (string)
    Enum: ">", "<", "<=", ">=", "=", "!=", "is", "is\\", "not"

  - `columns.source.functions.right_value` (number)

  - `columns.source.functions.then` (number)

  - `columns.source.functions.else` (number)

  - `columns.source.string` (string, required)

  - `columns.source.parameters` (array)
    Values for the placeholders ($1, $2, $3, ...) in the string

  - `columns.source.parameters.type` (string)
    Enum: "String"

  - `columns.source.parameters.string` (string)

  - `columns.source.parameters.format` (string)

  - `scheduleType` (string)
    Deprecated. Old parameter for setting schedule type. See/Use RepeatUnit instead.
    Enum: "cron", "daily", "hourly", "minutes_interval", "monthly", "none", "weekly"

  - `scheduleOption` (string)
    Deprecated. Old parameter for setting schedule. Use startAt instead.

  - `repeatUnit` (string)
    Setting an activation repetition cycle such as "day" or "week".
    Enum: "none", "minute", "hour", "day", "week", "month", "once"

  - `repeatFrequency` (integer)
    Setting an activation repeat frequency.
Currently, it is set only when the repeat unit is "minute". If the repeat unit is "minute", the interval is set in minutes.

  - `repeatSubFrequency` (array)
    Parameter for more detailed frequency settings. Values are array of integers.
Currently, this parameter is only valid for repeat unit "week".
For multiple days of the week, each value should be 1 to 7.
1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday, 7: Sunday
    Example: [1,5,6]

  - `startAt` (string)
    cdp-api will fill some value for old syndications with ScheduleType is not NoneType. '%Y-%M-%DT%h:%m:%s' is expected.

  - `runAt` (string)

  - `cron` (string)

  - `timezone` (string)

  - `connectionId` (integer)

  - `connectorConfig` (object)

  - `notifyOn` (array)

  - `emailRecipients` (array)

  - `nestedWorkflowProjectName` (string)

  - `nestedWorkflowName` (string)

  - `lockEnabled` (boolean)

  - `activationTemplateId` (string)

  - `syndicationBehavior` (object)
    Deprecated. Use syndicationBehaviors instead. Cannot be specified together with syndicationBehaviors.

  - `syndicationBehavior.behaviorTableName` (string)
    Behavior table name which contains behavior records
    Example: purchase_history

  - `syndicationBehavior.joinRow` (integer)
    How much rows would be joined (value is N for Top-N join)
    Example: 3

  - `syndicationBehavior.joinStrategy` (string)
    Label of what is the wanted record(s).
    Enum: "All", "First", "Last", "Top-N"

  - `syndicationBehavior.formatting` (string)
    Enum: "rows", "cols"

  - `syndicationBehavior.orderBy` (array)
    Example: [{"key":"purchased_at","order":"descending"},{"key":"price","order":"ascending"}]

  - `syndicationBehavior.orderBy.key` (string)

  - `syndicationBehavior.orderBy.order` (string)
    Enum: "ascending", "descending"

  - `syndicationBehaviors` (array)
    Behavior activation configurations. Cannot be specified together with syndicationBehavior.

## Response 400 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 401 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 403 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 404 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 4XX 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

