# Create an Activation Template Endpoint: POST /entities/activation_templates Version: 1.0.0 ## Request fields (application/vnd.treasuredata.v1+json): - `id` (string) - `type` (string) Enum: "activation-template" - `attributes` (object) - `attributes.name` (string, required) - `attributes.description` (string) - `attributes.kind` (integer) 0: batch, 1: batch_journey (default is 0) - `attributes.allColumns` (boolean) syndication all column flag ('true' means that you use all attribute data) - `attributes.columns` (array) Syndication column detail. Basic syntax is . accepts various definitions. See ColumnExpression/StringExpression for details. example value is using ColumnExpression without property. Example: [{"column":"alias_name","source":{"column":"real_column_name"}}] - `attributes.columns.column` (string, required) - `attributes.columns.source` (any, required) - `attributes.scheduleOption` (string) - `attributes.timezone` (string) - `attributes.startAt` (string,null) cdp-api will fill some value for old syndications with ScheduleType is not NoneType. '%Y-%M-%DT%h:%m:%s' is expected. - `attributes.endOn` (string,null) - `attributes.repeatUnit` (string) Setting an activation repetition cycle such as "day" or "week". Enum: "none", "minute", "hour", "day", "week", "month", "once" - `attributes.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. - `attributes.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] - `attributes.connectionId` (integer, required) - `attributes.connectorConfig` (object,null) - `attributes.notifyOn` (array) Enum: "onSuccess", "onFailure" - `attributes.emailRecipients` (array) - `attributes.state` (string, required) Enum: "draft", "published" - `attributes.nestedWorkflowProjectName` (string,null) - `attributes.nestedWorkflowName` (string,null) - `attributes.lockEnabled` (boolean) - `attributes.runAfterJourneyRefresh` (boolean) If true, this activation step will be executed immediately after the journey is refreshed. Only available for kind of journey. - `attributes.syndicationBehavior` (object,null) - `attributes.syndicationBehavior.behaviorTableName` (string) Behavior table name which contains behavior records Example: "purchase_history" - `attributes.syndicationBehavior.joinRow` (integer,null) How much rows would be joined (value is N for Top-N join) Example: 3 - `attributes.syndicationBehavior.joinStrategy` (string) Enum: "All", "First", "Last", "Top-N" - `attributes.syndicationBehavior.formatting` (string) Enum: "rows", "cols" - `attributes.syndicationBehavior.orderBy` (array) Example: [{"key":"purchased_at","order":"descending"},{"key":"price","order":"ascending"}] - `attributes.syndicationBehavior.orderBy.key` (string) Example: "purchased_at" - `attributes.syndicationBehavior.orderBy.order` (string) Enum: "ascending", "descending" - `attributes.fieldProperties` (object) activation template field properties - `attributes.fieldProperties.locked` (object, required) activation template field properties locked - `attributes.fieldProperties.locked.allColumns` (boolean) - `attributes.fieldProperties.locked.columns` (object) Example: {"b24bf298-4f8c-4e8a-8187-38f2efc781d9":{"column":true,"source":true,"lockDeleteColumn":false},"c97c5711-31dd-4563-aca9-795c0b429593":{"column":true,"source":true,"lockDeleteColumn":false}} - `attributes.fieldProperties.locked.activationActionsEnabled` (boolean) - `attributes.fieldProperties.locked.lockAddColumn` (boolean) - `attributes.fieldProperties.locked.lockAddString` (boolean) - `attributes.fieldProperties.locked.lockAddBehavior` (boolean) - `attributes.fieldProperties.locked.lockEditSchedule` (boolean) - `attributes.fieldProperties.locked.lockEditNotification` (boolean) - `attributes.fieldProperties.locked.lockEditWorkflowExecution` (boolean) - `attributes.fieldProperties.locked.lockEditSequentialActivation` (boolean) - `attributes.scheduleType` (string) Deprecated. Old parameter for setting schedule type. See/Use RepeatUnit instead. Enum: "cron", "daily", "hourly", "minutes_interval", "monthly", "none", "weekly" - `relationships` (object) - `relationships.parentFolder` (object) - `relationships.parentFolder.data` (object) ## Response 200 fields (application/json): - `data` (object, required) - `data.id` (string) - `data.type` (string) Enum: "activation-template" - `data.attributes` (object) - `data.attributes.audienceId` (string, required) - `data.attributes.name` (string, required) - `data.attributes.description` (string,null, required) - `data.attributes.kind` (integer) 0: batch, 1: batch_journey - `data.attributes.allColumns` (boolean) activation all column flag ('true' means that you use all attribute data) - `data.attributes.columns` (any) - `data.attributes.scheduleOption` (string,null) - `data.attributes.timezone` (string,null) - `data.attributes.startAt` (string,null) cdp-api will fill some value for old syndications with ScheduleType is not NoneType. '%Y-%M-%DT%h:%m:%s' is expected. - `data.attributes.endOn` (string,null) - `data.attributes.repeatUnit` (string) Setting an activation repetition cycle such as "day" or "week". Enum: "none", "minute", "hour", "day", "week", "month", "once" - `data.attributes.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. - `data.attributes.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] - `data.attributes.connectionId` (string,null) - `data.attributes.connectorConfig` (object,null) - `data.attributes.notifyOn` (array) Enum: "onSuccess", "onFailure" - `data.attributes.emailRecipients` (array) - `data.attributes.createdAt` (string, required) - `data.attributes.updatedAt` (string, required) - `data.attributes.state` (string) Enum: "draft", "published" - `data.attributes.nestedWorkflowProjectName` (string,null) - `data.attributes.nestedWorkflowName` (string,null) - `data.attributes.activationActionsEnabled` (boolean) - `data.attributes.lockEnabled` (boolean) - `data.attributes.runAfterJourneyRefresh` (boolean,null) If true, this activation step will be executed immediately after the journey is refreshed. Only available for kind of journey. - `data.attributes.syndicationBehavior` (object,null) - `data.attributes.syndicationBehavior.columns` (array) Syndication column detail. Basic syntax is . accepts various definitions. See ColumnExpression/StringExpression for details. example value is using ColumnExpression without property. Example: [{"column":"alias_name","source":{"column":"real_column_name"}}] - `data.attributes.syndicationBehavior.columns.column` (string, required) - `data.attributes.syndicationBehavior.columns.source` (any, required) - `data.attributes.syndicationBehavior.behaviorTableName` (string) Behavior table name which contains behavior records Example: "purchase_history" - `data.attributes.syndicationBehavior.joinRow` (integer,null) How much rows would be joined (value is N for Top-N join) Example: 3 - `data.attributes.syndicationBehavior.joinStrategy` (string) Enum: "All", "First", "Last", "Top-N" - `data.attributes.syndicationBehavior.formatting` (string) Enum: "rows", "cols" - `data.attributes.syndicationBehavior.orderBy` (array) Example: [{"key":"purchased_at","order":"descending"},{"key":"price","order":"ascending"}] - `data.attributes.syndicationBehavior.orderBy.key` (string) Example: "purchased_at" - `data.attributes.syndicationBehavior.orderBy.order` (string) Enum: "ascending", "descending" - `data.attributes.fieldProperties` (object) activation template field properties - `data.attributes.fieldProperties.locked` (object, required) activation template field properties locked - `data.attributes.fieldProperties.locked.allColumns` (boolean) - `data.attributes.fieldProperties.locked.lockAddColumn` (boolean) - `data.attributes.fieldProperties.locked.lockAddString` (boolean) - `data.attributes.fieldProperties.locked.lockAddBehavior` (boolean) - `data.attributes.fieldProperties.locked.lockEditSchedule` (boolean) - `data.attributes.fieldProperties.locked.lockEditNotification` (boolean) - `data.attributes.fieldProperties.locked.lockEditWorkflowExecution` (boolean) - `data.attributes.fieldProperties.locked.lockEditSequentialActivation` (boolean) - `data.attributes.activationCount` (integer) Number of related activations - `data.attributes.journeyCount` (integer) Number of related journeys - `data.attributes.available` (boolean) This template is available or not (It contains PBP PII BLOCKED columns or not) - `data.attributes.scheduleType` (string) Deprecated. Old parameter for setting schedule type. See/Use RepeatUnit instead. Enum: "cron", "daily", "hourly", "minutes_interval", "monthly", "none", "weekly" - `data.relationships` (object) - `data.relationships.parentFolder` (object) - `data.relationships.createdBy` (object) - `data.relationships.updatedBy` (object) - `included` (array, required) ## Response 400 fields (application/json): - `errors` (array, required) ## Response 403 fields (application/json): - `errors` (array, required) - `errors.code` (string, required) Error code in string Enum: "permission-error" - `errors.status` (string, required) Status code for error Enum: "403" - `errors.detail` (string, required) Detailed error message Example: "SegmentFolder View Permission Required" - `errors.meta` (object) Meta info for storing permissionCode. Note that in some cases, meta can be null. - `errors.meta.permissionCode` (string, required) Detailed validation error code Enum: "SEGMENT_FOLDER_VIEW_REQUIRED", "SEGMENT_FOLDER_EDIT_REQUIRED" ## Response 404 fields (application/json): - `errors` (array, required) - `errors.code` (string, required) Error code in string Enum: "record-not-found-error" - `errors.status` (string, required) Enum: "404" - `errors.detail` (string, required) Detailed error message Example: "Record not found" ## Response 5XX fields (application/json): - `status` (integer, required) Error status - `error` (string, required) Error message - `details` (string) Detailed error message