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
POST https://api.adspirer.ai/api/v1/tools/create_meta_ad_from_existing_post/execute
Authorization: Bearer sk_live_... — your Adspirer API key (required)Content-Type: application/json (required)Idempotency-Key: <uuid> — recommended for write operations to make retries safeAll tool arguments are wrapped in an arguments object.
| Field | Type | Description |
|---|---|---|
ad_set_id | string required | The 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_id | string optional | A 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_url | string optional | A 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_id | string optional | A numeric Instagram media id to promote as an ad (an existing IG post or Reel). |
instagram_post_url | string optional | An 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_id | string optional | The 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_id | string optional | The Instagram account id, when promoting an Instagram post and you want to pin the identity. Usually auto-resolved from the linked Page. |
ad_name | string optional | Optional name for the new ad. Defaults to 'Boosted post'. |
url_tags | string optional | Optional 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_id | string optional | Meta ad account ID (e.g., 'act_123456'). If not provided, uses the connected account. |
{
"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"
}
}
{
"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"
}
{
"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"
}
{
"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"
}
}
Interactive: Swagger UI
Machine-readable: OpenAPI 3.1 spec · llms-full.txt
Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai