AddAccount Service Operation - Customer Management

Creates a new account within an existing customer.

A user with Super Admin credentials can add accounts under their own customer.

Tip

Resellers typically should call SignupCustomer instead of AddAccount. For more details see the Account Hierarchy technical guide.

Note

Customers in the closed Unified smart campaigns pilot can add a new account for Unified smart campaigns. The AccountMode must be set to "UnifiedSmart".

Request Elements

The AddAccountRequest object defines the body and header elements of the service operation request. The elements must be in the same order as shown in the Request SOAP.

Note

Unless otherwise noted below, all request elements are required.

Request Body Elements

Element Description Data Type
Account The account that you want to add to the existing customer.

You must set the ParentCustomerId in the advertiser account object.
AdvertiserAccount

Request Header Elements

Element Description Data Type
AuthenticationToken The OAuth access token that represents the credentials of a user who has permissions to Microsoft Advertising accounts.

For more information see Authentication with OAuth.
string
DeveloperToken The developer token used to access the Bing Ads API.

For more information see Get a Developer Token.
string
Password This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. string
UserName This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. string

Response Elements

The AddAccountResponse object defines the body and header elements of the service operation response. The elements are returned in the same order as shown in the Response SOAP.

Response Body Elements

Element Description Data Type
AccountId A system-generated account identifier corresponding to the new account specified in the request.

Use this identifier with operation requests that require an AccountId body element and a CustomerAccountId SOAP header element.
long
AccountNumber The system-generated account number that is used to identify the account in the Microsoft Advertising web application.

The account number has the form xxxxxxxx, where xxxxxxxx is a series of any eight alphanumeric characters.
string
CreateTime The date and time that the account was added. The date and time value reflects the date and time at the server, not the client. For information about the format of the date and time, see the dateTime entry in Primitive XML Data Types. dateTime

Response Header Elements

Element Description Data Type
TrackingId The identifier of the log entry that contains the details of the API call. string

Request SOAP

This template was generated by a tool to show the order of the body and header elements for the SOAP request. For supported types that you can use with this service operation, see the Request Body Elements reference above.

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Customer/v13">
    <Action mustUnderstand="1">AddAccount</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <AddAccountRequest xmlns="https://bingads.microsoft.com/Customer/v13">
      <Account xmlns:e217="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e217:BillToCustomerId i:nil="false">ValueHere</e217:BillToCustomerId>
        <e217:CurrencyCode i:nil="false">ValueHere</e217:CurrencyCode>
        <e217:AccountFinancialStatus i:nil="false">ValueHere</e217:AccountFinancialStatus>
        <e217:Id i:nil="false">ValueHere</e217:Id>
        <e217:Language i:nil="false">ValueHere</e217:Language>
        <e217:LastModifiedByUserId i:nil="false">ValueHere</e217:LastModifiedByUserId>
        <e217:LastModifiedTime i:nil="false">ValueHere</e217:LastModifiedTime>
        <e217:Name i:nil="false">ValueHere</e217:Name>
        <e217:Number i:nil="false">ValueHere</e217:Number>
        <e217:ParentCustomerId>ValueHere</e217:ParentCustomerId>
        <e217:PaymentMethodId i:nil="false">ValueHere</e217:PaymentMethodId>
        <e217:PaymentMethodType i:nil="false">ValueHere</e217:PaymentMethodType>
        <e217:PrimaryUserId i:nil="false">ValueHere</e217:PrimaryUserId>
        <e217:AccountLifeCycleStatus i:nil="false">ValueHere</e217:AccountLifeCycleStatus>
        <e217:TimeStamp i:nil="false">ValueHere</e217:TimeStamp>
        <e217:TimeZone i:nil="false">ValueHere</e217:TimeZone>
        <e217:PauseReason i:nil="false">ValueHere</e217:PauseReason>
        <e217:ForwardCompatibilityMap xmlns:e218="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
          <e218:KeyValuePairOfstringstring>
            <e218:key i:nil="false">ValueHere</e218:key>
            <e218:value i:nil="false">ValueHere</e218:value>
          </e218:KeyValuePairOfstringstring>
        </e217:ForwardCompatibilityMap>
        <e217:LinkedAgencies i:nil="false">
          <e217:CustomerInfo>
            <e217:Id i:nil="false">ValueHere</e217:Id>
            <e217:Name i:nil="false">ValueHere</e217:Name>
          </e217:CustomerInfo>
        </e217:LinkedAgencies>
        <e217:SalesHouseCustomerId i:nil="false">ValueHere</e217:SalesHouseCustomerId>
        <e217:TaxInformation xmlns:e219="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
          <e219:KeyValuePairOfstringstring>
            <e219:key i:nil="false">ValueHere</e219:key>
            <e219:value i:nil="false">ValueHere</e219:value>
          </e219:KeyValuePairOfstringstring>
        </e217:TaxInformation>
        <e217:BackUpPaymentInstrumentId i:nil="false">ValueHere</e217:BackUpPaymentInstrumentId>
        <e217:BillingThresholdAmount i:nil="false">ValueHere</e217:BillingThresholdAmount>
        <e217:BusinessAddress i:nil="false">
          <e217:City i:nil="false">ValueHere</e217:City>
          <e217:CountryCode i:nil="false">ValueHere</e217:CountryCode>
          <e217:Id i:nil="false">ValueHere</e217:Id>
          <e217:Line1 i:nil="false">ValueHere</e217:Line1>
          <e217:Line2 i:nil="false">ValueHere</e217:Line2>
          <e217:Line3 i:nil="false">ValueHere</e217:Line3>
          <e217:Line4 i:nil="false">ValueHere</e217:Line4>
          <e217:PostalCode i:nil="false">ValueHere</e217:PostalCode>
          <e217:StateOrProvince i:nil="false">ValueHere</e217:StateOrProvince>
          <e217:TimeStamp i:nil="false">ValueHere</e217:TimeStamp>
          <e217:BusinessName i:nil="false">ValueHere</e217:BusinessName>
        </e217:BusinessAddress>
        <e217:AutoTagType i:nil="false">ValueHere</e217:AutoTagType>
        <e217:SoldToPaymentInstrumentId i:nil="false">ValueHere</e217:SoldToPaymentInstrumentId>
        <e217:TaxCertificate i:nil="false">
          <e217:TaxCertificateBlobContainerName i:nil="false">ValueHere</e217:TaxCertificateBlobContainerName>
          <e217:TaxCertificates xmlns:e220="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
            <e220:KeyValuePairOfstringbase64Binary>
              <e220:key i:nil="false">ValueHere</e220:key>
              <e220:value i:nil="false">ValueHere</e220:value>
            </e220:KeyValuePairOfstringbase64Binary>
          </e217:TaxCertificates>
          <e217:Status i:nil="false">ValueHere</e217:Status>
        </e217:TaxCertificate>
        <e217:AccountMode i:nil="false">ValueHere</e217:AccountMode>
      </Account>
    </AddAccountRequest>
  </s:Body>
</s:Envelope>

Response SOAP

This template was generated by a tool to show the order of the body and header elements for the SOAP response.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Customer/v13">
    <TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
  </s:Header>
  <s:Body>
    <AddAccountResponse xmlns="https://bingads.microsoft.com/Customer/v13">
      <AccountId>ValueHere</AccountId>
      <AccountNumber d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</AccountNumber>
      <CreateTime>ValueHere</CreateTime>
    </AddAccountResponse>
  </s:Body>
</s:Envelope>

Code Syntax

The example syntax can be used with Bing Ads SDKs. See Bing Ads API Code Examples for more examples.

public async Task<AddAccountResponse> AddAccountAsync(
	AdvertiserAccount account)
{
	var request = new AddAccountRequest
	{
		Account = account
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.AddAccountAsync(r), request));
}
static AddAccountResponse addAccount(
	AdvertiserAccount account) throws RemoteException, Exception
{
	AddAccountRequest request = new AddAccountRequest();

	request.setAccount(account);

	return CustomerManagementService.getService().addAccount(request);
}
static function AddAccount(
	$account)
{

	$GLOBALS['Proxy'] = $GLOBALS['CustomerManagementProxy'];

	$request = new AddAccountRequest();

	$request->Account = $account;

	return $GLOBALS['CustomerManagementProxy']->GetService()->AddAccount($request);
}
response=customermanagement_service.AddAccount(
	Account=Account)

Requirements

Service: CustomerManagementService.svc v13
Namespace: https://bingads.microsoft.com/Customer/v13