# Manage ads

Pause or resume Amazon Ads campaigns, ad groups and ads, rename them, change budgets and default bids, and archive them.

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

Amazon keeps an enabled, paused or archived state at each level, and Zernio writes to the level you call.

## Pause or resume

`PUT /v1/ads/{adId}/status` sets the ad's own state. Its ad group, 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: '6ae0968fa23091cc35b72199' },
  body: { status: 'paused' }
});
```
</Tab>
<Tab value="Python">
```python
paused = client.ad_campaigns.update_ad_status(
    ad_id="6ae0968fa23091cc35b72199",
    status="paused",
)
```
</Tab>
<Tab value="curl">
```bash
curl -X PUT "https://zernio.com/api/v1/ads/6ae0968fa23091cc35b72199/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 group's state the same way.

## Other changes

| Change | Call | Amazon behaviour |
|--------|------|------------------|
| Rename | `name` on `PUT /v1/ads/campaigns/{campaignId}` or `PUT /v1/ads/ad-sets/{adSetId}` | Renames the campaign or ad group. Of the ads, only Sponsored Brands ads have a name to change |
| Budget | `budget: { amount, type }` on `PUT /v1/ads/campaigns/{campaignId}` | Changes the campaign budget. Sponsored Brands keeps the daily or lifetime type it was created with |
| Default bid | `bidStrategy: "LOWEST_COST_WITH_BID_CAP"` and `bidAmount` on `PUT /v1/ads/ad-sets/{adSetId}` | Changes a Sponsored Products or Sponsored Display ad group's default bid |
| Keyword bid | `cpcBid` on `PATCH /v1/ads/keywords/{keywordId}` | See [Keywords](/platforms/amazon-ads/keywords#change-or-archive-a-keyword) |
| Archive | `DELETE /v1/ads/{adId}`, `DELETE /v1/ads/ad-sets/{adSetId}` or `DELETE /v1/ads/campaigns/{campaignId}` | Archives on Amazon, which cannot be undone |

## How it behaves

- An ad reads `paused` while its campaign or ad group is paused, even when its own state is enabled: `configuredStatus` shows the ad's own.
- Archive is Amazon's delete. An archived campaign, ad group or ad stays readable as `cancelled`, but it can never be enabled again.
- Amazon product ads have no name of their own, so an ad keeps the `name` you sent at create.
- Sponsored Brands ad groups have no bid: their bids live on keywords and targets.
- An ad reads `active` while it is out of daily budget or bid too low, since the budget resets. Account holds such as a payment failure read `error`.
- A level archived in the Amazon Ads console settles as `cancelled` on the next sync.

## If it fails

| Error | Cause | Fix |
|-------|-------|-----|
| `422` with `param: "budget.type"` | A lifetime budget on Sponsored Products or Sponsored Display, or a budget type other than the one a Sponsored Brands campaign was created with | Send the campaign's own budget type. |
| `422` on a bid | A default bid on a Sponsored Brands ad group | Change the keyword or target bids instead. |
| `501` with code `feature_not_available` | A creative change | Create a new ad. |

## Related

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