> ## 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

> Ayrshare経由でブーストしたReddit広告を一時停止、再開、アーカイブ、または削除します。

[投稿をブースト](https://www.ayrshare.com/docs/apis/ads/reddit/boost-post.md)で作成したReddit広告のステータスを変更します。広告と、Ayrshareがその広告用に作成したキャンペーンが一緒に変更されます。

<ul>
  <li>`DELETED`は、`ARCHIVED`と同じくReddit上で広告をアーカイブします。キャッシュされた結果が更新されると（`nextUpdate`を参照）、[ブーストされた広告](https://www.ayrshare.com/docs/apis/ads/reddit/get-boosted-ads.md)では`adStatus: "ARCHIVED"`と表示されます。</li>
  <li>別のプロフィールがブーストした広告には`code: 400`が返されます。Ayrshareに記録のない広告は、一時停止、アーカイブ、削除はできますが、`ACTIVE`に設定すると`code: 400`が返されます。</li>
  <li>広告のキャンペーンにAyrshare以外で作成された広告も含まれている場合、変更されるのはこの広告のみです。`ACTIVE`に設定するには、Reddit Adsでキャンペーンが有効になっている必要があります。そうでない場合は`code: 369`が返されます。</li>
  <li>`ACTIVE`への変更が失敗し、Redditが広告の再停止を確認できない場合、エラーに`warning`が含まれ、広告が配信中で費用が発生している可能性があることを警告します。広告は`adStatus: "ACTIVE"`と表示されます。広告を確認し、必要に応じて一時停止してください。</li>
  <li>Redditが許可する頻度を超えてリクエストを送信すると、HTTP 429とともに`code: 364`が返されます。</li>
</ul>

## ヘッダーパラメータ

**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`

## ボディパラメータ

**adId** `string` *required*

Redditの広告ID。例: `2707300000000000001`。

**status** `string` *required*

`ACTIVE`、`PAUSED`、`ARCHIVED`、または`DELETED`。大文字でも小文字でも指定できます。

```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.