---
title: "Set banner frequency capping — capping"
type: reference
method: POST
path: /rest-api/banner/{bannerId}/capping/frequency.do
tag: "Banners"
---

# Set banner frequency capping — capping

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

Creates or adds a frequency capping rule for the specified banner. Accepts amount (number of events), periodType (HOUR, DAY, WEEK, MONTH, YEAR), period (number of periods), and flat (boolean for uniform distribution). The amount must be greater than zero. Requires UPDATE permission on the banner's advertiser, plus MANAGE_CAPPING_AND_LIMITATIONS and FREQUENCY_CAPPING permissions.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `bannerId` | integer | yes | `3001` | ID of the banner to set frequency capping for |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `amount` | integer | no | `5` | Maximum number of impressions/clicks allowed within the capping period |
| `flat` | boolean | no | `false` | Whether to use flat (non-rolling) period windows |
| `id` | integer | no | `200` | Frequency capping rule ID |
| `period` | integer | no | `1` | Length of the capping period (combined with periodType) |
| `periodType` | string | no | `HOUR` | Period type for the capping window (MINUTE, HOUR, DAY, WEEK, MONTH, YEAR) |
| `subject` | string | no | `USER_COOKIE` | Subject type for capping identification (USER_COOKIE, USER_SERVER_SIDE, USER_MIXED, IP, LES_IP) |

## Responses

- `200` — Frequency capping updated
- `400` — Invalid request or banner not found
- `401` — Authentication error
- `403` — Not enough permissions
- `404` — Not found — resource does not exist

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/banner/3001/capping/frequency.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'amount=5' \
  --data-urlencode 'period=1' \
  --data-urlencode 'periodType=HOUR' \
  --data-urlencode 'subject=USER_COOKIE' \
  --data-urlencode 'flat=false'
```

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