I am trying to create a new Business unit via API. I am only finding create new user or update an existing account. Can someone send me a sample code to create a new business unit using Account ID?

I got it to work its as i missed bu.ParentIDSpecified = true;.

Here is the sample code to create a business unit to an existing account.

BusinessUnit bu = new BusinessUnit();
bu.AccountType = AccountTypeEnum.BUSINESS_UNIT;      
bu.Name = "TestAPI";
bu.Email = "[email protected]";
bu.FromName = "Test BU";
bu.ParentID = // my account id
//This tells that create user in subaccount
ClientID clientID = new ClientID();            
clientID.ID = XXXX;
clientID.IDSpecified = true;
bu.Client = clientID;

String requestId = null;
String overAllStatus = null;
CreateResult[] results = client.Create(new CreateOptions(), new APIObject[] { bu }, out requestId, out overAllStatus);
  • 1
    Please share what you have tried. The usage of the Create method follows the same pattern for all objects so the example for AccountUser would be very similar to BusinessUnit except the properties defined on the object would be different. If you are unsure of the property names for an object, there is reference documentation at: help.marketingcloud.com/en/technical_library/web_service_guide/…
    – Mac
    Jul 7, 2016 at 14:50
  • Thanks i will try it out by changing the object name to business unit and share my sample code
    – Deepak
    Jul 7, 2016 at 18:36

1 Answer 1


Below is the SOAP Envelope for creating a Business Unit -

<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">
  <a:Action s:mustUnderstand="1">Create</a:Action>
  <a:To s:mustUnderstand="1">https://webservice.s6.exacttarget.com/Service.asmx</a:To>
  <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
     <o:UsernameToken u:Id="uuid-88b91f91-bac2-489b-90fb-37e7b256e20c-1">
<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="BusinessUnit">
        <PartnerKey xsi:nil="true"/>
        <ObjectID xsi:nil="true"/>
        <Name>Maneesh Test BU1</Name>
        <Email>[email protected]</Email>
        <FromName>Maneesh From Name</FromName>
        <BusinessName>Maneesh and Company1</BusinessName>
        <Address>123 Main St.</Address>

        <Subscription xsi:nil="true"/>

You must log in to answer this question.

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