Skip to content
Amplify APIReference

Update an Existing Campaign

PUT/campaigns/{id}

To update a campaign send a JSON with the updated value for one or more of the updatable campaign attributes.

All attribute values left unset in this PUT will remain unchanged.

Only the following Campaign properties are updatable:

  • name - Maximum length is 100 characters

  • enabled

  • cpc - The cpc must be higher than the minimumCpc

  • targeting.platform - See Targeting object

  • targeting.locations - See Targeting object

  • targeting.excludedLocations - See Targeting object

  • targeting.language - See Targeting object

  • targeting.excludeAdBlockUsers - See Targeting object

  • targeting.operatingSystems - See Targeting object

  • targeting.browsers - See Targeting object

  • targeting.network - See Targeting object

  • suffixTrackingCode - Tracking code parameters that will be appended to the Campaign's PromotedLinks. Use the value "EMPTY_SUFFIX" to delete.

  • prefixTrackingCode - A marketer's prefix for a PromotedLink. The prefixTrackingCode must be in a valid url form and must end with some parameter followed by an equals sign. Use the value "EMPTY_PREFIX" to delete.

  • cpcPerAdEnabled (deprecation date 20.4.20) - Indicates whether or not the 'Cpc Per Ad' feature is enabled for this campaign.

  • blockedSites - The publishers / sections which should be blocked. Note that this is a full list including publishers / sections which are already blocked.

  • startHour - Time (12 hour format: 'HH:MM AM/PM') of the day when this Campaign should run. For this feature to work, the campaign budget type must be "DAILY" or "AUTOMATIC" it cannot be "Spend_ASAP"

  • trackingPixels - Deprecated please use pixel.trackingPixels instead (will be removed in 1.7.2021). Array of Tracking Pixels

  • archived - Use value archived to archive campaign. If you wish to unarchive please resend the archived request. Archived campaigns are not returned by the campaigns APIs

  • bids - See Bids object

  • campaignOptimization - See CampaignOptimization object

  • volumeControl - See Volume Control object

  • onAirType - See Campaign On Air Type object

  • scheduling - See Campaign Scheduling Rules object

  • objective - See Campaign Objective object

  • pixels - See Pixels object.

OB-TOKEN-V1<token>

Token obtained from the Obtain a token endpoint or the Amplify API token page. Valid for 30 days.

In: header

Path Parameters

id*string

the id of the Campaign

Query Parameters

extraFields?string

the additional campaign fields you want to include in the response

Response Body

application/json

curl -X PUT "https://example.com/campaigns/00f4b02153ee75f3c9dc4fc128ab0411ab?extraFields=CustomAudience%2CLocations%2CInterestsTargeting%2CBidBySections%2CBlockedSites%2CPlatformTargeting%2CCampaignOptimization%2CScheduling%2CIABCategories%2CCampaignPixels%2CVolumeControl"
{  "id": "00f4b02153ee75f3c9dc4fc128ab041962",  "name": "Boost 'ABC' Brand",  "marketerId": "00f4b02153ee75f3c9dc4fc128ab041562",  "lastModified": "2013-04-15 14:52:13",  "creationTime": "2013-01-26 21:17:11",  "campaignOnAir": false,  "onAirReason": "CAMPAIGN_FLY_DATES_PAST",  "enabled": true,  "autoArchived": false,  "currency": "USD",  "cpc": 0.13,  "minimumCpc": 0.1,  "autoExpirationOfPromotedLinks": 7,  "amountSpent": 150,  "targeting": {    "platform": [      "MOBILE",      "DESKTOP"    ],    "locations": [      {        "name": "Prince Edward Island",        "canonicalName": "Prince Edward Island, Canada",        "id": "a7fd4b0f63f8437cf04690b481e5eab1",        "geoType": "Region",        "parent": {          "geoType": "Country",          "canonicalName": "Canada",          "id": "aa4ab4c893b9fb5618476cb27f264ef8",          "name": "Canada"        }      }    ],    "operatingSystems": [      "MacOs",      "Windows"    ],    "browsers": [      "Chrome"    ]  },  "feeds": [    "http://rss.cnn.com/rss/edition.rss",    "http://rss.cnn.com/rss/sport.rss"  ],  "budget": {    "id": "00f4b02153ee75f3c9dc4fc128ab041962",    "name": "Boost 'ABC' Brand budget",    "shared": true,    "amount": 2000,    "amountRemaining": 100,    "creationTime": "2013-06-03 22:14:41",    "lastModified": "2013-06-03 22:14:41",    "startDate": "2013-09-16",    "runForever": true,    "type": "MONTHLY",    "currency": "USD"  },  "liveStatus": {    "campaignOnAir": false,    "onAirReason": "Campaign Fly Dates",    "amountSpent": 523.35  },  "suffixTrackingCode": "trck=12",  "prefixTrackingCode": {    "prefix": "http://www.marketersServer.com?redirectTo=",    "encode": true  },  "contentType": "NATIVE_VIDEO",  "cpcPerAdEnabled": true,  "blockedSites": {    "blockedPublishers": [      {        "id": "00f4b02153ee75f3c9dc4fc128ab041962",        "name": "Blocked Publisher Name 1",        "creationTime": "2016-01-12 04:02:34",        "expiration": "2026-01-20"      },      {        "id": "0095b3a4811c42fe570d1e730e7286adb4",        "name": "Blocked Publisher Name 2",        "creationTime": "2016-01-12 04:02:34"      }    ],    "blockedSections": [      {        "id": "00f4b02153ee75f3c9dc4fc128ab041962",        "name": "Blocked Section Name",        "creationTime": "2016-01-12 04:02:34",        "publisher": {          "id": "0095b3a4811c42fe570d1e730e7286adb4",          "name": "The name of the publisher the section belongs to"        }      }    ],    "marketerBlockedSites": {}  },  "bids": {    "bySection": [      {        "sectionId": "009e769d5444de4570582abe8ff7689883",        "sectionName": "Sports",        "publisherId": "00f3022e3638c88cb5e46768e45c471441",        "cpcAdjustment": 0.1,        "campaignId": "00f4b02153ee75f3c9dc4fc128ab041962",        "creationTime": "2013-01-14 07:19:16",        "lastModified": "2013-01-14 07:21:16"      },      {        "sectionId": "000b4b1c9dda9d79fe9ff53e0faefa615d",        "sectionName": "Culture",        "publisherId": "00d3a87281bbace0171560533ac547f6cc",        "cpcAdjustment": 0.1,        "campaignId": "00f4b02153ee75f3c9dc4fc128ab041962",        "creationTime": "2013-01-14 07:19:16",        "lastModified": "2013-01-14 07:27:16"      }    ]  },  "campaignOptimization": {    "optimizationType": "TRAFFIC"  },  "volumeControl": {    "adjustments": [      {        "sectionId": "009e769d5444de4570582abe8ff7689883",        "adjustmentLevel": "INCREASE"      }    ]  },  "onAirType": "Scheduled",  "scheduling": {    "cpc": [      {        "startDay": "Sunday",        "endDay": "Monday",        "startHour": 3,        "endHour": 1,        "cpcAdjustment": 0.1      }    ],    "onAir": [      {        "startDay": "Sunday",        "endDay": "Sunday",        "startHour": 8,        "endHour": 12      }    ]  },  "objective": "Awareness",  "creativeFormat": "Standard",  "pixels": {    "trackingPixels": [      "http://outbrain.com/1",      "http://outbrain.com/2"    ],    "impressionPixels": [      "http://outbrain.com/3",      "http://outbrain.com/4"    ]  }}