Sites API endpoints
Endpoint reference for the Sites tag (27 endpoints): Publisher site management
Publisher site management. 27 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/adsHosts.do
List ad serving hosts.
No parameters beyond authentication.
Responses: 200 — Successful operation. Errors follow the shared conventions.
GET /rest-api/invocationCodeHosts.do
List invocation code hosts.
No parameters beyond authentication.
Responses: 200 — Successful operation. Errors follow the shared conventions.
GET /rest-api/sites-tree.do
List sites with zones and placements.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
basicInfo | query | boolean | no | If true, includes additional site details such as URL, email, and contact info |
publishingCategories | query | array<integer> | no | IDs of publishing categories to filter sites by |
start | query | integer | no | Paging: skip this many sites (ordered by id). Default 0 |
limit | query | integer | no | Paging: at most this many sites, each with all its zones and placements. Omitted — every site. A page shorter than limit is the last one |
Responses: 200 — Site tree returned successfully. Errors follow the shared conventions.
GET /rest-api/sites.do
List all sites.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
publishingCategories | query | array<integer> | no | IDs of publishing categories to filter sites by |
basicInfo | query | boolean | no | If true, includes additional site details such as URL, email, and contact info |
basicInfoIds | query | array<string> | no | Comma-separated site IDs for which to include additional basic info |
offset | query | integer | no | Pagination offset over sites ordered by id (zero-based) |
limit | query | integer | no | Maximum number of sites to return; omit for all |
fields | query | array<string> | no | Return only these fields of each entity, comma-separated; id is always kept. A requested field no returned row carries is named in the X-Ignored-Fields response header |
filter | query | object | no | Keep only entities matching every key, e.g. filter[cpaOptimization]=true&filter[hasLimit]=true. Keys are the entity’s on/off settings (active, enableTargeting, cpaOptimization, alwaysRedirect, …) and a has<Relation> flag for each setting kept in rows of its own (hasLimit, hasPricing, hasFrequencyCapping, hasTrackingCode, hasPriceAdjustmentRules, hasLabels, hasBanners, …), true when the relation holds a row; hasCapping, hasLimits and hasTargetingRules group the relations of their kind. An unknown key is a 400 that lists every valid key for the list. |
Responses: 200 — Site list returned successfully. Errors follow the shared conventions.
GET /rest-api/sites/{siteId}.do
Get site by ID.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
basicInfo | query | boolean | no | If true, includes additional site details such as URL, email, and contact info |
Responses: 200 — Site returned successfully · 404 — Site not found or deleted. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/changeAdServingDomain.do
Change ad serving domain.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
host | form | string | no | Ad serving host name to set, or null to reset to system default |
Responses: 200 — Ad serving domain updated successfully · 404 — Site or domain not found. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/changeInvocationCodeDomain.do
Change invocation code domain.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
host | form | string | no | Invocation code host name to set, or null to reset to system default |
Responses: 200 — Invocation code domain updated successfully · 404 — Site or domain not found. Errors follow the shared conventions.
GET /rest-api/sites/{siteId}/cpm-thresholds.do
Get site CPM thresholds.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
Responses: 200 — CPM thresholds returned successfully · 404 — Not found — resource does not exist. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/cpm-thresholds.do
Set site CPM thresholds.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
Request body (application/json, required): JSON object with fields cpmThreshold, siteCountryCPMThresholds.
Responses: 200 — CPM thresholds updated successfully · 404 — Not found — resource does not exist. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/cpm-thresholds/delete.do
Delete site CPM thresholds.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
Responses: 200 — CPM thresholds deleted successfully · 404 — Not found — resource does not exist. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/delete.do
Delete site.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site to delete |
Responses: 200 — Site deleted successfully · 404 — Not found — resource does not exist. Errors follow the shared conventions.
GET /rest-api/sites/{siteId}/invocation-codes.do
List a site’s invocation codes.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Site ID |
limit | query | integer | no | Placements per page, 1 to 1000 |
start | query | integer | no | Offset of the first placement returned |
Responses: 200 — {success, total, data:[{zoneId, zoneName, placementId, placementName, placementType, codeTypes}]} · 404 — Site not found or deleted. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/invocation-codes/send.do
Email a site’s invocation codes.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Site ID |
bccAuthor | form | boolean | no | Send a blind copy to the caller’s own address |
body | form | string | no | Email HTML body; the invocation-code email template’s body when omitted. Required, with subject, when the network has no such template |
emails | form | array<string> | no | Recipient addresses, at most 20 |
placementInvocationCodes | form | object | no | Code types to send per placement ID. Every placement must belong to the site in the path. |
singleFile | form | boolean | no | Attach every code in one text file (true) or one file per placement and code type (false) |
subject | form | string | no | Email subject; the invocation-code email template’s subject when omitted. Required, with body, when the network has no such template |
Responses: 200 — {success, recipients} — the codes were handed to the mailer · 404 — Site or placement not found or deleted. Errors follow the shared conventions.
GET /rest-api/sites/{siteId}/pricing.do
Get site pricing.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
Responses: 200 — Pricing returned successfully · 404 — Not found — resource does not exist. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/pricing.do
Set site pricing.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
Request body (application/json, required): JSON object with fields advertiserPricing, countryPricing, minMarginType, minMarginValue, paymentModel, price, pricingType, revenueShare.
Responses: 200 — Pricing updated successfully · 404 — Not found — resource does not exist · 500 — Internal error while updating pricing. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/pricing/{countryCode}.do
Update site country pricing.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
price | form | number | yes | Price value as a decimal number |
siteId | path | integer | yes | Unique numeric ID of the site |
countryCode | path | string | yes | 2-letter ISO 3166 country code (e.g. US, GB, DE) |
actionId | form | integer | no | ID of the action for per-action pricing, or null for default pricing |
Responses: 200 — Country pricing updated successfully · 404 — actionId names no action the caller can see. Errors follow the shared conventions.
DELETE /rest-api/sites/{siteId}/pricing/{countryCode}.do
Delete site country pricing.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
countryCode | path | string | yes | 2-letter ISO 3166 country code (e.g. US, GB, DE) |
actionId | form | integer | no | ID of the action for per-action pricing, or null for default pricing |
Responses: 200 — Country pricing deleted successfully · 404 — actionId names no action the caller can see, or there is no price for that country (and action) to remove, including on a site without fixed pricing. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/pricing/{paymentModel}/remove.do
Remove site pricing model.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
paymentModel | path | string | yes | Payment model to remove: FIXED_PRICE or REVENUE_SHARE Values: FIXED_PRICE, REVENUE_SHARE. |
Responses: 200 — Pricing model removed successfully · 404 — Not found — resource does not exist. Errors follow the shared conventions.
GET /rest-api/sites/{siteId}/video-requirements.do
Get site video creative requirements.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
Responses: 200 — The site’s requirements · 404 — Site not found or deleted. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/video-requirements.do
Set site video creative requirements.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
Request body (application/json, required): JSON object with fields audioChannels, audioCodecs, basedOnPreset, bitrateExemptsProRes, constantFrameRate, containers, durationRange, durationTolerance, durations, frameRates, loudness, maxFileSizeMb, minAudioBitrate, minResolution, resolutions, videoBitrate, videoCodecs.
Responses: 200 — Requirements saved; the stored requirements are returned · 404 — Site not found or deleted. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/video-requirements/apply-preset.do
Apply a publisher video spec preset to a site.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
presetId | form | string | yes | Preset id from video-requirements/presets |
Responses: 200 — Preset applied; the site’s requirements and switch are returned · 404 — Site not found or deleted. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/video-requirements/disable.do
Switch off site video creative requirements.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
Responses: 200 — Switched off; the site’s requirements and switch are returned · 404 — Site not found or deleted. Errors follow the shared conventions.
POST /rest-api/sites/{siteId}/video-requirements/enable.do
Switch on site video creative requirements.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the site |
Responses: 200 — Switched on; the site’s requirements and switch are returned · 404 — Site not found or deleted. Errors follow the shared conventions.
GET /rest-api/sites/{siteId}/zones.do
List zones for site.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Unique numeric ID of the parent site |
fields | query | array<string> | no | Return only these fields of each entity, comma-separated; id is always kept. A requested field no returned row carries is named in the X-Ignored-Fields response header |
filter | query | object | no | Keep only entities matching every key, e.g. filter[cpaOptimization]=true&filter[hasLimit]=true. Keys are the entity’s on/off settings (active, enableTargeting, cpaOptimization, alwaysRedirect, …) and a has<Relation> flag for each setting kept in rows of its own (hasLimit, hasPricing, hasFrequencyCapping, hasTrackingCode, hasPriceAdjustmentRules, hasLabels, hasBanners, …), true when the relation holds a row; hasCapping, hasLimits and hasTargetingRules group the relations of their kind. An unknown key is a 400 that lists every valid key for the list. |
Responses: 200 — Zones returned successfully · 404 — Not found — resource does not exist. Errors follow the shared conventions.
GET /rest-api/sites/ids.do
List sites by IDs.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteIds | query | array<integer> | yes | Array of site IDs to retrieve |
basicInfo | query | boolean | no | If true, includes additional site details such as URL, email, and contact info |
Responses: 200 — Sites returned successfully. Errors follow the shared conventions.
POST /rest-api/sites/update.do
Create or update site.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
createDefaultZone | form | boolean | no | If true, creates a default zone with the same name as the site |
id | form | integer | no | ID of the site to update — omit to create a new site |
categoryId | form | array<integer> | no | Publisher category IDs, comma-separated or repeated — replace the site’s categories |
actionLimitsEnabled | form | boolean | no | Enable per-action conversion limits |
active | form | boolean | no | Whether the site is active |
adsHost | form | string | no | Custom ad serving domain for this site |
bundle | form | string | no | App bundle id (com.example.app on Android, numeric ID on iOS) — only relevant when inventoryType=APP. Optional. |
cookieCollectingEnabled | form | boolean | no | Enable cookie-based visitor tracking |
description | form | string | no | Site description |
email | form | string | no | Contact email for the site |
enableRules | form | boolean | no | Enable advanced rules engine for this site |
enableTargeting | form | boolean | no | Enable targeting rules for this site |
impressionsByMonth | form | string | no | Monthly impression volume range Values: LESS_THAN_100K, _100K_1_MILLION, _1_MILLION_50_MILLION, _50_MILLION_100_MILLION, _100_PLUS_MILLION, NOT_YET_LAUNCHED, DONT_KNOW. |
inventoryType | form | string | no | Inventory type: WEBSITE or APP Values: WEBSITE, APP. |
invocationCodeHost | form | string | no | Custom domain for invocation code generation, up to 64 characters |
maskInventory | form | boolean | no | Mask inventory details from advertisers |
name | form | string | no | Site name |
operationBetweenRuleTypes | form | string | no | Logical operator between different targeting rule types (AND, OR) Values: AND, OR. |
piggybackStatus | form | string | no | Piggyback tracking status (ENABLED, DISABLED) Values: ENABLED, DISABLED. |
privacyPolicyEnabled | form | boolean | no | Whether a privacy policy is enabled for this site |
privateField | form | boolean | no | Mark as private — hidden from marketplace/network discovery |
schainSellerId | form | string | no | Seller id for this publisher in the network’s own sellers.json |
url | form | string | no | Site URL — only relevant when inventoryType=WEBSITE, ignored for APP. Optional. |
visitorsByMonth | form | string | no | Monthly unique visitor volume range Values: LESS_THAN_100K, _100K_1_MILLION, _1_MILLION_50_MILLION, _50_MILLION_100_MILLION, _100_PLUS_MILLION, NOT_YET_LAUNCHED, DONT_KNOW. |
revenueShare | form | number | no | Revenue share percentage (0-100) for this site |
Responses: 200 — Site created or updated successfully. Errors follow the shared conventions.
GET /rest-api/video-requirements/presets.do
List publisher video spec presets.
No parameters beyond authentication.
Responses: 200 — {presets: [{id, name, profile, source, asOf, requirements}], total}. Errors follow the shared conventions.
Related
- REST API overview — authentication and conventions
- API endpoint reference by tag
- Entities — create, read, update, delete via API