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

# 投稿をブースト

> Reddit のコミュニティ投稿をブースト。Ayrshare がキャンペーン、広告グループ、広告を作成し、目標・予算・カスタムオーディエンスを設定。

既存のReddit投稿をブーストします。Ayrshareは、Reddit広告アカウント内に、投稿をプロモーションするキャンペーン、広告グループ、広告を作成します。

### 制限事項

<ul>
  <li>Reddit広告はアカウントごとに有効化されます。有効化するには、お問い合わせください。</li>
  <li>**コミュニティ投稿のみ。** ブーストできるのはコミュニティ（subreddit）内の投稿です。自分のプロフィール（`r/u_<username>`）上の投稿はブーストできず、`code: 101`が返されます。</li>
  <li>**コンバージョンピクセルが必要です。** 目標にかかわらず、Redditはピクセルがない広告を配信しません。ピクセルIDを`platformOptions.reddit.pixelId`で送信してください。送信しない場合、ブーストに対して`code: 101`が返されます。ピクセルIDはReddit Ads Events Managerで確認できます。</li>
</ul>

<ul>
  <li>Redditを連携し、広告の権限（`adsread`、`adsedit`、`adsconversions`）を付与してください。Redditが連携されていない場合は`code: 156`が返されます。広告の権限が不足している場合、またはRedditが連携を受け付けなくなった場合は`code: 420`が返されます。Redditを再連携し、権限を付与してください。</li>
  <li>予算は広告アカウントの通貨で指定します。`budget.currency`は送信しないでください。送信すると`code: 101`が返されます。</li>
  <li>予算は広告グループに設定されます。`budget.level: "campaign"`を指定すると`code: 101`が返されます。</li>
  <li>広告アカウントには支払い方法が必要です。支払い方法がない場合、ブーストに対して`code: 101`が返されます。Reddit Adsで支払い方法を追加してください。複数ある場合は、`platformOptions.reddit.fundingInstrumentId`で指定してください。</li>
  <li>Redditでは`callToAction`、`attachTo`、`targeting.excludedLocations`、年齢ターゲティング、`targeting.locations.regions`、`targeting.locations.cities`は受け付けられません。これらを送信すると`code: 101`が返されます。</li>
  <li>Redditはすべての新しい広告を審査します。承認されるまで、広告には`review.status: "PENDING_APPROVAL"`が表示されます。</li>
  <li>Redditが新しい広告を有効にできなかった場合でも、ブーストは作成され、レスポンスに`warning`が含まれます。通常、広告は一時停止（`adStatus: "PAUSED"`）の状態となり、[ステータスの更新](https://www.ayrshare.com/docs/apis/ads/reddit/put-ad-update.md)により再開できます。Redditが広告の一時停止を確認できない場合、レスポンスは`adStatus: "ACTIVE"`となり、広告が配信中で費用が発生している可能性があることを警告します。広告を確認し、必要に応じてステータスの更新により一時停止してください。</li>
  <li>ステータスを`active`に更新できず、Redditが広告の再停止を確認できない場合、エラーに`warning`が含まれ、広告が配信中で費用が発生している可能性があることを警告します。広告は`adStatus: "ACTIVE"`と表示されます。広告を確認し、必要に応じてステータスの更新により一時停止してください。</li>
  <li>Redditが許可する頻度を超えてリクエストを送信すると、HTTP 429とともに`code: 364`が返されます。`details`にはRedditのメッセージと、Redditから提示された場合は再試行できるまでの秒数が含まれます。</li>
  <li>インサイトでは、費用は広告アカウントの通貨で表示されます。`spendUsd`はその通貨がUSDの場合にのみ設定され、それ以外の場合は`null`になります。</li>
</ul>

### 広告の目標

<ul>
  <li>`brand_awareness`: できるだけ多くの人に投稿を表示します。</li>
  <li>`website_visits`: ウェブサイトへのクリックを獲得します。</li>
  <li>`leads`: ピクセルで計測される登録やリードを獲得します。</li>
  <li>`sales`: ピクセルで計測される購入を獲得します。</li>
</ul>

## カスタムオーディエンスをターゲットにする

Redditのカスタムオーディエンスに含まれる人に広告を届ける、または除外するには、`targeting.audiences`と`targeting.excludedAudiences`を送信します。それぞれ[オーディエンス](https://www.ayrshare.com/docs/apis/ads/reddit/get-audiences.md)で取得したオーディエンスIDのリストです。顧客リスト、サイト訪問者、その他広告アカウント上のあらゆるオーディエンスを指定できます。オーディエンスは[オーディエンスを作成](https://www.ayrshare.com/docs/apis/ads/reddit/create-audience.md)またはReddit Ads Managerで作成します。

```json theme={"system"}
{
  "accountId": "a2_abc123",
  "socialPostId": "1abc27",
  "goal": "website_visits",
  "budget": { "amount": 20, "type": "daily" },
  "targeting": {
    "locations": { "countries": ["US"] },
    "audiences": ["ca.129482487242828"],
    "excludedAudiences": ["ca.129482487242999"]
  },
  "platformOptions": { "reddit": { "pixelId": "t2_pixel123" } }
}
```

<ul>
  <li>`targeting.audiences`: 設定した他のターゲティングの範囲内で、これらのいずれかのオーディエンスに含まれる人に広告が届きます。</li>
  <li>`targeting.excludedAudiences`: これらのいずれかのオーディエンスに含まれる人には、広告が表示されません。</li>
  <li>作成中のオーディエンス（`status.ready: false`）は、Redditが1,000人以上をマッチングするまで配信されない場合があります。</li>
  <li>`targeting.locations`は引き続き必須です。</li>
  <li>各リストには1つ以上のIDが必要です。空のリストを送信する代わりに、フィールドを省略してください。空のリスト、またはRedditのオーディエンスIDではないIDを送信すると、何も作成される前に`code: 101`付きの`400`が返されます。</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`

## ボディパラメータ

**idempotencyKey** `string`

このブーストリクエストの一意で空でないキー。同じキーで同じペイロードを再試行すると、重複した広告の作成を回避できます。異なるペイロードでキーを再利用すると、HTTP 409が返されます。キーはこのプラットフォームでのみ有効で、他のプラットフォームで同じキーを使うと別のブーストが作成されます。処理中のリクエストも409を返します。予約が利用できない場合は、広告を作成せずに503が返されます。

**accountId** `string` *required*

Reddit広告アカウントのID。例: `a2_abc123`。

**postId** `string`

ブーストするAyrshare投稿ID。`postId`または`socialPostId`を送信してください。両方を送信する場合、`postId` は自分の投稿のいずれかである必要があります。そうでない場合、ブーストは `code: 369` で失敗します。

**socialPostId** `string`

Redditの投稿ID（`t3_`の有無は問いません）。例: `1abc27`。投稿はコミュニティ内のものである必要があります。Redditが認識しないIDには`code: 369`が返されます。

**goal** `string` *required*

[広告の目標](#ad-goals)のいずれか。

**budget** `object` *required*

**子属性**

**amount** `number` *required*

費用の金額。小数点以下2桁まで指定できます。

**type** `string` (default: daily)

`daily`または`lifetime`。通算予算には`schedule.end`が必要です。

**schedule** `object`

**子属性**

**start** `string`

広告を開始するISO日時。デフォルトは現在時刻です。過去の日時を指定すると、広告はすぐに開始されます。

**end** `string`

広告を停止するISO日時。省略すると、一時停止するまで広告が配信されます。`start`より後である必要があります。どちらの日時も10年より先にはできません。いずれかのルールに違反すると`code: 101`が返されます。

**targeting** `object` *required*

**子属性**

**locations** `object` *required*

広告を表示する場所。`countries`の下に、大文字2文字の国コードを1つ以上指定します。`"us"`のような小文字のコードには`code: 101`が返されます。

```json theme={"system"}
{ "countries": ["US", "CA"] }
```

**genders** `string`

`all`、`male`、または`female`。

**interests** `array`

[興味関心](https://www.ayrshare.com/docs/apis/ads/reddit/get-ad-interests.md)で取得した興味関心のID。

**keywords** `array`

広告を表示する検索語句。それぞれ最大100文字です。

**audiences** `array`

広告を届けるカスタムオーディエンスのID。[オーディエンス](https://www.ayrshare.com/docs/apis/ads/reddit/get-audiences.md)から取得し、1つ以上指定します。[カスタムオーディエンスをターゲットにする](#audiences)を参照してください。

**excludedAudiences** `array`

広告を表示しない人のカスタムオーディエンスのID。1つ以上指定します。[カスタムオーディエンスをターゲットにする](#audiences)を参照してください。

**status** `string` (default: active)

`active`または`paused`。

**platformOptions.reddit** `object` *required*

**子属性**

**pixelId** `string` *required*

RedditのコンバージョンピクセルID。

**fundingInstrumentId** `string`

広告の費用を支払う支払い方法。広告アカウントに複数ある場合は必須です。

**communities** `array`

広告を表示するコミュニティ。`r/`を除いた名前で指定します。例: `["gardening"]`。各名前は2〜21文字の英字、数字、アンダースコアです。空のリストを送信する代わりに、フィールドを省略してください。

**adName** `string`

キャンペーン、広告グループ、広告の名前（最大255文字）。デフォルトは会社名、投稿、時刻です。`idempotencyKey` を送信すると、デフォルトの名前の末尾に短いリクエスト参照も付きます。この参照は同じキーでは変わりません。

```bash cURL theme={"system"}
curl -X POST https://api.ayrshare.com/api/ads/reddit/boost \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "a2_abc123",
    "socialPostId": "1abc27",
    "goal": "website_visits",
    "budget": { "amount": 50, "type": "daily" },
    "targeting": { "locations": { "countries": ["US"] } },
    "platformOptions": { "reddit": { "pixelId": "YOUR_PIXEL_ID" } }
  }'
```

```json 200: Post Boosted theme={"system"}
{
  "status": "success",
  "id": "2707300000000000001",
  "platform": "reddit",
  "adStatus": "ACTIVE",
  "budget": { "amount": 50, "type": "daily", "level": "adSet", "currency": "USD" },
  "schedule": { "start": 1791892800000 },
  "platformIds": {
    "campaignId": "2707100000000000001",
    "adGroupId": "2707200000000000001",
    "adId": "2707300000000000001"
  }
}
```

```json 400: No pixel 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": "platformOptions.reddit.pixelId is required on reddit: Reddit runs no ad without a conversion pixel. Find it in Reddit Ads Events Manager."
}
```

```json 400: Profile post 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": "Post 1abc27 is on a Reddit profile (r/u_example). reddit boosts posts in communities only."
}
```

```json 429: Rate limited theme={"system"}
{
  "action": "rate limit",
  "status": "error",
  "code": 364,
  "message": "You are making too many requests. Please reduce the number of requests.",
  "details": "Too many requests Retry in 30 seconds."
}
```


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