---
title: "Delete a campaign"
method: DELETE
path: "/v1/ads/campaigns/{campaignId}"
tags: ["Ad Campaigns"]
---

# Delete a campaign

`DELETE /v1/ads/campaigns/{campaignId}`

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.

## Path parameters

- `campaignId` string, required

## Request body

- object
  - `platform` 'facebook' | 'instagram' | 'google', required
  - `accountId` string — 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 `200`

Campaign deleted

- object
  - `deleted` boolean
  - `adCount` integer — Number of local Ad docs marked cancelled

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `404` — The account or requested resource was not found or is not accessible. An account ID may have been disconnected and removed. Read GET /v1/accounts for current account IDs.
- `409` — The account exists but is inactive or needs reconnection. Reconnect it, then read GET /v1/accounts for its current account ID before retrying. Code: ads_connection_required.
- `501` — Operation not supported on this platform

## Changes

- **2026-09-16** `3e6ddf2a99ea` — 3 info
  - added the optional property `details/budgetScope` to the response with the `400` status
  - added the optional property `details/budgetScope` to the response with the `404` status
  - added the optional property `details/budgetScope` to the response with the `409` status
- **2026-09-15** `0dba7d004d75` — 6 info
  - added the optional property `details/quotaExhausted` to the response with the `400` status
  - added the optional property `details/quotaExhausted` to the response with the `404` status
  - added the optional property `details/quotaExhausted` to the response with the `409` status
  - added the optional property `details/quotaScope` to the response with the `400` status
  - …2 more
- **2026-09-10** `e70ed06e7150` — 3 info
  - added the media type `application/json` for the response with the status `404`
  - added the non-success response with the status `400`
  - added the non-success response with the status `409`
- **2026-08-26** `b5344d376e5e` — 1 info
  - added the new `google` enum value to the request property `platform`

[Change history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/ads/campaigns/:campaignId/delete.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) · [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/fdaf9a9fb1a7?raw)
