---
title: "Create or update site"
type: reference
method: POST
path: /rest-api/sites/update.do
tag: "Sites"
---

# Create or update site

`POST https://YOUR-NETWORK-DOMAIN/rest-api/sites/update.do`

Creates a new publisher site or updates an existing one. If the request includes a site ID, the existing site is updated; otherwise a new site is created. Requires ALL or SHARED level CREATE/UPDATE permission on INVENTORY (SHARED requires CAN_EDIT or IS_OWNER share type). When creating, optionally set createDefaultZone=true to auto-create a zone matching the site name. Auto-placements and default pricing may be initialized on creation. SSP sites cannot be updated through this endpoint. A new site is approved on creation when the caller holds SITES_APPROVAL; an update never changes the approval status. Fields with a console control of their own are applied only with that control's permission enabled and otherwise keep the stored value: 'active' MANAGE_SITES_ACTIVE_STATUS, 'adsHost' AD_SERVING_DOMAIN_INVENTORY, 'invocationCodeHost' INVOCATION_CODE_DOMAIN, 'piggybackStatus' PIGGYBACK_PIXEL_TRACKING, 'privateField' SET_PRIVATE, 'maskInventory' MANAGE_MASK_INVENTORY, 'cookieCollectingEnabled' SITE_COOKIE_NOCOLLECT, and the targeting, rules and per-action-limit switches their own. 'adsHost' and 'invocationCodeHost' must be one of the network's domains (see adsHosts / invocationCodeHosts), or blank for the system default. Parameters that were sent but not applied are listed in 'ignoredFields', each with its reason in 'ignoredFieldReasons'.

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `createDefaultZone` | boolean | no | `true` | If true, creates a default zone with the same name as the site |
| `id` | integer | no | `2001` | ID of the site to update — omit to create a new site |
| `categoryId` | array<integer> | no | `5` | Publisher category IDs, comma-separated or repeated — replace the site's categories |
| `actionLimitsEnabled` | boolean | no | `true` | Enable per-action conversion limits |
| `active` | boolean | no | `true` | Whether the site is active |
| `adsHost` | string | no | `ads.example.com` | Custom ad serving domain for this site |
| `bundle` | string | no | `com.example.app` | App bundle id (com.example.app on Android, numeric ID on iOS) — only relevant when inventoryType=APP. Optional. |
| `cookieCollectingEnabled` | boolean | no | `true` | Enable cookie-based visitor tracking |
| `description` | string | no | `High-traffic news portal` | Site description |
| `email` | string | no | `publisher@example.com` | Contact email for the site |
| `enableRules` | boolean | no | `true` | Enable advanced rules engine for this site |
| `enableTargeting` | boolean | no | `true` | Enable targeting rules for this site |
| `impressionsByMonth` | string | no | `_1_MILLION_50_MILLION` | Monthly impression volume range |
| `inventoryType` | string | no | `WEBSITE` | Inventory type: WEBSITE or APP |
| `invocationCodeHost` | string | no | `ads.example.com` | Custom domain for invocation code generation, up to 64 characters |
| `maskInventory` | boolean | no | `true` | Mask inventory details from advertisers |
| `name` | string | no | `Example News Portal` | Site name |
| `operationBetweenRuleTypes` | string | no | `AND` | Logical operator between different targeting rule types (AND, OR) |
| `piggybackStatus` | string | no | `ENABLED` | Piggyback tracking status (ENABLED, DISABLED) |
| `privacyPolicyEnabled` | boolean | no | `true` | Whether a privacy policy is enabled for this site |
| `privateField` | boolean | no | `true` | Mark as private — hidden from marketplace/network discovery |
| `schainSellerId` | string | no | `1200` | Seller id for this publisher in the network's own sellers.json |
| `url` | string | no | `https://example.com` | Site URL — only relevant when inventoryType=WEBSITE, ignored for APP. Optional. |
| `visitorsByMonth` | string | no | `_100K_1_MILLION` | Monthly unique visitor volume range |
| `revenueShare` | number | no | `70.0` | Revenue share percentage (0-100) for this site |

## Responses

- `200` — Site created or updated successfully
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Insufficient permissions

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/sites/update.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'id=2001' \
  --data-urlencode 'name=Example News Portal' \
  --data-urlencode 'active=true' \
  --data-urlencode 'createDefaultZone=true'
```

Source: https://epom.com/ad-server/docs/api/sites/post-sites-update