---
updatedAt: 2026-05-29T12:25:24.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Deletes a forecast

Deletes a forecast that was previously executed or cancels a forecast that is running or queued.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Forecast API",
    "description": "The Kevel Forecast API",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.kevel.co/v1"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/forecaster": {
      "post": {
        "tags": [
          "Forecast"
        ],
        "summary": "Request forecast",
        "description": "Request a forecast to be started.",
        "requestBody": {
          "description": "The JSON object that describes the forecast request.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "title": "Available Forecast Request",
                    "type": "object",
                    "description": "A request to perform an availability forecast, i.e., querying the predicted inventory to find the total amount of available (and booked) clicks, impressions, revenue, unique users, and custom events that exist at a given `Priority` level ([weight](doc:priorities#priority-fields)).\nThese are calculated by applying the supplied targeting rules or new ads after the delivery of all existing campaigns with priority weights equal to or above the supplied `Priority`.\nThe priority can be specified in two manners. Either by the `Priority` or `PriorityId` fields (only one of them can be defined) or by the priorities that are defined in the Flights when the `NewAds` field is passed.\nWhen the `NewAds` field is specified, the `Targeting`, `Priority`, and `PriorityId` fields cannot be, since all the targeting, capping, and priority rules will be encoded in the Flight and Ads passed in `NewAds`.\nAdditionally, if the `NewAds` provided contain a flight that shares the same ID with another one from the Ad Platform inventory, the simulated deliveries to that booked flight will be considered as potentially available for any of the provided Ads from flight.\nNote that the available revenue is only calculated when the `NewAds` field is provided.\n",
                    "required": [
                      "EndDate",
                      "Type"
                    ],
                    "properties": {
                      "Type": {
                        "type": "string",
                        "enum": [
                          "available"
                        ]
                      },
                      "StartDate": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Start date of the available forecast from which availability will be checked, as `yyyy-mm-dd'T'HH:mm:SS` or `yyyy-mm-dd` (default time of `00:00:00`), in the passed `TimeZone` or UTC if omitted.\n"
                      },
                      "EndDate": {
                        "type": "string",
                        "format": "date-time",
                        "description": "End date of the available forecast, must be after current date, as `yyyy-mm-dd'T'HH:mm:SS` or `yyyy-mm-dd` (default time of `23:59:59`), in the passed `TimeZone` or UTC if omitted."
                      },
                      "TimeZone": {
                        "default": "UTC",
                        "type": "string",
                        "description": "The time zone of the available forecast's start and end dates ([available time zones](https://www.joda.org/joda-time/timezones.html)). Additionally, day parting is evaluated in the available forecast's time zone.\n"
                      },
                      "Targeting": {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "FreqCapType": {
                                "type": "number",
                                "enum": [
                                  1,
                                  2,
                                  3
                                ],
                                "description": "The unit of the frequency cap:\n\n  * _1_: Hour\n  * _2_: Day\n  * _3_: Minute\n"
                              },
                              "FreqCapDuration": {
                                "type": "number",
                                "description": "How long the frequency cap should apply.\n"
                              },
                              "FreqCap": {
                                "type": "number",
                                "description": "The cap of the frequency cap.\n"
                              },
                              "Keywords": {
                                "type": "string",
                                "example": "dodge\ntruck",
                                "description": "Keywords as they're defined in flights. Please head to [Keyword Logic](doc:keyword-logic) for more details.\n"
                              },
                              "ActiveKeywords": {
                                "type": "array",
                                "description": "Keywords as they're defined in ads.\n",
                                "items": {
                                  "type": "string"
                                },
                                "example": [
                                  "tacocat",
                                  "potato cat"
                                ]
                              },
                              "GeoTargeting": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "CountryCode": {
                                      "type": "string",
                                      "description": "The two-character country code.\n",
                                      "example": "US"
                                    },
                                    "Region": {
                                      "type": "string",
                                      "description": "The two-character code for the state, region, or province.\n",
                                      "example": "NY"
                                    },
                                    "MetroCode": {
                                      "type": "string",
                                      "description": "The metro code, such as ZIP code.\n",
                                      "example": "10001"
                                    },
                                    "CityGeonameId": {
                                      "type": "integer",
                                      "description": "The numeric GeoNames ID for city-level targeting. This value is used for matching, not the city name. Please\nhead to [Geo Targeting](ref:create-geo-targeting) for more details.\n",
                                      "example": 5128581
                                    },
                                    "IsExclude": {
                                      "type": "boolean",
                                      "description": "Set to 'false' (it's also the default value) or null if you want to target; true if you want to exclude."
                                    }
                                  },
                                  "required": [
                                    "CountryCode"
                                  ]
                                },
                                "description": "Please head to [Geo Targeting](ref:create-geo-targeting) for more details.\n"
                              },
                              "DistanceTargeting": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "description": "For the time being, we don't support StreetAddress.\n",
                                  "properties": {
                                    "Distance": {
                                      "type": "number",
                                      "description": "The radius of acceptable area from latitude, longitude centre.\n",
                                      "example": 20
                                    },
                                    "Latitude": {
                                      "type": "number",
                                      "description": "The latitude of the requester source.\n",
                                      "example": 41.40338
                                    },
                                    "Longitude": {
                                      "type": "number",
                                      "description": "The latitude of the requester source.\n",
                                      "example": 2.17403
                                    }
                                  }
                                },
                                "description": "Please head to [Distance Targeting](ref:create-geodistance-targeting-geometry) for more details.\n"
                              },
                              "SiteZoneTargeting": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "SiteId": {
                                      "type": "number",
                                      "example": 1121285
                                    },
                                    "ZoneId": {
                                      "type": "number",
                                      "example": 247884
                                    },
                                    "IsExclude": {
                                      "type": "boolean",
                                      "description": "Whether targeting is to be excluded or included. Defaults to false, so if you leave this blank it'll target the site/zone."
                                    }
                                  }
                                },
                                "description": "Please head to [Site/Zone Targeting](ref:create-sitezone-targeting) for more details.\n"
                              },
                              "SegmentTargeting": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "SegmentId": {
                                      "type": "number",
                                      "example": 123456789
                                    },
                                    "IsExclude": {
                                      "type": "boolean",
                                      "default": false,
                                      "description": "Whether targeting is to be excluded or included. Defaults to false."
                                    },
                                    "Category": {
                                      "type": "string",
                                      "example": "Demographics",
                                      "description": "The category the segment belongs to. Include segments are matched OR-within-category and AND-across-categories: a request must match at least one included segment in every targeted category. Optional; segments with no category are treated as a single uncategorized group, so all-one-category (or no category) reduces to flat OR behavior. Ignored for excluded segments, because exclude is a flat deny."
                                    }
                                  }
                                },
                                "description": "A list of user segment targeting objects for the availability check.\n"
                              },
                              "SearchTerms": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/paths/~1forecaster~1reserved-campaign~1{reservedCampaignId}/put/requestBody/content/application~1json/schema/properties/flights/items/properties/searchTerms/items"
                                },
                                "description": "Search term targeting rules for the availability check. Please head to [Search Term Targeting](doc:search-term-targeting) for more details.\n"
                              },
                              "CategoryTargeting": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/paths/~1forecaster~1reserved-campaign~1{reservedCampaignId}/put/requestBody/content/application~1json/schema/properties/flights/items/properties/categoryTargeting/items"
                                },
                                "description": "Category targeting rules for the availability check. Please head to [Category Targeting](doc:category) for more details."
                              },
                              "CustomTargeting": {
                                "type": "string",
                                "description": "The custom targeting (Zerkel query) of the flight. Please head to [Custom Targeting](doc:custom-targeting) for more details.\n",
                                "example": "(age > 25 and gender = \"male\")"
                              },
                              "DayParting": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "StartTime": {
                                      "type": "string",
                                      "format": "time",
                                      "description": "HH:mm:ss."
                                    },
                                    "EndTime": {
                                      "type": "string",
                                      "format": "time",
                                      "description": "HH:mm:ss."
                                    },
                                    "WeekDays": {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "enum": [
                                          "MO",
                                          "TU",
                                          "WE",
                                          "TH",
                                          "FR",
                                          "SA",
                                          "SU"
                                        ]
                                      },
                                      "description": "The days of the week to target.\n",
                                      "example": [
                                        "TH",
                                        "FR"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "StartTime",
                                    "EndTime",
                                    "WeekDays"
                                  ]
                                },
                                "description": "Please head to [Day Parting](ref:create-day-part) for more details.\n"
                              },
                              "AdType": {
                                "oneOf": [
                                  {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  {
                                    "type": "array",
                                    "nullable": true,
                                    "items": {
                                      "type": "number"
                                    },
                                    "minItems": 1
                                  }
                                ],
                                "description": "An id or list of ids of the Ad Sizes / Types to target by. Setting to null is equivalent to a list with all Ad Sizes / Types.\n"
                              },
                              "TemplateValues": {
                                "type": "string",
                                "format": "json",
                                "example": "{\"ctString\":\"A string goes here\",\"ctExternalFile\":\"https://cdn.com/ad.gif\"}",
                                "description": "Creative Template Fields that can be queried via AdQuery.\nThis is a JSON string with a set of variables and their corresponding values (it can be any json supported type).\nPlease head to [AdQuery documentation](doc:adquery) for more details.\n"
                              },
                              "SkipTemplateValues": {
                                "type": "boolean",
                                "default": true,
                                "description": "When true, skips AdQuery filtering by ADRs.\n"
                              }
                            }
                          }
                        ],
                        "description": "The specified targeting for the available forecast."
                      },
                      "Priority": {
                        "type": "integer",
                        "description": "The priority weight at which availability will be calculated, impressions for existing ads with a \"lower\" priority than this will be considered available. This does not take into consideration ordering and filtering done at the site or channel level.\n"
                      },
                      "PriorityId": {
                        "type": "integer",
                        "description": "The ID of a [Kevel Priority](https://dev.kevel.com/docs/priorities) at which availability will be calculated, impressions for existing ads with a \"lower\" priority than this will be considered available.\n"
                      },
                      "NewAds": {
                        "type": "array",
                        "description": "The new ad or ads to consider in the availability request.\n",
                        "items": {
                          "allOf": [
                            {
                              "title": "New Ad",
                              "type": "object",
                              "properties": {
                                "Id": {
                                  "type": "integer",
                                  "description": "The id of the ad.",
                                  "example": 123337
                                },
                                "StartDate": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The start date of the ad, in UTC.\n",
                                  "example": null
                                },
                                "EndDate": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The end date of the ad, in UTC.\n",
                                  "example": null
                                },
                                "FrequencyCap": {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "Type": {
                                          "type": "number",
                                          "enum": [
                                            1,
                                            2,
                                            3
                                          ],
                                          "description": "The unit of the frequency cap:\n\n  * _1_: Hour\n  * _2_: Day\n  * _3_: Minute\n"
                                        },
                                        "Duration": {
                                          "type": "number",
                                          "description": "How long the frequency cap should apply.\n"
                                        },
                                        "Value": {
                                          "type": "number",
                                          "description": "The cap of the frequency cap.\n"
                                        }
                                      }
                                    },
                                    {
                                      "example": {
                                        "Type": 1,
                                        "Duration": 20,
                                        "Value": 2
                                      }
                                    }
                                  ]
                                },
                                "Flight": {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "Id": {
                                          "type": "number",
                                          "description": "The id of the flight.\n",
                                          "example": 346
                                        },
                                        "StartDate": {
                                          "type": "string",
                                          "format": "date-time",
                                          "description": "The start date of the flight, in UTC.\n",
                                          "example": "2022-11-17T00:00:00"
                                        },
                                        "EndDate": {
                                          "type": "string",
                                          "format": "date-time",
                                          "description": "The end date of the flight, in UTC.\nRequired for any `GoalType` other than Percentage, Daily Revenue or Monthly Revenue.\n",
                                          "example": "2022-11-20T23:59:59"
                                        },
                                        "TimeZone": {
                                          "default": "UTC",
                                          "type": "string",
                                          "description": "The flight's time zone to be used for the flight's daily caps, daily goals, and day parting (\n[available time zones](https://www.joda.org/joda-time/timezones.html)).\n"
                                        },
                                        "GoalType": {
                                          "type": "number",
                                          "enum": [
                                            1,
                                            2,
                                            3,
                                            7,
                                            8,
                                            9,
                                            10
                                          ],
                                          "description": "The metric used to pace the ads. Currently supported goal types are:\n\n  * _1_: Impressions\n  * _2_: Percentage\n  * _3_: Clicks\n  * _7_: Conversions\n  * _8_: Revenue\n  * _9_: Daily revenue\n  * _10_: Monthly revenue\n",
                                          "example": 2
                                        },
                                        "GoalAmount": {
                                          "type": "number",
                                          "description": "Maximum total of `GoalType` for all Ads related to Flight. This value can also be sent through the `Impressions` field, as that's its equivalent in the ad server Flight API. However, it will always be referenced to as `GoalAmount`.\n",
                                          "example": 150000
                                        },
                                        "RateType": {
                                          "type": "number",
                                          "enum": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5,
                                            6
                                          ],
                                          "description": "The field used to estimate the revenue you have made from your advertisers. Currently supported rate types are:\n\n  * _1_: Flat\n  * _2_: CPM\n  * _3_: CPC\n  * _4_: CPA View\n  * _5_: CPA Click\n  * _6_: CPA View & Click\n",
                                          "example": 2
                                        },
                                        "Price": {
                                          "type": "number",
                                          "description": "The amount an advertiser is paying you, based on the `RateType`.\nIt must be no less than 0, or it may be null.\n",
                                          "example": 100
                                        },
                                        "NetworkId": {
                                          "type": "number",
                                          "description": "The id of the network.\n",
                                          "example": 11379
                                        },
                                        "PriorityId": {
                                          "type": "number",
                                          "description": "The id of the priority.\n",
                                          "example": 221170
                                        },
                                        "KeywordTargeting": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "description": "The keyword targeting string representation, please head to [Keyword Logic](doc:keyword-logic) for more details.",
                                              "example": "keyword1,keyword2\nkeyword3\n!keyword1,keyword2"
                                            },
                                            {
                                              "type": "object",
                                              "description": "The keyword targeting set on the flight.\n",
                                              "properties": {
                                                "Include": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  }
                                                },
                                                "Exclude": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  }
                                                }
                                              },
                                              "example": {
                                                "Include": [
                                                  [
                                                    "keyword1",
                                                    "keyword2"
                                                  ],
                                                  [
                                                    "keyword3"
                                                  ]
                                                ],
                                                "Exclude": [
                                                  [
                                                    "keyword1",
                                                    "keyword2"
                                                  ]
                                                ]
                                              }
                                            }
                                          ]
                                        },
                                        "GeoTargeting": {
                                          "type": "array",
                                          "items": {
                                            "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Targeting/allOf/0/properties/GeoTargeting/items"
                                          },
                                          "description": "The location targeting set on the flight\n",
                                          "example": [
                                            {
                                              "CountryCode": "US"
                                            }
                                          ]
                                        },
                                        "DistanceTargeting": {
                                          "type": "array",
                                          "items": {
                                            "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Targeting/allOf/0/properties/DistanceTargeting/items"
                                          },
                                          "description": "The distance targeting set on the flight\n",
                                          "example": [
                                            {
                                              "Latitude": 41.40338
                                            }
                                          ]
                                        },
                                        "SiteZoneTargeting": {
                                          "type": "array",
                                          "items": {
                                            "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Targeting/allOf/0/properties/SiteZoneTargeting/items"
                                          },
                                          "description": "A list of site/zone targeting objects for the flight.\n"
                                        },
                                        "SegmentTargeting": {
                                          "type": "array",
                                          "items": {
                                            "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Targeting/allOf/0/properties/SegmentTargeting/items"
                                          },
                                          "description": "A list of user segment targeting objects for the flight.\n"
                                        },
                                        "CustomTargeting": {
                                          "type": "string",
                                          "description": "The custom targeting (Zerkel query) of the flight.\n"
                                        },
                                        "DayParting": {
                                          "type": "array",
                                          "items": {
                                            "allOf": [
                                              {
                                                "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Targeting/allOf/0/properties/DayParting/items"
                                              },
                                              {
                                                "example": {
                                                  "StartTime": "12:00:00",
                                                  "EndTime": "17:00:00",
                                                  "WeekDays": [
                                                    "SA",
                                                    "SU"
                                                  ]
                                                }
                                              }
                                            ]
                                          }
                                        },
                                        "FrequencyCap": {
                                          "allOf": [
                                            {
                                              "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/NewAds/items/allOf/0/properties/FrequencyCap/allOf/0"
                                            },
                                            {
                                              "example": {
                                                "Type": 1,
                                                "Duration": 20,
                                                "Value": 2
                                              }
                                            }
                                          ]
                                        },
                                        "Campaign": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "Id": {
                                                  "type": "number",
                                                  "description": "The id of the campaign.\n",
                                                  "example": 123456789
                                                },
                                                "FrequencyCap": {
                                                  "allOf": [
                                                    {
                                                      "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/NewAds/items/allOf/0/properties/FrequencyCap/allOf/0"
                                                    },
                                                    {
                                                      "example": {
                                                        "Type": 1,
                                                        "Duration": 20,
                                                        "Value": 2
                                                      }
                                                    },
                                                    {
                                                      "description": "The frequency cap to apply to all ads under the campaign.\n"
                                                    }
                                                  ]
                                                },
                                                "Advertiser": {
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "Id": {
                                                          "type": "number",
                                                          "description": "The id of the advertiser.\n",
                                                          "example": 123456789
                                                        },
                                                        "FrequencyCap": {
                                                          "allOf": [
                                                            {
                                                              "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/NewAds/items/allOf/0/properties/FrequencyCap/allOf/0"
                                                            },
                                                            {
                                                              "example": {
                                                                "Type": 1,
                                                                "Duration": 20,
                                                                "Value": 2
                                                              }
                                                            }
                                                          ]
                                                        },
                                                        "PlacementLimit": {
                                                          "type": "number",
                                                          "description": "The placement limit that limits how often ads from that advertiser will appear in an ad request.\n"
                                                        },
                                                        "CapType": {
                                                          "type": "number",
                                                          "enum": [
                                                            4
                                                          ],
                                                          "description": "Set to `CapType = 4` (Revenue). Advertisers can only budget cap on the revenue metric.\n"
                                                        },
                                                        "DailyCapAmount": {
                                                          "type": "number",
                                                          "description": "The maximum daily revenue.\n"
                                                        },
                                                        "LifetimeCapAmount": {
                                                          "type": "number",
                                                          "description": "The maximum lifetime revenue.\n"
                                                        }
                                                      }
                                                    },
                                                    {
                                                      "description": "The advertiser for the campaign.\n"
                                                    }
                                                  ]
                                                },
                                                "CapType": {
                                                  "type": "number",
                                                  "enum": [
                                                    4
                                                  ],
                                                  "description": "Set to `CapType = 4` (Revenue). Campaigns can only budget cap on the revenue metric.\n"
                                                },
                                                "DailyCapAmount": {
                                                  "type": "number",
                                                  "description": "The maximum daily revenue.\n"
                                                },
                                                "LifetimeCapAmount": {
                                                  "type": "number",
                                                  "description": "The maximum lifetime revenue.\n"
                                                }
                                              },
                                              "required": [
                                                "Id"
                                              ]
                                            },
                                            {
                                              "description": "Details of new campaign to be used by the flight.\n"
                                            }
                                          ]
                                        },
                                        "CapType": {
                                          "type": "number",
                                          "enum": [
                                            1,
                                            2,
                                            3,
                                            4
                                          ],
                                          "description": "The type of the cap:\n\n  * _1_: Impression\n  * _2_: Click\n  * _3_: Conversion\n  * _4_: Revenue\n"
                                        },
                                        "DailyCapAmount": {
                                          "type": "number",
                                          "description": "The maximum number of `CapType` per day.\n"
                                        },
                                        "LifetimeCapAmount": {
                                          "type": "number",
                                          "description": "The maximum number of `CapType` per lifetime.\n"
                                        },
                                        "DuplicateMode": {
                                          "type": "number",
                                          "enum": [
                                            1,
                                            2,
                                            3,
                                            4
                                          ],
                                          "description": "The type of the duplicate mode:\n\n  * _1_: Flight\n  * _2_: Campaign\n  * _3_: Advertiser\n  * _4_: Creative\n"
                                        },
                                        "EcpmOptimization": {
                                          "type": "object",
                                          "properties": {
                                            "Period": {
                                              "type": "number",
                                              "description": "Timeframe to optimize for [1 - 90 days].\n",
                                              "default": 7
                                            },
                                            "Multiplier": {
                                              "type": "number",
                                              "description": "The final eCPM will be multiplied by this amount.\n",
                                              "default": 1
                                            },
                                            "Floor": {
                                              "type": "number",
                                              "description": "Minimum eCPM.\n"
                                            },
                                            "Ceiling": {
                                              "type": "number",
                                              "description": "Maximum eCPM.\n"
                                            },
                                            "DefaultEcpm": {
                                              "type": "number",
                                              "description": "The eCPM that will be used while the Flight is in burn-in mode.\n"
                                            },
                                            "BurnIn": {
                                              "type": "number",
                                              "description": "Impressions per creative to show before using the calculated eCPM over the default eCPM.\n",
                                              "default": 2400
                                            }
                                          }
                                        },
                                        "EcpmOverride": {
                                          "type": "number",
                                          "description": "Sets a manual override to a flight's CPM, e.g. so a Flat Rate flight can compete in an auction priority.\n"
                                        },
                                        "SearchTerms": {
                                          "type": "array",
                                          "items": {
                                            "$ref": "#/paths/~1forecaster~1reserved-campaign~1{reservedCampaignId}/put/requestBody/content/application~1json/schema/properties/flights/items/properties/searchTerms/items"
                                          },
                                          "description": "Search term targeting rules for the flight. Please head to [Search Term Targeting](doc:search-term-targeting) for more details.\n"
                                        },
                                        "CategoryTargeting": {
                                          "type": "array",
                                          "items": {
                                            "$ref": "#/paths/~1forecaster~1reserved-campaign~1{reservedCampaignId}/put/requestBody/content/application~1json/schema/properties/flights/items/properties/categoryTargeting/items"
                                          },
                                          "description": "Category targeting rules for the flight. Please head to [Category Targeting](doc:category) for more details."
                                        },
                                        "BidModifiers": {
                                          "type": "array",
                                          "items": {
                                            "$ref": "#/paths/~1forecaster~1reserved-campaign~1{reservedCampaignId}/put/requestBody/content/application~1json/schema/properties/flights/items/properties/bidModifiers/items"
                                          },
                                          "description": "Bid modifiers to apply to the flight's effective price for matching ad requests.\nPlease head to [Bid Modifiers](doc:bid-modifiers) for more details.\n"
                                        },
                                        "isCompanion": {
                                          "type": "boolean",
                                          "default": false,
                                          "description": "Marks a companion flight. When true and one of the flight's ads wins a placement, the forecast co-allocates\nthe flight's other ads across the request's remaining placements.\n",
                                          "example": false
                                        }
                                      },
                                      "required": [
                                        "Id",
                                        "StartDate",
                                        "GoalType",
                                        "GoalAmount",
                                        "NetworkId",
                                        "PriorityId"
                                      ]
                                    },
                                    {
                                      "description": "Details of new flight to be used by the ad.\n"
                                    }
                                  ]
                                },
                                "Creative": {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "Id": {
                                          "type": "number",
                                          "description": "The id of the creative.\n",
                                          "example": 12234
                                        },
                                        "AdType": {
                                          "oneOf": [
                                            {
                                              "type": "number",
                                              "nullable": true,
                                              "example": 4649
                                            },
                                            {
                                              "type": "array",
                                              "nullable": true,
                                              "example": [
                                                4649,
                                                4650
                                              ],
                                              "items": {
                                                "type": "number"
                                              },
                                              "minItems": 1
                                            }
                                          ],
                                          "description": "The type of creative, which correlates to ad size. Setting to null is equivalent to a list with all types.\n"
                                        },
                                        "TemplateValues": {
                                          "type": "object",
                                          "description": "Creative Template Fields that can be queried via AdQuery.\nThis is a map of variable name to an object containing the fields `type` (string) and `value` (json).\nPlease head to [AdQuery documentation](doc:adquery) for more details.\n",
                                          "additionalProperties": {
                                            "x-additionalPropertiesName": "<VARIABLE-NAME>",
                                            "type": "object",
                                            "properties": {
                                              "Type": {
                                                "type": "string",
                                                "enum": [
                                                  "String",
                                                  "Number",
                                                  "Array"
                                                ],
                                                "description": "The type of the field.\n",
                                                "example": "Number"
                                              },
                                              "Value": {
                                                "oneOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  }
                                                ],
                                                "description": "The value of the field.\n",
                                                "example": 12345
                                              }
                                            }
                                          }
                                        },
                                        "SkipTemplateValues": {
                                          "type": "boolean",
                                          "default": false,
                                          "description": "When true, skips AdQuery filtering by ADRs.\n"
                                        }
                                      },
                                      "required": [
                                        "Id"
                                      ]
                                    },
                                    {
                                      "description": "Details of new creative to be used by the ad.\n"
                                    }
                                  ]
                                },
                                "Price": {
                                  "type": "number",
                                  "description": "The amount an advertiser is paying you, based on the Flight's `RateType`.\nIt must be no less than 0, or it may be null.\nWhen set, this value will take precedence over the Flight's price value for this Ad.\n",
                                  "example": 100
                                },
                                "ActiveKeywords": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "Active keywords for keyword targeting.\n",
                                  "example": null
                                },
                                "CustomTargeting": {
                                  "type": "string",
                                  "description": "A string for custom targeting using the [Zerkel Language](doc:zerkel-queries).\n",
                                  "example": "[\"order_confirmation\"] contains screen"
                                },
                                "SiteZoneTargeting": {
                                  "description": "Specific site and zone id targeting.\n",
                                  "type": "object",
                                  "properties": {
                                    "SiteId": {
                                      "type": "number",
                                      "example": 1121285
                                    },
                                    "ZoneId": {
                                      "type": "number",
                                      "example": 247884
                                    }
                                  },
                                  "example": {
                                    "SiteId": 1134156
                                  }
                                },
                                "SegmentTargeting": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Targeting/allOf/0/properties/SegmentTargeting/items"
                                  },
                                  "description": "A list of user segment targeting objects for the ad.\n"
                                },
                                "IsGoalOverride": {
                                  "type": "boolean",
                                  "example": true,
                                  "description": "Whether you are overriding the goal on the Ad.\n"
                                },
                                "GoalType": {
                                  "type": "number",
                                  "enum": [
                                    1,
                                    2,
                                    3,
                                    7,
                                    8,
                                    9,
                                    10
                                  ],
                                  "description": "If you are overriding the flight's goal, sets the target goal metric for the Ad.\nCurrently supported goal types are:\n\n  * _1_: Impressions\n  * _2_: Percentage\n  * _3_: Clicks\n  * _7_: Conversions\n  * _8_: Revenue\n  * _9_: Daily revenue\n  * _10_: Monthly revenue\n",
                                  "example": 2
                                },
                                "GoalAmount": {
                                  "type": "number",
                                  "description": "If you are overriding the flight's goal, sets the maximum total of `GoalType` for this Ad.\n",
                                  "example": 150000
                                },
                                "SearchTerms": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/paths/~1forecaster~1reserved-campaign~1{reservedCampaignId}/put/requestBody/content/application~1json/schema/properties/flights/items/properties/searchTerms/items"
                                  },
                                  "description": "Search term targeting rules for the ad. Please head to [Search Term Targeting](doc:search-term-targeting) for more details.\n"
                                },
                                "CategoryTargeting": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/paths/~1forecaster~1reserved-campaign~1{reservedCampaignId}/put/requestBody/content/application~1json/schema/properties/flights/items/properties/categoryTargeting/items"
                                  },
                                  "description": "Category targeting rules for ad. Please head to [Category Targeting](doc:category) for more details."
                                }
                              },
                              "required": [
                                "Id",
                                "Flight",
                                "Creative"
                              ]
                            }
                          ]
                        }
                      },
                      "Modifiers": {
                        "type": "object",
                        "description": "Manual Forecast Modifiers to apply to this forecast request. Currently, only Traffic Modifiers are supported. Traffic modifiers operate at the Ad Request level and make it possible to manually modify the volume of Ad Request in a certain date range and, optionally, that follow a targeting rule.\n",
                        "properties": {
                          "Traffic": {
                            "type": "array",
                            "description": "The Traffic Modifiers to apply, can be a `AdRequestCount`, `AdRequestMultiplier`, or `PlacementOpportunityRatio`.",
                            "items": {
                              "oneOf": [
                                {
                                  "$ref": "#/paths/~1forecaster~1modifiers~1traffic/post/requestBody/content/application~1json/schema/oneOf/0"
                                },
                                {
                                  "$ref": "#/paths/~1forecaster~1modifiers~1traffic/post/requestBody/content/application~1json/schema/oneOf/1"
                                },
                                {
                                  "$ref": "#/paths/~1forecaster~1modifiers~1traffic/post/requestBody/content/application~1json/schema/oneOf/2"
                                }
                              ]
                            }
                          }
                        }
                      },
                      "Params": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "Sampling": {
                                "default": 3,
                                "type": "integer",
                                "description": "The level of sampling to use (between 0 and 3). 3 provides the quickest response and 0 for the highest accuracy. By default this is set to 3.\n"
                              },
                              "Responsiveness": {
                                "default": 1,
                                "type": "integer",
                                "description": "The responsiveness level to use (between 0 and 3). 3 provides the quickest response at the expense of less intermediate results and 0 results in more intermediate results but at the expense of performance. By default this is set to 1.\n"
                              },
                              "GroupBy": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Break the forecast results down by the given `GroupBy` keys. Some caution should be used when choosing the `GroupBy` keys, as some keys may have thousands of possible values and can produce very large responses. For more details and the list of [available keys](ref:kevel-forecast-overview#group-by-fields), see this [section](ref:kevel-forecast-overview#grouping-by-and-time-zone-considerations).\nWhen grouping by fields that are arrays, the default behavior is to group by the whole set. Alternatively, it is possible to expand the elements of the array and group by each of them by suffixing the field name with `[]`, or by using the singular of the field (if it is one of the known array fields).\nIt's also possible to expand the key-value pairs of `$user.custom` by suffixing the field name with `{}`.\n",
                                "example": [
                                  "$datetime.dayofweek"
                                ]
                              },
                              "NotifyUrl": {
                                "type": "string",
                                "format": "url",
                                "description": "The URL for the forecast status update callback. The payload is documented in the \"callback\" section.\n",
                                "example": [
                                  "http://example.com/endpoint"
                                ]
                              },
                              "TimeZone": {
                                "default": "UTC",
                                "type": "string",
                                "description": "The time zone to use when grouping results with a time-related key ([available time zones](https://www.joda.org/joda-time/timezones.html)).\n"
                              },
                              "DynamicMultiWinnerImpressionRatio": {
                                "type": "boolean",
                                "nullable": true,
                                "description": "Warning: Using a different value other than the default will substantially increase the forecast duration, only set this value when exploring different winner ratios.\nWhen undefined it uses the default value for the network.\nWhen `true` uses the projected impressions based on historical data instead of relying on a fixed ratio. Takes precedence over the `MultiWinnerImpressionRatio`.\n",
                                "example": null
                              },
                              "MultiWinnerImpressionRatio": {
                                "type": "number",
                                "nullable": true,
                                "description": "Warning: Using a different value other than the default will substantially increase the forecast duration, only set this value when exploring different winner ratios.\nWhen undefined it uses the default value for the network.\nA value from 0.0 to 1.0 that represents the ratio to select the percentage of winners for multi-winner requests.\nThe ratio is applied to the Placement's `count` and rounded up to the nearest value. The resulting value is clamped between 1 and the placement's count. e.g., for a ratio of 0, the maximum number of opportunities to consider for that placement will be 1.\n",
                                "example": null
                              },
                              "Include": {
                                "type": "object",
                                "description": "Request additional data to be included in the forecast results.\n",
                                "properties": {
                                  "Events": {
                                    "type": "array",
                                    "items": {
                                      "type": "number",
                                      "enum": [
                                        1,
                                        2,
                                        3
                                      ]
                                    },
                                    "description": "A list of custom event ids to include in the forecast results. By default, no custom events are included. Currently, supported event types are:\n  * _1_: View Conversion\n  * _2_: Click Conversion\n  * _3_: Server to Server Conversion\n",
                                    "example": [
                                      3
                                    ]
                                  },
                                  "Metrics": {
                                    "type": "object",
                                    "description": "Per-metric aggregations to compute over winning ads. The key is a user-chosen name that\nappears verbatim in the response under each result block's `metrics` map. Currently, supports only\n`winningBid`.\n",
                                    "additionalProperties": {
                                      "title": "Metric Specification",
                                      "type": "object",
                                      "description": "Defines a single metric to compute. `rateType` is required when `source == winningBid`.\n",
                                      "required": [
                                        "source",
                                        "aggregation"
                                      ],
                                      "properties": {
                                        "source": {
                                          "type": "string",
                                          "enum": [
                                            "winningBid"
                                          ],
                                          "description": "The metric source.\n* _winningBid_: the bid price of winning ads, filtered by `rateType`.\n"
                                        },
                                        "rateType": {
                                          "type": "integer",
                                          "enum": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5,
                                            6
                                          ],
                                          "description": "Kevel rate-type encoding. Required when `source == winningBid`.\n\n* _1_: Flat\n* _2_: CPM\n* _3_: CPC\n* _4_: CPAView\n* _5_: CPAClick\n* _6_: CPABoth\n"
                                        },
                                        "aggregation": {
                                          "type": "string",
                                          "enum": [
                                            "avg"
                                          ],
                                          "description": "Aggregation kind. Currently, only `avg` is supported.\n"
                                        }
                                      }
                                    },
                                    "example": {
                                      "winningBidCPM": {
                                        "source": "winningBid",
                                        "rateType": 2,
                                        "aggregation": "avg"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "BookedBy": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "advertiser",
                                    "campaign",
                                    "flight",
                                    "ad"
                                  ]
                                },
                                "description": "Shows the available forecast **booked** results by a subset of `advertiser`, `campaign`, `flight` or `ad`. If more than one element is specified, the results are shown in a hierarchical tree.\n",
                                "example": [
                                  [
                                    "advertiser",
                                    "flight"
                                  ],
                                  "flight"
                                ]
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "ResultsBy": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "advertiser",
                                    "campaign",
                                    "flight",
                                    "ad"
                                  ]
                                },
                                "description": "Shows the forecast results by a subset of `advertiser`, `campaign`, `flight` or `ad`. If more than one element is specified, the results are shown in a hierarchical tree.\nIf any of the `NewAds` are missing advertiser or campaign ids, then `ResultsBy` should include at least one of the non-missing levels - in this case, missing ids will be shown as `-1` in the hierarchical tree.\n",
                                "example": [
                                  [
                                    "advertiser",
                                    "flight"
                                  ],
                                  "flight"
                                ]
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "FilterGroupBy": {
                                "type": "string",
                                "description": "Filter the forecast grouped results breakdown by the given rule (Zerkel query) at the inventory level.\nThis rule operates on the following set of numeric fields for the Available forecast type: `impressions`,\n`clicks`, `uniqueUsers`, `bookedImpressions`, `bookedClicks` and `bookedUniqueUsers`. These fields\nact over the total results of each group-by group - for example, a rule `impressions > 10` will filter\nall groups with less than 10 total available impressions out. An extra key, `groupedFiltered`, is added to\nthe forecast result containing all the results that were filtered out by the rule. If used in combination\nwith the `ResultsBy` parameter, the `advertiser`, `campaign` and `flight` levels won't include the\n`uniqueUsers`count.\n",
                                "example": "bookedImpressions < 100 and bookedUniqueUsers < 100 or impressions >= 1000"
                              }
                            }
                          }
                        ]
                      }
                    }
                  },
                  {
                    "title": "Deliverable Forecast Request",
                    "type": "object",
                    "description": "A request to perform a deliverability forecast, returning counts for clicks, impressions, revenue, unique users, and custom events for the `NewAds` specified.\nA deliverability forecast simulates how a new set of ads will run, taking into account and competing against all ads already running in the network (i.e., the result will consider the fact the `NewAds` may consume impressions away from existing campaigns).\n",
                    "required": [
                      "Type",
                      "EndDate",
                      "NewAds"
                    ],
                    "properties": {
                      "Type": {
                        "type": "string",
                        "enum": [
                          "deliverable"
                        ]
                      },
                      "EndDate": {
                        "type": "string",
                        "format": "date-time",
                        "description": "End date for results of the deliverable forecast, must be after current date, as `yyyy-mm-dd'T'HH:mm:SS` or `yyyy-mm-dd` (default time of `23:59:59`), in the passed `TimeZone` or UTC if omitted.\n",
                        "example": "2022-11-17"
                      },
                      "NewAds": {
                        "type": "array",
                        "description": "The new ad or ads to consider in the deliverability request.\n",
                        "items": {
                          "allOf": [
                            {
                              "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/NewAds/items/allOf/0"
                            }
                          ]
                        }
                      },
                      "Modifiers": {
                        "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Modifiers"
                      },
                      "Params": {
                        "allOf": [
                          {
                            "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Params/allOf/0"
                          },
                          {
                            "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Params/allOf/2"
                          },
                          {
                            "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/2/properties/Params/allOf/2"
                          }
                        ]
                      }
                    }
                  },
                  {
                    "title": "Existing Forecast Request",
                    "type": "object",
                    "description": "A request to perform a forecast for all existing running ads, i.e., the total predicted amount of clicks, impressions, revenue, unique users, and custom events for all running ads in the network.\n",
                    "properties": {
                      "Type": {
                        "type": "string",
                        "enum": [
                          "existing"
                        ]
                      },
                      "EndDate": {
                        "type": "string",
                        "format": "date-time",
                        "description": "End date for results of the existing forecast, must be after current date, as `yyyy-mm-dd'T'HH:mm:SS` or `yyyy-mm-dd` (default time of `23:59:59`), in the passed `TimeZone` or UTC if omitted.\n",
                        "example": "2022-11-17"
                      },
                      "Modifiers": {
                        "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Modifiers"
                      },
                      "Params": {
                        "allOf": [
                          {
                            "$ref": "#/paths/~1forecaster/post/requestBody/content/application~1json/schema/oneOf/0/properties/Params/allOf/0"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "ResultsBy": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "advertiser",
                                    "campaign",
                                    "flight",
                                    "ad"
                                  ]
                                },
                                "description": "Shows the forecast results by a subset of `advertiser`, `campaign`, `flight` or `ad`. If more than one element is specified, the results are shown in a hierarchical tree.\n",
                                "example": [
                                  [
                                    "advertiser",
                                    "flight"
                                  ],
                                  "flight"
                                ]
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "FilterGroupBy": {
                                "type": "string",
                                "description": "Filter the forecast grouped results breakdown by the given rule (Zerkel query) at the ad level.\nThis rule operates on the following set of numeric fields for the Deliverable and Existing forecast types:\n`impressions`, `clicks`, `uniqueUsers`, `adId`, `flightId`, `campaignId` and `advertiserId`. Additionally,\nthe following fields are available for filtering reserved campaigns: `reservedAdId`, `reservedFlightId` and\n`reservedCampaignId`. These fields act over the results of each ad in the group-by group - for example, a\nrule `impressions > 10` will filter all ads with less than 10 available impressions out. An extra key,\n`groupedFiltered`, is added to the forecast result containing all the ads that were filtered out by the\nrule. If used in combination with the `ResultsBy` parameter, the `advertiser`, `campaign` and `flight`\nlevels won't include the `uniqueUsers` count.\n",
                                "example": "bookedImpressions < 100 and bookedUniqueUsers < 100 or impressions >= 1000"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "required": [
                      "Type",
                      "EndDate"
                    ]
                  }
                ]
              }
            }
          }
        },
        "callbacks": {
          "Forecast status update": {
            "{$request.body#/params/notifyUrl}": {
              "post": {
                "summary": "This notification is emitted when the forecast transitions to a final state.",
                "requestBody": {
                  "description": "The callback notification body.",
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The id of the requested forecast. It must be used when querying for the forecast results.\n",
                            "example": "1978ad40-97da-403e-ad5d-c3e71c75a593"
                          },
                          "timestamp": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The time at which this notification was emitted - a UTC datetime. Example: `2024-01-25T12:30:09.985Z`.\n",
                            "example": "2024-01-25T12:30:09.985Z"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "enqueued",
                              "started",
                              "cancelled",
                              "partial",
                              "finished",
                              "failed"
                            ],
                            "description": "The status of the forecast execution. Currently, the only possible values are `finished` and `failed`.\n",
                            "example": "finished"
                          },
                          "desc": {
                            "type": "string",
                            "description": "A textual description of the forecast execution status.\n",
                            "example": "Forecast is finished"
                          }
                        }
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "Notification successfully received."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The forecast request was accepted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/paths/~1forecaster~1{Id}/get/responses/200/content/application~1json/schema"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error response, containing error message.",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Error Response",
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string",
                      "example": "The request content was malformed:\nError at '.': The end date of a forecast must be after start date."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/forecaster/{Id}": {
      "delete": {
        "tags": [
          "Forecast"
        ],
        "summary": "Deletes a forecast",
        "description": "Deletes a forecast that was previously executed or cancels a forecast that is running or queued.",
        "parameters": [
          {
            "name": "Id",
            "in": "path",
            "required": true,
            "description": "The forecast id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Information about deleted forecast.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "cancelled": {
                    "value": {
                      "message": "Forecast cancelled"
                    }
                  },
                  "removed": {
                    "value": {
                      "message": "Forecast removed"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error response, containing error message (e.g. the forecast id is not a valid UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1forecaster/post/responses/400/content/application~1json/schema"
                }
              }
            }
          },
          "404": {
            "description": "Forecast key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1forecaster/post/responses/400/content/application~1json/schema"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "message": "Forecast key not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Adzerk-ApiKey"
      }
    }
  }
}
```