# Manage ads

Pause, resume or rename Snapchat campaigns, ad squads and ads, change budgets, bids and targeting, and delete them.

import { Tab, Tabs } from 'fumadocs-ui/components/tabs';

Snapchat keeps an on/off switch at each level, and Zernio writes to the level you call.

## Pause or resume

`PUT /v1/ads/{adId}/status` sets the ad's own switch. Its ad squad, campaign and sibling ads keep theirs.

<Tabs items={['Node.js', 'Python', 'curl']}>
<Tab value="Node.js">
```typescript
const { data: paused } = await zernio.adcampaigns.updateAdStatus({
  path: { adId: '6ae0968fa23091cc35b72188' },
  body: { status: 'paused' }
});
```
</Tab>
<Tab value="Python">
```python
paused = client.ad_campaigns.update_ad_status(
    ad_id="6ae0968fa23091cc35b72188",
    status="paused",
)
```
</Tab>
<Tab value="curl">
```bash
curl -X PUT "https://zernio.com/api/v1/ads/6ae0968fa23091cc35b72188/status" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "paused" }'
```
</Tab>
</Tabs>

Response (`200`):

```json
{ "updated": 1, "skipped": 0, "status": "paused", "configuredStatus": "PAUSED" }
```

`PUT /v1/ads/campaigns/{campaignId}/status` and `PUT /v1/ads/ad-sets/{adSetId}/status` set the campaign's or the ad squad's switch the same way.

## Other changes

| Change | Call | Snapchat behaviour |
|--------|------|--------------------|
| Rename | `name` on `PUT /v1/ads/{adId}`, `PUT /v1/ads/ad-sets/{adSetId}` or `PUT /v1/ads/campaigns/{campaignId}` | Renames that level |
| Ad squad budget | `budget: { amount, type }` on `PUT /v1/ads/{adId}` or `PUT /v1/ads/ad-sets/{adSetId}` | Changes the ad squad's budget, at least 5 a day |
| Campaign spend cap | `budget` on `PUT /v1/ads/campaigns/{campaignId}` | Sets the campaign's daily or lifetime spend cap, at least 20, over ad squads that keep their own budgets |
| Bid | `bidStrategy` and `bidAmount` on `PUT /v1/ads/ad-sets/{adSetId}` | Changes the ad squad's bid, as on [create](/platforms/snapchat-ads/create-ads#budget-bid-and-schedule) |
| Targeting | `targeting` on `PUT /v1/ads/ad-sets/{adSetId}` | See [Change targeting after creation](/platforms/snapchat-ads/targeting#change-targeting-after-creation) |
| Delete | `DELETE /v1/ads/{adId}`, `DELETE /v1/ads/ad-sets/{adSetId}` or `DELETE /v1/ads/campaigns/{campaignId}` | Deletes that level on Snapchat, permanently |

## How it behaves

- An ad reads `paused` while its campaign or ad squad is paused, even when its own switch is on: `configuredStatus` shows the ad's own switch.
- A published ad squad cannot switch between a daily and a lifetime budget: change the amount, or create a new ad squad.
- Snapchat has no archive, so a delete cannot be undone. Deleting an ad leaves its ad squad and campaign in place.
- Creative changes are not available: create a new ad instead.
- A campaign, ad squad or ad deleted in Snapchat Ads Manager settles as `cancelled` on the next sync.

## If it fails

| Error | Cause | Fix |
|-------|-------|-----|
| `422` on a budget change | A switch between daily and lifetime on a published ad squad | Keep its budget type. |
| `400` with `param: "budgetAmount"` | An ad squad budget under 5, or a campaign spend cap under 20 | Raise the amount. |
| `422` with `param: "bidAmount"` | A max bid or target cost without `bidAmount` | Send `bidAmount`. |

## Related

- [Pause or resume a single ad](/ad-campaigns/update-ad-status): the switch and its read-back.
- [Update ad](/ad-campaigns/update-ad) and [Update a campaign](/ad-campaigns/update-ad-campaign): rename and budget.
- [Get campaign tree](/ad-campaigns/get-ad-tree): every level with its status.