post
https://sandbox-api.viantinc.com/{basePath}/campaignflight
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Campaign Budget Types
Campaign Flights determine their budget requirements based on the Campaign's budget type:
MONETARY Campaigns
- Required:
maxBudget(in USD) - Optional:
dailyBudget
IMPRESSIONS Campaigns
- Required:
lifetimeImpCap - Optional:
dailyImpCap
The API validates the appropriate fields based on the Campaign's budget type.
Request Body
| Name | Type | Description | Required |
|---|---|---|---|
| budgetType | String | One of: FIXED_BUDGET, AUTO_BUDGET | No |
| dailyBudget | Number | The daily budget limit in USD. | Optional. Only applicable for MONETARY campaigns. |
| dailyFrontload | Number | Daily frontload percentage. | Required when budgetType is AUTO_BUDGET. Ignored for FIXED_BUDGET. |
| maxBudget | Number | The maximum budget for the campaign flight in USD. | Required if campaign budget type is MONETARY. |
| dailyImpCap | Number | The daily impressions cap. | Optional. Only applicable for IMPRESSIONS campaigns. |
| lifetimeImpCap | Number | The total lifetime impressions cap for the campaign flight. | Required if campaign budget type is IMPRESSIONS. |
| startDate | Number | Start date of the campaign flight, passed as Unix time in milliseconds. | Yes |
| endDate | Number | End date of the campaign flight, passed as Unix time in milliseconds. | Yes |
Examples
Creating a Campaign Flight for a MONETARY Campaign with FIXED_BUDGET
{
"budgetType": "FIXED_BUDGET",
"maxBudget": 10000,
"dailyBudget": 1000,
"startDate": 1766476800000,
"endDate": 1769088800000
}Creating a Campaign Flight for a MONETARY Campaign with AUTO_BUDGET
{
"budgetType": "AUTO_BUDGET",
"maxBudget": 10000,
"dailyFrontload": 0.75,
"startDate": 1766476800000,
"endDate": 1769088800000
}Creating a Campaign Flight for an IMPRESSIONS Campaign with FIXED_BUDGET
{
"budgetType": "FIXED_BUDGET",
"lifetimeImpCap": 500000,
"dailyImpCap": 50000,
"startDate": 1766476800000,
"endDate": 1769088800000
}Creating a Campaign Flight for an IMPRESSIONS Campaign with AUTO_BUDGET
{
"budgetType": "AUTO_BUDGET",
"lifetimeImpCap": 500000,
"dailyFrontload": 0.75,
"startDate": 1766476800000,
"endDate": 1769088800000
}Note
- The new Campaign Flight's Start Date must begin after the current time.
- A Campaign Flight's Start Date and End Date cannot overlap with another Campaign Flight's Start Date and End Date within the given Campaign.
401Unauthorized
403Forbidden
404Not Found