---
schema_version: "1"
id: 1f853e98f5f699b2f09dfd73d951a09b1ed79749abb557eb63552c5999e6f743
title: Email - Preview and Send (Direct Email Send API)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/mc-core/references/generated-api-specs/mc-next-email-direct-send.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-growth/references/mc-next-email-direct-send
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1927d4602394fcfc65164c7d06ea67380c01f5353ef104a585f5cfa31d7a2824
products:
  - Marketing Cloud Next
  - Marketing Cloud
---
Email - Preview and Send (Direct Email Send API)

# Email - Preview and Send (Direct Email Send API)

Use Direct Email Send API to send transactional emails. All operations require authentication with a Bearer token that has the `sfap_api` scope.

This table lists the use cases that the API supports.

| Supported Use Case | HTTP Verb | URI |
| --- | --- | --- |
| Send an email to a recipient | [POST](/docs/marketing/marketing-cloud-growth/references/mc-next-email-direct-send?meta=sendEmail) | /messaging/email/v1 |
| Send an email to multiple recipients | [POST](/docs/marketing/marketing-cloud-growth/references/mc-next-email-direct-send?meta=sendBulkEmail) | /messaging/email/v1/bulk |
| Preview a rendered email | [POST](/docs/marketing/marketing-cloud-growth/references/mc-next-email-direct-send?meta=previewEmail) | /messaging/email/v1/preview |

**Version:** 1.0.0

Contact: Salesforce Marketing Cloud, https://developer.salesforce.com

## Servers

*   `https://api.salesforce.com/automation/actions360` Production server

## Operations

### POST Send an email to a single recipient

`POST /messaging/email/v1`

Operation ID: `sendEmail`. Tags: Messaging - Email.

Renders and sends an email to a single recipient using the specified send definition.

#### Parameters

*   `sendDefinitionId` (query, string, required) The unique ID of the send definition.  
    Pattern: ^\[a-zA-Z0-9\]+.
    
    _Example_
    
    ```
    0XBWs000000ugHVOAY
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `object`.

*   `individualId` (_string_, required) The unique recipient identifier in Data 360, in the form `Individual__dlm/{id}`.  
    Example: `Individual__dlm/user-001`.
*   `attributes` (_object_, required) The personalization data for the message. Keyed by the Apex class name defined in the CMS content. The key must match the class name exactly.
    
    Additional properties: `object`.
    
    The field-value pairs passed to the content template, as defined by the Apex class.
    
    _Example_
    
    ```
    {
      "WelcomeEmailInput": {
        "firstName": "John",
        "lastName": "Doe",
        "company": "Northern Trail Outfitters"
      }
    }
    ```
    
*   `subject` (_string_) Overrides the subject that the content template renders for this recipient.
*   `body` (_string_) Overrides the HTML body that the content template renders for this recipient.
*   `text` (_string_) Overrides the plain-text body that the content template renders for this recipient.

_Example_

```
{
  "individualId": "Individual__dlm/user-001",
  "attributes": {
    "WelcomeEmailInput": {
      "firstName": "John",
      "lastName": "Doe",
      "company": "Northern Trail Outfitters"
    }
  }
}
```

#### Responses

*   **200** Email sent successfully
    
    Media type: `application/json`. Schema: `object`.
    
    *   `requestId` (_string_) The unique identifier of this send request.
    *   `properties` (_object_)
        *   `deliveryId` (_string_) The delivery tracking identifier for this message.
    
    _Example_
    
    ```
    {
      "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "properties": {
        "deliveryId": "del_abc123xyz"
      }
    }
    ```
    
*   **400** Bad Request - A required field is missing or the request body is invalid.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **401** Unauthorized - The authentication token is expired or invalid.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **403** Forbidden - The feature isn’t enabled for the tenant, or the token scope isn’t sufficient to perform the action.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **404** Not Found - The send definition specified in the request wasn’t found.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **429** Too Many Requests - The request was rate limited. Implement an exponential backoff strategy before retrying the request.
    
    Media type: `application/json`. Schema: `Error`.
    

### POST Send an email to multiple recipients

`POST /messaging/email/v1/bulk`

Operation ID: `sendBulkEmail`. Tags: Messaging - Email.

Renders and sends an email to multiple recipients in a single request using the specified send definition.

#### Parameters

*   `sendDefinitionId` (query, string, required) The send definition record ID.  
    Pattern: ^\[a-zA-Z0-9\]+.
    
    _Example_
    
    ```
    0XBWs000000ugHVOAY
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `object`.

*   `recipients` (_array of object_, required) The list of recipients. Each element contains the same properties as a single-send request body.
    *   `individualId` (_string_, required) The unique identifier of the recipient in Data 360. Use this syntax to specify the ID: `Individual__dlm/{id}`.
    *   `attributes` (_object_, required) The personalization data for the recipient, keyed by the Apex class name.
        
        Additional properties: `object`.
        
    *   `subject` (_string_) Overrides the subject for this recipient.
    *   `body` (_string_) Overrides the HTML body for this recipient.
    *   `text` (_string_) Overrides the plain-text body for this recipient.

_Example_

```
{
  "recipients": [
    {
      "individualId": "Individual__dlm/user-001",
      "attributes": {
        "WelcomeEmailInput": {
          "firstName": "John",
          "lastName": "Doe",
          "company": "Northern Trail Outfitters"
        }
      }
    },
    {
      "individualId": "Individual__dlm/user-002",
      "attributes": {
        "WelcomeEmailInput": {
          "firstName": "Jane",
          "lastName": "Smith",
          "company": "Northern Trail Outfitters"
        }
      }
    }
  ]
}
```

#### Responses

*   **200** Bulk email request accepted
    
    Media type: `application/json`. Schema: `object`.
    
    *   `requestId` (_string_) The unique identifier for the batch request.
*   **400** Bad Request - A required field is missing or the body of the request is invalid.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **401** Unauthorized - The token used in the request is expired or invalid.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **403** Forbidden - The feature isn’t enabled for the tenant, or the permission scope for the token isn’t sufficient to perform the requested action.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **404** Not Found - The send definition specified in the request wasn’t found.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **429** Too Many Requests - The request was rate limited. Implement an exponential backoff strategy and then retry.
    
    Media type: `application/json`. Schema: `Error`.
    

### POST Preview a rendered email

`POST /messaging/email/v1/preview`

Operation ID: `previewEmail`. Tags: Messaging - Email.

Renders an email with the supplied data and returns the result without sending. Use the preview operation to confirm that a template and data combination renders correctly before you send.

#### Parameters

*   `sendDefinitionId` (query, string, required) The send definition (ListEmail) record ID.  
    Pattern: ^\[a-zA-Z0-9\]+.
    
    _Example_
    
    ```
    0XBWs000000ugHVOAY
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `object`.

*   `individualId` (_string_, required) The recipient identifier used to resolve personalization data.
*   `attributes` (_object_, required) The personalization data, keyed by the Apex class name.
    
    Additional properties: `object`.
    

_Example_

```
{
  "individualId": "Individual__dlm/test-user",
  "attributes": {
    "WelcomeEmailInput": {
      "firstName": "John",
      "lastName": "Doe",
      "company": "Northern Trail Outfitters"
    }
  }
}
```

#### Responses

*   **200** Rendered email preview
    
    Media type: `application/json`. Schema: `object`.
    
    *   `response` (_object_)
        *   `subject` (_string_) The rendered subject line.
        *   `body` (_string_) The rendered HTML body.
        *   `text` (_string_) The rendered plain-text body.
        *   `preheader` (_string_) The rendered preheader text.
    
    _Example_
    
    ```
    {
      "response": {
        "subject": "Welcome to Northern Trail Outfitters, John!",
        "body": "<html>..rendered HTML..</html>",
        "text": "Welcome to NTO, John! ...",
        "preheader": "Your account is ready to use!"
      }
    }
    ```
    
*   **400** Bad Request - A required field is missing or the request body is invalid.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **401** Unauthorized - The token is expired or invalid
    
    Media type: `application/json`. Schema: `Error`.
    
*   **403** Forbidden - The feature isn’t enabled for the tenant, or the scope of the token isn’t sufficient to perform the action.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **404** Not Found - The send definition specified in the request wasn’t found.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **429** Too Many Requests - The request was rate limited. Implement an exponential backoff strategy and retry.
    
    Media type: `application/json`. Schema: `Error`.
    

## Schemas

### Error

*   `message` (_string_) A message that describes the error that occurred.

_Example_

```
{
  "message": "The send definition wasn’t found."
}
```