Update Meta Ad Set
update_meta_adsetUpdates a Meta ad set (only the fields provided). status: ACTIVE | PAUSED | ARCHIVED. Budget increases are subject to the safety cap. DELIVERY SETTINGS (existing targeting is preserved; only these fields change):
• publisher_platforms — narrows placement; comma-separated: facebook,instagram,audience_network,messenger,whatsapp,threads (e.g. "instagram" = Instagram only).
• facebook_positions / instagram_positions / whatsapp_positions / messenger_positions / audience_network_positions / threads_positions — the slot INSIDE a platform, comma-separated (facebook/instagram: story, feed, reels…; whatsapp: status). "Story + WhatsApp Status only" = publisher_platforms="facebook,instagram,whatsapp" + facebook_positions="story" + instagram_positions="story" + whatsapp_positions="status". Pass "-" to drop the restriction for that platform (all of its slots come back). See create_meta_adset for the full slot list.
• audience_expansion — "off" (turns off Advantage custom audience / audience expansion; prevents a retargeting set from drifting from the list to a cold audience) or "on".
TARGETING (omitted fields keep their current value; Meta replaces targeting atomically, so the tool reads the live spec and merges):
• age_min / age_max — 18..65. • genders — "1" (men), "2" (women) or "1,2"; "-" CLEARS the restriction (all genders). "" means leave unchanged. Anything else is REJECTED — an invalid value used to silently clear the restriction and widen the ad set to everyone.
• countries / regions / cities — comma-separated; region & city KEYS are the numeric key from search_meta_interests(kind="adgeolocation") (NOT the place name). Passing any of them replaces the location set.
• places / custom_locations — RADIUS targeting (JSON). places = [{"key":"2034720566774469","radius":5.7,"distance_unit":"mile"}] (a pinned place + drop-radius; key from search_meta_interests(kind="adgeolocation")); custom_locations = [{"latitude":41.01,"longitude":28.97,"radius":10,"distance_unit":"kilometer"}]. distance_unit "mile" (1-50) or "kilometer" (1-80), clamped for you. Passing either replaces the location set.
• geo_locations — the raw Meta geo_locations object (from another ad set's targeting.geo_locations) passed through verbatim to reproduce a proven radius/place target; it overrides countries/regions/cities/places/custom_locations, drops the deprecated location_types and clamps radius.
• interest_ids — comma-separated interest IDs; "" clears interest targeting (demographic entries are KEPT).
• relationship_statuses / education_statuses — comma-separated numeric codes (3 = MARRIED; see create_meta_adset for the full code list). AND-ed with interests, so you can add "married" to an existing interest-targeted set without touching it.
• family_statuses / life_events / industries / behaviors — comma-separated IDs from search_meta_interests(kind="adTargetingCategory", category_class=...) — parents & child age brackets, newly-weds/recently-moved, industry, behaviours. Each field you pass replaces only that dimension; the ones you omit are preserved.
OPTIMIZATION: • optimization_goal (e.g. OFFSITE_CONVERSIONS) • pixel_id + custom_event_type (e.g. PURCHASE) — fixes an ad set optimizing for the wrong conversion event without rebuilding the campaign. • custom_conversion_id (from list_meta_custom_conversions) — points the ad set at a specific Meta CUSTOM CONVERSION instead of a standard pixel event; keep optimization_goal OFFSITE_CONVERSIONS. custom_conversion_id is MUTUALLY EXCLUSIVE with pixel_id / custom_event_type (Meta rejects the combination with "Promoted Object Invalid") — pass one or the other. NOTE: Meta forbids changing the conversion/optimization of an ALREADY-PUBLISHED ad set (error subcode 3260011 "Can't Make Edits to Published Ad Set"); to switch a live ad set's conversion you must create a new ad set.
MESSAGING (Click-to-WhatsApp / click-to-Messenger): • destination_type WHATSAPP | MESSENGER | INSTAGRAM_DIRECT | PHONE_CALL (+ page_id) — pins a CONVERSATIONS ad set's chat destination without rebuilding it (the Page needs a WhatsApp number connected for WHATSAPP). page_id also sets/overrides the messaging promoted_object.
confirm=false = preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| cities | No | ||
| places | No | ||
| status | No | ||
| age_max | No | ||
| age_min | No | ||
| confirm | No | ||
| genders | No | ||
| page_id | No | ||
| regions | No | ||
| adset_id | Yes | ||
| pixel_id | No | ||
| behaviors | No | ||
| countries | No | ||
| account_id | Yes | ||
| industries | No | ||
| life_events | No | ||
| daily_budget | No | ||
| interest_ids | No | ||
| geo_locations | No | ||
| family_statuses | No | ||
| custom_locations | No | ||
| destination_type | No | ||
| custom_event_type | No | ||
| optimization_goal | No | ||
| threads_positions | No | ||
| audience_expansion | No | ||
| education_statuses | No | ||
| facebook_positions | No | ||
| whatsapp_positions | No | ||
| instagram_positions | No | ||
| messenger_positions | No | ||
| publisher_platforms | No | ||
| custom_conversion_id | No | ||
| relationship_statuses | No | ||
| audience_network_positions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||