Call it
curl https://api.peume.com/v1/call/boost-post-as-ad \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"name": "your name",
"goal": "engagement",
"currency": "USD"
}
}'const res = await fetch("https://api.peume.com/v1/call/boost-post-as-ad", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"name": "your name",
"goal": "engagement",
"currency": "USD"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/boost-post-as-ad",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"name": "your name",
"goal": "engagement",
"currency": "USD"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: boost-post-as-ad.
Parameters
stagebooleanSend true to store this write as a staged change instead of applying it. The response is `202` with the change, and POST /v1/ads/changes/{changeId}/confirm applies it later. Cannot be combined with `validateOnly`.
creativeFeaturesobjectcreativeFeatures
postIdstringThe post id (24 hex characters) returned when the post was created through. Send this or platformPostId. A value that is not a id is boosted as the platform post id, the same as platformPostId; a id that matches no post is a 404 on postId.
platformPostIdstringPlatform post ID (alternative to postId). - Reddit: the post id, with or without the `t3_` prefix. - Meta: a Page post id (`<pageId>_<postId>` or the bare post id) or an Instagram media id. - business-login connection (platform metaads): the id is resolved live. An Instagram media id is boosted as that media, running as the Instagram account that owns it.
accountIdRequiredstringaccount id. Normally the connected posting account (facebook, instagram, tiktok, linkedin, pinterest, twitter) or a redditads account. A Google Ads account (googleads) is a 400: a Google ad needs its own images and copy, so create it with POST /v1/ads/create. TikTok: the connection (platform tiktokads) is also accepted when the post brings its own authorization (sparkAuthCode or sparkPosts), so Spark ads need no organic TikTok account connected. Such a call cannot use a postId: send the TikTok item id (as platformPostId, or in postId).
adAccountIdRequiredstringPlatform ad account ID
nameRequiredstringcampaignNamestringExact name for the campaign this boost provisions. Omitted keeps the default `<name> - Campaign`. Every platform: on LinkedIn it names the campaign group. Ignored on the Meta attach shape (`adSetId`), which creates no campaign.
adSetNamestringExact name for the ad-group level this boost provisions. Omitted keeps the default `<name> - Ad Group`. Meta: ad set; TikTok, Pinterest: ad group; X: line item; LinkedIn: the campaign under the campaign group. Ignored on the Meta attach shape.
goalRequiredstringAvailable goals vary by platform. Meta (Facebook/Instagram) and TikTok support all 7. LinkedIn supports all except app_promotion. X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest supports only engagement, traffic, awareness, video_views. Reddit supports traffic, awareness, video_views, lead_generation and conversions.
engagement · traffic · awareness · video_views · lead_generation · conversions · app_promotion
adSetIdstringMeta, or TikTok with `smartPlus: true`. Attach the boosted post to this existing ad set instead of creating a campaign. - Meta: the ad set then owns budget, schedule and targeting; sending those too is a 400. - TikTok: the id is an existing Smart+ ad group. The post is added as one more Spark ad (up to 30 per ad group), under the identity its `sparkAuthCode` creates. Goal and budget are inherited from the Smart+ campaign; a regular ad group is rejected with a 400.
existingCampaignIdstringTikTok only. Create the ad group and the Spark ad under this existing TikTok campaign instead of creating a new campaign. The campaign keeps its own status and objective (the objective must fit `goal`). Cannot be combined with adSetId or smartPlus. On Meta use POST /v1/ads/create with existingCampaignId.
identityIdstringTikTok only. The identity the ad runs as (the profile shown on the ad), from GET /v1/ads/tiktok-identities. Default: the connected TikTok account's own identity. Must be authorized on the advertiser or the call fails naming the available ones.
identityTypestringTikTok only. Type of identityId; resolved from the advertiser's identity list when omitted.
TT_USER · CUSTOMIZED_USER · BC_AUTH_TT
budgetAmountnumberBudget in whole currency units, the same flat field as POST /v1/ads/create. Required unless adSetId is set. Minimum varies: TikTok=$20, Pinterest=$5, others=$1
budgetTypestringGoes together with budgetAmount. lifetime requires schedule.endDate.
daily · lifetime
lifetimeBudgetCapnumberX only (400 on another platform or on a lifetime budget). A lifetime total, in whole currency units, that caps a daily budget (budgetType daily). Must be at least budgetAmount. The line item gets both daily_budget_amount_local_micro and total_budget_amount_local_micro and stops spending once the total is reached. Read back as budget.daily and budget.lifetime.
budgetobjectAlias of budgetAmount + budgetType, kept for existing callers
instagramAccountIdstringMeta only. Instagram identity the ad runs AS (creative.instagram_user_id), overriding the account linked to the Page. Live-verified against a Page-post creative.
destinationTypestringMeta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as. Independent of plain link CTAs and their goal. A messaging callToAction selects its destination automatically; an explicit destinationType must then match. Lead ads use ON_AD.
INSTAGRAM_PROFILE · WEBSITE · ON_AD · MESSENGER · WHATSAPP · INSTAGRAM_DIRECT
whatsappPhoneNumberstringMeta WhatsApp only. E.164 number already paired with the Page. Omit to use the default pairing. Requires WHATSAPP_MESSAGE callToAction. Stored as creative.whatsappPhoneNumber on the ad.
workflowIdstringMeta messaging boosts only (callToAction MESSAGE_PAGE, WHATSAPP_MESSAGE or INSTAGRAM_MESSAGE). A workflow in the account's profile, started in the conversation a click on the ad opens. Stored on the ad. 400 without a messaging callToAction or on another platform, 404 when no such workflow exists in the profile.
currencystringISO 4217 currency code matching the ad account's currency. Meta only. Optional: resolves it from the ad account when omitted. The value selects the minor-unit exponent converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is).
Example: USD
startDatestringAd-set start time (ISO 8601, e.g. "2026-06-10T09:00:00Z"), mapped to the ad set's `start_time`. When omitted the ad starts delivering immediately. On Meta, TikTok, X, Pinterest and Reddit a value without an offset (`YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account timezone. Same field as on POST /v1/ads/create.
endDatestringAd-set end time (ISO 8601). Required for lifetime budgets. Same field as on POST /v1/ads/create. Maps to the ad set's `end_time` (on X, the line item's `end_time`; X campaigns carry no flight dates). On Pinterest it also goes on the campaign when the ad account needs Campaign Budget Optimization, daily budget included. On Meta, TikTok, X, Pinterest and Reddit, a value without an offset (`YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account timezone, and a date-only end runs to 23:59:59 local. Anything that is not an ISO 8601 date or date-time is a 400 on `e
scheduleobjectAlias of the top-level `startDate` / `endDate`, kept for existing callers. Sending both forms with differing values is a 400.
targetingobjectSame geo/demographic fields as the `TargetingSpec` used by /v1/ads/create. Geo keys (`regions`/`cities`/`zips`/`metros`) resolve via GET /v1/ads/targeting/search?dimension=geo. - Meta only: city radius and lat/lng `customLocations`. They preserve the boosted post's social proof (the ad references the existing post). - LinkedIn: the B2B fields of `TargetingSpec` apply (`industries`, `companySizes`, `seniorities`, `jobFunctions`, `jobTitles`, `skills`). - Reddit: the whole `TargetingSpec` applies, including `communities`, `excludedCommunities`, `conversationKeywords`, `excludedConversationKeywo
rawTargetingobjectMeta only. A Meta-native targeting spec (e.g. `{ "geo_locations": { "cities": [{ "key": "...", "radius": 15, "distance_unit": "kilometer" }] } }`). Sent alone, it is forwarded unchanged. Use it for advanced fields the structured object does not expose (flexible_spec, excluded audiences, business places, user_os, wireless_carrier). **With `targeting`:** rawTargeting is the BASE layer and the built camelCase spec is merged on top, key by key (camelCase wins on collision). - The merge goes one level deep inside `geo_locations` and `excluded_geo_locations` (built sub-keys win; raw-only sub-keys
metaSavedAudienceIdstringMeta only. The id of a Meta saved audience on `adAccountId` (made in Ads Manager, listed by `GET /v1/ads/saved-audiences`). Its targeting is read live from Meta and used as `rawTargeting` for the ad set the boost creates, so `targeting` merges on top of it exactly as it does on `rawTargeting`. Also applied with `validateOnly`. Returns 404 when the id is not on the ad account, 400 `mutually_exclusive_fields` with `rawTargeting`, and 400 with `adSetId` (an existing ad set keeps its targeting) or on another network. Meta requires `targeting_automation` on create: send `targeting.advantage_audie
bidStrategystringDeprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Meta bid strategy applied to the ad set. On TikTok, mapped to `bid_type` / `bid_price` / `deep_bid_type` automatically. On Reddit, applied to the new ad group (see the Reddit section above; 422 for LOWEST_COST_WITH_MIN_ROAS).
bidAmountnumberDeprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`. Backward-compat: providing `bidAmount` without `bidStrategy` is treated as `LOWEST_COST_WITH_BID_CAP`.
roasAverageFloornumberDeprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`. Sent to Meta as `bid_constraints.roas_average_floor` × 10000 (Meta uses fixed-point integers).
platformSpecificDatastringPlatform-specific options. The platform is derived from `accountId`; sending options for a different platform returns a 400. LinkedIn (campaign bidding and delivery controls), Meta (the bid trio) and TikTok (`placements`) have options today. **Meta**: `bidStrategy`, `bidAmount` and `roasAverageFloor` may be sent here instead of at the root, which is the preferred home going forward. Sending the bid fields in BOTH places returns a 400 (`mutually_exclusive_fields`).
trackingobjectMeta only, except `pixelId`, which also picks the Reddit pixel of the new ad group (`promotedObject.pixelId` wins when both are sent). Tracking specs (pixel, URL tags).
specialAdCategoriesarraySpecial ad category of the campaign the boost creates. Required for housing, employment, credit, or political ads. - Meta: every value. - TikTok: HOUSING, EMPLOYMENT and CREDIT, sent as the campaign's `special_industries` (TikTok requires one for these ads aimed at the US or Canada). Other values return 400. - TikTok targeting: a 400 names the field for ZIP codes (`targeting.locations.zips`), gender, ages under 18 (`targeting.ageMin`), interest keywords (`keyword:` ids in `targeting.interests`) and hashtag behaviors. - TikTok also refuses Smart Targeting (`smartTargeting`) and lookalike audie
specialAdCategoryCountryarrayMeta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires specialAdCategories to be set (400 otherwise).
regionalRegulatedCategoriesarrayMeta only. Regional regulation categories required when the ad set targets certain countries (e.g. AUSTRALIA_FINSERV, AUSTRALIA_UNIVERSAL, BRAZIL_REGULATION, INDIA_FINSERV, MALAYSIA_UNIVERSAL, SINGAPORE_UNIVERSAL, TAIWAN_FINSERV, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, US_SECURITIES_LICENSING). Forwarded to the ad set.
regionalRegulationIdentitiesobjectMeta only. Verified identity IDs of the beneficiary and payer for each declared regionalRegulatedCategories value. Ignored when adSetId adds the ad to an existing ad set. Meta may require them on ad sets created through the API even when Ads Manager advertising settings have a default beneficiary and payer (seen on AUSTRALIA_FINSERV), so sending them explicitly is the reliable path. The value is the Verified identity ID (Meta Business Settings > Verified identities), not a Page or Business ID. Beneficiary and payer may be the same ID. The IDs reach Meta unchanged. Send each ID as a string o
linkUrlstringWebsite URL for non-messaging CTA buttons. Send it with `callToAction`. Omit for messaging boosts. **Meta**: adds a top-level `call_to_action` to the post-reference creative. This is what gives a `traffic` boost a clickable destination without replacing the creative and losing the post's social proof. Ignored when `leadGenFormId` is set, which supplies its own destination. Live-verified against a Page-post creative. **TikTok**: maps to `landing_page_url` on the Spark Ad creative (`AdcreateCreatives.landing_page_url`); Spark Ads have no clickable destination without it. **Reddit**: the ad's
callToActionstringCTA button label. Non-messaging CTAs require `linkUrl`. WHATSAPP_MESSAGE, MESSAGE_PAGE, and INSTAGRAM_MESSAGE do not require a URL and reject linkUrl. **Meta**: the CTA enum of POST /v1/ads/create plus `VIEW_INSTAGRAM_PROFILE`, `WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, and `INSTAGRAM_MESSAGE`. VIEW_INSTAGRAM_PROFILE requires linkUrl; the messaging CTAs select their destination automatically. **Meta** `GET_DIRECTIONS` is a 400: Meta opens that button on a map location, and a boost's only button link is `linkUrl`, a website. Create the ad with POST /v1/ads/create and `callToActionLink` instead. **T
sparkAuthCodestringTikTok-only. Spark Code (the creator's `auth_code`) authorizing cross-creator Spark Ads: the advertiser can boost a video owned by a DIFFERENT TikTok account. Maps to `auth_code` on the creative entry of /v2/ad/create/. Without it, boosts are limited to videos owned by the same account running the ads (same-BC creators only). The creator generates the code in their TikTok app's Promote settings and shares it with the advertiser.
smartPlusbooleanTikTok only. Run the Spark post in a Smart+ campaign instead of a regular one: goal `conversions` = Smart+ Web Conversions, `lead_generation` = Smart+ Lead Generation. Rejected with a 400 on other platforms. **Requires:** - `sparkAuthCode`: the Smart+ ad runs the post under the identity created by redeeming its Spark code. A Business Center-owned post is not accepted. - `promotedObject.pixelId` + `customEventType`. `app_promotion` is not available on a Spark post. A Smart+ Spark ad uses a dynamic CTA portfolio, sent as ad_configuration.call_to_action_id (TikTok accepts no named call to act
sparkPostsarrayTikTok Smart+ only (requires `smartPlus: true`; a 400 on other platforms). Several Spark posts as creatives of ONE Smart+ ad, each with its own post code. Replaces `platformPostId` + `sparkAuthCode`. TikTok allows 1-50 per ad, and posts from different creators can mix. - Without `adSetId`: creates campaign + ad group + one ad carrying all of them. - With `adSetId`: creates one new ad with all of them in that ad group.
promoCodesarrayTikTok Smart+ Web Conversions only (requires `smartPlus: true`, goal `conversions`). Promo codes or offers TikTok highlights on the ad (Ads Manager's "Add promo code or offer"). - A promo code needs shoppers to enter it at checkout. - An entry without `promoCode` is an offer applied automatically. Rejected with a 400 on other platforms and on Lead Generation campaigns.
promotedObjectobjectMeta, TikTok and Reddit. What the conversion ad set optimizes toward, so a boost of an existing organic post can run for a conversion instead of only engagement or traffic. Required when `goal` is `conversions` (Meta also `lead_conversion`); ignored on goals that do not optimize for a conversion. - Meta: `pixelId` + `customEventType` (a commerce event such as PURCHASE under `conversions`, a leads-class event such as LEAD under `lead_conversion`), or `customConversionId` for a Custom Conversion, or `customEventType: OTHER` + `customEventStr` for a pixel custom event. - Meta: becomes the ad set
dsaBeneficiarystringLegal entity that benefits from the ad. Required when targeting EU users (EU DSA, Article 26). Optional if the ad account has a default beneficiary: set it once via `PATCH /v1/ads/accounts` or in Manager, and Meta fills it in whenever the field is omitted.
dsaPayorstringLegal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor.
leadGenFormIdstringLead Gen form ID to attach to the boosted ad's creative. REQUIRED when `goal` is `lead_generation`; ignored for other goals. - Meta: the leadgen_forms ID (create one via POST /v1/ads/lead-forms). - LinkedIn: the adForm ID (create one via POST /v1/ads/lead-forms with a LinkedIn account). The creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}`. - Reddit: rejected with 400 on every goal (Reddit retired its native lead forms).
statusstringPublish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default). PAUSED pauses only the top-most object this boost creates and switches everything below it on: - New campaign: held paused with its ad set and ad on. One PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live. - Into an existing campaign (TikTok `existingCampaignId`): the new ad set is held paused. - Attached to an existing ad set (`adSetId`): the new ad itself is paused. - LinkedIn: every object the boost creates is held. A new campaign group is PAUSED, and its campaign and
ACTIVE · PAUSED
campaignStatusstringEvery platform, same semantics as POST /v1/ads/create. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. When omitted, it follows `status`. `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Rejected with a 400 alongside `adSetId` or `existingCampaignId`, where no campaign is created (change an existing one with PUT /v1/ads/campaigns/{campaignId}/status).
ACTIVE · PAUSED
adSetStatusstringEvery platform, same semantics as POST /v1/ads/create. Sets the switch of the new ad set alone and overrides `status` for it. Omitted, it follows `status`. The ad set is the ad group on TikTok and Pinterest; the campaign on LinkedIn (it stays DRAFT when held); the line item on X. **Precedence.** A level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level. `status: PAUSED` then holds the top-most new object without a level status, only when no level status is PAUSED; every other new object is switched on. So `campaignStatus: ACTIVE` + `adSetStatus: PAUSED` + `adSta
ACTIVE · PAUSED
adStatusobjectadStatus
budgetLevelstringMeta only, same semantics as POST /v1/ads/create: campaign = Advantage campaign budget (CBO), the budget and bid strategy sit on the campaign and the ad set inherits them. Default adset. Not allowed with adSetId.
adset · campaign
attributionSpecarrayMeta only. Ad-set attribution windows, same shape as POST /v1/ads/create. Applied on OUTCOME_SALES, OUTCOME_LEADS and OUTCOME_APP_PROMOTION campaigns (conversions, lead_conversion, lead_generation, app_promotion); other objectives keep Meta's default. Not allowed with adSetId.
bodiesarrayMeta only. Extra primary-text options Meta rotates on the boosted post (asset_feed_spec.bodies with DEGREES_OF_FREEDOM). The post keeps its own text as one of the options. Works for Facebook posts and Instagram media. Under a conversions or traffic goal, Meta also wants a website URL on the options, taken from `linkUrl` (send it with a `callToAction`). Engagement boosts need none.
retryOnServerErrorbooleanMeta only. `true` returns a 400 elsewhere, `false` is ignored there. When Meta answers a create with a 5xx and reading the parent back by name finds no such object, sends the create again (at most 3 POSTs per object, never for an object created ACTIVE) and reports it in `recoveredWrites`. `false` never sends it again: the request fails with 502 and `details.unconfirmedWrite`, so you can check the parent yourself. One object found by name is still reused.
rehostOnInstagramVideoRejectionbooleanMeta only. `true` returns a 400 elsewhere, `false` is ignored there. Controls the fallback when Meta refuses an existing Instagram video as the ad (subcode 1815279). - First, copies the video into the ad account and retries on the original post. - Then it falls back to a new Facebook video in a new Page post, which does not show the original post's likes and comments. The response reports which in `instagramVideoFallback`. Messaging boosts never use the unlinked copy. `false` skips every fallback and returns Meta's error.
smartTargetingobjectTikTok only (a 400 elsewhere). TikTok Smart Targeting on the ad group: `audience` is TikTok's `smart_audience_enabled`, `interestsBehaviors` its `smart_interest_behavior_enabled`. When on, TikTok may deliver beyond the selected audiences or interests. Available on Video views, Traffic, Lead generation, App install, Web conversion and Community interaction. Not available with smartPlus or when attaching to an existing ad set (adSetId). Only the flags you send are written. An unwritten flag reads back null in `nativeSettings`, so send `false` explicitly to be able to verify it is off.
optimizationGoalstringAd-set optimization goal override. Meta, or TikTok with `goal: video_views`. **TikTok**: ENGAGED_VIEW (6-second Focused View, the default) or ENGAGED_VIEW_FIFTEEN (15-second views), both billed per view (CPV). Any other value is a 400. **Meta**: explicit ad-set `optimization_goal` override. When omitted, defaults to the value derived from `goal`. - Messaging boosts always use CONVERSATIONS and reject other values. - Otherwise the value must fit the objective Meta derives from `goal` for boosts, not the one `POST /v1/ads/create` uses for the same name. Boost maps `goal: "engagement"` to `OUT
metaObjectivestringMeta only, with `goal: engagement` and without `adSetId` (400 otherwise). `OUTCOME_ENGAGEMENT` creates the campaign with objective `OUTCOME_ENGAGEMENT` and the ad set with `optimization_goal` `POST_ENGAGEMENT` (unless `optimizationGoal` is set) and `destination_type` `ON_POST`: the shape Ads Manager uses to boost an existing post. - `optimizationGoal: POST_ENGAGEMENT` selects the same objective, so the two may be sent together. - `destinationType` returns 400 (messaging CTAs excepted); `optimizationGoal` must be `POST_ENGAGEMENT` or `REACH` (400 otherwise). - When both are omitted, an engage
OUTCOME_ENGAGEMENT
validateOnlybooleanMeta only (facebook, instagram and connections). Dry-runs the boost with Meta's execution_options validate_only: the campaign, ad set, creative (the post reference) and ad are checked as sent, everything PAUSED, and nothing is created or stored on Meta or in. Returns 200 with the same body as a validateOnly POST /v1/ads/create (`validateOnly`, `results` per node, `message`). - Idempotency-Key storage and the duplicate-boost guard are bypassed. - Counts toward the 30 Meta writes per ad account per 5 minutes. - Runs the account status and payment checks of GET /v1/ads/accounts/
