I created Test email in classic content using below code. but i need to create same email in content builder through soap api.could you please send me Sopa api code for creating email in content builder.

 <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                    <Username>[email protected]</Username>
            <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
                <Objects xsi:type="Email">
                    <ObjectID xsi:nil="true"/>
                    <Name>Text Only in API</Name>
                    <TextBody>Good Day,

    Below are the stats from Activity.

    -   Number of new Emails
    -   Number of Old email 
    -   Number of After 10 days emailemail 

    Thank you

                <Subject>AppData Web Activity Reporting </Subject>
                    <EmailType>Text Only</EmailType>

2 Answers 2


Unfortunately, it is not possible to create assets in content builder with the SOAP API. You must use the REST API to do this. See Content Builder API to get started

From the docs:

Marketing developers, service providers, and third-party developers can create and manipulate marketing content using the Content Builder REST API


Things may have changed since Samuel answered... The SOAP API does allow to create content assets. See supported methods for objects here.

Here is a sample envelope you can use to create a simple content block via SOAP API

    <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: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">
            <Objects xsi:type="Asset">
                <Name>soap api created content asset</Name>
                    <DisplayName>HTML Block</DisplayName>
                    <Name>Content Builder</Name>

Some more notes and methods: To find out what is retrievable, you can use a Describe action on any Object and examine the response. Here is an example request for the Asset object.

Host: https://mc31kxxxxxxxxxxq0d7m.soap.marketingcloudapis.com/Service.asmx
SOAPAction: Describe
Content-Type: text/xml; charset=utf-8
Content-Type: text/plain
<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">
          <DefinitionRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">

I have a short jQuery snippet you can run in any browser console to grab all the retrievable properties which you can then copy into my retrieve request. Note, you may need to remove line breaks / odd characters.

var soap = '<soap:Envelope xmlns:s.....COPY THE FULL RESPONSE HERE....</soap:Envelope>',
xmlDoc = $.parseXML( soap ),
retProps = [],
$x = $( xmlDoc );
    "<Properties>" + $(this).html() + "</Properties>"
//copy and paste the console message into your retrieve request
  • This is great - However, it seems the retrieve is still very basic. I can only retrieve the ObjectID and CustomerKey but not any details about the asset itself
    – shd.lux
    May 7, 2020 at 14:49
  • @shd.lux I've updated the answer with some more details on how to get the asset content from the SOAP API May 8, 2020 at 18:54
  • Thank you. I am aware of describe and I have used this. However, only ObjectID is IsRetrievable: true. All other informations are false. Hence, I am not able to retrieve any information of the asset. In the REST I get some information back
    – shd.lux
    May 9, 2020 at 11:18

You must log in to answer this question.

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