## Overview

When you set up frequency capping, you set the maximum number of times a given flight or creative can be displayed to any particular person in a particular time period.

The flight frequency cap will apply to all the ads that belong to it.

> 📘  
> ### Set caps by **hour**, **day**, or **minute**. Max duration is 180 days, 168 hours, or 4400 minutes.

## Overriding Flight Caps

There are several cases where the flight frequency cap can be overridden:

- If the advertiser, campaign or ad frequency cap is stricter than the flight frequency cap
- If the ad has the setting "Don't affect the parent frequency cap" enabled. This setting allows the object to ignore the frequency caps of objects above it.

## Setting Up with UI

Use the Frequency Capping section of the Configure Flight Settings page to set up frequency capping:

1. Click the "Enable Frequency Capping" checkbox
2. Enter how many times the flight should display, per a number of Hours or Days
3. Save

## Setting Up with API

Use the below parameters in the [Create Flight](https://dev.kevel.co/v1.0/reference/flight#create-flight) request.

| Property | Description |
| --- | --- |
| `IsFreqCap`<br>(boolean) | Set to `true`. If `false` or `null`, then the below fields are ignored |
| `FreqCap`<br>(integer) | The number of times that you would like the frequency cap to occur |
| `FreqCapDuration`<br>(integer) | How often the frequency cap should occur |
| `FreqCapType`<br>(integer) | Which unit of time you would like frequency capping to occur. Key:<br>`1 = Hour`<br>`2 = Day` |
| `DontAffectParentFreqCap`<br>(boolean) | Optional. If `true`, opts-it out of frequency cap settings imposed at advertiser or campaign level |

> 📘  
> ### To understand frequency capping, use this formula: `Display this advertiser {{FreqCap}} times per {{FreqCapDuration}} {{FreqCapType}}`. For instance: `Display this advertiser 3 times per 6 hours`

Here's an example request for a [Create Flight](https://dev.kevel.co/v1.0/reference/flight#create-flight) request with frequency cap settings of `10 times per 1 day` and which is opted-out of advertiser/campaign level caps.

### JSON

```json
flight={
  "CampaignId":1234,
  "PriorityId":1325,
  "Name":"Test",
  "StartDateISO":"2017-05-01T00:00:00.00.0000000",
  "GoalType": 1,
  "IsFreqCap": true,
  "FreqCap": 10,
  "FreqCapDuration": 1,
  "FreqCapType": 2,
  "DontAffectParentFreqCap": true
}
```

You can also update the caps with the [Update Flights](https://dev.kevel.co/v1.0/reference/flight#update-flights) request.
