add_meta_ad

Meta Ads Write

User wants to add another ad/creative variation to an EXISTING ad set

Endpoint

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

Headers

Description

User wants to add another ad/creative variation to an EXISTING ad set. DO NOT USE to create a new campaign. For new campaigns: - Video campaign - `create_meta_video_campaign` - Image campaign - `create_meta_image_campaign` - Carousel campaign - `create_meta_carousel_campaign` Common scenarios: - A/B test ad copy: Different headlines, primary text, or CTAs for the same audience - A/B test creatives: Different images or videos for the same audience - Format testing within one audience: Image vs video ad in the same ad set - Dynamic Creative (DCO): Multiple images + text variations in one ad — Meta auto-optimizes KEY DISTINCTION — add_meta_ad vs add_meta_ad_set: - Same audience, different creative/copy - use THIS tool (add_meta_ad) - Different audience/targeting - use `add_meta_ad_set` instead (creates a new ad set) Ads in the same ad set SHARE: targeting, budget, schedule, pixel tracking. Each ad has its OWN: creative (image/video/carousel), headline, primary text, CTA, landing page. IMPORTANT: You need an ad_set_id from a previously created ad set. Use `list_meta_ad_sets` first if you don't have the ad_set_id. Supports all 3 ad types + Dynamic Creative: - `image`: Different image + copy variation - `video`: Different video + copy variation - `carousel`: Different card set + copy variation - **Dynamic Creative (DCO)**: Pass `image_urls` (2-10 images), `headlines` (up to 5), `primary_texts` (up to 5), `descriptions` (up to 5). Meta tests ALL combinations and optimizes delivery automatically. Dynamic Creative Optimization (DCO) workflow: 1. Create ad set with `is_dynamic_creative=true` via `add_meta_ad_set` 2. Call this tool with `image_urls` (list of 2-10 image URLs), plus optional `headlines`, `primary_texts`, `descriptions` arrays 3. Meta will test all image × headline × text combinations and optimize 4. DCO ad sets support only 1 ad — if the ad set already has is_dynamic_creative enabled, this tool auto-detects it Note: Cannot mix image_urls (DCO) with image_url (single image) or placement-specific images. Standard workflow: 1. Get ad_set_id from prior campaign creation or `list_meta_ad_sets` 2. Write variant ad copy (different headline/primary_text/image) 3. Call this tool with ad_set_id + new creative + copy

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
ad_set_idstring requiredThe Meta Ad Set ID to add the ad to (required)
ad_typestring requiredType of ad: 'image', 'video', or 'carousel'
image_urlstring optionalImage URL (for image type)
existing_image_hashstring optionalExisting image hash
asset_bundle_idstring optionalAsset bundle ID
story_image_urlstring optionalImage URL for Stories/Reels (9:16, recommended 1080x1920px). Uses asset_feed_spec for placement-specific creatives.
right_column_image_urlstring optionalImage URL for Right Column (1.91:1, recommended 1200x628px). Uses asset_feed_spec for placement-specific creatives.
video_urlstring optionalVideo URL (for video type)
existing_video_idstring optionalExisting video ID
thumbnail_urlstring optionalCustom thumbnail URL
cardsarray optionalCarousel cards (2-10)
primary_textstring requiredPrimary ad text (max 2200 chars, recommended 125). Supports emojis and line breaks.
headlinestring optionalHeadline (max 255 chars, recommended 40)
landing_page_urlstring requiredLanding page URL (HTTPS)
call_to_actionstring optionalCTA button default: "LEARN_MORE"
descriptionstring optionalDescription (max 255 chars, recommended 30)
image_urlsarray optionalList of image URLs for Dynamic Creative Optimization (2-10). Meta automatically tests all combinations and optimizes delivery. Mutually exclusive with image_url/existing_image_hash/story_image_url.
headlinesarray optionalList of headline variations for Dynamic Creative (up to 5). Used with image_urls for DCO.
primary_textsarray optionalList of primary text variations for Dynamic Creative (up to 5). Used with image_urls for DCO.
descriptionsarray optionalList of description variations for Dynamic Creative (up to 5). Used with image_urls for DCO.
lead_form_idstring optionalLead form ID for OUTCOME_LEADS campaigns. If not provided, auto-fetched from the ad set's campaign.
facebook_page_idstring optionalFacebook Page ID
instagram_account_idstring optionalInstagram account ID
ad_namestring optionalCustom name for the ad. Also accepts 'name' as alias.
ad_account_idstring optionalMeta ad account ID
multi_advertiserboolean optionalSet to false to opt out of Meta's multi-advertiser ad format at the creative level. Default (None) = Meta's default behavior (enrolled).

Example request

{
  "arguments": {
    "ad_set_id": "string",
    "ad_type": "string",
    "primary_text": "string",
    "landing_page_url": "https://example.com",
    "image_url": "string",
    "existing_image_hash": "string",
    "asset_bundle_id": "string",
    "story_image_url": "string",
    "right_column_image_url": "string",
    "video_url": "string"
  }
}

Example responses

200 — Success

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

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": "add_meta_ad"
}

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": "add_meta_ad",
  "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