Skip to content

Instantly share code, notes, and snippets.

@eliotharper
Last active September 10, 2018 20:53
Show Gist options
  • Save eliotharper/f29a78abba23020d8465 to your computer and use it in GitHub Desktop.
Save eliotharper/f29a78abba23020d8465 to your computer and use it in GitHub Desktop.
Update Email Address for existing Subscriber on Salesforce Marketing Cloud
<!--
Use the following cURL command to execute this request:
curl -XPOST -H "Content-type: text/xml; charset=utf-8" -H "SOAPAction: Update" -d @request.xml https://webservice.s7.exacttarget.com/Service.asmx
Replace 's7' with your SOAP endpoint as required
-->
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<fueloauth xmlns="http://exacttarget.com">insertAccessTokenHere</fueloauth>
</soapenv:Header>
<soapenv:Body>
<UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Options>
<SaveOptions>
<SaveOption>
<PropertyName>*</PropertyName>
<SaveAction>UpdateOnly</SaveAction>
</SaveOption>
</SaveOptions>
</Options>
<Objects xsi:type="Subscriber">
<PartnerKey xsi:nil="true" />
<ObjectID xsi:nil="true" />
<EmailAddress>insertUpdatedEmailAddressHere</EmailAddress>
<SubscriberKey>insertExistingSubscriberKeyHere</SubscriberKey>
</Objects>
</UpdateRequest>
</soapenv:Body>
</soapenv:Envelope>
@eliotharper
Copy link
Author

This request will update the email address on all lists that a Subscriber is on (All Subscribers list and any other lists).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment