This week we released an addition to the v201109 version of the API, enabling one of the most commonly requested uses of the API: account creation. The CreateAccountService creates AdWords accounts without login emails (corresponding to the new optional-login feature available in the AdWords UI).
Sample request
Let's dive right into some sample code using the Java client library . Notice that the only required parameters are currency, time zone, and descriptive name:
// Get the CreateAccountService.
CreateAccountServiceInterface createAccountService =
user.getService(AdWordsService.V201109.CREATE_ACCOUNT_SERVICE);
Account account = new Account();
account.setCurrencyCode("EUR");
account.setDateTimeZone("Europe/London");
CreateAccountOperation operation = new CreateAccountOperation();
operation.setDescriptiveName("Account Created with CAS");
operation.setOperand(account);
operation.setOperator(Operator.ADD);
CreateAccountOperation[] operations =
new CreateAccountOperation[] {operation};
Account[] accounts = createAccountService.mutate(operations);
Notes
The new accounts will be automatically linked to the MCC account used to make the request.
Google accounts (and therefore login emails) are not created by this service; as a consequence, these newly created client accounts are only accessible via your MCC account.
Unlike v13 Account objects, these Account objects do not contain any address information.
The descriptiveName value is not included in the SOAP response, so make sure to record it elsewhere or retrieve it later using the ServicedAccountService.
It's not possible to specify billing information using this service.
You can pass more than one operation to the service and create multiple accounts with a single call.
Client libraries
We have a new Java client library available that includes CreateAccountService functionality and example code , and over the next few weeks we’ll be publishing updated libraries in other languages as well.
I hope this blog post will help you use this new feature effectively. As usual, If you have any questions about the AdWords API, check out our developer forum or ask us during our Google+ Hangout Office Hours .
- Nazmul Idris , AdWords API Team