# Method: services.dnsZones.add

- [HTTP request](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones/add#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones/add#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones/add#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones/add#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones/add#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones/add#body.aspect)
- [Try it!](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones/add#try-it)

Service producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project.

### HTTP request

`POST https://servicenetworking.googleapis.com/v1/{parent=services/*}/dnsZones:add`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `servicenetworking.services.addDnsZone` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "consumerNetwork": string, "name": string, "dnsSuffix": string } ``` |

| Fields ||
|---|---|
| `consumerNetwork` | `string` Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name. |
| `name` | `string` Required. The name for both the private zone in the shared producer host project and the peering zone in the consumer project. Must be unique within both projects. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes. |
| `dnsSuffix` | `string` Required. The DNS name suffix for the zones e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/service.management`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).