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

# Create placement capping

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

Creates a new capping rule for the specified placement, controlling how frequently events (impressions, clicks, or actions) occur within a time window. The capping type determines which event category is capped (e.g. PLACEMENT_FREQUENCY for impressions, PLACEMENT_CLICKS for clicks). The response JSON carries the new record, with its assigned id, under capping. Requires UPDATE permission on the placement's site, MANAGE_INVENTORY_CAPPING enabled, and the permission of the capping type and subject.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `placementId` | integer | yes | `3001` | Numeric ID of the placement to add the capping rule to |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `type` | string | yes | `PLACEMENT_FREQUENCY` | Type of the capping to create. Only placement types are accepted: PLACEMENT_REQUEST, PLACEMENT_FREQUENCY, PLACEMENT_CLICKS, PLACEMENT_ACTIONS; 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/placement/capping/3001.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'type=PLACEMENT_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-placement-capping