Skip to main content
Version: v3

Upsert campaign

PUT 

/ad-publishing/facebook/campaigns

Create or update a Facebook campaign

Request​

Version stringrequired

API Version

Available optionsv3
application/json

Bodyrequired

    idstring

    Campaign identifier

    locationIdstringrequired

    Location identifier

    namestring

    Campaign name

    objectivestring

    Campaign objective

    Available optionsOUTCOME_LEADSOUTCOME_TRAFFICOUTCOME_ENGAGEMENTOUTCOME_SALES
    specialAdCategoriesstring[]

    Special ad categories

    Available optionsEMPLOYMENTCREDITFINANCIAL_PRODUCTS_SERVICESHOUSINGISSUES_ELECTIONS_POLITICSONLINE_GAMBLING_AND_GAMINGNONE
    isCampaignBudgetboolean

    Advantage campaign budget. When true the campaign carries budget and bidStrategy, and ad sets carry no budget of their own.

    budgetobject

    Campaign-level budget (Advantage campaign budget). Requires isCampaignBudget.

    bidStrategystring

    Campaign-level bid strategy. Only with isCampaignBudget.

    Available optionsLOWEST_COST_WITHOUT_CAPLOWEST_COST_WITH_BID_CAPCOST_CAP
    bidAmountnumber

    Default bid cap / cost-per-result goal in account currency for every ad set; an ad set's own bidAmount wins. Only with isCampaignBudget or adsetBudgetSharing.

    adsetBudgetSharingboolean

    Ad set budget sharing: Meta may move up to 20% of an ad set budget to sibling ad sets. Mutually exclusive with isCampaignBudget.

    sourcestring

    Campaign data source

    customValueMappingsobject

    User-provided overrides for custom_values merge tags used in ad copy

application/json

The saved campaign, without its ad sets

Schema
    idstringrequired

    Campaign identifier

    namestringrequired

    Campaign name

    locationIdstringrequired

    Location identifier

    fbAdAccountIdstringrequired

    Ad account the campaign belongs to

    fbCampaignIdstring

    Facebook campaign id, set once published

    objectivestringrequired

    Campaign objective

    specialAdCategoriesstring[]required

    Special ad categories declared for the campaign

    publishingStatusstringrequired

    Publishing status of the campaign itself. Independent of its children — pausing one ad set leaves the campaign PUBLISHED.

    Available optionsDRAFTSCHEDULEDPUBLISHINGPUBLISHEDPAUSEDIN_REVIEWWITH_ISSUESREJECTEDARCHIVEDFAILED
    fbErrorstringnullable

    Despite the name this is not always an error. Reads return null when there is nothing to report and the upsert returns "", but pausing an ad set or an ad overwrites it with an informational notice — One or more adsets are paused or One or more ads are paused — which the matching resume clears back to null. Treat it as a status line, not a failure signal.

    sourcestringrequired

    Where the campaign was created from

    metaobject

    Ancillary campaign metadata

    unpublishedChangesboolean

    Whether the campaign has edits not yet published

    createdAtstringrequired

    Created at

    updatedAtstringrequired

    Updated at