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

# Boost Post

> Boost a Reddit community post as a promoted post. Ayrshare creates the campaign, ad group and ad, with ad goals, budget and custom audience targeting.

Boost an existing Reddit post. Ayrshare creates a campaign, an ad group and an ad that promotes your post, in your Reddit ad account.

### Limits

<ul>
  <li>Reddit ads are turned on per account. Contact us to enable them.</li>
  <li>**Community posts only.** You can boost a post in a community (a subreddit). A post on your own profile (`r/u_<username>`) cannot be boosted and answers `code: 101`.</li>
  <li>**A conversion pixel is required.** Reddit runs no ad without one, whatever the goal. Send your pixel ID in `platformOptions.reddit.pixelId`, or the boost answers `code: 101`. Find it in Reddit Ads Events Manager.</li>
</ul>

<ul>
  <li>Link Reddit and grant the ads permissions (`adsread`, `adsedit`, `adsconversions`). If Reddit is not linked, the answer is `code: 156`. If the ads permissions are missing, or Reddit no longer accepts the link, the answer is `code: 420`: relink Reddit and grant the permissions.</li>
  <li>Budget is in your ad account's currency. Do not send `budget.currency`: sending it answers `code: 101`.</li>
  <li>The budget sits on the ad group. `budget.level: "campaign"` answers `code: 101`.</li>
  <li>Your ad account needs a funding instrument. If it has none, the boost answers `code: 101`: add a payment method in Reddit Ads. If it has more than one, name it in `platformOptions.reddit.fundingInstrumentId`.</li>
  <li>`callToAction`, `attachTo`, `targeting.excludedLocations`, age targeting, `targeting.locations.regions` and `targeting.locations.cities` are not accepted on Reddit. Sending them answers `code: 101`.</li>
  <li>Reddit reviews every new ad. Until it is approved, the ad shows `review.status: "PENDING_APPROVAL"`.</li>
  <li>If Reddit fails to switch a new ad on, the boost is still created and the response carries a `warning`. Usually the ad is paused (`adStatus: "PAUSED"`), and you resume it with a [status update](https://www.ayrshare.com/docs/apis/ads/reddit/put-ad-update.md). If Reddit cannot confirm the ad is paused, the response says `adStatus: "ACTIVE"` and warns that the ad may be live and spending. Check it, and pause it with a status update if needed.</li>
  <li>If a status update 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 with a status update if needed.</li>
  <li>If you send requests faster than Reddit allows, the answer is `code: 364` with HTTP 429. `details` carries Reddit's message and, when Reddit says, how many seconds until you can retry.</li>
  <li>Insights show spend in your ad account's currency. `spendUsd` is set only when that currency is USD, and is `null` otherwise.</li>
</ul>

### Ad Goals

<ul>
  <li>`brand_awareness`: show the post to as many people as possible.</li>
  <li>`website_visits`: get clicks to your website.</li>
  <li>`leads`: get sign-ups or leads tracked by your pixel.</li>
  <li>`sales`: get purchases tracked by your pixel.</li>
</ul>

## Target Custom Audiences

To reach, or leave out, people in your Reddit custom audiences, send `targeting.audiences` and `targeting.excludedAudiences`. Each is a list of audience IDs from [Audiences](https://www.ayrshare.com/docs/apis/ads/reddit/get-audiences.md): your customer lists, website visitors, and any other audience on the ad account. Create them with [Create Audience](https://www.ayrshare.com/docs/apis/ads/reddit/create-audience.md) or in 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`: the ad reaches people in any of these audiences, within the other targeting you set.</li>
  <li>`targeting.excludedAudiences`: people in any of these audiences never see the ad.</li>
  <li>An audience still filling (`status.ready: false`) may not deliver until Reddit has matched at least 1,000 people.</li>
  <li>`targeting.locations` is still required.</li>
  <li>Each list needs at least one ID; leave the field out instead of sending an empty list. An empty list, or an ID that is not a Reddit audience ID, returns a `400` with `code: 101` before anything is created.</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

**idempotencyKey** `string`

A unique, non-empty key for this boost request. Retry the same payload with the same key to avoid creating a duplicate ad. Reusing the key with a different payload returns HTTP 409. The key applies to this platform only: the same key on another platform starts a separate boost. A request still in progress also returns 409; an unavailable reservation returns 503 without creating an ad.

**accountId** `string` *required*

Your Reddit ad account ID, for example `a2_abc123`.

**postId** `string`

The Ayrshare post ID to boost. Send `postId` or `socialPostId`. If you send both, `postId` must be one of your own posts, or the boost fails with `code: 369`.

**socialPostId** `string`

The Reddit post ID, with or without `t3_`, for example `1abc27`. The post must be in a community. An ID Reddit does not know answers `code: 369`.

**goal** `string` *required*

One of the [ad goals](#ad-goals).

**budget** `object` *required*

**child attributes**

**amount** `number` *required*

Amount to spend, up to two decimal places.

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

`daily` or `lifetime`. A lifetime budget needs `schedule.end`.

**schedule** `object`

**child attributes**

**start** `string`

ISO date-time the ad starts. Defaults to now. A start in the past starts the ad now.

**end** `string`

ISO date-time the ad stops. Leave it out to run until you pause it. It must be after `start`. Neither date may be more than 10 years ahead. Breaking either rule answers `code: 101`.

**targeting** `object` *required*

**child attributes**

**locations** `object` *required*

Where to show the ad: at least one upper-case two-letter country code under `countries`. Lower-case codes such as `"us"` answer `code: 101`.

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

**genders** `string`

`all`, `male` or `female`.

**interests** `array`

Interest IDs from [Interests](https://www.ayrshare.com/docs/apis/ads/reddit/get-ad-interests.md).

**keywords** `array`

Search terms to show the ad for, up to 100 characters each.

**audiences** `array`

Custom audience IDs to reach, from [Audiences](https://www.ayrshare.com/docs/apis/ads/reddit/get-audiences.md), at least one. See [Target Custom Audiences](#audiences).

**excludedAudiences** `array`

Custom audience IDs whose people never see the ad, at least one. See [Target Custom Audiences](#audiences).

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

`active` or `paused`.

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

**child attributes**

**pixelId** `string` *required*

Your Reddit conversion pixel ID.

**fundingInstrumentId** `string`

The funding instrument that pays for the ad. Required when your ad account has more than one.

**communities** `array`

Communities to show the ad in, by name without `r/`, for example `["gardening"]`. Each name is 2 to 21 letters, digits or underscores. Leave it out rather than send an empty list.

**adName** `string`

Name of the campaign, ad group and ad, up to 255 characters. Defaults to your company name, the post and the time. If you send an `idempotencyKey`, the default name also ends in a short request reference that stays the same for that key.

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