---
schema_version: "1"
id: af74b755ffd06db9ac7b6e2f0c3848b799dcfddbac84617d1330e5639edb1bb7
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_emailAdd.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_emailAdd.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7c7023b16e6dd24b49b4b05550588861e8258a1e4a5aca2aef5ff4bd5e006e6e
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Add

## Overview

Adds a new email to your account and returns an initialized object

### Syntax

Add(1)

### Function Properties

<!--complex table-->

| Ordinal | Type   |              | Description                                 |
| ------- | ------ | ------------ | ------------------------------------------- |
| **1**   | object | **Required** | JSON object containing new email properties |

## Example

This sample code adds an email to your account:

```
var newMail = {
    "CustomerKey" : "test_email_key",
    "Name" : "Test Email",
    "CategoryID" : "123456",
    "HTMLBody" : "<b>This is a test email</b>",
    "TextBody" : "This is a test email",
    "Subject" : "Test Email Subject",
    "IsActive" : "true",
    "IsHTMLPaste" : "true",
    "Status" : "active",
    "EmailType" : "HTML",
    "CharacterSet" : "US-ASCII",
    "HasDynamicSubjectLine" : "false"
};
var myEmail = Email.Add(newMail);
```

The CategoryID value in the above code sample assigns the new email message to a specific folder. To save the new email message to the default folder in your account, remove the CategoryID value entirely.
