v2

latestOpenAPI 3.1.02026-08-075421692.0 MB
Ad Campaigns

Delete a campaign

Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked status: cancelled.

Empty campaigns. A campaign with zero ads has no local Ad documents to resolve, so it is invisible to /v1/ads/tree and this endpoint would 404. That state is produced by the two-step create flow (campaign, then ads via existingCampaignId) whenever Meta rejects the ad step. To delete such a shell, send accountId in the body: we skip the local lookup entirely and forward the delete to Meta. accountId is ignored when the campaign does have ads.

delete/v1/ads/campaigns/{campaignId}

Path parameters

campaignIdstring required

Platform campaign ID

Request body

platform'facebook' | 'instagram' required
accountIdstring

Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.

Response

Campaign deleted

deletedboolean
adCountinteger

Number of local Ad docs marked cancelled