---
title: "Create advertiser capping"
type: reference
method: POST
path: /rest-api/advertiser/capping/{advertiserId}.do
tag: "Capping"
---

# Create advertiser capping

`POST https://YOUR-NETWORK-DOMAIN/rest-api/advertiser/capping/{advertiserId}.do`

Creates a new capping rule for the specified advertiser, typically used for advertiser-level frequency capping across all campaigns. The capping type should be ADVERTISER_FREQUENCY for advertiser-level rules. The response JSON carries the new record, with its assigned id, under capping. Requires UPDATE permission on the advertiser, MANAGE_CAPPING_AND_LIMITATIONS enabled, and the permission of the capping type and subject.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `advertiserId` | integer | yes | `1001` | Numeric ID of the advertiser to add the capping rule to |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `type` | string | yes | `ADVERTISER_FREQUENCY` | Type of the capping to create. Only ADVERTISER_FREQUENCY is accepted; any other value of the shared enum is rejected with 'Capping type is incompatible with entity' |
| `amount` | integer | yes | `1000` | Maximum number of events allowed within the specified period |
| `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 |
| `flat` | boolean | yes | `true` | When true, events are distributed evenly (flat) across the period instead of being served/counted as fast as possible |
| `subject` | string | no | `USER_COOKIE` | Entity used to identify unique users for capping. Optional; allowed values: USER_COOKIE, USER_SERVER_SIDE, USER_MIXED, IP, LES_IP |

## Responses

- `200` — Capping created: {success, capping:{id, type, amount, period, periodType, flat, subject, ...}}
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Forbidden — insufficient permissions
- `404` — Not found — resource does not exist

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/advertiser/capping/1001.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'type=ADVERTISER_FREQUENCY' \
  --data-urlencode 'amount=1000' \
  --data-urlencode 'period=24' \
  --data-urlencode 'periodType=HOUR' \
  --data-urlencode 'flat=true' \
  --data-urlencode 'subject=USER_COOKIE'
```

Source: https://epom.com/ad-server/docs/api/capping/post-advertiser-capping