0

I was able to create Email Send Definitions(User-Initiated Sends) with JSON and REST using the Python FuelSDK, but I am trying to send a call without FuelSDK and can't figure out what REST endpoint to send to.

Any help is appreciated, thanks!

2
  • You could also use the NEW transactional triggered send developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/…
    – EazyE
    Commented Sep 30, 2019 at 18:28
  • I found the answer, the REST End point is "(Your REST Base URL)/automation/v1/automations". Your REST Base URL can be found in Setup > Apps > Installed Packages > (Your API Package). You can refer to @Gortonington 's blog for more on using REST in the Automation Studio gortonington.com/…
    – Brett
    Commented Nov 29, 2019 at 17:32

2 Answers 2

1

There is no documented or undocumented REST API endpoint to accomplish this, you will need to utilize SOAP API to accomplish this.

You would need to target the EmailSendDefinition object using the Create method. Sample envelope below:

<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>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-9560865" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">             <wsse:Username>username</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>          </wsse:UsernameToken>       </wsse:Security>    </soapenv:Header>    <soapenv:Body>
      <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Options/>
         <Objects xsi:type="ns1:EmailSendDefinition" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI">
            <CustomerKey>Market2Lead_Email_Definition_Key</CustomerKey>
            <Name>Market2Lead_Email_Definition</Name>
            <SendClassification>
               <Client>
                  <ID>75741</ID>
               </Client>
               <ObjectID>4819efef-4527-dd11-8126-001a4be9433a</ObjectID>
               <CustomerKey>3542</CustomerKey>
               <Name>Default Commercial</Name>
               <Description>Default Commercial Send Classification</Description>
               <SenderProfile>
                  <CustomerKey>1973</CustomerKey>
               </SenderProfile>
            </SendClassification>
            <SendDefinitionList>
               <CustomObjectID>1a3e2c14-580e-de11-b30f-001cc494ae9e</CustomObjectID>
               <DataSourceTypeID>CustomObject</DataSourceTypeID>
            </SendDefinitionList>
            <Email>
               <ID>794527</ID>
               <Name>Market2Lead</Name>
               <Subject>Market2Lead-Email</Subject>
               <Status>New</Status>
            </Email>
            <IsMultipart>true</IsMultipart>
         </Objects>
      </CreateRequest>
   </soapenv:Body>
</soapenv:Envelope>
0

You can use the REST transactional Messaging API (POST /messaging/v1/email/definitions) to create send definitions or you can use the SOAP API to create email send definition that uses data extensions to send emails.

REST API reference:

https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/createSendDefinition.htm

SOAP API Reference:

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/creating_an_email_send_definition_using_the_web_service_api.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .