---
updatedAt: 2025-06-09T21:53:01.000Z
agentTools:
  projectIndex: https://developers.kayzen.io/llms.txt
---

# Update Campaign

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "kayzen-oauth",
    "version": "1.3.1"
  },
  "servers": [
    {
      "url": "https://api.kayzen.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/campaigns/{id}": {
      "patch": {
        "summary": "Update Campaign",
        "description": "",
        "operationId": "update-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "description": "Campaign Data",
                    "properties": {
                      "campaign": {
                        "type": "object",
                        "properties": {
                          "skip_budget_overspend_warning": {
                            "type": "boolean",
                            "description": "Set this parameter to `true` to bypass the error response identified by the key `budget_overspend_risks`. This error response returns an array that may include one or more of the following risk codes:<br /><br /> - <strong>HIGH_TARGET_BID_WITH_DAILY_BUDGET_TOO_LOW</strong><br />This error appears for CPM/CPC campaigns only when the target CPM/CPC is high and the daily budget is relatively low for the target bid. The recommended budget is:<br />a. `Target CPM/CPC between $5 - $20`: We recommend daily budget at least 2x the target bid.<br />b. `Target CPM/CPC > $20`: We recommend daily budget at least 5x the target bid.<br /><br />Ex. If your target CPM is $10 and your daily budget is $10, you will see this warning, recommending you a daily budget of 2X of $10 CPM which is $20.<br /><br /> - <strong>OPEN_TARGETING</strong><br />When a campaign has All countries targeted or does not have an audience white-listed.<br /><br /> - <strong>HIGH_TARGET_BID_TARGETING_BROAD_INVENTORY</strong><br />An error triggered when there is no applist or no audience, or no IP white-listed in the campaigns and on below mentioned conditions:<br />a. `CPM/CPC`: Campaign with target CPM/CPC >$5<br />b. `CPI/CPA/CPA-RT`: Campaign with target bid >$200.",
                            "default": false
                          },
                          "title": {
                            "type": "string",
                            "description": "Campaign name"
                          },
                          "start_time": {
                            "type": "string",
                            "description": "Start time, must be in the **future**, format:<br>**2023-08-30 10:46:22**"
                          },
                          "end_time": {
                            "type": "string",
                            "description": "End time, must be after **start_time**, format:<br>**2023-09-29 10:46:22**"
                          },
                          "timezone": {
                            "type": "integer",
                            "description": "[Timezone ID](/reference/timezone), **11** is **UTC**",
                            "format": "int32"
                          },
                          "max_bid": {
                            "type": "number",
                            "description": "Target CPM/CPC/CPI/CPA, depending on **optimization_type** and **advertiser settings**",
                            "format": "float"
                          },
                          "day_budget": {
                            "type": "integer",
                            "description": "Daily budget capping, $.<br />**Minimum** and **maximum** possible values depend on advertiser & order.<br />One of **day_budget** & **total_budget** is **required**",
                            "format": "int32"
                          },
                          "total_budget": {
                            "type": "integer",
                            "description": "Total budget capping, $.<br />**Minimum** and **maximum** possible values depend on advertiser & order.<br />One of **day_budget** & **total_budget** is **required**",
                            "format": "int32"
                          },
                          "optimization": {
                            "type": "object",
                            "description": "Spending optimization settings",
                            "properties": {
                              "app_diversity": {
                                "type": "string",
                                "description": "App Diversity",
                                "enum": [
                                  "on",
                                  "off"
                                ]
                              },
                              "app_budget_percentage": {
                                "type": "integer",
                                "description": "Required when App Diversity is on (app_diversity=on). Spend max this much % of budget on single bundle.",
                                "format": "int32"
                              },
                              "auto_blacklisting": {
                                "type": "boolean",
                                "description": "Auto Blacklisting"
                              },
                              "auto_exclusion": {
                                "type": "string",
                                "description": "Auto Exclusion",
                                "enum": [
                                  "on",
                                  "off"
                                ]
                              },
                              "exclusion_cap_value": {
                                "type": "integer",
                                "description": "Required when Auto Exclusion is On, exclude bundles with higher than this amount eCPI ($) after spending exclusion_sample_value",
                                "format": "int32"
                              },
                              "exclusion_sample_value": {
                                "type": "integer",
                                "description": "Required when Auto Exclusion is On, exclude bundles with higher than exclusion_cap_value eCPI after spending this amount ($)",
                                "format": "int32"
                              },
                              "bid_pacing": {
                                "type": "string",
                                "description": "Budget Pacing (for CPC, CPM, CPA campaigns only)",
                                "enum": [
                                  "yes",
                                  "no"
                                ]
                              },
                              "bidshading_enabled": {
                                "type": "boolean",
                                "description": "Bid Shading (for CPA, CPI, CPC, CPM campaigns)"
                              },
                              "creative_rotation": {
                                "type": "boolean",
                                "description": "Creative Rotation (also known as Creative Optimization)"
                              },
                              "serving_unknown_device": {
                                "type": "string",
                                "description": "Device identifier: disabled means Present, only means Missing, enabled means Both Present & Missing",
                                "enum": [
                                  "enabled",
                                  "disabled",
                                  "only"
                                ]
                              },
                              "cpi_algo_state_allowed": {
                                "type": "string",
                                "description": "Enable App Diversity for these CPI Algo states (for CPI campaign). \"exploit\" for Optimize, \"explore\" for Explore",
                                "enum": [
                                  "both",
                                  "exploit",
                                  "explore"
                                ]
                              }
                            }
                          },
                          "tags_ids": {
                            "type": "array",
                            "description": "Tag IDs",
                            "items": {
                              "type": "integer",
                              "format": "int32"
                            }
                          },
                          "comments": {
                            "type": "string",
                            "description": "Comments"
                          },
                          "deal_id": {
                            "type": "array",
                            "description": "Array of deal IDs",
                            "items": {
                              "type": "string"
                            }
                          },
                          "day_parting": {
                            "type": "object",
                            "description": "On which days and which hours to run the campaign (in the campaign's timezone)",
                            "properties": {
                              "mon": {
                                "type": "string",
                                "description": "Hours, during which to run campaign on Monday, comma separated, e.g., \"10,11,12,13,14,15\""
                              },
                              "tue": {
                                "type": "string",
                                "description": "Hours, during which to run campaign on Tuesday, comma separated, e.g., \"10,11,12,13,14,15\""
                              },
                              "wed": {
                                "type": "string",
                                "description": "Hours during which to run campaign on Wednesday, comma separated, e.g., \"10,11,12,13,14,15\""
                              },
                              "thu": {
                                "type": "string",
                                "description": "Hours, during which to run campaign on Thursday, comma separated, e.g., \"10,11,12,13,14,15\""
                              },
                              "fri": {
                                "type": "string",
                                "description": "Hours, during which to run campaign on Friday, comma separated, e.g., \"10,11,12,13,14,15\""
                              },
                              "sat": {
                                "type": "string",
                                "description": "Hours, during which to run campaign on Saturday, comma separated, e.g., \"10,11,12,13,14,15\""
                              },
                              "sun": {
                                "type": "string",
                                "description": "Hours, during which to run campaign on Sunday, comma separated, e.g., \"10,11,12,13,14,15\""
                              }
                            }
                          },
                          "impression_pacing": {
                            "type": "string",
                            "description": "Impression Pacing<br />- `yes` for Even<br/>- `no` for No",
                            "enum": [
                              "yes",
                              "no"
                            ]
                          },
                          "impression_interval": {
                            "type": "integer",
                            "description": "Impression Interval per User, minimum minutes between impressions per user, default **0** max **1440**",
                            "format": "int32"
                          },
                          "click_pacing": {
                            "type": "string",
                            "description": "Click Pacing<br />- `yes` for Even<br/>- `no` for No",
                            "enum": [
                              "yes",
                              "no"
                            ]
                          },
                          "limit_max_bid": {
                            "type": "boolean",
                            "description": "Limit Max Bid<br/>For CPC/CPI campaigns.<br/>If empty - default is `true`"
                          },
                          "first_price_bid_cap": {
                            "type": "number",
                            "description": "Max Bid, relevant and **required** for non-CPM campaigns. Applicable for both 1st Price and 2nd Price auction.<br /><br />If \"limit_max_bid\" is true and there is no set value for \"first_price_bid_cap\" in the campaign, the default value will as follows:<br />- `Image` - 15<br />- `HTML` - 15<br />- `Native` - 15<br />- `Video` - 40",
                            "format": "float"
                          },
                          "billing_type": {
                            "type": "string",
                            "description": "Billing type. Send null to remove",
                            "enum": [
                              "cpm",
                              "cpc",
                              "cpi",
                              "cpa"
                            ]
                          },
                          "billing_price": {
                            "type": "number",
                            "description": "Billing price. Required if billing_type is not null",
                            "format": "float"
                          },
                          "day_impression_budget": {
                            "type": "integer",
                            "description": "Daily impression capping.<br/>Minimum and maximum possible values depend on advertiser",
                            "format": "int32"
                          },
                          "total_impression_budget": {
                            "type": "integer",
                            "description": "Total impression capping.<br/>Minimum and maximum possible values depend on advertiser",
                            "format": "int32"
                          },
                          "day_click_budget": {
                            "type": "integer",
                            "description": "Daily click capping.<br/>Minimum and maximum possible values depend on advertiser",
                            "format": "int32"
                          },
                          "total_click_budget": {
                            "type": "integer",
                            "description": "Total click capping.<br/>Minimum and maximum possible values depend on advertiser",
                            "format": "int32"
                          },
                          "frequency_cap": {
                            "type": "object",
                            "description": "Frequency capping",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "Type",
                                "enum": [
                                  "none",
                                  "click",
                                  "impression"
                                ]
                              },
                              "count": {
                                "type": "integer",
                                "description": "Max number of clicks/impressions in a period",
                                "format": "int32"
                              },
                              "days": {
                                "type": "integer",
                                "description": "Number of days to count clicks/impression in. Use 999 for lifetime",
                                "format": "int32"
                              }
                            }
                          },
                          "geolocations": {
                            "type": "array",
                            "description": "Lat-Long coordinates with radius, within which to target devices",
                            "items": {
                              "properties": {
                                "latitude": {
                                  "type": "number",
                                  "description": "Latitude, from -90 to 90",
                                  "format": "double"
                                },
                                "longitude": {
                                  "type": "number",
                                  "description": "Longitude, from -180 to 180",
                                  "format": "double"
                                },
                                "radius": {
                                  "type": "number",
                                  "description": "Radius, miles. From 0.5 to 999 with 2 decimal points",
                                  "format": "float"
                                }
                              },
                              "type": "object"
                            }
                          },
                          "targeting": {
                            "type": "object",
                            "description": "More targeting options",
                            "properties": {
                              "countries": {
                                "type": "array",
                                "description": "Array of [Country IDs](/reference/countries) to include/exclude, depending on exclude_countries. Send string **all** for all",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "exclude_countries": {
                                "type": "boolean",
                                "description": "Whether to include or exclude countries"
                              },
                              "states": {
                                "type": "array",
                                "description": "[State IDs](/reference/states) to include/exclude, depending on exclude_states. Send **all** for all",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "exclude_states": {
                                "type": "boolean",
                                "description": "Whether to include or exclude states"
                              },
                              "cities": {
                                "type": "array",
                                "description": "[City IDs](/reference/cities) to include/exclude, depending on exclude_cities. Send string **all** for all",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "exclude_cities": {
                                "type": "boolean",
                                "description": "Whether to include or exclude cities"
                              },
                              "zip": {
                                "type": "array",
                                "description": "Zipcodes. Exactly one country must be targeted for these to work correctly",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "exchanges": {
                                "type": "array",
                                "description": "[Exchange IDs](/reference/exchanges), on which to serve the campaign. Send string **all** for all",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "carriers": {
                                "type": "array",
                                "description": "[Cellular Carrier IDs](/reference/carriers) to target only when targeting cellular traffic. Send string **all** for all",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "os_versions": {
                                "type": "object",
                                "description": "[OS version IDs](/reference/os-versions) to target",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "Type",
                                    "enum": [
                                      "all",
                                      "range",
                                      "specific"
                                    ]
                                  },
                                  "versions": {
                                    "type": "array",
                                    "description": "Check Request Examples for different ways to target OS Versions",
                                    "items": {
                                      "properties": {
                                        "os_id": {
                                          "type": "integer",
                                          "description": "OS ID. 12 for iOS, 11 for Android",
                                          "format": "int32"
                                        },
                                        "values": {
                                          "type": "array",
                                          "description": "For os_versions.type=all/range use array of objects as it is described here. For os_versions.type=specific use array of integer OS version IDs. Check Request Examples",
                                          "items": {
                                            "properties": {
                                              "min": {
                                                "type": "integer",
                                                "description": "Minimum OS version. For os_versions.type=all use 0",
                                                "default": 0,
                                                "format": "int32"
                                              },
                                              "max": {
                                                "type": "integer",
                                                "description": "Maximum OS version. Use 999999999 for latest",
                                                "default": 999999999,
                                                "format": "int32"
                                              }
                                            },
                                            "type": "object"
                                          }
                                        }
                                      },
                                      "required": [
                                        "os_id"
                                      ],
                                      "type": "object"
                                    }
                                  }
                                }
                              },
                              "device_types": {
                                "type": "array",
                                "description": "Device type IDs to target. Send string **all** for all",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "manufacturers": {
                                "type": "array",
                                "description": "[Device manufacturer IDs](/reference/manufacturers) to target. Send string **all** for all",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "devices": {
                                "type": "array",
                                "description": "Device model IDs. Send string **all** for all",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "traffic_type": {
                                "type": "string",
                                "description": "Traffic type, inapp - App, wap - Mobile Web",
                                "enum": [
                                  "all",
                                  "inapp",
                                  "wap"
                                ]
                              },
                              "wifi_only": {
                                "type": "string",
                                "description": "Network type",
                                "enum": [
                                  "all",
                                  "wifi",
                                  "cellular"
                                ]
                              },
                              "taxons": {
                                "type": "array",
                                "description": "[Smart app categories](/reference/list-smart-app-categories) to target. <br /> Send `3` in `genre_id` or `subgenre_id` to target all genres/subgenres within a category/genre. <br/>For example, to target:<br/>- whole categories send `\"taxons\": [{\"category_id\": 12, \"genre_id\": 3, \"subgenre_id\": 3}]`<br/>- specific genres within a category regardless of subgenre: `\"taxons\": [{\"category_id\": 12, \"genre_id\": 41, \"subgenre_id\": 3}]`<br/>- specific subgenre: `\"taxons\": [{\"category_id\": 12, \"genre_id\": 26, \"subgenre_id\": 68}]`",
                                "items": {
                                  "properties": {
                                    "category_id": {
                                      "type": "integer",
                                      "description": "Category ID of a [Smart App Category](/reference/list-smart-app-categories)",
                                      "format": "int32"
                                    },
                                    "genre_id": {
                                      "type": "integer",
                                      "description": "Genre ID of a [Smart App Category](/reference/list-smart-app-categories). Send **3** for All genres within the category",
                                      "format": "int32"
                                    },
                                    "subgenre_id": {
                                      "type": "integer",
                                      "description": "Subgenre ID of a [Smart App Category](/reference/list-smart-app-categories). Send **3** for All subgenres within the genre/category",
                                      "format": "int32"
                                    }
                                  },
                                  "required": [
                                    "category_id",
                                    "genre_id",
                                    "subgenre_id"
                                  ],
                                  "type": "object"
                                }
                              },
                              "skan_versions": {
                                "type": "array",
                                "description": "SKAN versions to target",
                                "items": {
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "description": "Type",
                                      "enum": [
                                        "all",
                                        "range",
                                        "specific"
                                      ]
                                    },
                                    "values": {
                                      "type": "array",
                                      "description": "For skan_versions.type=range use objects as described here. For skan_versions.type=specific use array of integer SKAN version IDs",
                                      "items": {
                                        "properties": {
                                          "min": {
                                            "type": "integer",
                                            "description": "Minimum SKAN version ID",
                                            "format": "int32"
                                          },
                                          "max": {
                                            "type": "integer",
                                            "description": "Max SKAN version ID. Use 9999 for latest",
                                            "format": "int32"
                                          }
                                        },
                                        "type": "object"
                                      }
                                    }
                                  },
                                  "type": "object"
                                }
                              },
                              "languages": {
                                "type": "array",
                                "description": "Device [language IDs](/reference/languages) to target",
                                "items": {
                                  "type": "integer",
                                  "format": "int32"
                                }
                              }
                            }
                          },
                          "creatives": {
                            "type": "array",
                            "description": "Creative IDs. They must be of the same creative_type as campaign and advertise the same App/Website as the campaign's Order",
                            "items": {
                              "type": "integer",
                              "format": "int32"
                            }
                          },
                          "audience_whitelist": {
                            "type": "array",
                            "description": "Whitelisted audience IDs",
                            "items": {
                              "type": "integer",
                              "format": "int32"
                            }
                          },
                          "whitelist_audiences_combined_with": {
                            "type": "string",
                            "description": "How multiple whitelisted audiences are combined to form a single whitelist of device IDs",
                            "enum": [
                              "or",
                              "and"
                            ]
                          },
                          "whitelist_app_list_ids": {
                            "type": "array",
                            "description": "Whitelisted app list IDs",
                            "items": {
                              "type": "integer",
                              "format": "int32"
                            }
                          },
                          "ips_whitelist": {
                            "type": "string",
                            "description": "URL to a file with whitelisted IPs in CSV format, must be uploaded to Kayzen CDN"
                          },
                          "ips_whitelist_filename": {
                            "type": "string",
                            "description": "Name of the whitelisted IPs file. Providing the filename is mandatory if you provide the IP list."
                          },
                          "audience_blacklist": {
                            "type": "array",
                            "description": "Blacklisted audience IDs",
                            "items": {
                              "type": "integer",
                              "format": "int32"
                            }
                          },
                          "blacklist_audiences_combined_with": {
                            "type": "string",
                            "description": "How multiple blacklisted audiences are combined to form a single blacklist of device IDs",
                            "enum": [
                              "or",
                              "and"
                            ]
                          },
                          "blacklist_app_list_ids": {
                            "type": "array",
                            "description": "Blacklisted app list IDs",
                            "items": {
                              "type": "integer",
                              "format": "int32"
                            }
                          },
                          "ips_blacklist": {
                            "type": "string",
                            "description": "URL to a file with blacklisted IPs in CSV format, must be uploaded to Kayzen CDN"
                          },
                          "ips_blacklist_filename": {
                            "type": "string",
                            "description": "Name of the blacklisted IPs file.  Providing the filename is mandatory if you provide the IP list."
                          },
                          "bid_values": {
                            "type": "array",
                            "description": "Bid multipliers",
                            "items": {
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "Type of a bid multiplier. app_id means Placement ID",
                                  "enum": [
                                    "country_id",
                                    "state_id",
                                    "city_id",
                                    "exchange_id",
                                    "app_bundle",
                                    "app_id",
                                    "auction_type",
                                    "has_device_id",
                                    "connection_type",
                                    "rewarded_ad",
                                    "ad_format"
                                  ]
                                },
                                "key_name": {
                                  "type": "string",
                                  "description": "Value that has to match to apply bid multiplier.<br/><br/> - For types `country_id`, `state_id`, `city_id`, `exchange_id` this parameter must be the integer ID of the respective thing (Country etc).<br/> - For types `app_id` (Placement ID) and `app_bundle` this parameter must equal to respective publisher app value.<br/> - `auction_type` expects \"1\" for 1st price auction or \"2\" for 2nd price auction.<br/> - `has_device_id` expects \"1\" for present device ID, \"0\" for missing device ID.<br/> - `connection_type`: \"wifi\" or \"cellular\".<br/>`rewarded_ad`: 0 or 1.<br/> - `ad_format`: Banner, Rewarded, Interstitial, Native"
                                },
                                "multiplier": {
                                  "type": "number",
                                  "description": "In case of a match, multiply bid by this number",
                                  "format": "float"
                                },
                                "expiry_date": {
                                  "type": "string",
                                  "description": "Expiration time for this mulitpler",
                                  "default": "2100-01-01 00:00:00"
                                },
                                "expiry_days": {
                                  "type": "integer",
                                  "description": "Days until expiration to display on UI",
                                  "format": "int32"
                                }
                              },
                              "required": [
                                "type",
                                "key_name",
                                "multiplier",
                                "expiry_date"
                              ],
                              "type": "object"
                            }
                          },
                          "bid_multipliers_enabled": {
                            "type": "boolean",
                            "description": "Whether bid multipliers are enabled. If this is turned off bid_values will stay but they will not impact bid price"
                          },
                          "domain": {
                            "type": "string",
                            "description": "Ad domain. Can be edited if it cannot be inferred from Order + App, otherwise it is ignored. For some setups App feature is disabled"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  errors: ['OPEN_TARGETING']\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```