Ads · Ad Campaigns

Update a campaign

Updates a campaign.

PUThttps://api.pozy.ai/v1/ads/campaigns/{campaignId}
Facebook and Instagram, Google Workspace, TikTok, LinkedIn, Pinterest and X and 2 moreupdateAdCampaign

Guides: Meta Ads, X Ads, Reddit Ads

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the ads resource group disabled get 403 resource_group_disabled. Authentication

Path parameters

NameTypeNotes
campaignIdrequiredstring

Request body

application/json, required

  • platformstringrequired

    One of facebook, instagram, tiktok, linkedin, pinterest, google, twitter, openai, reddit.

  • accountIdstring
  • bidStrategyobject
  • bidAmountnumber
  • roasAverageFloornumber
  • portfolioBidStrategyIdstring

    Matches ^\d+$.

  • allowSharedBudgetUpdateboolean

    Default false.

  • targetImpressionShareobject
    • locationstringrequired

      One of ANYWHERE_ON_PAGE, TOP_OF_PAGE, ABSOLUTE_TOP_OF_PAGE.

    • percentnumberrequired

      At most 100.

    • maxCpcnumberrequired
  • manualCpcobject
    • maxCpcnumberrequired
  • networkSettingsobject
    • searchPartnersboolean
    • displayNetworkboolean
  • trackingUrlTemplatestring
  • finalUrlSuffixstring
  • sharedBudgetIdstring

    Matches ^\d+$. Can be null.

  • budgetobject
    • amountnumberrequired
    • typestringrequired

      One of daily, lifetime.

  • namestring

    Up to 255 characters.

  • platformSpecificDataobject
    • spendCapnumber

      Can be null.

Example

curl -X PUT "https://api.pozy.ai/v1/ads/campaigns/65a3737dd8b11ea61f199e6e" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "platform": "facebook"
}'

Response

200 on success

  • updatedinteger
  • budgetobject
    • amountnumberrequired
    • typestringrequired

      One of daily, lifetime.

    • amountMicrosstring

      Matches ^\d+$.

    • explicitlySharedboolean

      Can be null.

    • resourceNamestring

      Can be null.

    • deliveryMethodstring

      Can be null.

  • budgetLevelstring

    One of campaign.

  • bidStrategystring

    One of LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS.

  • bidAmountnumber
  • roasAverageFloornumber
  • portfolioBidStrategyIdstring
  • targetImpressionShareobject
    • locationstringrequired

      One of ANYWHERE_ON_PAGE, TOP_OF_PAGE, ABSOLUTE_TOP_OF_PAGE.

    • percentnumberrequired

      At most 100.

    • maxCpcnumberrequired
  • manualCpcobject
    • maxCpcnumberrequired
  • networkSettingsobject
    • searchPartnersboolean
    • displayNetworkboolean
  • trackingUrlTemplatestring
  • finalUrlSuffixstring
  • sharedBudgetIdstring

    Can be null.

  • platformSpecificDataobject
200 response
{
  "updated": 1,
  "budget": {
    "amount": 12.5,
    "type": "daily",
    "amountMicros": "string",
    "explicitlyShared": true,
    "resourceName": "Acme",
    "deliveryMethod": "string"
  },
  "budgetLevel": "campaign",
  "bidStrategy": "LOWEST_COST_WITHOUT_CAP",
  "bidAmount": 12.5,
  "roasAverageFloor": 12.5,
  "portfolioBidStrategyId": "657ef37139bac4c6428f5f10",
  "targetImpressionShare": {
    "location": "ANYWHERE_ON_PAGE",
    "percent": 12.5,
    "maxCpc": 12.5
  },
  "manualCpc": {
    "maxCpc": 12.5
  },
  "networkSettings": {
    "searchPartners": true,
    "displayNetwork": true
  },
  "trackingUrlTemplate": "https://pozy.ai/media/example-1.jpg",
  "finalUrlSuffix": "https://pozy.ai/media/example-1.jpg",
  "sharedBudgetId": "6251639fc36f449486902b2e",
  "platformSpecificData": {}
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is read-only, scoped to other profiles, or has this resource group disabled.
404not_foundNothing with that id exists in your workspace.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Ad Campaigns

GETList adsGETList Google Ads recommendationsPOSTApply Google Ads recommendationsPOSTDismiss Google Ads recommendationsGETList portfolio bid strategiesPOSTCreate portfolio bid strategyPATCHUpdate portfolio bid strategyGETList shared budgetsPOSTCreate a shared budgetGETList Search keywordsPOSTAdd Search ad-group keywordsPATCHPause or enable a Search keywordDELRemove a Search keywordGETList campaignsPOSTCreate a standalone campaignPUTPause or resume a campaignGETRead a campaign's ad schedule (dayparting)PUTReplace a campaign's ad schedule (dayparting)GETRead a campaign's current biddingGETGet live campaign detailsDELDelete a campaignGETList campaign-level negative keywordsPUTReplace campaign-level negative keywordsPOSTPause or resume many campaignsPOSTDuplicate a campaignGETRead a Google campaign's device, location, excluded location, and language targetingPUTEdit a Google campaign's device, location, excluded location, or language targetingGETList ad setsPOSTCreate a standalone ad groupPOSTDuplicate an ad setPOSTDuplicate an adGETGet live ad-set detailsPUTUpdate an ad setDELDelete an ad setGETRead a Reddit ad group's targeting and schedulePUTPause or resume a single ad setGETGet campaign treeGETGet daily account metricsGETGet ad detailsPUTUpdate adDELCancel an adPUTPause or resume a single adGETList campaign assetsPOSTAttach campaign assetsPUTUpdate campaign assetsDELRemove campaign assetsGETList ad-group assetsPOSTAttach ad-group assetsPUTUpdate ad-group assetsDELRemove ad-group assetsGETRead the platform's review verdict for an adGETReview status of each creative in a TikTok Smart+ adGETList ads that need attentionPOSTDismiss an ads alertGETReview status of every TikTok Smart+ ad of an advertiserGETList campaign negative listsPUTReplace campaign negative listsPOSTBoost post as adGETList Performance Max asset groupsPOSTCreate a Performance Max asset groupGETGet a Performance Max asset groupPATCHUpdate a Performance Max asset groupDELRemove a Performance Max asset groupPOSTLink or unlink asset group assetsPUTReplace an asset group's listing-group treePOSTCreate standalone adGETGet campaign conversion goalsPATCHUpdate campaign conversion goals