- [HTTP request](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#body.request_body)
  - [JSON representation](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#body.response_body)
- [Authorization scopes](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#body.aspect)
- [AddUser](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddUser)
  - [JSON representation](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddUser.SCHEMA_REPRESENTATION)
- [VerificationMailSettings](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#VerificationMailSettings)
  - [JSON representation](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#VerificationMailSettings.SCHEMA_REPRESENTATION)
- [VerificationMailMode](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#VerificationMailMode)
- [AddAccountService](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddAccountService)
  - [JSON representation](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddAccountService.SCHEMA_REPRESENTATION)
- [SetAliasForRelationship](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#SetAliasForRelationship)
  - [JSON representation](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#SetAliasForRelationship.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#try-it)

Creates a Merchant Center account with additional configuration. Adds the user that makes the request as an admin for the new account.

### HTTP request

`POST https://merchantapi.googleapis.com/accounts/v1/accounts:createAndConfigure`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "account": { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts#Account`) }, "user": [ { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddUser`) } ], "service": [ { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddAccountService`) } ], "setAlias": [ { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#SetAliasForRelationship`) } ] } ``` |

| Fields ||
|---|---|
| `account` | ``object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts#Account`)`` Required. The account to be created. |
| `user[]` | ``object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#AddUser`)`` Optional. Users to be added to the account. |
| `service[]` | ``object (`https://developers.google.com/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 `productsManagement` services may be provided. |
| `setAlias[]` | ``object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#SetAliasForRelationship`)`` Optional. If a relationship is created with a provider, you can set an alias for it with this field. The calling user must be an admin on the provider to be able to set an alias. |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts#Account`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/content`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## AddUser

Instruction for adding a user to the account during creation.

| JSON representation |
|---|
| ``` { "userId": string, "user": { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.users#User`) }, "verificationMailSettings": { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#VerificationMailSettings`) } } ``` |

| Fields ||
|---|---|
| `userId` | `string` Required. The email address of the user (for example, `john.doe@gmail.com`). |
| `user` | ``object (`https://developers.google.com/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. |
| `verificationMailSettings` | ``object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#VerificationMailSettings`)`` Optional. Settings related to configuring the verification email that is sent after adding a user. |

## VerificationMailSettings

Settings related to the verification email that is sent after adding a user.

| JSON representation |
|---|
| ``` { "verificationMailMode": enum (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#VerificationMailMode`) } ``` |

| Fields ||
|---|---|
| `verificationMailMode` | ``enum (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/createAndConfigure#VerificationMailMode`)`` Optional. Mode of the verification mail. If not set, the default is `SEND_VERIFICATION_MAIL`. |

## VerificationMailMode

The different configuration options for sending a verification email when adding a user.

| Enums ||
|---|---|
| `VERIFICATION_MAIL_MODE_UNSPECIFIED` | Default first member of every enum. Do not use. |
| `SEND_VERIFICATION_MAIL` | An invitation email is sent to the user added shortly after. |
| `SUPPRESS_VERIFICATION_MAIL` | No invitation email is sent. This can be useful if the user is expected to accept the invitation through the API without needing another notification. |

## AddAccountService

Additional instructions to add account services during creation of the account.

| JSON representation |
|---|
| ``` { "externalAccountId": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "accountAggregation": { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.services#AccountAggregation`) }, "accountManagement": { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.services#AccountManagement`) }, "comparisonShopping": { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.services#ComparisonShopping`) }, "productsManagement": { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.services#ProductsManagement`) }, "campaignsManagement": { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.services#CampaignsManagement`) } // End of mutually exclusive fields. "provider": string } ``` |

| Fields ||
|---|---|
| `externalAccountId` | `string` Immutable. An optional, immutable identifier that Google uses to refer to this account when communicating with the provider. This should be the unique account ID within the provider's system (for example, your shop ID in Shopify). If you have multiple accounts with the same provider - for instance, different accounts for various regions --- the `externalAccountId` differentiates between them, ensuring accurate linking and integration between Google and the provider. The external account ID must be specified for the campaigns management service type. The external account ID must not be specified for the account aggregation service type. The external account ID is optional / may be specified for all other service types. |
| The service type to be added. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `accountAggregation` | ``object (`https://developers.google.com/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. |
| `accountManagement` | ``object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.services#AccountManagement`)`` The provider manages this account. Payload for service type Account Management. |
| `comparisonShopping` | ``object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.services#ComparisonShopping`)`` The provider is a CSS (Comparison Shopping Service) of this account. Payload for service type Comparison Shopping. |
| `productsManagement` | ``object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.services#ProductsManagement`)`` The provider manages products for this account. Payload for service type products management. |
| `campaignsManagement` | ``object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.services#CampaignsManagement`)`` The provider manages campaigns for this account. Payload for service type campaigns management. |
| End of mutually exclusive fields. ||
| `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`). |

## SetAliasForRelationship

Set an alias for a relationship between a provider and the account to be created.

| JSON representation |
|---|
| ``` { "provider": string, "accountIdAlias": string } ``` |

| Fields ||
|---|---|
| `provider` | `string` Required. The provider of the service. This is a reference to an account such as `providers/123` or `accounts/123`. The same provider must be specified in at least one of the `service` fields. |
| `accountIdAlias` | `string` Required. The unique ID of this account in the provider's system. The value must be unique across all accounts on the platform for this provider. |