---
title: "Set site pricing"
type: reference
method: POST
path: /rest-api/sites/{siteId}/pricing.do
tag: "Sites"
---

# Set site pricing

`POST https://YOUR-NETWORK-DOMAIN/rest-api/sites/{siteId}/pricing.do`

Sets or replaces the pricing model for the specified site. The request body is a JSON object describing either a FIXED_PRICE model (with pricingType CPM/CPC/CPA, default price, optional per-country pricing and an optional minimum-margin floor) or a REVENUE_SHARE model (with default revenue share percentage and optional per-advertiser/campaign overrides). As in the console, a FIXED_PRICE call never touches the pricing of the site's placements. Switching pricingType deletes the site's country and action prices and clears the price unless one is sent; keeping the same pricingType keeps them. The lists are replaced only when sent: countryPricing replaces the site's country prices for every action (per-action CPA country prices are kept), advertiserPricing replaces its per-advertiser/campaign shares, and a call that leaves a list out keeps it. revenueShare may be left out to keep the stored one, but is required when the site has none yet. Fields that do not apply to the chosen paymentModel are listed in ignoredFields. Every check runs before anything is written, so a refused call changes nothing. The site's own row is reused, so a minimum margin already set on the site survives a call that omits the fields. minMarginType/minMarginValue additionally require ENABLED level on the MIN_MARGIN permission and update access to the site. Requires ENABLED level on SITE_PAYMENT_MODEL permission.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `siteId` | integer | yes | `5001` | Unique numeric ID of the site |

## Body

A JSON body. An example, built from the field definitions:

```json
{
  "pricingType": "CPM",
  "paymentModel": "FIXED_PRICE",
  "price": "2.50",
  "revenueShare": "65.0"
}
```

## Responses

- `200` — Pricing updated successfully
- `400` — Invalid body, named in errors — e.g. a price out of 0-1000000, a malformed countryPricing entry, an unknown country or advertiser, a missing revenueShare, or an invalid minimum margin
- `401` — Authentication error
- `403` — Insufficient permissions, naming the missing one
- `404` — Not found — resource does not exist
- `500` — Internal error while updating pricing

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/sites/5001/pricing.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "pricingType": "CPM",
  "paymentModel": "FIXED_PRICE",
  "price": "2.50",
  "revenueShare": "65.0"
}'
```

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