---
title: "Run and Update Forecast for Given New Strategy Plan"
method: POST
path: "/new_strategy_plans/{strategy_plan_id}/forecast"
tags: ["New Strategy Plans"]
---

# Run and Update Forecast for Given New Strategy Plan

`POST /new_strategy_plans/{strategy_plan_id}/forecast`

## Request

- Base URL: `https://api.mediamath.com/api/v3.0`
- URL: `https://api.mediamath.com/api/v3.0/new_strategy_plans/{strategy_plan_id}/forecast`
- Auth: OAuth 2
  - Authorization code: `https://auth.mediamath.com/authorize`
  - Token URL: `https://auth.mediamath.com/oauth/token` scopes: `offline_access`, `manage:services`
- TypeScript: <https://skmtc.dev/mediamath/apis/campaigns-api/docs/new_strategy_plans/:strategy_plan_id/forecast/post.ts> (a function with typed inputs; its response is checked against the schema)

Run and update forecast for given new strategy plan ID

## Path parameters

- `strategy_plan_id` integer, required

## Response `200`

New strategy plan response

- object
  - `data` object: New Strategy Plan
    - `campaign_start_date` string, date-time
    - `campaign_end_date` string, date-time
    - `campaign_zone_name` string
    - `name` string
    - `feature_compatibility` string
    - `device_graph_only` boolean
    - `zone_name` string
    - `campaign_service_type` string
    - `type` string
    - `duration` StrategyPlanDuration
      - `use_campaign_start` boolean
      - `use_campaign_end` boolean
      - `start_date` string, date-time, nullable
      - `end_date` string, date-time, nullable
    - `budget` StrategyPlanBudget
      - `budget` number, float, nullable: Must be a valid float between 1 and 10000000 USD or its equivalent in other currency.
      - `currency_code` string
    - `goals` StrategyPlanGoals
      - `goal_type` 'spend' | 'reach' | 'cpc' | 'cpe' | 'cpa' | 'roi' | 'ctr' | 'vcr' | 'viewability_rate' | 'vcpm' | ''
      - `goal_value` number, float
      - `min_bid` number, float
      - `max_bid` number, float
      - `roi_target` number, double, nullable
      - `bid_min_devices` integer, nullable
      - `bid_aggressiveness` integer
      - `bid_price_is_media_only` boolean
      - `max_bid_wm` number, float, nullable
      - `use_bid_shading` boolean
    - `frequency` StrategyPlanFrequency
      - `frequency_type` 'even' | 'asap' | 'no-limit' | 't1-optimized', nullable
      - `frequency_interval` 'hour' | 'day' | 'week' | 'month' | 'campaign' | 'not-applicable'
      - `frequency_amount` integer
      - `frequency_optimization` boolean
    - `inventory` StrategyPlanInventory
      - `run_on_all_pmp` boolean, required
      - `run_on_all_exchanges` boolean, required
      - `site_restriction_transparent_urls` boolean
      - `domain_restrictions` object
        - `include` DomainRestriction[]
          - `domain` string, required
          - `target_type` 'DOMAIN' | 'APP', required
        - `exclude` DomainRestriction[]
          - `domain` string, required
          - `target_type` 'DOMAIN' | 'APP', required
      - `site_lists` SiteList[]
        - `site_list_id` integer, required
        - `assigned` boolean, required
      - `deals` Deal[]
        - `deal_id` integer, required
      - `deal_groups` DealGroup[]
        - `deal_group_id` integer, required
      - `supply_sources` SupplySource[]
        - `supply_source_id` integer, required
    - `targeting` StrategyPlanTargeting
      - `fold_position` string[], nullable
      - `audience` object
        - `include` object[]
          - `operator` 'AND' | 'OR'
          - `segments` StrategyAudienceSegment[]
            - `audience_segment_id` integer, required
            - `user_cpm` number, float, nullable: user_cpm is stored in the currency of the campaign and will not fluctuate with daily exchange rates.
        - `exclude` object
          - `operator` 'AND' | 'OR'
          - `segments` StrategyAudienceSegment[]
            - `audience_segment_id` integer, required
            - `user_cpm` number, float, nullable: user_cpm is stored in the currency of the campaign and will not fluctuate with daily exchange rates.
      - `contextual` object
        - `include` object[]
          - `code` string
          - `operator` 'AND' | 'OR'
          - `segments` StrategyContextualSegment[]
            - `targeting_segment_id` integer, required
            - `user_cpm` number, float, nullable: user_cpm is stored in the currency of the campaign and will not fluctuate with daily exchange rates.
        - `exclude` object
          - `code` string
          - `operator` 'AND' | 'OR'
          - `segments` StrategyContextualSegment[], required
            - `targeting_segment_id` integer, required
            - `user_cpm` number, float, nullable: user_cpm is stored in the currency of the campaign and will not fluctuate with daily exchange rates.
      - `postal_codes` TargetingPostalCodes
        - `restriction` string
        - `codes` string[]
      - `geofence` object
        - `include` StrategyGeofence
          - `operator` 'AND' | 'OR'
          - `segments` object[]
            - `geofence_segment_id` integer
            - `geofence_segment_factual_id` string
            - `place_list_id` integer
        - `exclude` StrategyGeofence
          - `operator` 'AND' | 'OR'
          - `segments` object[]
            - `geofence_segment_id` integer
            - `geofence_segment_factual_id` string
            - `place_list_id` integer
      - `my_data` object
        - `include` StrategyMyData
          - `operator` 'AND' | 'OR'
          - `pixels` object[], required
            - `pixel_id` integer, required
        - `exclude` StrategyMyData
          - `operator` 'AND' | 'OR'
          - `pixels` object[], required
            - `pixel_id` integer, required
      - `location` object
        - `include` StrategyLocation[]
          - `operator` 'AND' | 'OR'
          - `target_value_id` integer, required
          - `code` 'DMAX' | 'REGN' | 'CITY' | 'COUNTRY', required
        - `exclude` StrategyLocation[]
          - `operator` 'AND' | 'OR'
          - `target_value_id` integer, required
          - `code` 'DMAX' | 'REGN' | 'CITY' | 'COUNTRY', required
      - `technology` object
        - `include` StrategyTechnology[]
          - `operator` 'AND' | 'OR'
          - `code` 'BSER' | 'CSPD' | 'DVCE' | 'ISPX' | 'OSXX' | 'INVT' | 'VPSZ' | 'VLIN' | 'VCON' | 'VAUD' | 'VSKP' | 'VPLC' | 'DVMD' | 'BRLG' | 'IPTA' | 'HYPL', required
          - `target_value_id` integer, required
        - `exclude` StrategyTechnology[]
          - `operator` 'AND' | 'OR'
          - `code` 'BSER' | 'CSPD' | 'DVCE' | 'ISPX' | 'OSXX' | 'INVT' | 'VPSZ' | 'VLIN' | 'VCON' | 'VAUD' | 'VSKP' | 'VPLC' | 'DVMD' | 'BRLG' | 'IPTA' | 'HYPL', required
          - `target_value_id` integer, required
      - `ip_addresses` TargetingIpAddresses
        - `restriction` 'INCLUDE' | 'EXCLUDE' | ''
        - `codes` string[]
      - `day_parts` DayPart[]
        - `user_time` boolean: Defaults to true. true evaluates the hours in the user's local time; false evaluates them in EST.
        - `start_hour` integer, required: Inclusive start hour, from 0 through 23. 10 means the window starts at 10:00.
        - `end_hour` integer, required: Inclusive end hour, from 0 through 23. 10 means the last hour included is 10:00-10:59, so the window ends at 10:59.
        - `days` string[], required: Days of the week as single-letter codes. M Monday, T Tuesday, W Wednesday, R Thursday, F Friday, S Saturday, U Sunday.
      - `recency` object[]
        - `pixel_id` integer, required
        - `from_hour` integer, required
        - `to_hour` integer, required
      - `language_codes` object[]
        - `code` string
        - `name` string
    - `creatives` StrategyPlanCreatives
      - `ad_expandable` boolean, nullable, required
      - `ad_formats` string[], nullable, required
      - `ad_sizes` string[], nullable, required
    - `id` integer
    - `version` integer
    - `campaign_id` integer
  - `meta` object
    - `status` string

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response

---

[API](https://skmtc.dev/mediamath/apis/campaigns-api.md) - [All operations](https://skmtc.dev/mediamath/apis/campaigns-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mediamath/apis/campaigns-api/revisions/408743891def?raw)
