Updating a Campaign


You can update both template-based campaign and custom-code campaign.  For template-based campaign, you can only update properties associated with the campaign, but not the actual email content itself.  For custom-code campaign, you can update properties as well as update the HTML/XHTML associated with the campaign.  A campaign can only be updated in DRAFT status.


To update a campaign, the easiest way is to get details of a campaign, as described in Obtaining a Campaign's Information, and modify only the elements you would like to change, and use the resulting XML through a PUT operation on the campaign URI.


When updating a campaign, you can change values of elements that are marked as editable in the Campaign Collection Reference.


For a custom-code campaign, <EmailContent> is required.  If you have <EmailContent> in your request but do not have any values, then the content of the campaign will be deleted.  If <EmailContent> element is not included in the XML, then the HTML content of the campaign will not be touched.

To learn more about how to use HTML and XHTML in your custom code campaign, please consult the Advanced Editor User Guide.


The body of the request should contain the elements of a campaign, as described in the Campaigns Collection Reference.  Please note that values in non-editable elements do not matter when  you are creating a new campaign, but we advise you keep all the elements from a GET operation when you are creating a new campaign using the returned XML in order to make sure you can successfully create a campaign at all times.  Any editable elements that do not have any values specified during an update will overwrite any existing values with an empty field.  For example, if you had set <GreetingString> in your campaign, and then if you PUT <GreetingString></GreetingString>, then any value you had as your greeting string will be deleted.