Zones API endpoints
Endpoint reference for the Zones tag (5 endpoints): Zone management
Zone management. 5 endpoints, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see REST API overview. Parameters marked form go in an application/x-www-form-urlencoded request body.
GET /rest-api/zones/{zoneId}.do
Get zone by ID.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneId | path | integer | yes | Unique numeric ID of the zone |
Responses: 200 — Zone properties returned successfully · 404 — Zone with the given ID was not found or is deleted. Errors follow the shared conventions.
POST /rest-api/zones/{zoneId}/copy.do
Copy zone.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneId | path | integer | yes | ID of the zone to copy |
siteId | form | integer | yes | ID of the site to copy the zone into (may be the zone’s own site) |
name | form | string | no | Name for the copy (at most 500 characters). With count above 1 the later copies are named ‘<name> 2’, ‘<name> 3’… Omit to keep the source’s name (with ‘_copy’ appended when the site already has a zone of that name). |
keepBannersLinked | form | boolean | no | Whether the copied placements keep the banners linked to the originals |
count | form | integer | no | Number of copies to create, 1 to 20 |
Responses: 200 — Zone copied · 404 — Zone or site not found or deleted. Errors follow the shared conventions.
POST /rest-api/zones/{zoneId}/delete.do
Delete zone.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneId | path | integer | yes | Unique numeric ID of the zone to delete |
Responses: 200 — Zone deleted successfully · 404 — No zone with this id, or the zone is already deleted · 500 — Internal server error during deletion. Errors follow the shared conventions.
GET /rest-api/zones/{zoneId}/placements.do
List zone placements.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneId | path | integer | yes | Unique numeric ID of the zone whose placements to list |
Responses: 200 — Placements returned successfully · 404 — Zone with the given ID was not found or is deleted. Errors follow the shared conventions.
POST /rest-api/zones/update.do
Create or update zone.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | form | integer | no | ID of the zone to update — omit (or 0) to create a new zone |
siteId | form | integer | no | ID of the site the zone belongs to — needed when creating; on update, moves the zone to this site |
active | form | boolean | no | Whether the zone is active |
description | form | string | no | Zone description |
enableRules | form | boolean | no | Whether rule-based optimization is enabled for this zone |
enableTargeting | form | boolean | no | Enable pretargeting rules for this zone |
name | form | string | no | Zone name |
operationBetweenRuleTypes | form | string | no | Logical operator between different targeting rule types (AND, OR) Values: AND, OR. |
Responses: 200 — Zone created or updated successfully · 404 — Associated site not found. Errors follow the shared conventions.
Related
- REST API overview — authentication and conventions
- API endpoint reference by tag
- Entities — create, read, update, delete via API