Skip to main content
Version: v3

Publish campaign

POST 

/ad-publishing/facebook/campaigns/:campaignId/publish

Queue a Facebook campaign for publishing and push it live to Facebook. Publishing runs asynchronously, so the campaign comes back in the state it was queued in — publishingStatus is still DRAFT on the campaign and on every ad set and ad, and no Facebook ids are attached yet. Poll GET /facebook/campaigns/{campaignId}/publishing-progress for the outcome.

Request

Version stringrequired

API Version

Available optionsv3
campaignId stringrequired

Campaign identifier

application/json

Bodyrequired

    locationIdstringrequired

    Location identifier

application/json

The campaign with its ad sets and ads, as queued for publishing

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

    adsetsobject[]required

    Ad sets with their ads