# Method: partners.channels.sites.replace

> [!WARNING]
> Display \& Video 360 API v3 has sunset. Use [v4](https://developers.google.com/display-video/api/reference/rest/v4) instead.

- [HTTP request](https://developers.google.com/display-video/api/reference/rest/v3/partners.channels.sites/replace#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/display-video/api/reference/rest/v3/partners.channels.sites/replace#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/display-video/api/reference/rest/v3/partners.channels.sites/replace#body.request_body)
  - [JSON representation](https://developers.google.com/display-video/api/reference/rest/v3/partners.channels.sites/replace#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/display-video/api/reference/rest/v3/partners.channels.sites/replace#body.response_body)
- [Authorization scopes](https://developers.google.com/display-video/api/reference/rest/v3/partners.channels.sites/replace#body.aspect)
- [Try it!](https://developers.google.com/display-video/api/reference/rest/v3/partners.channels.sites/replace#try-it)

Replaces all of the sites under a single channel.

The operation will replace the sites under a channel with the sites provided in `https://developers.google.com/display-video/api/reference/rest/v3/partners.channels.sites/replace#body.request_body.FIELDS.new_sites`.

**This method regularly experiences high latency.** We recommend [increasing your default timeout](https://developers.google.com/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.

### HTTP request

`POST https://displayvideo.googleapis.com/v3/partners/{partnerId}/channels/{channelId}/sites:replace`

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

### Path parameters

| Parameters ||
|---|---|
| `channelId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The ID of the parent channel whose sites will be replaced. |
| Union parameter `owner`. Required. Identifies the DV360 entity that owns the parent channel. It can be either a partner or an advertiser. `owner` can be only one of the following: ||
| `partnerId` | `string (https://developers.google.com/discovery/v1/type-format format)` The ID of the partner that owns the parent channel. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "newSites": [ { object (`https://developers.google.com/display-video/api/reference/rest/v3/advertisers.channels.sites#Site`) } ], // Union field `owner` can be only one of the following: "advertiserId": string // End of list of possible types for union field `owner`. } ``` |

| Fields ||
|---|---|
| `newSites[]` | ``object (`https://developers.google.com/display-video/api/reference/rest/v3/advertisers.channels.sites#Site`)`` The sites that will replace the existing sites assigned to the channel, specified as a list of `https://developers.google.com/display-video/api/reference/rest/v3/advertisers.channels.sites#Site`. |
| Union field `owner`. Required. Identifies the DV360 entity that owns the parent channel. It can be either a partner or an advertiser. `owner` can be only one of the following: ||
| `partnerId` | `string (https://developers.google.com/discovery/v1/type-format format)` The ID of the partner that owns the parent channel. |
| `advertiserId` | `string (https://developers.google.com/discovery/v1/type-format format)` The ID of the advertiser that owns the parent channel. |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/display-video/api/reference/rest/v3/ReplaceSitesResponse`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/display-video`

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