- [HTTP request](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/list#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/list#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/list#body.request_body)
- [Response body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/list#body.response_body)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/list#body.ListDomainsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/list#body.aspect)
- [Try it!](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/list#try-it)

Retrieves a list of all domains registered by you, along with their corresponding metadata. The order of domains in the response is unspecified and non-deterministic. Newly registered domains will not necessarily be added to the end of this list.

### HTTP request

`GET https://gmailpostmastertools.googleapis.com/v2/domains`

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

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. Requested page size. Server may return fewer domains than requested. If unspecified, the default value for this field is 10. The maximum value for this field is 200. |
| `pageToken` | `string` Optional. The nextPageToken value returned from a previous List request, if any. |

### Request body

The request body must be empty.

### Response body

Response message for domains.list.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "domains": [ { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains#Domain`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `domains[]` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains#Domain`)`` The domains that have been registered by the user. |
| `nextPageToken` | `string` Token to retrieve the next page of results, or empty if there are no more results in the list. |

### 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).