AddAccount Service Operation - Customer Management

Creates a new account within an existing customer.

Only a user with Super Admin credentials can add accounts.

Important

Resellers should call SignupCustomer instead of AddAccount. For more details see Management Model for Resellers.

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 specify the ParentCustomerId in the advertiser account object.
AdvertiserAccount

Request Header Elements

Element Description Data Type
AuthenticationToken The OAuth access token that represents a Microsoft Account user who has permissions to Microsoft Advertising accounts. string
DeveloperToken The developer token used to access the Bing Ads API. 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 element and a CustomerAccountId SOAP header element.
long
AccountNumber A system-generated account number that is used to identify the account in the Microsoft Advertising web application. The account number has the form, Xnnnnnnn, where nnnnnnn is a series of digits. 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/v12">
    <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/v12">
      <Account xmlns:e379="https://bingads.microsoft.com/Customer/v12/Entities" i:nil="false">
        <e379:BillToCustomerId i:nil="false">ValueHere</e379:BillToCustomerId>
        <e379:CurrencyCode i:nil="false">ValueHere</e379:CurrencyCode>
        <e379:AccountFinancialStatus i:nil="false">ValueHere</e379:AccountFinancialStatus>
        <e379:Id i:nil="false">ValueHere</e379:Id>
        <e379:Language i:nil="false">ValueHere</e379:Language>
        <e379:LastModifiedByUserId i:nil="false">ValueHere</e379:LastModifiedByUserId>
        <e379:LastModifiedTime i:nil="false">ValueHere</e379:LastModifiedTime>
        <e379:Name i:nil="false">ValueHere</e379:Name>
        <e379:Number i:nil="false">ValueHere</e379:Number>
        <e379:ParentCustomerId>ValueHere</e379:ParentCustomerId>
        <e379:PaymentMethodId i:nil="false">ValueHere</e379:PaymentMethodId>
        <e379:PaymentMethodType i:nil="false">ValueHere</e379:PaymentMethodType>
        <e379:PrimaryUserId i:nil="false">ValueHere</e379:PrimaryUserId>
        <e379:AccountLifeCycleStatus i:nil="false">ValueHere</e379:AccountLifeCycleStatus>
        <e379:TimeStamp i:nil="false">ValueHere</e379:TimeStamp>
        <e379:TimeZone i:nil="false">ValueHere</e379:TimeZone>
        <e379:PauseReason i:nil="false">ValueHere</e379:PauseReason>
        <e379:ForwardCompatibilityMap xmlns:e380="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
          <e380:KeyValuePairOfstringstring>
            <e380:key i:nil="false">ValueHere</e380:key>
            <e380:value i:nil="false">ValueHere</e380:value>
          </e380:KeyValuePairOfstringstring>
        </e379:ForwardCompatibilityMap>
        <e379:LinkedAgencies i:nil="false">
          <e379:CustomerInfo>
            <e379:Id i:nil="false">ValueHere</e379:Id>
            <e379:Name i:nil="false">ValueHere</e379:Name>
          </e379:CustomerInfo>
        </e379:LinkedAgencies>
        <e379:SalesHouseCustomerId i:nil="false">ValueHere</e379:SalesHouseCustomerId>
        <e379:TaxInformation xmlns:e381="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
          <e381:KeyValuePairOfstringstring>
            <e381:key i:nil="false">ValueHere</e381:key>
            <e381:value i:nil="false">ValueHere</e381:value>
          </e381:KeyValuePairOfstringstring>
        </e379:TaxInformation>
        <e379:BackUpPaymentInstrumentId i:nil="false">ValueHere</e379:BackUpPaymentInstrumentId>
        <e379:BillingThresholdAmount i:nil="false">ValueHere</e379:BillingThresholdAmount>
        <e379:BusinessAddress i:nil="false">
          <e379:City i:nil="false">ValueHere</e379:City>
          <e379:CountryCode i:nil="false">ValueHere</e379:CountryCode>
          <e379:Id i:nil="false">ValueHere</e379:Id>
          <e379:Line1 i:nil="false">ValueHere</e379:Line1>
          <e379:Line2 i:nil="false">ValueHere</e379:Line2>
          <e379:Line3 i:nil="false">ValueHere</e379:Line3>
          <e379:Line4 i:nil="false">ValueHere</e379:Line4>
          <e379:PostalCode i:nil="false">ValueHere</e379:PostalCode>
          <e379:StateOrProvince i:nil="false">ValueHere</e379:StateOrProvince>
          <e379:TimeStamp i:nil="false">ValueHere</e379:TimeStamp>
          <e379:BusinessName i:nil="false">ValueHere</e379:BusinessName>
        </e379:BusinessAddress>
        <e379:AutoTagType i:nil="false">ValueHere</e379:AutoTagType>
        <e379:SoldToPaymentInstrumentId i:nil="false">ValueHere</e379:SoldToPaymentInstrumentId>
      </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/v12">
    <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/v12">
      <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 v12
Namespace: https://bingads.microsoft.com/Customer/v12