- [HTTP request](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains/create#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains/create#body.request_body)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains/create#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains/create#body.response_body)
- [Authorization scopes](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains/create#body.aspect)

Adds a domain to the user's account. Returns INVALID_ARGUMENT if a domain is not provided. Returns ALREADY_EXISTS if the domain is already registered by the user.

### HTTP request

`POST https://gmailpostmastertools.googleapis.com/v2beta/domains`

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

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "domainId": string } ``` |

| Fields ||
|---|---|
| `domainId` | `string` Required. The domain to add. e.g., "example.com" |

### Response body

If successful, the response body contains a newly created instance of `https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2beta/domains#Domain`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/postmaster`
- `
  https://www.googleapis.com/auth/postmaster.domain`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).