---
schema_version: "1"
id: abf4e7c6facaf52fad5bf90e7b3dd3eb381732bf3c44654bcd3e9120776b126a
title: Add
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_dataExtensionAdd.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_dataExtensionAdd.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 16b12e8f3b2707da7908cabbf64155d28cbbb39f842ec7589ef0a9dea411e1c0
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Add

Creates a data extension and returns an initialized DataExtension object.

## Syntax

`Add(1)`

## Function Properties

| Ordinal | Type   | Description                                                                  |
| ------- | ------ | ---------------------------------------------------------------------------- |
| `1`     | Object | Required. An object that specifies the properties of the new data extension. |

## Examples

This code example creates a sendable data extension that contains four fields. The field `SubKey` is associated with the contact’s subscriber key.

```
var deObj = {
    CustomerKey : "SendableDE",
    Name : "Sendable Data Extension",
    Fields : [
        { "Name" : "SubKey", "FieldType" : "Text", "IsPrimaryKey" : true, "MaxLength" : 50, "IsRequired" : true },
        { "Name" : "SecondField", "FieldType" : "Text", "MaxLength" : 50 },
        { "Name" : "ThirdField", "FieldType" : "Text", "MaxLength" : 50 },
        { "Name" : "DifferentSubKey", "FieldType" : "Text", "MaxLength" : 50 }
    ],
    SendableInfo : {
        Field : { "Name" : "SubKey", "FieldType" : "Text" },
        RelatesOn : "Subscriber Key"
    }
};

var de = DataExtension.Add(deObj);
```

For information about specifying data extension fields, see [Fields.Add](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_dataExtensionFieldsAdd.md).
