Update an email

put

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

Updates the email specified by the id parameter. 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 : contentSections
Type: array
A list of associated Content Section assets.
Show Source
Nested Schema : dynamicContents
Type: array
A list of associated dynamic content.
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 : landingPages
Type: array
A list of associated landing page assets.
Show Source
Nested Schema : ContentSection
Type: object
Title: ContentSection
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 : Size
Type: object
Title: Size
Show Source
Nested Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
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 : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source
Nested Schema : Hyperlink
Type: object
Title: Hyperlink
Show Source
Nested Schema : ImageFile
Type: object
Title: ImageFile
Show Source
Nested Schema : DynamicContent
Type: object
Title: DynamicContent
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 : FieldMerge
Type: object
Title: FieldMerge
Show Source
Nested Schema : ImportedFile
Type: object
Title: ImportedFile
Show Source
Nested Schema : LandingPage
Type: object
Title: LandingPage
Show Source
Nested Schema : contentSections
Type: array
A list of content sections contained within the landing page.
Show Source
Nested Schema : dynamicContents
Type: array
A list of dynamic contents contained within the landing page.
Show Source
Nested Schema : files
Type: array
A list of files contained within the landing page.
Show Source
Nested Schema : forms
Type: array
A list of forms contained within the landing page.
Show Source
Nested Schema : images
Type: array
A list of images contained within the landing page.
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : Email
Type: object
Title: Email
Show Source
Nested Schema : contentSections
Type: array
A list of associated Content Section assets.
Show Source
Nested Schema : dynamicContents
Type: array
A list of associated dynamic content.
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 : landingPages
Type: array
A list of associated landing page assets.
Show Source
Nested Schema : ContentSection
Type: object
Title: ContentSection
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 : Size
Type: object
Title: Size
Show Source
Nested Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
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 : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source
Nested Schema : Hyperlink
Type: object
Title: Hyperlink
Show Source
Nested Schema : ImageFile
Type: object
Title: ImageFile
Show Source
Nested Schema : DynamicContent
Type: object
Title: DynamicContent
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 : FieldMerge
Type: object
Title: FieldMerge
Show Source
Nested Schema : ImportedFile
Type: object
Title: ImportedFile
Show Source
Nested Schema : LandingPage
Type: object
Title: LandingPage
Show Source
Nested Schema : contentSections
Type: array
A list of content sections contained within the landing page.
Show Source
Nested Schema : dynamicContents
Type: array
A list of dynamic contents contained within the landing page.
Show Source
Nested Schema : files
Type: array
A list of files contained within the landing page.
Show Source
Nested Schema : forms
Type: array
A list of forms contained within the landing page.
Show Source
Nested Schema : images
Type: array
A list of images contained within the landing page.
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/1.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": "fullControl",
  "updatedAt": "1563803500",
  "updatedBy": "9",
  "bounceBackEmail": "newclient@qa01en25.com",
  "contentSections": [],
  "dynamicContents": [],
  "emailFooterId": "12",
  "emailGroupId": "6",
  "emailHeaderId": "11",
  "encodingId": "3",
  "fieldMerges": [],
  "forms": [],
  "htmlContent": {
    "type": "StructuredHtmlContent",
    "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": [],
  "isPlainTextEditable": "false",
  "isTracked": "false",
  "landingPages": [],
  "layout": "{\"body\":{\"width\":600,\"height\":692,\"centerX\":0,\"topAndBottomPad\":null}}",
  "plainText": " ",
  "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/1.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": "fullControl",
  "updatedAt": "1563803811",
  "updatedBy": "9",
  "htmlContent": {
    "type": "RawHtmlContent"
  },
  "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/1.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/1.0/assets/email/63
			
Back to Top