POST
api/REST/2.0/assets/email/deployment
This endpoint is used to create and send an HTML email deployment to up to 2000 contacts.
Request parameters
Required
Name |
Type |
Description |
Possible values |
---|---|---|---|
type | string | The type of email deployment. |
Note: The activity's email send type will appear as |
name | string | The name of the deployment. | |
contacts | array |
The array of contact IDs of the contacts to send to. |
Nested schema: email
Details about the HTML email deployment.
Name |
Type |
Description |
Possible values |
---|---|---|---|
type | string | The asset's type in Eloqua. | Email
|
name | string |
The name of the email asset. Note: The name is not actually read so any value can be used but it is still required. |
|
subject | string | The email subject. | |
id | string | (Optional) The email ID to specify if you want to send an existing email deployment. |
Nested schema: htmlContent
The HTML content for the email deployment.
Name |
Type |
Description |
Possible values |
---|---|---|---|
type | string | The email type. Must be RawHtmlContent . |
RawHtmlContent
|
html | string | The raw HTML content for the email. |
Optional
Name |
Type |
Description |
Possible values |
---|---|---|---|
sendFromUserId | string | The ID of the user to use as the sender of the email. The default will use the current user. | |
sendDate | string | A date in the future to schedule the deployment. If the date is in the past, or not specified, the deployment is scheduled immediately. The format is Unix Time. | |
externalSource | string | Indicates the source of the email. If not specified, set to Unknown . |
|
depth | string | Level of detail returned by the request. The default will be complete. Learn more about the depth parameter. |
|
Response parameters
Name |
Type |
Description |
Possible values |
---|---|---|---|
type |
string |
The type of email deployment. |
Note: The activity's Email Send Type will appear as |
currentStatus | string | Current deployment status. |
|
id | string | The ID of the email asset | |
depth | string | The request's level of detail. | complete
|
name |
string |
The name of the deployment. |
|
permissions | array | Permission values of the deployment granted to the current user. | |
successfulSendCount | string | The number of emails which have been successfully sent so far. | |
failedSendCount | string | The number of emails which failed during send so far. | |
sendDate | string |
The date the deployment was scheduled for send. The format is Unix Time. If scheduled for a future date, the email will be deployed at the future date and time. Otherwise the email will be sent right away. |
|
sentContent | string | The contents of the email sent. | |
sentSubject | string | The email subject. | |
successfulSendCount | string | The amount of email deployments sent successfully to contacts. | |
clickthroughCount | string | The count of user clickthroughs recorded on the email. | |
contacts | array | The array of contact ids of the contacts to the deployment will attempt to send to. | |
externalSource | string | Indicates the source of the email. If not specified, set to Unknown . |
|
openCount | string | The count of user email opens for the email. | |
sendFromUserId | string |
The ID of the user used as the sender of the email. |
|
statistics | array | Statistics about the email deployment such as bounceback type, clickthrough count, email open date, and email send date. Retrieve an email deployment to see email deployment statistics. |
Nested schema: email
Name |
Type |
Description |
Possible values |
---|---|---|---|
type | string | The asset's type in Eloqua. | Email
|
id | string | The ID of the email asset. | |
name | string | The name of the email asset. |
Nested schema: htmlContent
The HTML content for the email deployment.
Name |
Type |
Description |
Possible values |
---|---|---|---|
type | string | The email type. Must be RawHtmlContent . |
RawHtmlContent
|
html | string | The raw HTML content for the email. |
Example
Create and send an email deployment for an HTML email to two contacts:
POST /assets/email/deployment
Request body:
{
"type": "EmailInlineDeployment",
"depth": "complete",
"name": "Email Send Future Date",
"email": {
"type": "Email",
"name": "Test Inline Deployment",
"subject": "Email Deployment Test",
"htmlContent": {
"type": "RawHtmlContent",
"html": "<html><head></head><body>Test Inline Deployment</body></html>"
}
},
"sendDate": "1601363751",
"externalSource": "SalesCloud",
"sendFromUserId": 2,
"contacts": [
{
"id": 3,
"id": 4
}
]
}
Response:
{
"type": "EmailInlineDeployment",
"currentStatus": "normal",
"id": "209",
"depth": "complete",
"name": "Email Send Future Date",
"permissions": [
"Retrieve",
"SetSecurity",
"Delete",
"Update",
"Activate"
],
"email": {
"type": "Email",
"replyToEmail": "newclient@oracle.com",
"replyToName": "New Client",
"senderEmail": "newclient@oracle.com",
"senderName": "New Client"
},
"failedSendCount": "0",
"sendDate": "1601363751",
"sentContent": "<html><head></head><body>Test Inline Deployment</body></html>",
"sentSubject": "Email Deployment Test",
"successfulSendCount": "0",
"clickthroughCount": "0",
"contacts": [],
"externalSource": "SalesCloud",
"openCount": "0",
"sendFromUserId": "2",
"statistics": []
}