---
title: "Update campaign pricing"
type: reference
method: POST
path: /rest-api/campaign/{campaignId}/pricing.do
tag: "Campaigns"
---

# Update campaign pricing

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

Updates pricing settings for the specified campaign, or creates a new pricing record with system defaults if one does not yet exist. Accepts price, paymentModel (FIXED_PRICE or REVENUE_SHARE), pricingType (CPM, CPC, CPA), and optimization parameters such as estimatedCtr, estimatedConversionRate, burnUpPeriod, startUpPeriod, minClicks, minConversions and useGlobalActionPricing. Only the fields sent are changed; the rest keep their stored values. Switching pricingType, or creating the pricing record (CPM when pricingType is not sent), needs that pricing type's permission and, on a switch, as in the console, deletes the campaign's country and action prices and its global price (send price in the same call to set the new one). estimatedCtr and estimatedConversionRate are fractions between 0 and 1 (0.05 means 5%); price must be between 0 and 1000000; burnUpPeriod must be >= startUpPeriod. A value out of range is answered with 400 naming the field.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `campaignId` | integer | yes | `2001` | Unique identifier of the campaign whose pricing to update |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `burnUpPeriod` | integer | no | `24` | Burn-up period in hours for eCPM optimization |
| `burnUpSubPeriod` | integer | no | `6` | Burn-up sub-period length in hours |
| `burnUpSubPeriodWeighting` | string | no | `SINGLET` | Weighting type for burn-up sub-periods |
| `estimatedConversionRate` | number | no | `0.002` | Estimated impression-to-conversion rate (I2C) as a fraction from 0 to 1, not a percentage — 0.002 means 0.2%. Used to estimate eCPM of CPA campaigns under eCPM optimization; omit to keep the current value (a new pricing record starts from the network default) |
| `estimatedCtr` | number | no | `0.005` | Estimated click-through rate as a fraction from 0 to 1, not a percentage — 0.005 means 0.5% CTR. Used to estimate eCPM of CPC campaigns under eCPM optimization; omit to keep the current value (a new pricing record starts from the network default) |
| `minClicks` | integer | no | `50` | Minimum number of clicks before optimization kicks in |
| `minConversions` | integer | no | `10` | Minimum number of conversions before optimization kicks in |
| `paymentModel` | string | no | `FIXED_PRICE` | Payment model (FIXED_PRICE, REVENUE_SHARE) |
| `price` | number | no | `2.50` | Price value in the selected pricing type; null when no global price is set |
| `pricingType` | string | no | `CPM` | Pricing type (CPM, CPC, CPA, COST_PER_DAY, COST_PER_MONTH) |
| `startUpPeriod` | integer | no | `12` | Start-up period in hours for eCPM optimization; must not exceed burnUpPeriod |
| `useGlobalActionPricing` | boolean | no | `true` | Whether to use global action pricing from the action definition |

## Responses

- `200` — Campaign pricing updated
- `400` — Wrong request format or invalid parameters
- `401` — Authentication error
- `403` — Not enough permissions, including the permission of a pricingType being switched to
- `404` — Not found — resource does not exist

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/campaign/2001/pricing.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'burnUpPeriod=24' \
  --data-urlencode 'burnUpSubPeriod=6' \
  --data-urlencode 'burnUpSubPeriodWeighting=SINGLET'
```

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