# Manage ads

Turn Trade Desk ad groups on or off, pause campaigns, rename them, change budgets and base bids, and archive them.

A Trade Desk campaign has no on or off switch of its own: it delivers through its enabled ad groups. Zernio writes to the ad groups for you.

## Pause or resume

`PUT /v1/ads/ad-sets/{adSetId}/status` turns one ad group on or off. Its campaign and sibling ad groups keep theirs.

```bash
curl -X PUT "https://zernio.com/api/v1/ads/ad-sets/AD_SET_ID/status" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "paused" }'
```

Pausing a campaign with `PUT /v1/ads/campaigns/{campaignId}/status` switches off every enabled ad group in it. Resuming a campaign answers `422`: turn on the ad groups you want instead.

## Other changes

| Change | How |
|--------|-----|
| Rename | `PUT /v1/ads/campaigns/{campaignId}` or `PUT /v1/ads/ad-sets/{adSetId}` with `name` |
| Campaign budget | `budget` as a lifetime budget: it lands on the running flight, or the next one before the campaign starts |
| Ad group budget | `budget` on the ad set, daily or lifetime |
| Bid | `bidAmount` on the ad set: the ad group's base CPM bid, in the advertiser currency |
| Delete | `DELETE` on the campaign or ad set archives it. Deleting an ad takes its creative off the ad group |

## How it behaves

- Archiving cannot be undone, in Zernio or in The Trade Desk.
- Deleting an ad keeps the creative in the advertiser's library. It only stops serving in that ad group.
- A campaign created through Zernio has no ad groups, so there is nothing to pause until you add one in The Trade Desk.
- Not available yet: creating ad groups, uploading creatives, and geo, device or inventory targeting.

## If it fails

| Error | Cause | Fix |
|-------|-------|-----|
| `422` resuming a campaign | Trade Desk campaigns serve through their ad groups | Turn on the ad groups with `PUT /v1/ads/ad-sets/{adSetId}/status`. |
| `422` naming `budget.type` on a campaign | A daily campaign budget | Send a lifetime budget, or set a daily budget on an ad group. |
| `422` on a campaign budget | The campaign has no running or upcoming flight | Add a flight in The Trade Desk first. |
| `422` naming `bidAmount` | The bid change has no `bidAmount` | Send `bidAmount` in the advertiser currency. |

## Related

- [Update campaign](/ad-campaigns/update-ad-campaign)
- [Update ad set](/ad-campaigns/update-ad-set)
- [Delete campaign](/ad-campaigns/delete-ad-campaign)
- [Get campaign tree](/ad-campaigns/get-ad-tree)