---
title: "Update reserved campaign"
method: PUT
path: "/forecaster/reserved-campaign/{reservedCampaignId}"
tags: ["Reserved Campaigns"]
---

# Update reserved campaign

`PUT /forecaster/reserved-campaign/{reservedCampaignId}`

Fully replace an existing reserved campaign with the provided data.
All required fields must be provided.

**Important: ID handling for flights and ads**

- The campaign `id` is required and must match the path parameter.
- Flights and ads **with an `id`**: Will be updated in-place if the ID exists.
- Flights and ads **without an `id`**: Will be created as new entities with auto-generated IDs.
- Existing flights and ads **not included** in the request: Will be **deleted**.

This means the PUT operation performs a full replacement of the reserved campaign structure.
To preserve existing flights or ads, you must include them in the request with their respective IDs.

## Request body

- object — A reserved campaign represents a campaign that is reserved (or booked) for a specific advertiser. It is used to forecast how reserved campaigns will impact future inventory availability.
  - `id` integer — Unique identifier of the reserved campaign. Auto-generated on creation (do not include when creating). Required when updating via PUT.
  - `name` string, required — The name of the reserved campaign.
  - `status` 'reserved' | 'booked' — The status of the campaign: * _reserved_: The campaign is reserved but not yet booked. * _booked_: The campaign has been confirmed and booked so it will not be considered as a reservation in the forecasts.
  - `description` string, nullable — An optional description of the reserved campaign.
  - `salesProbabilityWeight` integer, required — A weight (0-100) representing the probability that this reserved campaign will convert to a booked campaign.
  - `advertiser` object, required — The advertiser associated with the reserved campaign.
    - `id` integer, required — The unique identifier of the advertiser. Must be an existing advertiser.
    - `frequencyCap` FrequencyCap — unresolved $ref
    - `placementLimit` integer, nullable — Maximum number of placements for this advertiser.
    - `caps` object, nullable — Ad caps for the advertiser.
  - `capType` 1 | 2 | 3 | 4, nullable — The type of cap: * _1_: Impressions * _2_: Clicks * _3_: Conversions * _4_: Revenue
  - `dailyCapAmount` integer, nullable — The daily cap amount (based on capType).
  - `lifetimeCapAmount` integer, nullable — The lifetime cap amount (based on capType).
  - `frequencyCap` object, nullable — Configuration for limiting ad frequency to users.
    - `type` 1 | 2 | 3, required — The time unit for the frequency cap: * _1_: Hour * _2_: Day * _3_: Minute
    - `duration` integer, required — The number of time units for the cap period.
    - `value` integer, required — The maximum number of impressions allowed within the duration.
  - `flights` object[], required — The flights associated with this reserved campaign. At least one flight is required.
    - `id` integer — Unique identifier of the flight. Auto-generated on creation (do not include when creating). When updating via PUT: include to update in-place, omit to create as new.
    - `priorityId` integer, required — The ID of the priority level for this flight.
    - `rate` object, required — The rate configuration for billing.
      - `rateType` 1 | 2 | 3 | 4 | 5 | 6, required — The type of rate: * _1_: Flat * _2_: CPM (Cost Per Mille/Thousand Impressions) * _3_: CPC (Cost Per Click) * _4_: CPA View (Cost Per Action - View) * _5_: CPA Click (Cost Per Action - Click) * _6_: CPA Both (Cost Per Action - Both)
      - `price` number, required — The price amount for the rate.
    - `keywordTargeting` string, nullable — Keyword targeting rules. Please head to [Keyword Logic](https://dev.kevel.com/docs/keyword-logic) for more details.
    - `siteZoneTargeting` Items[], nullable — unresolved $ref
    - `geoTargeting` Items[], nullable — unresolved $ref
    - `distanceTargeting` Items[], nullable — unresolved $ref
    - `customTargeting` string, nullable — A string for custom targeting using the [Zerkel Language](https://dev.kevel.com/docs/zerkel-queries).
    - `duplicateMode` DuplicateMode — unresolved $ref
    - `ads` object[], required — The ads associated with this flight. At least one ad is required.
      - `id` integer — Unique identifier of the ad. Auto-generated on creation (do not include when creating). When updating via PUT: include to update in-place, omit to create as new.
      - `adType` integer, required — The ad type ID.
    - `segmentTargeting` object[], nullable — Segment-based audience targeting.
      - `segmentId` integer, required — The ID of the audience segment to target.
      - `isExclude` boolean — Whether to exclude (true) or include (false) users in this segment.
    - `startDate` string, date-time, required — The start date and time of the flight.
    - `endDate` string, date-time, nullable — The end date and time of the flight. Required for goal types other than Percentage (2), Daily Revenue (9), or Monthly Revenue (10). Must be after the start date and after the current date.
    - `timeZone` string — The time zone for the flight's schedule.
    - `goalType` 1 | 2 | 3 | 7 | 8 | 9 | 10, required — The type of goal for this flight: * _1_: Impressions * _2_: Percentage * _3_: Clicks * _7_: Conversions * _8_: Revenue * _9_: Daily Revenue * _10_: Monthly Revenue
    - `goalAmount` integer, required — The target amount for the goal (e.g., number of impressions, percentage, etc.).
    - `capType` CapType — unresolved $ref
    - `dailyCapAmount` DailyCapAmount — unresolved $ref
    - `lifetimeCapAmount` LifetimeCapAmount — unresolved $ref
    - `frequencyCap` FrequencyCap — unresolved $ref
    - `searchTerms` Items[], nullable — Search term targeting rules. Please head to [Search Term Targeting](https://dev.kevel.com/docs/search-term-targeting) for more details. — unresolved $ref
    - `bidModifiers` Items[], nullable — Bid modifiers to apply to the flight's effective price for matching ad requests. Please head to [Bid Modifiers](https://dev.kevel.com/docs/bid-modifiers) for more details. — unresolved $ref

## Response `200`

Normal response, containing the updated JSON object with the reserved campaign, if successful.

- Schema — unresolved $ref

## Other responses

- `400` — The entity in the body is invalid.
- `404` — The entity doesn't exist.

---

[API](https://skmtc.net/kevel/apis/engine-apis.md) · [All operations](https://skmtc.net/kevel/apis/engine-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kevel/engine-apis/revisions/0ca55f45aa7d/schema)
