Use this API to create mediation ad units. This API allows you to create multiple ad units with a single API call. The "settings" parameter allows you to define specific configurations for each ad unit.
This API allows you to create multiple ad units with a single API call
The Ad Unit ID value is reachable using GET call to this API
The newly created ad unit's name Length should be in range 1 to 255
✓
Interstitial-1
adFormat
String
rewarded, interstitial, banner, native
✓
interstitial
reward
Object
Represents a reward, the name and amount of the reward. Relevant only for rewarded ad format Mandatory if ad format is rewarded
x
rewardItemName
String
Specifies the name of the reward item Length should be in range 1 to 32
✓
Virtual Item
rewardAmount
Number
Indicates the amount or value of the reward
✓
1
settings
Array
List of settings. If not specified, the default values will be set.
x
These are the following settings fields in the ‘settings' array
testGroup
String
The AB test group it is related to. testGroup value should be 'null' or not sent in case there is no AB test
x
null
cappingEnabled
Boolean
Indicates if a cap or limit is enforced (true if enabled, false otherwise). Relevant only for rewarded and interstitial ad formats
x
true
cappingLimit
Number
Specifies the maximum cap value for the ad unit
x
5
cappingInterval
String
Defines the time interval, 'd' (day) or 'h' (hour)
x
d
pacingEnabled
Boolean
Indicates if pacing is active (true if enabled, false otherwise). Relevant only for rewarded and interstitial ad formats
x
true
pacingMinutes
Number
Specifies the pacing interval in minutes. float number maximum value is 1000
x
4.6
bannerRefreshRate
Number
Sets the refresh rate for the banner in seconds. Relevant only for banner ad format. Default value in case not being sent: 25 Possible values are 0,10,15,20,25,30,45,60,120 and 240
The newly created ad unit's name Length should be in range 1 to 255
x
interstitial-1
isPaused
Boolean
Indicates whether the ad unit is currently paused (true if paused, false if active) Should be true to pause the ad unit, or false to unpause the ad unit
x
false
reward
Object
Represents a reward, the name and amount of the reward. Relevant only for rewarded ad format Mandatory if ad format is rewarded
x
rewardItemName
String
Specifies the name of the reward item Length should be in range 1 to 32
✓
Virtual Item
rewardAmount
Number
Indicates the amount or value of the reward
✓
1
settings
Array
List of settings. If not specified, the default values will be set.
x
These are the following settings fields in the ‘settings' array
testGroup
String
The AB test group it is related to. null/"A"/"B"
x
null
cappingEnabled
Boolean
Indicates if a cap or limit is enforced (true if enabled, false otherwise). Relevant only for rewarded and interstitial ad formats
x
true
cappingLimit
Number
Specifies the maximum cap value for the ad unit
x
5
cappingInterval
String
Defines the time interval, 'd' (day) or 'h' (hour)
x
d
pacingEnabled
Boolean
Indicates if pacing is active (true if enabled, false otherwise). Relevant only for rewarded and interstitial ad formats
x
true
pacingMinutes
Number
Specifies the pacing interval in minutes. float number maximum value is 1000
x
4.6
bannerRefreshRate
Number
Sets the refresh rate for the banner in seconds. Relevant only for banner ad format. Default value in case not being sent: 25 Possible values are 0,10,15,20,25,30,45,60,120 and 240.
A successful response will be sent with HTTP code 200.
Errors
If one of the groups sent in the request is failing, an error array will be sent with HTTP code 400 and will cause the whole request to be rejected.Each error will be followed with an error message.
Example
{
"errorsArray": [
{
"code": "ERR-4332",
"errorMessage": "cappingInterval value must be either 'd' (days) or 'h' (hours)",
"params": {
"[0].settings[0].cappingInterval": "s"
}
}
],
"code": 400
}