Update an email

put

/api/REST/2.0/assets/email/{id}

Updates the email specified by the id parameter. Updating emails with the type ResponsiveHtmlContent is not supported. If you use this endpoint with this email type, we cannot guarantee your email will be responsive. All properties should be included in PUT requests, as some properties will be considered blank if not included.

Request

Supported Media Types
Path Parameters
Body ()
The request body defines the details of the email to be updated.
Root Schema : Email
Type: object
Title: Email
Show Source
Nested Schema : attachments
Type: array
A list of imported files.
Show Source
Nested Schema : contentSections
Type: array
A list of content sections contained within the email.
Show Source
Nested Schema : contentServiceInstances
Type: array
Show Source
Nested Schema : dynamicContents
Type: array
A list of dynamic contents contained within the email.
Show Source
Nested Schema : fieldMerges
Type: array
A list of associated Field Merges.
Show Source
Nested Schema : files
Type: array
A list of imported files.
Show Source
Nested Schema : forms
Type: array
A list of associated Form assets.
Show Source
Nested Schema : HtmlContent
Type: object
Title: HtmlContent
Show Source
Nested Schema : images
Type: array
A list of associated Image assets.
Show Source
Nested Schema : permissions
Type: array
The permissions for the email granted to your current instance. This is a read-only property.
Show Source
Nested Schema : ImportedFile
Type: object
Title: ImportedFile
Show Source
Nested Schema : permissions
Type: array
The permissions for the imported file granted to your current instance.
Show Source
Nested Schema : ContentSection
Type: object
Title: ContentSection
Show Source
Nested Schema : files
Type: array
A list of associated files.
Show Source
Nested Schema : forms
Type: array
A list of associated Form assets.
Show Source
Nested Schema : images
Type: array
A list of associated Image assets.
Show Source
Nested Schema : permissions
Type: array
The permissions for the content section granted to your current instance. This is a read-only property.
Show Source
Nested Schema : Size
Type: object
Title: Size
Show Source
Nested Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : FormFieldUpdateMapping
Type: object
Title: FormFieldUpdateMapping
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
Show Source
Nested Schema : permissions
Type: array
The permissions for the form granted to your current instance. This is a read-only property.
Show Source
Nested Schema : processingSteps
Type: array
A list of the form's processing steps. There is no limit to the number of processing steps that can be included. Possible values include: FormStepAddToCampaign, FormStepAddToContactList, FormStepAddToDataCanvas, FormStepAddToProgram, FormStepAssociateToCampaign, FormStepCancelRegistration, FormStepUpdateContactEmailAddress, FormStepCreateUpdateEventRegistration, FormStepCreateUpdate, FormStepCreateUpdateFromFormField, FormStepGlobalSubscribe, FormStepGlobalUnsubscribe, FormStepGroupSubscription, FormStepPostData, FormStepRedirectToWebPage, FormStepRemoveFromContactList, FormStepRunIntegrationRules, FormStepSendEmail, FormStepSendNotificationEmail, and FormStepWebTracking.
Show Source
Nested Schema : permissions
Type: array
The permissions for the form field update mapping granted to your current instance. This is a read-only property.
Show Source
Nested Schema : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : permissions
Type: array
The permissions for the form element granted to your current instance.
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source
Nested Schema : ProcessingStepCondition
Type: object
Title: ProcessingStepCondition
Show Source
Nested Schema : permissions
Type: array
The permissions for the form processing step granted to your current instance.
Show Source
Nested Schema : conditionalFieldCriteria
Type: array
The conditional field criteria for the form processing step condition.
Show Source
Nested Schema : FieldComparisonCriteria
Type: object
Title: FieldComparisonCriteria
Show Source
Nested Schema : Condition
Type: object
Title: Condition
Show Source
Nested Schema : permissions
Type: array
The permissions for the field comparison criteria granted to your current instance. This is a read-only property.
Show Source
Nested Schema : Hyperlink
Type: object
Title: Hyperlink
Show Source
Nested Schema : permissions
Type: array
The permissions for the hyperlink granted to your current instance.
Show Source
Nested Schema : ImageFile
Type: object
Title: ImageFile
Show Source
Nested Schema : permissions
Type: array
The permissions for the image granted to your current instance. This is a read-only property.
Show Source
Nested Schema : CloudComponentInstance
Type: object
Title: CloudComponentInstance
Show Source
Nested Schema : DynamicContent
Type: object
Title: DynamicContent
Show Source
Nested Schema : permissions
Type: array
The permissions for the dynamic content granted to your current instance. This is a read-only property.
Show Source
Nested Schema : rules
Type: array
The dynamic content's rules.
Show Source
Nested Schema : DynamicContentRule
Type: object
Title: DynamicContentRule
Show Source
Nested Schema : criteria
Type: array
The criteria of the dynamic content rule.
Show Source
Nested Schema : Criterion
Type: object
Title: Criterion
Show Source
Nested Schema : permissions
Type: array
The permissions for the criterion granted to your current instance.
Show Source
Nested Schema : FieldMerge
Type: object
Title: FieldMerge
Show Source
Nested Schema : fieldConditions
Type: array
Array of field condition fields.
Show Source
Nested Schema : permissions
Type: array
The permissions for the field merge granted to your current instance.
Show Source
Nested Schema : FieldCondition
Type: object
Title: FieldCondition
Show Source
Nested Schema : permissions
Type: array
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : Email
Type: object
Title: Email
Show Source
Nested Schema : attachments
Type: array
A list of imported files.
Show Source
Nested Schema : contentSections
Type: array
A list of content sections contained within the email.
Show Source
Nested Schema : contentServiceInstances
Type: array
Show Source
Nested Schema : dynamicContents
Type: array
A list of dynamic contents contained within the email.
Show Source
Nested Schema : fieldMerges
Type: array
A list of associated Field Merges.
Show Source
Nested Schema : files
Type: array
A list of imported files.
Show Source
Nested Schema : forms
Type: array
A list of associated Form assets.
Show Source
Nested Schema : HtmlContent
Type: object
Title: HtmlContent
Show Source
Nested Schema : images
Type: array
A list of associated Image assets.
Show Source
Nested Schema : permissions
Type: array
The permissions for the email granted to your current instance. This is a read-only property.
Show Source
Nested Schema : ImportedFile
Type: object
Title: ImportedFile
Show Source
Nested Schema : permissions
Type: array
The permissions for the imported file granted to your current instance.
Show Source
Nested Schema : ContentSection
Type: object
Title: ContentSection
Show Source
Nested Schema : files
Type: array
A list of associated files.
Show Source
Nested Schema : forms
Type: array
A list of associated Form assets.
Show Source
Nested Schema : images
Type: array
A list of associated Image assets.
Show Source
Nested Schema : permissions
Type: array
The permissions for the content section granted to your current instance. This is a read-only property.
Show Source
Nested Schema : Size
Type: object
Title: Size
Show Source
Nested Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : FormFieldUpdateMapping
Type: object
Title: FormFieldUpdateMapping
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
Show Source
Nested Schema : permissions
Type: array
The permissions for the form granted to your current instance. This is a read-only property.
Show Source
Nested Schema : processingSteps
Type: array
A list of the form's processing steps. There is no limit to the number of processing steps that can be included. Possible values include: FormStepAddToCampaign, FormStepAddToContactList, FormStepAddToDataCanvas, FormStepAddToProgram, FormStepAssociateToCampaign, FormStepCancelRegistration, FormStepUpdateContactEmailAddress, FormStepCreateUpdateEventRegistration, FormStepCreateUpdate, FormStepCreateUpdateFromFormField, FormStepGlobalSubscribe, FormStepGlobalUnsubscribe, FormStepGroupSubscription, FormStepPostData, FormStepRedirectToWebPage, FormStepRemoveFromContactList, FormStepRunIntegrationRules, FormStepSendEmail, FormStepSendNotificationEmail, and FormStepWebTracking.
Show Source
Nested Schema : permissions
Type: array
The permissions for the form field update mapping granted to your current instance. This is a read-only property.
Show Source
Nested Schema : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : permissions
Type: array
The permissions for the form element granted to your current instance.
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source
Nested Schema : ProcessingStepCondition
Type: object
Title: ProcessingStepCondition
Show Source
Nested Schema : permissions
Type: array
The permissions for the form processing step granted to your current instance.
Show Source
Nested Schema : conditionalFieldCriteria
Type: array
The conditional field criteria for the form processing step condition.
Show Source
Nested Schema : FieldComparisonCriteria
Type: object
Title: FieldComparisonCriteria
Show Source
Nested Schema : Condition
Type: object
Title: Condition
Show Source
Nested Schema : permissions
Type: array
The permissions for the field comparison criteria granted to your current instance. This is a read-only property.
Show Source
Nested Schema : Hyperlink
Type: object
Title: Hyperlink
Show Source
Nested Schema : permissions
Type: array
The permissions for the hyperlink granted to your current instance.
Show Source
Nested Schema : ImageFile
Type: object
Title: ImageFile
Show Source
Nested Schema : permissions
Type: array
The permissions for the image granted to your current instance. This is a read-only property.
Show Source
Nested Schema : CloudComponentInstance
Type: object
Title: CloudComponentInstance
Show Source
Nested Schema : DynamicContent
Type: object
Title: DynamicContent
Show Source
Nested Schema : permissions
Type: array
The permissions for the dynamic content granted to your current instance. This is a read-only property.
Show Source
Nested Schema : rules
Type: array
The dynamic content's rules.
Show Source
Nested Schema : DynamicContentRule
Type: object
Title: DynamicContentRule
Show Source
Nested Schema : criteria
Type: array
The criteria of the dynamic content rule.
Show Source
Nested Schema : Criterion
Type: object
Title: Criterion
Show Source
Nested Schema : permissions
Type: array
The permissions for the criterion granted to your current instance.
Show Source
Nested Schema : FieldMerge
Type: object
Title: FieldMerge
Show Source
Nested Schema : fieldConditions
Type: array
Array of field condition fields.
Show Source
Nested Schema : permissions
Type: array
The permissions for the field merge granted to your current instance.
Show Source
Nested Schema : FieldCondition
Type: object
Title: FieldCondition
Show Source
Nested Schema : permissions
Type: array
Show Source

400 Response

Bad request. See Status Codes for information about other possible HTTP status codes.

401 Response

Unauthorized. See Status Codes for information about other possible HTTP status codes.

403 Response

Forbidden. See Status Codes for information about other possible HTTP status codes.

404 Response

The requested resource was not found. See Status Codes for information about other possible HTTP status codes.

500 Response

The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Back to Top

Examples

The following examples demonstrate how to update emails in your database using an HTTP request and cURL. For more information on requests, see API requests.

HTTP Request Examples

Update the name and subject line of the email with Id #63:


PUT /api/REST/2.0/assets/email/63
Content-Type: application/json 
			

Request body:


{
  "id": "63",
  "name": "My new email name",
  "subject": "New subject line"
}
			

Response:


{
  "type": "Email",
  "currentStatus": "Draft",
  "id": "63",
  "initialId": "63",
  "createdAt": "1449504001",
  "depth": "complete",
  "folderId": "4195",
  "name": "My new email name",
  "permissions": [
    "Retrieve",
    "SetSecurity",
    "Delete",
    "Update"
  ],
  "updatedAt": "1563981169",
  "updatedBy": "9",
  "archive": "false",
  "bounceBackEmail": "newclient@qa01en25.com",
  "contentSections": [],
  "dynamicContents": [],
  "emailFooterId": "12",
  "emailGroupId": "6",
  "emailHeaderId": "11",
  "encodingId": "3",
  "fieldMerges": [],
  "forms": [],
  "htmlContent": {
    "type": "StructuredHtmlContent",
    "contentSource": "editor",
    "docType": "<!DOCTYPE html>",
    "htmlBody": "",
    "metaTags": [],
    "systemHeader": "<style>body{   } a img{border: none;}.ReadMsgBody { width: 100%;}.ExternalClass {width: 100%;}<\/style>",
    "root": "SC.Page.design({mainView: CoreOrion.DropView.design({inlineStyles: {\"borderWidth\": \"2\",\"borderStyle\": \"none\"},childViews: [CoreOrion.TextBoxView.design({layout: {\"left\": 40,\"top\": 51,\"height\": 152,\"width\": 300},value: \"Click here to register:<br><a data-targettype=\\\"webpage\\\" href=\\\"http:\/\/www.example.com\/?elqTrackId=A1FFA5B809EDDB5B160F1AF03EF8D030&elqTrack=true\\\">https:\/\/lsvertical.test234.com\/LP=24<\/a><br>\",inlineStyles: {\"borderWidth\": \"2\",\"borderStyle\": \"none\",\"color\": \"#000000\",\"fontFamily\": \"Arial\",\"fontSize\": \"12px\",\"lineHeight\": \"18px\",\"borderColor\": \"#000\",\"letterSpacing\": \"0px\",\"wordWrap\": \"break-word\"}}),CoreOrion.TextBoxView.design({layout: {\"left\": 40,\"top\": 300,\"height\": 60,\"width\": 300},value: \"Double-Click to Edit\",inlineStyles: {\"borderWidth\": \"2\",\"borderStyle\": \"none\",\"color\": \"#000000\",\"fontFamily\": \"Arial\",\"fontSize\": \"12px\",\"lineHeight\": \"18px\",\"borderColor\": \"#000\",\"letterSpacing\": \"0px\",\"wordWrap\": \"break-word\"}})]})})"
  },
  "hyperlinks": [],
  "images": [],
  "isContentProtected": "false",
  "isPlainTextEditable": "false",
  "isPrivate": "False",
  "isTracked": "false",
  "layout": "{\"body\":{\"width\":600,\"height\":692,\"centerX\":0,\"topAndBottomPad\":null}}",
  "plainText": " ",
  "renderMode": "Flow",
  "replyToEmail": "newclient@qa01en25.com",
  "replyToName": "New Client",
  "sendPlainTextOnly": "false",
  "senderEmail": "newclient@qa01en25.com",
  "senderName": "New Client",
  "style": "{}",
  "subject": "New subject line",
  "virtualMTAId": "1"
}
			

Update an email's name only:

Note that depth must be set to minimal to update only the name of the email. All other properties will not be updated.


PUT /api/REST/2.0/assets/email/63
Content-Type: application/json 
			

Request body:


{
  "id": "63",
  "name": "My new email name",
  "depth": "minimal"
}
			

Response:


{
  "type": "Email",
  "currentStatus": "Draft",
  "id": "63",
  "initialId": "63",
  "createdAt": "1449504001",
  "depth": "minimal",
  "folderId": "4195",
  "name": "My new email name",
  "permissions": [
    "Retrieve",
    "SetSecurity",
    "Delete",
    "Update"
  ],
  "updatedAt": "1563803894",
  "updatedBy": "9",
  "archive": "false",
  "htmlContent": {
    "type": "RawHtmlContent",
    "contentSource": "upload"
  },
  "subject": "New subject line"
}
			

cURL Examples

Here are the same examples in cURL given an instance with the name APITest, username API.User, and POD of 3.


curl --user "APITest\API.User" --header "Content-Type: application/json" --request PUT --data '{"id":"63","name":"My new email name","subject":"New subject line"}' https://secure.p03.eloqua.com/api/REST/2.0/assets/email/63
			

curl --user "APITest\API.User" --header "Content-Type: application/json" --request PUT --data '{"id":"63","name":"My new email name","depth":"minimal"}' https://secure.p03.eloqua.com/api/REST/2.0/assets/email/63
			
Back to Top