> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apostra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete campaign

> Archive a campaign and its media buys

`DELETE /api/v2/buyer/campaigns/:id`

Archives the campaign, moving it to `ARCHIVED` status. This is a soft delete — the record is retained for reporting, not permanently removed. Before archiving, Apostra requests full cancellation of the campaign's active media buys from each seller.

## Request

```bash theme={null}
curl -X DELETE https://api.apostra.com/api/v2/buyer/campaigns/cmp_987654321 \
  -H "Authorization: Bearer $SCOPE3_API_KEY"
```

## Parameters

| Field | Type   | Required | Notes                                    |
| ----- | ------ | -------- | ---------------------------------------- |
| `id`  | string | Yes      | Path parameter — the campaign identifier |

## Response

`204 No Content` — no response body. The campaign and all of its media buys and packages are soft-deleted (transitioned to `ARCHIVED` status). Archived campaigns are excluded from default list results; filter `status=ARCHIVED` to retrieve them.

An archived campaign can be restored from the v3 agent surface with
`save_campaign({ campaignId, isArchived: false })`. It comes back as a `DRAFT`
with a new revision: its media buys were retired when it was archived, so
inventory must be staged again before it can launch. There is no v2 REST
restore endpoint for campaigns.

Campaign deletion is safe to retry when a seller has already removed a full
media buy. If the seller returns `MEDIA_BUY_NOT_FOUND`, Apostra treats that
full-buy cancellation as complete and continues archiving the local campaign.
This does not apply to cancellation of selected packages: package-only
cancellation still returns the seller error and leaves the media buy active so
the mismatch can be reviewed.

## Errors

* `404 NOT_FOUND` — no campaign with this ID is visible to the authenticated account.
* Seller cancellation failures stop deletion and leave the campaign unarchived. The only exception is `MEDIA_BUY_NOT_FOUND` while cancelling a full buy, as described above.

See [Errors](/v2/reference/errors) for the full error contract.

## Related

<CardGroup cols={2}>
  <Card title="Pause campaign" href="/v2/buyer/campaigns/tasks/pause-campaign" icon="circle-pause">
    Halt spend without archiving
  </Card>

  <Card title="List campaigns" href="/v2/buyer/campaigns/tasks/list-campaigns" icon="list">
    Filter by status, including ARCHIVED
  </Card>

  <Card title="Campaign tasks" href="/v2/buyer/campaigns/tasks" icon="list-check">
    All campaign operations
  </Card>

  <Card title="Campaign overview" href="/v2/object-guides/campaign" icon="rocket">
    Fields, lifecycle, and concepts
  </Card>
</CardGroup>
