---
title: "Set banner no-click capping"
type: reference
method: POST
path: /rest-api/banner/{bannerId}/no-click-capping/set.do
tag: "Capping"
---

# Set banner no-click capping

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

Creates or replaces the no-click capping rule for a banner. No-click capping suppresses a banner if a user sees it a specified number of times (amount) within a time window (period) without clicking. The impression counter resets to zero whenever the user clicks. If a capping rule already exists for the given subject type, it is updated in place; otherwise a new rule is created. 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 configure no-click capping for |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `period` | integer | yes | `24` | Length of the capping time window, expressed in units defined by periodType |
| `periodType` | string | yes | `HOUR` | Unit of the capping period. Allowed values: SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR |
| `amount` | integer | no | `5` | Maximum number of impressions without a click before the banner is suppressed. Optional; if omitted the existing amount is preserved. |
| `evenDistribution` | boolean | no | `false` | When true, impression counting is distributed evenly across the period |
| `subject` | string | no | `USER_COOKIE` | Entity used to identify unique users for capping. Defaults to USER_COOKIE if omitted. Allowed values: USER_COOKIE, USER_SERVER_SIDE, USER_MIXED, IP, LES_IP |

## Responses

- `200` — No-click capping set successfully
- `400` — Invalid request parameters
- `401` — Authentication error
- `403` — Not enough permissions
- `404` — Banner not found

## Example request

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

Source: https://epom.com/ad-server/docs/api/capping/post-banner-no-click-capping-set