hermosodocs

create_meta_ad

Build a full Meta ad (campaign -> ad set -> ad, paused) destructive

Area: Meta ad-set targeting, shared by create_meta_ad and create_m… · Ad campaign management. Generated from the running MCP server, like the rest of the tool reference.

Description

Build a complete, ready-to-run Meta ad: campaign -> ad set (FULL targeting + budget + schedule + bidding) -> creative -> ad(s), ALL created PAUSED — it spends NOTHING until you activate the campaign with set_meta_campaign_status(confirm:true). This is the "create a campaign and put the ads on it" path. IMAGE, VIDEO (uploaded, transcoded and thumbnailed for you) and CAROUSEL (format:"carousel", 2–10 cards each with its own headline/description/link) all work. Targeting is the `targeting` object: geo down to cities with a radius, age, gender, interests, behaviours, custom audiences and lookalikes, languages, placements, devices and OS. For a conversion objective pass pixelId + conversionEvent and the ad set optimizes for that conversion. Schedule with startTime/endTime + dayparting; bid with bidStrategy + bidAmountUsd/minRoas; use lifetimeBudgetUsd (with endTime) for a fixed flight. Attach to an existing campaign with campaignId or an existing ad set with adSetId. Everything is READ BACK from Meta before you are told it exists — print the returned summary verbatim (it carries 24-hour Meta PREVIEW LINKS for the first ad — hand them to the user; preview_meta_ad renders any ad in any placement). Needs ads-management on the connected account. BOOST AN EXISTING POST: pass boostPostId — a post you have ALREADY published (numeric id, the <pageId>_<postId> form, or a permalink) — INSTEAD of any creative, and the ad promotes that post exactly as published, comments and all. The post keeps its own caption and media, so message/headline/description do NOT apply. AN INSTAGRAM BOOST TAKES A BUTTON: pass cta (e.g. SHOP_NOW, SIGN_UP) and link and the boosted post carries that button to that link; a FACEBOOK post boost takes no button and keeps the post as published. Anything not applied is named in the reply, and the reply reads back from Meta which post the ad promotes. Targeting, budget, schedule, bidding and PAUSED-by-default all work identically. Find ids with list_meta_posts. AN INSTAGRAM POST NEEDS boostTarget:"instagram" — IG media ids and Facebook post ids are both bare digits, so Hermoso never guesses, and a Facebook boost given an IG media id is refused. Instagram eligibility is checked for free before anything is created (Meta refuses to boost a post carrying licensed music or an interactive element). CLICK-TO-CALL: destinationType "PHONE_CALL" + phoneNumber builds a Call Now ad that dials that number, optimised for QUALITY_CALL. Before building on an account for the first time, run the ad account health check, which says whether it can run ads (status, payment method, spending limit, rejected ads).

Parameters

ParameterTypeDescription
boostPostIdstringPromote a post that ALREADY EXISTS instead of building a new ad from media. Accepts the numeric post id, <pageId>_<postId>, or a permalink (an Instagram post is its NUMERIC media id — an instagram.com link carries only a shortcode, which Meta cannot resolve). Cannot be combined with image/video inputs. The post keeps its caption and media; an INSTAGRAM boost also takes cta + link (a button on the boosted post), a Facebook one takes neither.
boostTarget"facebook" | "instagram"Which surface the boosted post lives on. Default facebook. REQUIRED for an Instagram post: an IG media id and a Facebook post id are both bare digits, so this is never inferred — Meta takes a different creative for each (object_story_id for a Page post; object_id + instagram_user_id + source_instagram_media_id for an IG post). list_meta_posts(target:'instagram') returns the ids.
threadsUserIdstringTHREADS: the Threads account id the ad runs under on Threads. Leave it out: when targeting.publisherPlatforms includes threads (or the ad set already has it), Hermoso finds the Threads profile linked to the Page's Instagram account itself. An existing Facebook or Instagram post (boostPostId) can be shown on Threads this way; an existing THREADS post cannot be boosted (Meta does not offer it), and partnership ads cannot run on Threads.
partnershipAdCodestringPARTNERSHIP AD FROM A CREATOR'S CODE: the ad code a creator shares for their own Instagram post (their post > ... > Partnership label and ads > Ad code). The ad promotes THEIR post as a partnership ad run by this brand — no media id needed. Use INSTEAD of boostPostId; cannot be combined with your own media, a catalog or carousel. An expired or unknown code is refused in plain words.
partnershipAdFormat"both" | "single" | "auto"Which identities a boosted partnership post shows (Meta's ad_format): both = creator AND brand (Meta's default), single = only the first identity, auto = Meta picks per impression (Instagram only). Only with partnershipAdCode or boostPostId.
adAccountIdrequiredstringad account id (act_… or digits — from list_meta_pages)
format"auto" | "carousel"auto = one ad per asset (image or video); carousel = ONE multi-card ad
imageUrlstringpublic https image URL for the ad creative
imageUrlsstring[]several image URLs -> one ad each, or the carousel cards in order
videoUrlstringa video URL -> a real Meta VIDEO ad (uploaded + transcoded + thumbnailed for you)
thumbnailUrlstringcustom video thumbnail (otherwise Meta picks a frame)
messagestringprimary ad text
headlinestringheadline
descriptionstringthe smaller description line under the headline
cardsobject[]carousel cards in order — each may set its own headline/description/link
cards[].headlinestringheadline for this carousel card
cards[].descriptionstringdescription line for this carousel card
cards[].linkstringdestination URL for this carousel card
carouselEndCardbooleanappend the Page end card to a carousel
linkstringdestination URL (defaults to the brand domain). A Hermoso page works: publish_page’s live URL, or get_page adDestinations.
ctastringcall-to-action, e.g. SHOP_NOW / LEARN_MORE / SIGN_UP (default LEARN_MORE); WHATSAPP_MESSAGE for a click-to-WhatsApp ad (see destinationType). Any Meta call-to-action type works (SEE_DETAILS…); unknown ones are refused, not swapped.
leadFormIdstringLEAD ADS — attach an instant form (from list_meta_lead_forms / create_meta_lead_form) so the button opens that form INSIDE Facebook/Instagram instead of sending the click to a website. Requires objective:"OUTCOME_LEADS"; the ad set is then optimized for LEAD_GENERATION and pointed at the form automatically. Read the submissions afterwards with read_meta_leads.
objective"OUTCOME_TRAFFIC" | "OUTCOME_AWARENESS" | "OUTCOME_ENGAGEMENT" | "OUTCOME_LEADS" | "OUTCOME_SALES"default OUTCOME_TRAFFIC
brandedContentSponsorIgIdstringPARTNERSHIP AD — the Instagram account id shown as the PAID PARTNER on this ad (Meta’s `instagram_branded_content.sponsor_id`), so the ad runs as a creator collaboration rather than as a plain brand ad. The creator must already be APPROVED on this brand’s Partnership Ads list: check with list_meta_partnership_creators first, because a PENDING creator makes the ad fail for a reason nothing in Meta’s error names. Hermoso sends this id EXACTLY as given and does not work out which id belongs in which slot — Meta’s own two published examples disagree on that — so confirm the ad’s identity in Ads Manager before it is switched on.
brandedContentSponsorPageIdstringPARTNERSHIP AD — the Facebook Page id of the paid partner (Meta’s `facebook_branded_content.sponsor_page_id`). Give BOTH halves when the ad runs across both surfaces: supplying only one leaves the other surface’s placements with no partnership label at all, and the returned summary says which half is missing rather than letting it be discovered in Ads Manager.
productSetIdstringCATALOG (dynamic product) ADS — the PRODUCT SET this ad set advertises, from list_meta_product_sets. Meta binds a catalog at TWO levels and they are different ids on different objects: the CAMPAIGN takes productCatalogId, the AD SET takes productSetId. Passing a CATALOG id here is refused by name rather than moved, because Meta’s own error for a mis-placed id names neither the level nor the right field. Cannot be combined with pixelId — an ad set has exactly one promoted_object — and its conversion event is conversionEvent, which Meta defaults to PURCHASE.
dailyBudgetUsdnumberad-set daily budget in the AD ACCOUNT's currency (historical name — not necessarily USD; default 10, or 1,000 in a whole-unit currency like JPY) — spends only once ACTIVE. Under a campaign that HAS its own budget (create_meta_campaign with dailyBudgetUsd, Advantage+ campaign budget) leave this and lifetimeBudgetUsd OUT: Meta allows a budget at the campaign or the ad set, never both, so the ad set then gets none and shares the campaign’s, and naming one is refused by name before anything is created
lifetimeBudgetUsdnumbera fixed total instead of a daily budget, in the ad account's currency — REQUIRES endTime
countrystring2-letter shorthand when you are not passing full targeting (default US)
targetingobjectfull Meta ad-set targeting — age, gender, geo, interests, behaviours, audiences, languages, placements, devices. Use EXACTLY these key names: an unrecognised one (e.g. geoLocations) is REFUSED by name — it is never dropped, because a dropped geo key used to fall back to targeting the United States.
targeting.geoobjectwhere the ad runs
targeting.geo.countriesstring[]2-letter codes, e.g. ["US","CA"]
targeting.geo.regionsobject[]region KEYS from find_meta_audiences(type:"adgeolocation")
targeting.geo.regions[].keyrequiredstringMeta numeric region key (the ads location search returns it)
targeting.geo.citiesobject[]city KEYS; radius works here (10–50 mi / 17–80 km)
targeting.geo.cities[].keyrequiredstringMeta numeric city key, from find_meta_audiences
targeting.geo.cities[].radiusnumberradius around the city: 10 to 50 miles or 17 to 80 kilometers
targeting.geo.cities[].distanceUnit"mile" | "kilometer"mile or kilometer; the unit the radius is measured in
targeting.geo.zipsobject[]postal codes to target: list of {key}
targeting.geo.zips[].keyrequiredstringMeta postal code key (the ads location search returns it)
targeting.geo.geoMarketsobject[]DMA keys, e.g. {key:"DMA:807"}
targeting.geo.geoMarkets[].keyrequiredstringMeta geo market (DMA) key (the ads location search returns it)
targeting.geo.customLocationsobject[]drop a pin + radius
targeting.geo.customLocations[].latituderequirednumberlatitude of a custom pin location
targeting.geo.customLocations[].longituderequirednumberlongitude of a custom pin location
targeting.geo.customLocations[].radiusnumberradius around the pin: 0.63 to 50 miles or 1 to 80 kilometers
targeting.geo.customLocations[].distanceUnit"mile" | "kilometer"mile or kilometer; the unit the radius is measured in
targeting.geo.locationTypes"home" | "recent" | "travel_in"[]people who LIVE there vs were recently there
targeting.excludedGeoobjectplaces to exclude
targeting.excludedGeo.countriesstring[]2-letter codes, e.g. ["US","CA"]
targeting.excludedGeo.regionsobject[]region KEYS from find_meta_audiences(type:"adgeolocation")
targeting.excludedGeo.regions[].keyrequiredstringMeta numeric region key (the ads location search returns it)
targeting.excludedGeo.citiesobject[]city KEYS; radius works here (10–50 mi / 17–80 km)
targeting.excludedGeo.cities[].keyrequiredstringMeta numeric city key, from find_meta_audiences
targeting.excludedGeo.cities[].radiusnumberradius around the city: 10 to 50 miles or 17 to 80 kilometers
targeting.excludedGeo.cities[].distanceUnit"mile" | "kilometer"mile or kilometer; the unit the radius is measured in
targeting.excludedGeo.zipsobject[]postal codes to target: list of {key}
targeting.excludedGeo.zips[].keyrequiredstringMeta postal code key (the ads location search returns it)
targeting.excludedGeo.geoMarketsobject[]DMA keys, e.g. {key:"DMA:807"}
targeting.excludedGeo.geoMarkets[].keyrequiredstringMeta geo market (DMA) key (the ads location search returns it)
targeting.excludedGeo.customLocationsobject[]drop a pin + radius
targeting.excludedGeo.customLocations[].latituderequirednumberlatitude of a custom pin location
targeting.excludedGeo.customLocations[].longituderequirednumberlongitude of a custom pin location
targeting.excludedGeo.customLocations[].radiusnumberradius around the pin: 0.63 to 50 miles or 1 to 80 kilometers
targeting.excludedGeo.customLocations[].distanceUnit"mile" | "kilometer"mile or kilometer; the unit the radius is measured in
targeting.excludedGeo.locationTypes"home" | "recent" | "travel_in"[]people who LIVE there vs were recently there
targeting.ageMinnumber13–65
targeting.ageMaxnumber13–65 (65 means 65+)
targeting.genders"all" | "men" | "women"all, men or women
targeting.interestsobject[]interest ids from find_meta_audiences(type:"adinterest")
targeting.interests[].idrequiredstringMeta interest id, from find_meta_audiences
targeting.interests[].namestringinterest name, for readability; the id is what targets
targeting.behaviorsobject[]behaviour ids from find_meta_audiences(type:"adTargetingCategory", class:"behaviors")
targeting.behaviors[].idrequiredstringMeta interest id, from find_meta_audiences
targeting.behaviors[].namestringinterest name, for readability; the id is what targets
targeting.excludedInterestsobject[]interests to exclude: list of {id, name}
targeting.excludedInterests[].idrequiredstringMeta interest id, from find_meta_audiences
targeting.excludedInterests[].namestringinterest name, for readability; the id is what targets
targeting.excludedBehaviorsobject[]behaviors to exclude: list of {id, name}
targeting.excludedBehaviors[].idrequiredstringMeta interest id, from find_meta_audiences
targeting.excludedBehaviors[].namestringinterest name, for readability; the id is what targets
targeting.flexibleSpecobject[]AND across entries, OR within one
targeting.flexibleSpec[].interestsobject[]interests in this group, matched as OR within the group: list of {id, name}
targeting.flexibleSpec[].interests[].idrequiredstringMeta interest id, from find_meta_audiences
targeting.flexibleSpec[].interests[].namestringinterest name, for readability; the id is what targets
targeting.flexibleSpec[].behaviorsobject[]behaviors in this group, matched as OR within the group: list of {id, name}
targeting.flexibleSpec[].behaviors[].idrequiredstringMeta interest id, from find_meta_audiences
targeting.flexibleSpec[].behaviors[].namestringinterest name, for readability; the id is what targets
targeting.customAudiencesobject[]saved audiences AND lookalikes — a lookalike IS a custom audience id
targeting.customAudiences[].idrequiredstringMeta interest id, from find_meta_audiences
targeting.customAudiences[].namestringinterest name, for readability; the id is what targets
targeting.excludedCustomAudiencesobject[]custom audiences to exclude: list of {id, name}
targeting.excludedCustomAudiences[].idrequiredstringMeta interest id, from find_meta_audiences
targeting.excludedCustomAudiences[].namestringinterest name, for readability; the id is what targets
targeting.localesnumber[]Meta language ids from find_meta_audiences(type:"adlocale")
targeting.publisherPlatforms"facebook" | "instagram" | "audience_network" | "messenger" | "threads"[]placement platforms: facebook, instagram, audience_network, messenger or threads
targeting.facebookPositionsstring[]feed, story, facebook_reels, marketplace, search, instream_video, right_hand_column, …
targeting.instagramPositionsstring[]stream, story, reels, profile_feed, profile_reels, ig_search, explore_home. "explore_home" needs "stream" beside it; the old "explore" placement is retired by Meta and refused
targeting.messengerPositionsstring[]Messenger placements, e.g. sponsored_messages
targeting.audienceNetworkPositionsstring[]Audience Network placement names, as Meta defines them
targeting.threadsPositions"threads_stream"[]Threads feed. Threads needs "instagram" in publisherPlatforms too (and "stream" if you list instagramPositions); the ad runs under the Threads profile linked to the Instagram account, found automatically
targeting.devicePlatforms"mobile" | "desktop"[]mobile or desktop
targeting.userOs"iOS" | "Android"[]iOS or Android
targeting.deviceExpansionbooleanonly with devicePlatforms / userOs: true lets Meta also show the ad on OTHER devices and operating systems (its "Reach more people across other mobile devices", Sales campaigns only). Default false keeps delivery to exactly the devices and OS you targeted — Hermoso sends the opt-out explicitly, because Meta turns this on by default for new Sales ad sets from Graph v27
targeting.advantageAudiencebooleanlet Meta expand beyond your audience (Advantage+ audience)
pixelIdstringMeta Pixel id — with this the ad set optimizes for a real CONVERSION instead of falling back to link clicks
conversionEventstringPURCHASE | LEAD | COMPLETE_REGISTRATION | ADD_TO_CART | INITIATED_CHECKOUT | …
customConversionIdstringMeta custom conversion id (digits), from Meta Events Manager
applicationIdstringapp-promotion ads
objectStoreUrlstringapp store link for an app-install ad
optimizationGoalstringoverride, e.g. OFFSITE_CONVERSIONS / LANDING_PAGE_VIEWS / THRUPLAY / VALUE
billingEventstringdefault IMPRESSIONS
bidStrategy"LOWEST_COST_WITHOUT_CAP" | "LOWEST_COST_WITH_BID_CAP" | "COST_CAP" | "LOWEST_COST_WITH_MIN_ROAS"bidding: lowest cost, bid cap, cost cap or minimum ROAS (Meta's strategy names)
bidAmountUsdnumberREQUIRED for a bid cap / cost cap
minRoasnumberREQUIRED for LOWEST_COST_WITH_MIN_ROAS, e.g. 1.1
startTimestringISO-8601 with offset, e.g. 2026-08-01T09:00:00-0700
endTimestringREQUIRED with lifetimeBudgetUsd
adsetScheduleobject[]dayparting — minutes from midnight (0–1440), days 0=Sunday…6=Saturday
adsetSchedule[].startMinuterequirednumberstart of the daypart window, minutes from midnight (0 to 1440)
adsetSchedule[].endMinuterequirednumberend of the daypart window, minutes from midnight (0 to 1440)
adsetSchedule[].daysrequirednumber[]weekdays the window runs on: 0 = Sunday through 6 = Saturday
attributionSpecobject[]e.g. [{event_type:"CLICK_THROUGH",window_days:7}]
dsaBeneficiarystringEU AD TRANSPARENCY: the person or organisation this ad promotes (Meta shows it on the ad). Meta requires it whenever the ad set reaches the EU; omit it and Hermoso uses the ad account's own default, else this profile's brand name, else the Page name, and the summary says which was used
dsaPayorstringEU AD TRANSPARENCY: who pays for the ads (Meta shows it on the ad). Omit it and it matches dsaBeneficiary
specialAdCategories"HOUSING" | "EMPLOYMENT" | "CREDIT" | "ISSUES_ELECTIONS_POLITICS" | "ONLINE_GAMBLING_AND_GAMING" | "FINANCIAL_PRODUCTS_SERVICES"[]legally required when the ad falls in one of these categories — it restricts targeting
specialAdCategoryCountrystring[]with specialAdCategories: the 2-letter ISO countries the declaration is made for (Meta’s special_ad_category_country), e.g. ["SY"]. Left out, the countries this ad targets are used; ISSUES_ELECTIONS_POLITICS needs it
instagramUserIdstringrun it on Instagram under the brand’s own handle
namestringbase name for the campaign/ad set/ads
campaignIdstringattach to an existing campaign instead of creating one
destinationTypestringWHERE A CLICK LANDS, and worth deciding for a merchant with a shop. "WEBSITE" sends it to their own site — their pixel fires, their email capture runs, their upsell flow works. "WEBSITE_AND_SHOP" lets Meta route it into the in-app Facebook/Instagram Shop instead: often fewer taps to a purchase, but the visit never reaches their site. FROM META API v26 AN ADVERTISER WITH A SHOP DEFAULTS TO WEBSITE_AND_SHOP, so pass "WEBSITE_AND_SHOP_OPT_OUT" to keep every click on their own site. Also accepts APP, MESSENGER, INSTAGRAM_DIRECT, WHATSAPP, PHONE_CALL, ON_AD, ON_POST, ON_PAGE, ON_EVENT, ON_VIDEO, SHOP_AUTOMATIC. An unknown value is refused by name, and the read-back says in words where clicks will go. CLICK-TO-WHATSAPP ADS (certified against Meta 2026-09-03): pass destinationType "WHATSAPP", cta "WHATSAPP_MESSAGE" and optimizationGoal "CONVERSATIONS" (objective OUTCOME_ENGAGEMENT). Meta refuses the ad set unless the Page already has a WhatsApp number linked (Facebook Page settings > WhatsApp) — that link is made on Facebook, not here, and needs no extra Hermoso permission. The shop choice is sent on the ad CREATIVE (destination_spec) — "WEBSITE" or "WEBSITE_AND_SHOP_OPT_OUT" switches the in-app Shop OFF, "WEBSITE_AND_SHOP" switches it on — and the reply reads back what Meta stored. CLICK-TO-CALL ADS: pass destinationType "PHONE_CALL" and phoneNumber (international format, +15551234567): the button is Call Now and dials that number, the ad set optimises for QUALITY_CALL (calls of a meaningful length) and the objective defaults to OUTCOME_LEADS. One image or video per ad (no carousel, boost, catalog or lead form). Built PAUSED like every ad.
creativeEnhancements"off" | "meta" | objectMETA'S AUTOMATIC CREATIVE ENHANCEMENTS (Advantage+ creative: AI text overlays, stickers, templates, generated backgrounds, uncropping, text rewrites, translation…). DEFAULT "off": every one is explicitly switched OFF so the ad runs exactly as made. "meta" leaves Meta's own defaults. Or an object turning named ones on, e.g. {"image_touchups": true} (everything else stays off). Names: adapt_to_placement, add_text_overlay, creative_stickers, description_automation, enhance_cta, image_animation, image_background_gen, image_brightness_and_contrast, image_templates, image_text_translation, image_touchups, image_uncrop, inline_comment, media_type_automation, pac_relaxation, product_extensions, reveal_details_over_time, text_optimizations, text_translation, translate_voiceover, video_auto_crop, video_filtering, video_uncrop. The reply reads back what Meta stored.
urlTagsstring | booleanUTM click tracking Meta appends to every click (the creative's url_tags). DEFAULT ON: utm_source=meta&utm_medium=paid&utm_campaign={{campaign.name}}&utm_term={{adset.name}}&utm_content={{ad.name}} (Meta fills the {{…}} per click) — skipped automatically when your link already has utm_ parameters. Pass your own query string to use it exactly as written, or false to send none. Not used on lead-form or click-to-message ads. The reply reads back what Meta stored.
phoneNumberstringCLICK-TO-CALL: the number the Call Now button dials, international format (+15551234567); with destinationType PHONE_CALL
whatsappPhoneNumberstringCLICK-TO-WHATSAPP: the WhatsApp Business number the chat opens with, in international format (e.g. +15551234567; list_whatsapp_accounts shows the numbers on the connected WhatsApp Business Account). Sent as the ad set’s promoted whatsapp_phone_number when destinationType is WHATSAPP; Meta still requires that number to be linked to the Page.
adSetIdstringattach the ad(s) to an EXISTING ad set (skips ad-set creation)
playableAssetIdstringa PLAYABLE from upload_meta_playable, shown after the lead-in video. Needs adSetId of an App Installs ad set and exactly ONE video; the button installs the app the ad set promotes
pageIdstringPage id from list_meta_pages. Omit when the brand has one Page; with several the call lists them, so ask the user which one.

Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/create_meta_ad.

MCP (tools/call)

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_meta_ad","arguments":{"adAccountId":"<string>"}}}

CLI

hermoso call create_meta_ad --json '{"adAccountId":"<string>"}'

Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.

All 759 Ad campaign management tools · tools.json