Add

Overview

Adds a new content area to your account and returns an initialized object

Syntax

Add(1)

Function Properties

Ordinal Type Description
1 object Required JSON object representing the properties of the new content area

Example

This sample code adds a content area to your account:

var exampleArea = {
    "CustomerKey" : "exampleArea",
    "Name" : "SSJS Content Area Example",
    "CategoryID" : 123456                            //Use only if you wish to assign the content area to a specific folder
    "Layout" : "RawText",                            //Use only if you wish to create a specific layout format for a content area
    "LayoutSpecified" : true,                        //Use only if you specify a layout type
    "Content" : "<b>This is example content</b>"
};

var addedCA = ContentAreaObj.Add(exampleArea);
Last Updated: Jun 8, 2021