---
title: "Bulk Update Campaigns"
method: POST
path: "/bulk_update/campaigns"
tags: ["Campaigns"]
---

# Bulk Update Campaigns

`POST /bulk_update/campaigns`

## Request

- Base URL: `https://api.mediamath.com/api/v3.0`
- URL: `https://api.mediamath.com/api/v3.0/bulk_update/campaigns`
- 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/bulk_update/campaigns/post.ts> (a function with typed inputs; its response is checked against the schema)

Update multiple campaigns

## Request body

- object
  - `update` CampaignBulk[], required
    - `archived` boolean
    - `status` boolean
    - `name` string
    - `service_type` 'SELF' | 'MANAGED'
    - `io_name` string
    - `io_reference_num` string
    - `is_programmatic_guaranteed` boolean
    - `political` boolean
    - `source_campaign_id` integer, nullable
    - `zone_name` string
    - `viewability` CampaignViewability, nullable
      - `vendor_id` integer, required
      - `type` 'AUTO_TAG' | 'BYOV', required
      - `sample_rate` number, float, required
    - `identity` CampaignIdentity
      - `device_graph_only` boolean
      - `bid_min_devices` integer
      - `connected_id_type` 'DETERMINISTIC_FIRST', nullable
    - `ad_server` CampaignAdServer
      - `ad_server_id` integer
      - `ad_server_username` string
      - `ad_server_password` string
      - `use_default_ad_server` boolean
      - `ad_server_fee` number, float
    - `pacing` CampaignPacing
      - `pacing_alert` number, float
      - `impression_cap_automatic` boolean
      - `impression_cap_amount` integer, nullable
      - `impression_cap_type` 'even' | 'asap' | 'no-limit'
      - `spend_cap_type` 'even' | 'asap' | 'no-limit'
      - `spend_cap_amount` number, float, nullable
      - `spend_cap_automatic` boolean
      - `brain_intraday_pacing` boolean
      - `spend_pace_ahead` boolean: Boosts automatic spend pacing early in the flight. May be true only when spend_cap_automatic is true.
      - `impression_pace_ahead` boolean: Boosts automatic impression pacing early in the flight. May be true only when impression_cap_automatic is true.
    - `attribution` CampaignAttribution
      - `has_custom_attribution` boolean
      - `custom_attribution_source` '3rd Party Attribution' | 'T1 MTA via Neustar', nullable
      - `pc_window_minutes` integer, nullable: Post-click attribution window in minutes. Use null to disable the window; 0 is accepted as a legacy disabled sentinel. When merit_pixel_id is non-null/non-zero or merit_pixels contains at least one pixel, at least one of pc_window_minutes or pv_window_minutes must be greater than 0.
      - `pv_window_minutes` integer, nullable: Post-view attribution window in minutes. Use null to disable the window; 0 is accepted as a legacy disabled sentinel. When merit_pixel_id is non-null/non-zero or merit_pixels contains at least one pixel, at least one of pc_window_minutes or pv_window_minutes must be greater than 0.
      - `pv_pct` number, float
      - `merit_pixel_id` integer, nullable: Deprecated. Use `merit_pixels` instead. If `merit_pixel_id` is set on create or update then `merit_pixels` will be synchronized with it. If `merit_pixels` is set on create or update then `merit_pixel_id` will be synchronized with it. Set up (update) both fields at the same time is not supported.
      - `merit_pixels` object[]: Merit pixels for multi-merit attribution (up to 10 per campaign). If `merit_pixel_id` is set on create or update then `merit_pixels` will be synchronized with it. If `merit_pixels` is set on create or update then `merit_pixel_id` will be synchronized with it. Set up (update) both fields at the same time is not supported. Send empty array to remove all pixels. Send only pixel id for element to reset other fields to default. Validation rules: - Each `pixel_id` must reference an event pixel that belongs to the campaign's advertiser. - `pixel_id` values must be unique within the array. - `weight` accepts values from 0.00 to 10.00 with at most 2 decimal places; at least one pixel must have a weight greater than 0. - `funnel_position` values must be unique; if any pixel has a funnel position then all pixels must have one, with no gaps (1 to N).
        - `id` integer
        - `pixel_id` integer, required
        - `weight` number
        - `funnel_position` integer, nullable
      - `conversion_type` 'every' | 'variable'
      - `conversion_variable_minutes` integer: Deduplication window in minutes. Must be 1 or greater when conversion_type is variable. To attribute all merit events without a deduplication window, use conversion_type: every (in which case this value is ignored).
    - `vendor_contracts` VendorContractBase[]
      - `vendor_id` integer, required
      - `use_mm_contract` boolean
      - `price` number, float, nullable
      - `rate_card_type` 'CPM' | 'FIXED', nullable
    - `mfa_avoidance` 'INHERIT' | 'ALLOW_ALL' | 'EXCLUDE_MFA'
    - `targeting_identity_level` 'INHERIT' | 'INDIVIDUAL' | 'HOUSEHOLD'
    - `id` integer, required
    - `version` integer
    - `goals` CampaignGoals
      - `goal_type` 'spend' | 'reach' | 'cpc' | 'cpe' | 'cpa' | 'roi' | 'ctr' | 'vcr' | 'viewability_rate' | 'vcpm'
      - `goal_alert` number, float
      - `goal_value` number, float
      - `goal_category` 'audience' | 'engagement' | 'response', nullable
    - `duration` CampaignDuration: Duration of campaigns must not exceed 36 months
      - `start_date` string, date-time
      - `end_date` string, date-time
    - `budget` object
      - `total_budget` number, float, nullable
      - `total_impression_budget` integer, nullable
      - `currency_code` string
      - `margin_pct` number, float
      - `dynamic_budget_allocation_type` 'SBA_AUTO_ALLOCATION' | 'SBA_RECOMMENDATIONS_ONLY' | 'OFF'
      - `dynamic_budget_allocation_applied` string, date-time
      - `dynamic_budget_allocation_available` string, date-time
      - `flights` CampaignBudgetFlights[]
        - `id` integer
        - `start_date` string, date-time
        - `end_date` string, date-time: The latest end date of flight must be no more than 36 months after the earliest start date
        - `total_budget` number, float
        - `total_impression_budget` integer, nullable
        - `is_relevant` boolean
    - `frequency` CampaignFrequency
      - `frequency_type` 'even' | 'asap' | 'no-limit' | 't1-optimized' | 'frequency_goal'
      - `frequency_interval` 'hour' | 'day' | 'week' | 'month' | 'not-applicable', nullable
      - `frequency_amount` integer, nullable
      - `use_mm_freq` boolean
      - `frequency_optimization` boolean
    - `inventory` CampaignInventory
      - `ads_txt_verified` 'ANY' | 'AUTHORIZED_ONLY' | 'AUTHORIZED_DIRECT_ONLY' | 'NONE', nullable
      - `minimize_multi_ads` boolean
      - `override_suspicious_traffic_filter` boolean
      - `suspicious_traffic_filter_level` integer
      - `dcs_data_is_campaign_level` boolean
      - `restrict_targeting_to_deterministic_id` boolean
      - `restrict_targeting_to_same_device_id` boolean

## Response `200`

Campaign bulk response

- object
  - `data` CampaignBulk[]
    - `archived` boolean
    - `status` boolean
    - `name` string
    - `service_type` 'SELF' | 'MANAGED'
    - `io_name` string
    - `io_reference_num` string
    - `is_programmatic_guaranteed` boolean
    - `political` boolean
    - `source_campaign_id` integer, nullable
    - `zone_name` string
    - `viewability` CampaignViewability, nullable
      - `vendor_id` integer, required
      - `type` 'AUTO_TAG' | 'BYOV', required
      - `sample_rate` number, float, required
    - `identity` CampaignIdentity
      - `device_graph_only` boolean
      - `bid_min_devices` integer
      - `connected_id_type` 'DETERMINISTIC_FIRST', nullable
    - `ad_server` CampaignAdServer
      - `ad_server_id` integer
      - `ad_server_username` string
      - `ad_server_password` string
      - `use_default_ad_server` boolean
      - `ad_server_fee` number, float
    - `pacing` CampaignPacing
      - `pacing_alert` number, float
      - `impression_cap_automatic` boolean
      - `impression_cap_amount` integer, nullable
      - `impression_cap_type` 'even' | 'asap' | 'no-limit'
      - `spend_cap_type` 'even' | 'asap' | 'no-limit'
      - `spend_cap_amount` number, float, nullable
      - `spend_cap_automatic` boolean
      - `brain_intraday_pacing` boolean
      - `spend_pace_ahead` boolean: Boosts automatic spend pacing early in the flight. May be true only when spend_cap_automatic is true.
      - `impression_pace_ahead` boolean: Boosts automatic impression pacing early in the flight. May be true only when impression_cap_automatic is true.
    - `attribution` CampaignAttribution
      - `has_custom_attribution` boolean
      - `custom_attribution_source` '3rd Party Attribution' | 'T1 MTA via Neustar', nullable
      - `pc_window_minutes` integer, nullable: Post-click attribution window in minutes. Use null to disable the window; 0 is accepted as a legacy disabled sentinel. When merit_pixel_id is non-null/non-zero or merit_pixels contains at least one pixel, at least one of pc_window_minutes or pv_window_minutes must be greater than 0.
      - `pv_window_minutes` integer, nullable: Post-view attribution window in minutes. Use null to disable the window; 0 is accepted as a legacy disabled sentinel. When merit_pixel_id is non-null/non-zero or merit_pixels contains at least one pixel, at least one of pc_window_minutes or pv_window_minutes must be greater than 0.
      - `pv_pct` number, float
      - `merit_pixel_id` integer, nullable: Deprecated. Use `merit_pixels` instead. If `merit_pixel_id` is set on create or update then `merit_pixels` will be synchronized with it. If `merit_pixels` is set on create or update then `merit_pixel_id` will be synchronized with it. Set up (update) both fields at the same time is not supported.
      - `merit_pixels` object[]: Merit pixels for multi-merit attribution (up to 10 per campaign). If `merit_pixel_id` is set on create or update then `merit_pixels` will be synchronized with it. If `merit_pixels` is set on create or update then `merit_pixel_id` will be synchronized with it. Set up (update) both fields at the same time is not supported. Send empty array to remove all pixels. Send only pixel id for element to reset other fields to default. Validation rules: - Each `pixel_id` must reference an event pixel that belongs to the campaign's advertiser. - `pixel_id` values must be unique within the array. - `weight` accepts values from 0.00 to 10.00 with at most 2 decimal places; at least one pixel must have a weight greater than 0. - `funnel_position` values must be unique; if any pixel has a funnel position then all pixels must have one, with no gaps (1 to N).
        - `id` integer
        - `pixel_id` integer, required
        - `weight` number
        - `funnel_position` integer, nullable
      - `conversion_type` 'every' | 'variable'
      - `conversion_variable_minutes` integer: Deduplication window in minutes. Must be 1 or greater when conversion_type is variable. To attribute all merit events without a deduplication window, use conversion_type: every (in which case this value is ignored).
    - `vendor_contracts` VendorContractBase[]
      - `vendor_id` integer, required
      - `use_mm_contract` boolean
      - `price` number, float, nullable
      - `rate_card_type` 'CPM' | 'FIXED', nullable
    - `mfa_avoidance` 'INHERIT' | 'ALLOW_ALL' | 'EXCLUDE_MFA'
    - `targeting_identity_level` 'INHERIT' | 'INDIVIDUAL' | 'HOUSEHOLD'
    - `id` integer, required
    - `version` integer
    - `goals` CampaignGoals
      - `goal_type` 'spend' | 'reach' | 'cpc' | 'cpe' | 'cpa' | 'roi' | 'ctr' | 'vcr' | 'viewability_rate' | 'vcpm'
      - `goal_alert` number, float
      - `goal_value` number, float
      - `goal_category` 'audience' | 'engagement' | 'response', nullable
    - `duration` CampaignDuration: Duration of campaigns must not exceed 36 months
      - `start_date` string, date-time
      - `end_date` string, date-time
    - `budget` object
      - `total_budget` number, float, nullable
      - `total_impression_budget` integer, nullable
      - `currency_code` string
      - `margin_pct` number, float
      - `dynamic_budget_allocation_type` 'SBA_AUTO_ALLOCATION' | 'SBA_RECOMMENDATIONS_ONLY' | 'OFF'
      - `dynamic_budget_allocation_applied` string, date-time
      - `dynamic_budget_allocation_available` string, date-time
      - `flights` CampaignBudgetFlights[]
        - `id` integer
        - `start_date` string, date-time
        - `end_date` string, date-time: The latest end date of flight must be no more than 36 months after the earliest start date
        - `total_budget` number, float
        - `total_impression_budget` integer, nullable
        - `is_relevant` boolean
    - `frequency` CampaignFrequency
      - `frequency_type` 'even' | 'asap' | 'no-limit' | 't1-optimized' | 'frequency_goal'
      - `frequency_interval` 'hour' | 'day' | 'week' | 'month' | 'not-applicable', nullable
      - `frequency_amount` integer, nullable
      - `use_mm_freq` boolean
      - `frequency_optimization` boolean
    - `inventory` CampaignInventory
      - `ads_txt_verified` 'ANY' | 'AUTHORIZED_ONLY' | 'AUTHORIZED_DIRECT_ONLY' | 'NONE', nullable
      - `minimize_multi_ads` boolean
      - `override_suspicious_traffic_filter` boolean
      - `suspicious_traffic_filter_level` integer
      - `dcs_data_is_campaign_level` boolean
      - `restrict_targeting_to_deterministic_id` boolean
      - `restrict_targeting_to_same_device_id` boolean
  - `meta` ListMetadata
    - `status` string, required: The status of the response, indicating success or failure.
    - `count` integer, required: The number of items returned in the current response.
    - `total_count` integer: The total number of items available in the dataset.
    - `offset` integer: The offset from the start of the dataset, used for pagination.
    - `next_page` string: The URL to fetch the next page of results.
    - `prev_page` string: The URL to fetch the previous page of results.

## Other responses

- `207`: Campaign bulk response
- `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)
