Method: accounts.createAndConfigure
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-31 UTC.
[null,null,["Last updated 2025-07-31 UTC."],[],[],null,["# Method: accounts.createAndConfigure\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [AddUser](#AddUser)\n - [JSON representation](#AddUser.SCHEMA_REPRESENTATION)\n- [AddAccountService](#AddAccountService)\n - [JSON representation](#AddAccountService.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nCreates a Merchant Center account with additional configuration. Adds the user that makes the request as an admin for the new account.\n\n### HTTP request\n\n`POST https://merchantapi.googleapis.com/accounts/v1/accounts:createAndConfigure`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"account\": { object (/merchant/api/reference/rest/accounts_v1/accounts#Account) }, \"user\": [ { object (/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddUser) } ], \"service\": [ { object (/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddAccountService) } ] } ``` |\n\n| Fields ||\n|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `account` | `object (`[Account](/merchant/api/reference/rest/accounts_v1/accounts#Account)`)` Required. The account to be created. |\n| `user[]` | `object (`[AddUser](/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddUser)`)` Optional. Users to be added to the account. |\n| `service[]` | `object (`[AddAccountService](/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddAccountService)`)` Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently exactly one of these needs to be `accountAggregation` and `accounts.createAndConfigure` method can be used to create a sub-account under an existing advanced account through this method. Additional `accountManagement` or `product_management` services may be provided. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Account](/merchant/api/reference/rest/accounts_v1/accounts#Account).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2).\n\nAddUser\n-------\n\nInstruction for adding a user to the account during creation.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------|\n| ``` { \"userId\": string, \"user\": { object (/merchant/api/reference/rest/accounts_v1/accounts.users#User) } } ``` |\n\n| Fields ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `userId` | `string` Required. The email address of the user (for example, `john.doe@gmail.com`). |\n| `user` | `object (`[User](/merchant/api/reference/rest/accounts_v1/accounts.users#User)`)` Optional. Details about the user to be added. At the moment, only access rights may be specified. |\n\nAddAccountService\n-----------------\n\nAdditional instructions to add account services during creation of the account.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { // Union field `service_type` can be only one of the following: \"accountAggregation\": { object (/merchant/api/reference/rest/accounts_v1/accounts.services#AccountAggregation) } // End of list of possible types for union field `service_type`. \"provider\": string } ``` |\n\n| Fields ||\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Union field `service_type`. The service type to be added. `service_type` can be only one of the following: ||\n| `accountAggregation` | `object (`[AccountAggregation](/merchant/api/reference/rest/accounts_v1/accounts.services#AccountAggregation)`)` The provider is an [aggregator](https://support.google.com/merchants/answer/188487) for the account. Payload for service type Account Aggregation. |\n| `provider` | `string` Required. The provider of the service. Either the reference to an account such as `providers/123` or a well-known service provider (one of `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). |"]]