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

# Update Ad

> Pause, resume, archive or delete a Reddit ad you boosted through Ayrshare.

Change the status of a Reddit ad you created with [Boost Post](https://www.ayrshare.com/docs/apis/ads/reddit/boost-post.md). The ad and the campaign Ayrshare made for it change together.

<ul>
  <li>`DELETED` archives the ad on Reddit, the same as `ARCHIVED`. It then reads `adStatus: "ARCHIVED"` in [Boosted Ads](https://www.ayrshare.com/docs/apis/ads/reddit/get-boosted-ads.md) once its cached answer refreshes (see `nextUpdate`).</li>
  <li>An ad another profile boosted answers `code: 400`. An ad Ayrshare has no record of can be paused, archived or deleted; setting it to `ACTIVE` answers `code: 400`.</li>
  <li>If the ad's campaign also holds ads made outside Ayrshare, only this ad changes. To set it to `ACTIVE`, the campaign must be active in Reddit Ads, or the answer is `code: 369`.</li>
  <li>If a change to `ACTIVE` fails and Reddit cannot confirm the ad is stopped again, the error carries a `warning` that the ad may be live and spending, and the ad reads `adStatus: "ACTIVE"`. Check it, and pause it if needed.</li>
  <li>If you send requests faster than Reddit allows, the answer is `code: 364` with HTTP 429.</li>
</ul>

## Header Parameters

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## Body Parameters

**adId** `string` *required*

The Reddit ad ID, for example `2707300000000000001`.

**status** `string` *required*

`ACTIVE`, `PAUSED`, `ARCHIVED` or `DELETED`. Upper or lower case.

```bash cURL theme={"system"}
curl -X PUT https://api.ayrshare.com/api/ads/reddit/ads \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "adId": "2707300000000000001",
    "status": "PAUSED"
  }'
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "adId": "2707300000000000001",
  "requestedStatus": "PAUSED"
}
```

```json 400: Invalid status theme={"system"}
{
  "action": "request",
  "status": "error",
  "code": 101,
  "message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
  "details": "Invalid status: STOPPED. Status must be one of ACTIVE, PAUSED, DELETED, ARCHIVED."
}
```

```json 400: Resume failed, ad may be live theme={"system"}
{
  "action": "ads",
  "status": "error",
  "code": 369,
  "message": "Unable to boost post. Please try again.",
  "warning": "The status change failed, and reddit did not confirm that ad 2707300000000000001 is stopped. It may be live and spending. Check it on reddit or pause it."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.