---
schema_version: "1"
id: b17df3e216251119d12c540e05ed039b1a84083f0ce53d2cc4ca11bab14e6de5
title: Definition.AddWithDE
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_sendDefinitionAddWithDE.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_sendDefinitionAddWithDE.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: dda7c8e702ad17d7fa91a2ca52e681aa45b3eebdfc8c43bb4610237fe4bdd58e
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Definition.AddWithDE

## Overview

Add a send definition that incorporates a sendable data extension

### Syntax

Definition.AddWithDE(1, 2, 3, 4, 5)

### Function Properties

<!--complex table-->

| Ordinal | Type   |              | Description                                                     |
| ------- | ------ | ------------ | --------------------------------------------------------------- |
| **1**   | string | **Required** | Customer key, name, and subject line for send definition        |
| **2**   | string | **Required** | Customer key for related send classification                    |
| **3**   | string | **Required** | Customer key for email used in send definition                  |
| **4**   | string | **Required** | Customer key of sendable data extension used in send definition |
| **5**   | string | **Required** | Customer key of publication list to use with send definition    |

## Examples

This sample code adds the send definition with the applicable sendable data extension:

```
var esdParams = {
    "CustomerKey" : "ssjs_de_esd_1c",
    "Name" : "SSJS DE Test ESD3",
    "EmailSubject" : "Third send By Test DE Send Definition"
};

// local values
var scKey = 'scKey';
var emailKey = 'test_email';
var deKey = 'deKey';
var pubListKey = 'myPubList';

var status = Send.Definition.AddWithDE(esdParams, scKey, emailKey, deKey, pubListKey);
```
