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

> Promote a Snap from your Snapchat Public Profile as an ad. Ayrshare creates the campaign, ad squad and ad, with ad goals, budget and audience targeting.

Promote a Snap that your Snapchat Public Profile posted. Ayrshare adds the Snap to your ad account, waits for Snapchat to get it ready, then creates a creative, a campaign, an ad squad and an ad in your Snapchat ad account.

<ul>
  <li>Snapchat ads are turned on per account. Contact us to enable them.</li>
  <li>Link Snapchat. The link already includes the ads permission (`snapchat-marketing-api`), so you do not need to relink.</li>
  <li>If Snapchat no longer accepts your link, for example because access was removed in Snapchat, every Snapchat ads request answers `code: 420` with HTTP 401. Relink Snapchat and try again.</li>
  <li>The budget is set on the ad squad, in your ad account's currency. Do not send `budget.currency` or `budget.level: "campaign"`.</li>
  <li>The smallest budget is 5 in your ad account's currency.</li>
  <li>Snapchat usually gets a Snap ready in a few seconds. If it is not ready within 45 seconds, the answer is `code: 369` and no ad is created, so nothing spends. Try again in a few minutes with a new `idempotencyKey`.</li>
  <li>If Snapchat cannot get a Snap ready at all, the answer is also `code: 369`, and `details` says Snapchat could not prepare it. Retrying that Snap will not help: check that it is still on your Public Profile, or boost another Snap.</li>
  <li>Target countries only. `targeting.locations.regions`, `targeting.locations.cities`, `targeting.excludedLocations`, `targeting.keywords` and `attachTo` answer `code: 101`.</li>
  <li>Snapchat reviews every new ad. Until it is approved, the ad's `review.status` in [Boosted Ads](https://www.ayrshare.com/docs/apis/ads/snapchat/get-boosted-ads.md) is `PENDING`.</li>
  <li>If Snapchat fails to switch a new ad on, the boost is still created and the response carries a `warning`. Usually the ad is paused (`adStatus` is `PAUSED`): resume it with a status update. If Snapchat reports the ad as running, `adStatus` is `ACTIVE`: pause it with a status update if you did not want it live. In the rare case Snapchat cannot confirm the ad's state, `adStatus` is `UNKNOWN`: do not resume it, and contact us with the ad ID.</li>
  <li>If you send requests faster than Snapchat allows, the answer is `code: 364` with HTTP 429 and Snapchat's message in `details`. Wait a minute and retry. If you sent an `idempotencyKey`, retry with a new one: the same key replays the `code: 364` answer.</li>
</ul>

### Ad Goals

<ul>
  <li>`brand_awareness`: show the Snap to as many people as possible.</li>
  <li>`video_views`: get views of a video Snap.</li>
  <li>`traffic`: send people to your website. Needs `callToAction` with an `https://` link.</li>
</ul>

## Target Audience Segments

To reach, or leave out, people in your Snapchat audience segments, send `targeting.audiences` and `targeting.excludedAudiences`. Each is a list of segment ids from [Audiences](https://www.ayrshare.com/docs/apis/ads/snapchat/get-audiences.md): your customer lists, website visitors and lookalikes. Create them with [Create Audience](https://www.ayrshare.com/docs/apis/ads/snapchat/create-audience.md) or in Snapchat Ads Manager.

```json theme={"system"}
{
  "accountId": "5a0d1b2c-0000-4000-8000-000000000003",
  "postId": "Ut1fWU6XkqkMayHGnJZ",
  "goal": "brand_awareness",
  "budget": { "amount": 20, "type": "daily" },
  "targeting": {
    "locations": { "countries": ["US"] },
    "audiences": ["8c1e2f3a-0000-4000-8000-000000000101"],
    "excludedAudiences": ["8c1e2f3a-0000-4000-8000-000000000103"]
  }
}
```

<ul>
  <li>The ad reaches people in the countries and ages you target who are also in the segments, and never people in an excluded segment.</li>
  <li>Each list holds at least one id. An empty list returns `code: 101`: leave the field out instead.</li>
  <li>Snapchat targets a segment only once it is ready, which happens when Snapchat has matched enough people. Check `status.ready` in [Audiences](https://www.ayrshare.com/docs/apis/ads/snapchat/get-audiences.md) before you boost.</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

**accountId** `string` *required*

Your Snapchat ad account ID, for example `5a0d0000-0000-4000-8000-000000000003`.

**postId** `string`

The Ayrshare post ID to boost. Send `postId` or `socialPostId`. For a Snapchat Story posted through Ayrshare, send `postId` on its own: Ayrshare boosts the Snap that post added, even when the story holds several Snaps, and the ad stays linked to the post. A `postId` sent on its own must be a post Ayrshare published to Snapchat, or the boost fails with `code: 369`. If you send both, `socialPostId` decides which Snap is boosted, and `postId` must be one of your own posts, or the boost fails with `code: 369`.

**socialPostId** `string`

The ID of the Snap to boost. This is the `mediaId` in the post's Snapchat result. You can also send the story `id` from that result: Ayrshare boosts the Snap in that story. A story that holds more than one Snap returns error `101`, so send the post's `postId` on its own, or the Snap's `mediaId`, instead.

**goal** `string` *required*

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

**budget** `object` *required*

**child attributes**

**amount** `number` *required*

Amount to spend, at least 5, 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.

**end** `string`

ISO date-time the ad stops. Leave it out to run until you pause it.

**targeting** `object` *required*

**child attributes**

**locations** `object` *required*

Where to show the ad: two-letter country codes under `countries`.

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

**ageMin** `number`

From 18 to 35. Snapchat targets no minimum age above 35, so 36 and over answer `code: 101`.

**ageMax** `number`

From 18 to 55, or 65 for no upper limit. Snapchat targets no maximum age above 55, so 56 to 64 answer `code: 101`.

**genders** `string`

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

**interests** `array`

Interest IDs from `GET /ads/snapchat/interests?search=<term>`, for example `SLC_1`.

**audiences** `array`

Audience segment ids to reach, from [Audiences](https://www.ayrshare.com/docs/apis/ads/snapchat/get-audiences.md). See [Target audience segments](#audiences).

**excludedAudiences** `array`

Audience segment ids to leave out, from [Audiences](https://www.ayrshare.com/docs/apis/ads/snapchat/get-audiences.md).

**callToAction** `object`

Required for the `traffic` goal, and only accepted with it.

**child attributes**

**type** `string` *required*

Snapchat's web-view buttons: `MORE`, `VIEW`, `SHOP_NOW`, `SIGN_UP`, `BOOK_NOW`, `APPLY_NOW`, `ORDER_NOW`, `BUY_TICKETS`, `GET_NOW`, `DOWNLOAD`, `WATCH`, `LISTEN`, `READ`, `PLAY`, `PLAY_GAME`, `TRY`, `DONATE`, `VOTE`, `RESPOND`, `SHOW`, `SHOWTIMES`, `VIEW_MENU` or `PRE_REGISTER`. `LEARN_MORE` is sent as `MORE`, and `VIEW_MORE` as `VIEW`.

**link** `string` *required*

The `https://` page to open.

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

`active` or `paused`.

**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: the first answer is replayed, including an error. 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. After a `code: 369` "still preparing" or a `code: 364` rate limit, retry with a new key.

**platformOptions.snapchat** `object`

**child attributes**

**placements** `array`

Where on Snapchat to show the ad: `INTERSTITIAL_USER`, `INTERSTITIAL_CONTENT`, `INTERSTITIAL_SPOTLIGHT`, `INSTREAM`, `INSTREAM_SPOTLIGHT`, `PUBLIC_STORIES_INSTREAM` or `CHAT_FEED`. Leave it out to let Snapchat choose.

* `CHAT_FEED` needs goal `traffic`, and `INTERSTITIAL_USER` or `INTERSTITIAL_CONTENT` with it.
* `INTERSTITIAL_SPOTLIGHT` needs another position with it, and a video Snap.

**headline** `string`

The ad's headline, up to 34 characters. Defaults to your company name.

**brandName** `string`

Shown instead of your Public Profile's name, up to 32 characters.

**adName** `string`

Name of the campaign, ad squad and ad, up to 375 characters. Defaults to your company name, the Snap 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/snapchat/boost \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "5a0d0000-0000-4000-8000-000000000003",
    "socialPostId": "6f1c2d3e-0000-4000-8000-00000000000a",
    "goal": "brand_awareness",
    "budget": { "amount": 20, "type": "daily" },
    "targeting": { "locations": { "countries": ["US"] } },
    "platformOptions": { "snapchat": { "placements": ["INTERSTITIAL_USER", "INSTREAM"] } }
  }'
```

```json 200: Snap Boosted theme={"system"}
{
  "status": "success",
  "id": "c3a1e2d4-0000-4000-8000-0000000000ad",
  "platform": "snapchat",
  "adStatus": "ACTIVE",
  "budget": { "amount": 20, "type": "daily", "level": "adSet", "currency": "USD" },
  "schedule": { "start": 1791892800000 },
  "platformIds": {
    "mediaId": "b7f0e2d4-0000-4000-8000-0000000000me",
    "creativeId": "a1b2c3d4-0000-4000-8000-0000000000cr",
    "campaignId": "d4c3b2a1-0000-4000-8000-0000000000ca",
    "adSquadId": "e5f6a7b8-0000-4000-8000-0000000000sq",
    "adId": "c3a1e2d4-0000-4000-8000-0000000000ad"
  }
}
```

```json 400: CHAT_FEED alone 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.snapchat.placements: CHAT_FEED cannot run alone: add one of INTERSTITIAL_USER, INTERSTITIAL_CONTENT beside it."
}
```

```json 400: Snap not ready theme={"system"}
{
  "action": "ads",
  "status": "error",
  "code": 369,
  "message": "Unable to boost post. Please try again.",
  "details": "Snapchat is still preparing Snap 6f1c2d3e-0000-4000-8000-00000000000a for ads. No ad was created and nothing spends. Try again in a few minutes with a new idempotency key."
}
```

```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": "<Snapchat's own message about the rate limit>"
}
```


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