---
title: "Update campaign action capping"
type: reference
method: POST
path: /rest-api/campaign/{campaignId}/action-capping/update.do
tag: "Capping"
---

# Update campaign action capping

`POST https://YOUR-NETWORK-DOMAIN/rest-api/campaign/{campaignId}/action-capping/update.do`

Updates an existing action (conversion) capping record for a campaign, identified by the capping record's own ID. Only the fields provided are modified; omitted optional fields retain their current values. The record must already exist within the campaign's action capping set, otherwise the answer is 404. 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 |
|---|---|---|---|---|
| `campaignId` | integer | yes | `2001` | Numeric ID of the campaign that owns the capping record |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `id` | integer | yes | `501` | Numeric ID of the specific capping record to update (obtained from the GET capping list response) |
| `amount` | integer | no | `1000` | Maximum number of conversions 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, conversions are distributed evenly across the period instead of being counted as fast as possible |
| `subject` | string | no | `USER_COOKIE` | Entity used to identify unique users for capping. Optional; if omitted the existing subject is preserved. Allowed values: USER_COOKIE, USER_SERVER_SIDE, USER_MIXED, IP, LES_IP |

## Responses

- `200` — Action capping updated successfully
- `400` — Invalid request parameters
- `401` — Authentication error
- `403` — Not enough permissions
- `404` — No action capping enabled or campaign not found

## Example request

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

Source: https://epom.com/ad-server/docs/api/capping/post-campaign-action-capping-update