Skip to content

Instantly share code, notes, and snippets.

@eliotharper
Created February 13, 2017 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliotharper/cf5c99cc979728f123d818dbb4e9f8d2 to your computer and use it in GitHub Desktop.
Save eliotharper/cf5c99cc979728f123d818dbb4e9f8d2 to your computer and use it in GitHub Desktop.
Triggered Send to multiple subscribers
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">Create</a:Action>
<a:MessageID>urn:uuid:7e0cca04-57bd-4481-864c-6ea8039d2ea0</a:MessageID>
<a:ReplyTo>
<a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">https://webservice.s7.exacttarget.com/Service.asmx</a:To>
<fueloauth xmlns="http://exacttarget.com">{{accessToken}}</fueloauth>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Options>
<RequestType>Asynchronous</RequestType>
<QueuePriority>Medium</QueuePriority>
</Options>
<Objects xsi:type="TriggeredSend">
<PartnerKey xsi:nil="true"/>
<ObjectID xsi:nil="true"/>
<TriggeredSendDefinition>
<PartnerKey xsi:nil="true"/>
<ObjectID xsi:nil="true"/>
<CustomerKey>2750</CustomerKey>
</TriggeredSendDefinition>
<Subscribers>
<PartnerKey xsi:nil="true"/>
<ObjectID xsi:nil="true"/>
<SubscriberKey>DL999999</SubscriberKey>
<EmailAddress>sam@sample.com</EmailAddress>
<Attributes>
<Name>HTML__emailBody</Name>
<Value>&lt;body&gt;hello Sam&lt;/body&gt;</Value>
</Attributes>
</Subscribers>
<Subscribers>
<PartnerKey xsi:nil="true"/>
<ObjectID xsi:nil="true"/>
<SubscriberKey>DL999998</SubscriberKey>
<EmailAddress>samantha@sample.com</EmailAddress>
<Attributes>
<Name>HTML__emailBody</Name>
<Value>&lt;body&gt;hello Samantha&lt;/body&gt;</Value>
</Attributes>
</Subscribers>
<Subscribers>
<PartnerKey xsi:nil="true"/>
<ObjectID xsi:nil="true"/>
<SubscriberKey>DL999997</SubscriberKey>
<EmailAddress>jlong@innovateteam.com</EmailAddress>
<Attributes>
<Name>HTML__emailBody</Name>
<Value>&lt;body&gt;hello Josh&lt;/body&gt;</Value>
</Attributes>
</Subscribers>
</Objects>
</CreateRequest>
</s:Body>
</s:Envelope>
@shreyasvkul
Copy link

Can we send multiple subscribers with the REST API in this link?

@eliotharper
Copy link
Author

No, you can't send to multiple subscribers from that REST API route, but you can with the new Transactional Messaging API.

@shreyasvkul
Copy link

No, you can't send to multiple subscribers from that REST API route, but you can with the new Transactional Messaging API.

Thank you, I'll look into it 👍

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