---
title: "Update banner frequency capping"
type: reference
method: POST
path: /rest-api/banner/{bannerId}/frequency-capping/update.do
tag: "Capping"
---

# Update banner frequency capping

`POST https://YOUR-NETWORK-DOMAIN/rest-api/banner/{bannerId}/frequency-capping/update.do`

Updates an existing frequency capping rule for a banner, modifying its amount, period, period type, distribution, or subject. Fields not sent keep their value. It never creates a rule: when the banner has no rule of this type for the subject the answer is 404 naming it - create one with the matching set.do. If the capping was previously disabled, this call re-enables it. Rules are keyed by subject: without subject the banner's only rule of this type is updated (keeping its subject), otherwise the USER_COOKIE rule. Requires UPDATE permission and the MANAGE_CAPPING_AND_LIMITATIONS privilege; using IP or LES_IP subjects requires additional permissions.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `bannerId` | integer | yes | `42` | Numeric ID of the banner to update frequency capping for |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `amount` | integer | no | `1000` | Maximum number of impressions allowed within the specified period. Optional; if omitted the existing amount is preserved. |
| `period` | integer | no | `24` | Length of the capping time window, expressed in units defined by periodType. Omitted keeps the current period |
| `periodType` | string | no | `HOUR` | Unit of the capping period. Allowed values: SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR. Omitted keeps the current unit |
| `evenDistribution` | boolean | no | `true` | When true, impressions are distributed evenly across the period instead of being served as fast as possible |
| `subject` | string | no | `USER_COOKIE` | Entity used to identify unique users for capping; selects the rule to update. If omitted and the banner has exactly one rule of this type, that rule is updated and keeps its subject; otherwise USER_COOKIE. Allowed values: USER_COOKIE, USER_SERVER_SIDE, USER_MIXED, IP, LES_IP |

## Responses

- `200` — Frequency capping updated successfully
- `400` — Invalid request parameters
- `401` — Authentication error
- `403` — Not enough permissions
- `404` — Banner not found, or it has no frequency capping rule for the subject

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/banner/42/frequency-capping/update.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'amount=1000' \
  --data-urlencode 'period=24' \
  --data-urlencode 'periodType=HOUR'
```

Source: https://epom.com/ad-server/docs/api/capping/post-banner-frequency-capping-update