create_meta_ad_from_existing_post

Meta Ads Write

User wants to BOOST or PROMOTE an EXISTING published Facebook Page post (or an Instagram image post) as an ad (the classic "Boost post" flow), by its post id or URL

Endpoint

POST https://api.adspirer.ai/api/v1/tools/create_meta_ad_from_existing_post/execute

Headers

Description

User wants to BOOST or PROMOTE an EXISTING published Facebook Page post (or an Instagram image post) as an ad (the classic "Boost post" flow), by its post id or URL. Use THIS tool when the user already has a published organic post and wants to run it as an ad — do NOT build a new creative with add_meta_ad / create_meta_*_campaign for that (those make a NEW post). This tool references the existing post directly: a Facebook Page post via object_story_id ("{page_id}_{post_id}"), or an Instagram image post via its media id. ⛔ Meta limitation: an existing Instagram VIDEO or REEL cannot be promoted by its id — Meta requires the video be uploaded to the Facebook Page first. If the user asks to boost an existing IG Reel/video, tell them to upload it to their Facebook Page and promote that post, or to promote a Facebook Page post / an Instagram image post instead. Provide the post one of four ways (exactly one): - `facebook_post_id` — a Facebook Page post id (numeric, or the full "{page_id}_{post_id}"). - `facebook_post_url` — a Facebook post URL (facebook.com/<page>/posts/<id> or a permalink). - `instagram_media_id` — a numeric Instagram media id (an image post; an IG video/Reel id will be rejected by Meta). - `instagram_post_url` — an Instagram image-post URL (instagram.com/p/<code>/); a /reel/<code>/ URL resolves but Meta rejects the create (see the limitation above). The ad is added to an EXISTING ad set (pass `ad_set_id`) and is created PAUSED — it never spends until the user activates it. For a Facebook post, pass `facebook_page_id` if only the bare post id is given (call list_meta_pages if unsure which Page).

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
ad_set_idstring requiredThe existing ad set to add this ad to. The new ad inherits the ad set's audience, budget, schedule and tracking. Use list_meta_ad_sets if you don't have it.
facebook_post_idstring optionalA Facebook Page post id to promote. Accepts the numeric post id, or the full '{page_id}_{post_id}' form. Pass facebook_page_id too if you only have the bare post id. Use ONE of facebook_post_id / facebook_post_url / instagram_media_id / instagram_post_url.
facebook_post_urlstring optionalA Facebook post URL to promote, e.g. facebook.com/<page>/posts/<id>, a permalink with story_fbid, or a /reel/<id> link. Opaque pfbid links may need the numeric post id instead.
instagram_media_idstring optionalA numeric Instagram media id to promote as an ad (an existing IG post or Reel).
instagram_post_urlstring optionalAn Instagram post/Reel URL to promote, e.g. instagram.com/p/<code>/ or instagram.com/reel/<code>/. If it can't be resolved to a media id, pass instagram_media_id instead.
facebook_page_idstring optionalThe Facebook Page that owns the post (required to build the ad reference for a Facebook post when only the bare post id is given). Auto-detected when the account has exactly ONE promotable Page; if 2+, the tool lists them and asks. Call list_meta_pages to see options.
instagram_account_idstring optionalThe Instagram account id, when promoting an Instagram post and you want to pin the identity. Usually auto-resolved from the linked Page.
ad_namestring optionalOptional name for the new ad. Defaults to 'Boosted post'.
url_tagsstring optionalOptional UTM-style URL parameters appended to the post's link on click, e.g. 'utm_source=facebook&utm_medium=cpc&utm_campaign=spring'.
ad_account_idstring optionalMeta ad account ID (e.g., 'act_123456'). If not provided, uses the connected account.

Example request

{
  "arguments": {
    "ad_set_id": "string",
    "facebook_post_id": "string",
    "facebook_post_url": "string",
    "instagram_media_id": "string",
    "instagram_post_url": "string",
    "facebook_page_id": "string",
    "instagram_account_id": "string"
  }
}

Example responses

200 — Success

{
  "success": true,
  "data": {
    "text": "(tool-specific textual output for create_meta_ad_from_existing_post)",
    "quota": {
      "used": 42,
      "limit": 150,
      "tier": "plus",
      "period_end": "2026-05-01"
    }
  },
  "tool": "create_meta_ad_from_existing_post"
}

400 — Tool-level error (bad arguments / multi-account selection)

{
  "success": false,
  "error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n  - Acme Holdings (ad_account_id=\"act_123456789\")\n  - Acme EU (ad_account_id=\"act_987654321\")",
  "is_error": true,
  "tool": "create_meta_ad_from_existing_post"
}

402 — Quota exhausted

{
  "success": false,
  "error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
  "is_error": true,
  "tool": "create_meta_ad_from_existing_post",
  "quota": {
    "used": 150,
    "limit": 150,
    "tier": "plus",
    "period_end": "2026-05-01",
    "upgrade_url": "https://adspirer.ai"
  }
}

Try it live


Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai