{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reddit/json-schema/reddit-components-schema-campaign-patch-schema.json",
  "title": "Campaign Patch",
  "description": "Partial campaign update. The campaign type is immutable. Existing clients may continue sending a matching `type`, but new integrations should omit it.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reddit-campaigns-api-openapi.yml#/components/schemas/components_schema_campaign_patch",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "name": {
      "$ref": "#/$defs/name-8"
    },
    "configured_status": {
      "$ref": "#/$defs/configured_status-3"
    },
    "goal_value": {
      "$ref": "#/$defs/goal_value-3"
    },
    "funding_instrument_id": {
      "$ref": "#/$defs/funding_instrument_id"
    },
    "spend_cap": {
      "$ref": "#/$defs/spend_cap"
    },
    "bid_strategy": {
      "$ref": "#/$defs/bid_strategy-3"
    },
    "bid_type": {
      "$ref": "#/$defs/bid_type-3"
    },
    "bid_value": {
      "$ref": "#/$defs/bid_value-3"
    },
    "end_time": {
      "$ref": "#/$defs/end_time-3"
    },
    "start_time": {
      "$ref": "#/$defs/start_time-3"
    },
    "schedule": {
      "$ref": "#/$defs/schedule-2"
    },
    "invoice_label": {
      "$ref": "#/$defs/invoice_label"
    },
    "objective": {
      "$ref": "#/$defs/objective"
    },
    "use_catalog": {
      "$ref": "#/$defs/use_catalog"
    }
  },
  "$defs": {
    "bid_strategy-3": {
      "type": [
        "string",
        "null"
      ],
      "description": "The campaign's bid strategy. Required when `is_campaign_budget_optimization` is `true`.",
      "enum": [
        "BIDLESS",
        "MAXIMIZE_VOLUME",
        "TARGET_CPX",
        null
      ],
      "x-enumDescriptions": {
        "BIDLESS": "Maximize results within the budget without a cost cap. Set `bid_value` to `null`.",
        "MAXIMIZE_VOLUME": "Maximize result volume. Use `bid_value` as the cost cap in microcurrency.",
        "TARGET_CPX": "Optimize toward a target cost per action. Set `bid_value` to the target cost in microcurrency."
      }
    },
    "bid_type-3": {
      "type": [
        "string",
        "null"
      ],
      "description": "The campaign's bid type. Required when `is_campaign_budget_optimization` is `true`.",
      "enum": [
        "CPC",
        "CPM",
        "CPV6",
        "CPV15",
        null
      ]
    },
    "bid_value-3": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The amount to pay per bidding event (microcurrency). Used when `is_campaign_budget_optimization` is `true`. Optional when `bid_strategy` is `MAXIMIZE_VOLUME`. If set at campaign level, it **can't be set** at ad group level."
    },
    "components_schema_time_block": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "end_day": {
          "description": "Day of the week when this window ends (`0`–`6`; `0` = Sunday).",
          "type": "integer",
          "minimum": 0,
          "maximum": 6
        },
        "end_hour": {
          "description": "Hour on `end_day` when this window ends (`0`–`23`).",
          "type": "integer",
          "minimum": 0,
          "maximum": 23
        },
        "start_day": {
          "description": "Day of the week when this window starts (`0`–`6`; `0` = Sunday).",
          "type": "integer",
          "minimum": 0,
          "maximum": 6
        },
        "start_hour": {
          "description": "Hour on `start_day` when this window starts (`0`–`23`).",
          "type": "integer",
          "minimum": 0,
          "maximum": 23
        }
      }
    },
    "configured_status-3": {
      "type": "string",
      "description": "The campaign's status set by the ad account. Can differ from `effective_status` depending on context, such as pending billing information.",
      "enum": [
        "ACTIVE",
        "ARCHIVED",
        "DELETED",
        "PAUSED"
      ],
      "default": "ACTIVE"
    },
    "end_time-3": {
      "type": [
        "string",
        "null"
      ],
      "description": "When the campaign will stop delivering ([ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)). A non-null value is required if `goal_type` is `LIFETIME_SPEND`."
    },
    "funding_instrument_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The campaign-level funding instrument ID."
    },
    "goal_value-3": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Campaign-level goal value (microcurrency). Only works when `is_campaign_budget_optimization` is `true`."
    },
    "invoice_label": {
      "type": [
        "string",
        "null"
      ],
      "description": "A free-form label agencies can use for tracking and reconciliation purposes on the resulting invoice. Only settable on campaigns whose funding instrument is **not** a credit card; attempts to set this field on credit-card-funded campaigns are ignored.\n",
      "maxLength": 80
    },
    "name-8": {
      "$ref": "#/$defs/nullable",
      "description": "The campaign name."
    },
    "nullable": {
      "description": "The entity name.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 3,
      "maxLength": 500
    },
    "objective": {
      "type": "string",
      "description": "The [campaign objective](https://business.reddithelp.com/s/article/Ad-campaign-objectives).",
      "enum": [
        "APP_INSTALLS",
        "BRAND_AWARENESS",
        "CATALOG_SALES",
        "CLICKS",
        "CONVERSIONS",
        "IMPRESSIONS",
        "LEAD_GENERATION",
        "SALES",
        "VIDEO_VIEWABLE_IMPRESSIONS"
      ]
    },
    "schedule-2": {
      "description": "The recurring weekly window(s) when the campaign may deliver. Day values are `0` (Sunday) through `6` (Saturday); hour values are `0`–`23` on a 24-hour clock (in the campaign's time zone). An empty array or `null` means the campaign may deliver at any time. Only available when `is_campaign_budget_optimization` is `true`, in which case it replaces the schedule of every ad group in the campaign.",
      "type": [
        "array",
        "null"
      ],
      "minItems": 0,
      "items": {
        "$ref": "#/$defs/components_schema_time_block"
      }
    },
    "spend_cap": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Campaign lifetime spend cap (microcurrency). Available for non-CBO campaigns and when `goal_type` is `DAILY_SPEND` for CBO campaigns."
    },
    "start_time-3": {
      "type": [
        "string",
        "null"
      ],
      "description": "When the campaign will begin to deliver ([ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)). Required and only available when `is_campaign_budget_optimization` is `true`."
    },
    "use_catalog": {
      "description": "Whether the campaign uses a product catalog. It can be `true` only when `objective` is `SALES`. Omitted when unset. When `true`, all ad groups in the campaign must use a catalog.\n",
      "type": "boolean"
    }
  }
}