{"name":"paid_manage","inputSchema":{"type":"object","oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"hierarchy"},"params":{"type":"object","properties":{"platform":{"type":"string","const":"meta_ads"},"ad_account_id":{"type":"string","minLength":1},"level":{"type":"string","enum":["campaign","adset","ad"]},"parent_id":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"include_deleted":{"type":"boolean"},"include_archived":{"type":"boolean"}},"required":["platform","ad_account_id","level"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"create_campaign"},"params":{"type":"object","properties":{"platform":{"type":"string","const":"meta_ads"},"campaign":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":400},"objective":{"type":"string","enum":["OUTCOME_AWARENESS","OUTCOME_TRAFFIC","OUTCOME_ENGAGEMENT","OUTCOME_LEADS","OUTCOME_APP_PROMOTION","OUTCOME_SALES"]},"daily_budget":{"description":"Minor units (cents). Set = CBO: the campaign holds the budget.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lifetime_budget":{"description":"Minor units (cents). Set = CBO; its ad sets need end_time.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bid_strategy":{"description":"CBO only. A cap strategy needs each ad set to pass bid.bid_amount_minor_units.","type":"string","enum":["LOWEST_COST_WITHOUT_CAP","COST_CAP","LOWEST_COST_WITH_BID_CAP","LOWEST_COST_WITH_MIN_ROAS"]},"special_ad_categories":{"type":"array","items":{"type":"string"}}},"required":["name","objective"],"additionalProperties":false},"mode":{"type":"string","enum":["preview","confirm"]},"ad_account_id":{"type":"string","minLength":1},"adsets":{"description":"Ad sets created PAUSED in this campaign (same fields as create_adset). Under CBO omit their budgets; under ABO each needs one.","maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":400},"optimization_goal":{"type":"string","enum":["REACH","IMPRESSIONS","AD_RECALL_LIFT","LINK_CLICKS","LANDING_PAGE_VIEWS","POST_ENGAGEMENT","THRUPLAY","CONVERSATIONS","PAGE_LIKES","EVENT_RESPONSES","LEAD_GENERATION","QUALITY_LEAD","OFFSITE_CONVERSIONS","VALUE"]},"targeting":{"type":"object","properties":{"geo":{"type":"object","properties":{"countries":{"description":"ISO 3166-1 alpha-2, e.g. \"MX\".","type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"regions":{"description":"Meta region keys (from Meta targeting search), e.g. \"3847\".","type":"array","items":{"type":"string","minLength":1}},"cities":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Meta city key."},"radius":{"description":"Radius around the city.","type":"number","exclusiveMinimum":0,"maximum":80},"distance_unit":{"type":"string","enum":["mile","kilometer"]}},"required":["key"],"additionalProperties":false}},"custom_locations":{"description":"Radius around a point (pin drop).","type":"array","items":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"radius":{"type":"number","exclusiveMinimum":0,"maximum":80,"description":"Meta accepts 1-80 km or 0.63-50 miles."},"distance_unit":{"type":"string","enum":["mile","kilometer"]},"address_string":{"type":"string"}},"required":["latitude","longitude","radius","distance_unit"],"additionalProperties":false}},"location_types":{"description":"Default (omitted) = people living in or recently in the area.","type":"array","items":{"type":"string","enum":["home","recent","travel_in"]}}},"additionalProperties":false},"age_min":{"type":"integer","minimum":13,"maximum":65},"age_max":{"type":"integer","minimum":13,"maximum":65},"genders":{"type":"string","enum":["all","male","female"]},"interests":{"description":"Meta interest ids (from Meta targeting search).","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false}},"custom_audience_ids":{"type":"array","items":{"type":"string","minLength":1}},"excluded_custom_audience_ids":{"type":"array","items":{"type":"string","minLength":1}},"advantage_audience":{"description":"Let Meta reach beyond this audience (Advantage+ audience). Default false.","type":"boolean"}},"required":["geo"],"additionalProperties":false},"placement":{"description":"Omit for Advantage+ (automatic) placements; mode='manual' names them.","oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"advantage_plus"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"manual"},"publisher_platforms":{"minItems":1,"type":"array","items":{"type":"string","enum":["facebook","instagram"]}},"facebook_positions":{"minItems":1,"type":"array","items":{"type":"string","enum":["feed","facebook_reels","story","video_feeds"]}},"instagram_positions":{"minItems":1,"type":"array","items":{"type":"string","enum":["stream","story","reels","explore"]}},"device_platforms":{"minItems":1,"type":"array","items":{"type":"string","enum":["mobile","desktop"]}}},"required":["mode","publisher_platforms"],"additionalProperties":false}]},"destination":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"WEBSITE"},"pixel_id":{"type":"string","minLength":1},"custom_event_type":{"type":"string","enum":["PURCHASE","LEAD","COMPLETE_REGISTRATION","ADD_TO_CART","INITIATED_CHECKOUT","CONTACT","SUBSCRIBE","SCHEDULE","SEARCH","VIEW_CONTENT","OTHER"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"WHATSAPP"},"whatsapp_phone_number":{"type":"string","pattern":"^\\+?\\d{8,15}$","description":"The WhatsApp Business number, international format, e.g. +5215512345678."},"page_id":{"description":"Defaults to the brand’s only Page.","type":"string","minLength":1}},"required":["type","whatsapp_phone_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"MESSENGER"},"page_id":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"INSTAGRAM_DIRECT"},"page_id":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"ON_AD"},"page_id":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false,"description":"Instant (lead) form on the ad; pair with LEAD_GENERATION."}],"description":"Where the ad sends people. Omit for plain reach / traffic to the ad link."},"daily_budget":{"description":"Minor units (cents). Omit when the campaign holds the budget (CBO).","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lifetime_budget":{"description":"Minor units (cents); needs end_time. Omit under CBO.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bid":{"description":"Absent = lowest cost, no cap.","oneOf":[{"type":"object","properties":{"strategy":{"type":"string","const":"LOWEST_COST_WITHOUT_CAP"}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"strategy":{"type":"string","enum":["COST_CAP","LOWEST_COST_WITH_BID_CAP"]},"bid_amount_minor_units":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["strategy","bid_amount_minor_units"],"additionalProperties":false},{"type":"object","properties":{"strategy":{"type":"string","const":"LOWEST_COST_WITH_MIN_ROAS"},"roas_floor":{"type":"number","exclusiveMinimum":0,"maximum":1000}},"required":["strategy","roas_floor"],"additionalProperties":false}]},"start_time":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end_time":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"ads":{"description":"Ads created PAUSED inside this ad set (same fields as create_ad).","maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":400},"media":{"type":"object","properties":{"image_hash":{"description":"From upload_media or the ad account.","type":"string","minLength":1},"video_id":{"description":"From upload_media or the ad account.","type":"string","minLength":1},"image_url":{"description":"Public http(s) URL of an image; downloaded and uploaded to the ad account.","type":"string","format":"uri"},"video_url":{"description":"Public http(s) URL of a video; Meta fetches it directly (file_url).","type":"string","format":"uri"},"asset_id":{"description":"Continuum library asset id (media.assets); its poster is uploaded too for video.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"thumbnail_image_hash":{"description":"Video poster. Omitted = the library asset's poster, else Meta's own frame.","type":"string","minLength":1},"thumbnail_url":{"description":"Video poster by URL.","type":"string","format":"uri"}},"additionalProperties":false,"description":"Exactly one of image_hash, video_id, image_url, video_url, asset_id."},"primary_text":{"type":"string","minLength":1,"maxLength":2200},"headline":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":255},"call_to_action_type":{"description":"Default: WHATSAPP_MESSAGE / MESSAGE_PAGE for messaging ad sets, SIGN_UP for forms, else LEARN_MORE.","type":"string","enum":["LEARN_MORE","SHOP_NOW","SIGN_UP","BOOK_NOW","CONTACT_US","DOWNLOAD","APPLY_NOW","GET_QUOTE","GET_OFFER","SUBSCRIBE","ORDER_NOW","BUY_NOW","CALL_NOW","MESSAGE_PAGE","WHATSAPP_MESSAGE","NO_BUTTON"]},"link_url":{"description":"Destination URL. Required unless the ad set sends people to WhatsApp / Messenger / IG Direct / a form.","type":"string","format":"uri"},"lead_form_id":{"description":"Instant form id; required for ON_AD ad sets.","type":"string","minLength":1},"page_id":{"description":"Facebook Page the ad runs as. Default: the ad set's promoted Page, else the brand's only Page.","type":"string","minLength":1},"instagram_user_id":{"description":"Instagram account the ad runs as. Default: the brand's only connected one.","type":"string","minLength":1},"url_tags":{"description":"Query string appended to link clicks, e.g. utm_source=meta.","type":"string"}},"required":["name","media","primary_text"],"additionalProperties":false}}},"required":["name","optimization_goal","targeting"],"additionalProperties":false}},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["platform","campaign","mode","ad_account_id"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"create_adset"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"platform":{"type":"string","const":"meta_ads"},"ad_account_id":{"type":"string","minLength":1},"campaign_id":{"type":"string","minLength":1},"adset":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":400},"optimization_goal":{"type":"string","enum":["REACH","IMPRESSIONS","AD_RECALL_LIFT","LINK_CLICKS","LANDING_PAGE_VIEWS","POST_ENGAGEMENT","THRUPLAY","CONVERSATIONS","PAGE_LIKES","EVENT_RESPONSES","LEAD_GENERATION","QUALITY_LEAD","OFFSITE_CONVERSIONS","VALUE"]},"targeting":{"type":"object","properties":{"geo":{"type":"object","properties":{"countries":{"description":"ISO 3166-1 alpha-2, e.g. \"MX\".","type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"regions":{"description":"Meta region keys (from Meta targeting search), e.g. \"3847\".","type":"array","items":{"type":"string","minLength":1}},"cities":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Meta city key."},"radius":{"description":"Radius around the city.","type":"number","exclusiveMinimum":0,"maximum":80},"distance_unit":{"type":"string","enum":["mile","kilometer"]}},"required":["key"],"additionalProperties":false}},"custom_locations":{"description":"Radius around a point (pin drop).","type":"array","items":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"radius":{"type":"number","exclusiveMinimum":0,"maximum":80,"description":"Meta accepts 1-80 km or 0.63-50 miles."},"distance_unit":{"type":"string","enum":["mile","kilometer"]},"address_string":{"type":"string"}},"required":["latitude","longitude","radius","distance_unit"],"additionalProperties":false}},"location_types":{"description":"Default (omitted) = people living in or recently in the area.","type":"array","items":{"type":"string","enum":["home","recent","travel_in"]}}},"additionalProperties":false},"age_min":{"type":"integer","minimum":13,"maximum":65},"age_max":{"type":"integer","minimum":13,"maximum":65},"genders":{"type":"string","enum":["all","male","female"]},"interests":{"description":"Meta interest ids (from Meta targeting search).","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"],"additionalProperties":false}},"custom_audience_ids":{"type":"array","items":{"type":"string","minLength":1}},"excluded_custom_audience_ids":{"type":"array","items":{"type":"string","minLength":1}},"advantage_audience":{"description":"Let Meta reach beyond this audience (Advantage+ audience). Default false.","type":"boolean"}},"required":["geo"],"additionalProperties":false},"placement":{"description":"Omit for Advantage+ (automatic) placements; mode='manual' names them.","oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"advantage_plus"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"manual"},"publisher_platforms":{"minItems":1,"type":"array","items":{"type":"string","enum":["facebook","instagram"]}},"facebook_positions":{"minItems":1,"type":"array","items":{"type":"string","enum":["feed","facebook_reels","story","video_feeds"]}},"instagram_positions":{"minItems":1,"type":"array","items":{"type":"string","enum":["stream","story","reels","explore"]}},"device_platforms":{"minItems":1,"type":"array","items":{"type":"string","enum":["mobile","desktop"]}}},"required":["mode","publisher_platforms"],"additionalProperties":false}]},"destination":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"WEBSITE"},"pixel_id":{"type":"string","minLength":1},"custom_event_type":{"type":"string","enum":["PURCHASE","LEAD","COMPLETE_REGISTRATION","ADD_TO_CART","INITIATED_CHECKOUT","CONTACT","SUBSCRIBE","SCHEDULE","SEARCH","VIEW_CONTENT","OTHER"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"WHATSAPP"},"whatsapp_phone_number":{"type":"string","pattern":"^\\+?\\d{8,15}$","description":"The WhatsApp Business number, international format, e.g. +5215512345678."},"page_id":{"description":"Defaults to the brand’s only Page.","type":"string","minLength":1}},"required":["type","whatsapp_phone_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"MESSENGER"},"page_id":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"INSTAGRAM_DIRECT"},"page_id":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"ON_AD"},"page_id":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false,"description":"Instant (lead) form on the ad; pair with LEAD_GENERATION."}],"description":"Where the ad sends people. Omit for plain reach / traffic to the ad link."},"daily_budget":{"description":"Minor units (cents). Omit when the campaign holds the budget (CBO).","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lifetime_budget":{"description":"Minor units (cents); needs end_time. Omit under CBO.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bid":{"description":"Absent = lowest cost, no cap.","oneOf":[{"type":"object","properties":{"strategy":{"type":"string","const":"LOWEST_COST_WITHOUT_CAP"}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"strategy":{"type":"string","enum":["COST_CAP","LOWEST_COST_WITH_BID_CAP"]},"bid_amount_minor_units":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["strategy","bid_amount_minor_units"],"additionalProperties":false},{"type":"object","properties":{"strategy":{"type":"string","const":"LOWEST_COST_WITH_MIN_ROAS"},"roas_floor":{"type":"number","exclusiveMinimum":0,"maximum":1000}},"required":["strategy","roas_floor"],"additionalProperties":false}]},"start_time":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end_time":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["name","optimization_goal","targeting"],"additionalProperties":false},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["mode","platform","ad_account_id","campaign_id","adset"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"create_ad"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"platform":{"type":"string","const":"meta_ads"},"ad_account_id":{"type":"string","minLength":1},"adset_id":{"type":"string","minLength":1},"ad":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":400},"media":{"type":"object","properties":{"image_hash":{"description":"From upload_media or the ad account.","type":"string","minLength":1},"video_id":{"description":"From upload_media or the ad account.","type":"string","minLength":1},"image_url":{"description":"Public http(s) URL of an image; downloaded and uploaded to the ad account.","type":"string","format":"uri"},"video_url":{"description":"Public http(s) URL of a video; Meta fetches it directly (file_url).","type":"string","format":"uri"},"asset_id":{"description":"Continuum library asset id (media.assets); its poster is uploaded too for video.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"thumbnail_image_hash":{"description":"Video poster. Omitted = the library asset's poster, else Meta's own frame.","type":"string","minLength":1},"thumbnail_url":{"description":"Video poster by URL.","type":"string","format":"uri"}},"additionalProperties":false,"description":"Exactly one of image_hash, video_id, image_url, video_url, asset_id."},"primary_text":{"type":"string","minLength":1,"maxLength":2200},"headline":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":255},"call_to_action_type":{"description":"Default: WHATSAPP_MESSAGE / MESSAGE_PAGE for messaging ad sets, SIGN_UP for forms, else LEARN_MORE.","type":"string","enum":["LEARN_MORE","SHOP_NOW","SIGN_UP","BOOK_NOW","CONTACT_US","DOWNLOAD","APPLY_NOW","GET_QUOTE","GET_OFFER","SUBSCRIBE","ORDER_NOW","BUY_NOW","CALL_NOW","MESSAGE_PAGE","WHATSAPP_MESSAGE","NO_BUTTON"]},"link_url":{"description":"Destination URL. Required unless the ad set sends people to WhatsApp / Messenger / IG Direct / a form.","type":"string","format":"uri"},"lead_form_id":{"description":"Instant form id; required for ON_AD ad sets.","type":"string","minLength":1},"page_id":{"description":"Facebook Page the ad runs as. Default: the ad set's promoted Page, else the brand's only Page.","type":"string","minLength":1},"instagram_user_id":{"description":"Instagram account the ad runs as. Default: the brand's only connected one.","type":"string","minLength":1},"url_tags":{"description":"Query string appended to link clicks, e.g. utm_source=meta.","type":"string"}},"required":["name","media","primary_text"],"additionalProperties":false},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["mode","platform","ad_account_id","adset_id","ad"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"upload_media"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"platform":{"type":"string","const":"meta_ads"},"ad_account_id":{"type":"string","minLength":1},"image_url":{"description":"Public http(s) URL of an image; downloaded and uploaded to the ad account.","type":"string","format":"uri"},"video_url":{"description":"Public http(s) URL of a video; Meta fetches it directly (file_url).","type":"string","format":"uri"},"asset_id":{"description":"Continuum library asset id (media.assets); its poster is uploaded too for video.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["mode","platform","ad_account_id"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"update_entity"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"platform":{"type":"string","const":"meta_ads"},"entity_type":{"type":"string","enum":["campaign","adset","ad"]},"entity_id":{"type":"string","minLength":1},"changes":{"type":"object","properties":{"status":{"type":"string","enum":["PAUSED","ACTIVE","ARCHIVED"]},"name":{"type":"string","minLength":1,"maxLength":400},"daily_budget":{"type":"number","exclusiveMinimum":0},"lifetime_budget":{"type":"number","exclusiveMinimum":0},"bid_amount":{"type":"number","exclusiveMinimum":0},"bid_strategy":{"type":"string","enum":["LOWEST_COST_WITHOUT_CAP","COST_CAP","LOWEST_COST_WITH_BID_CAP","LOWEST_COST_WITH_MIN_ROAS"]},"optimization_goal":{"type":"string","enum":["REACH","IMPRESSIONS","AD_RECALL_LIFT","LINK_CLICKS","LANDING_PAGE_VIEWS","POST_ENGAGEMENT","THRUPLAY","CONVERSATIONS","PAGE_LIKES","EVENT_RESPONSES","LEAD_GENERATION","QUALITY_LEAD","OFFSITE_CONVERSIONS","VALUE"]},"start_time":{"description":"ISO 8601","type":"string","minLength":1},"end_time":{"description":"ISO 8601 (a campaign's stop_time)","type":"string","minLength":1},"targeting":{"type":"object","properties":{"age_min":{"anyOf":[{"type":"integer","minimum":13,"maximum":65},{"type":"null"}]},"age_max":{"anyOf":[{"type":"integer","minimum":13,"maximum":65},{"type":"null"}]},"genders":{"description":"[1]=men, [2]=women, null=all","anyOf":[{"type":"array","items":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2}]}},{"type":"null"}]},"geo_locations":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Meta geo spec: countries [\"US\"], regions [{key}], cities [{key, radius, distance_unit:\"mile\"|\"kilometer\"}], custom_locations [{latitude, longitude, radius, distance_unit}] (radius targeting), zips [{key}], location_types."},{"type":"null"}]},"excluded_geo_locations":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Meta geo spec: countries [\"US\"], regions [{key}], cities [{key, radius, distance_unit:\"mile\"|\"kilometer\"}], custom_locations [{latitude, longitude, radius, distance_unit}] (radius targeting), zips [{key}], location_types."},{"type":"null"}]},"interests":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"],"additionalProperties":{}}},{"type":"null"}]},"custom_audiences":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"],"additionalProperties":{}}},{"type":"null"}]},"excluded_custom_audiences":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"],"additionalProperties":{}}},{"type":"null"}]},"targeting_automation":{"anyOf":[{"type":"object","properties":{"advantage_audience":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1}]}},"required":["advantage_audience"],"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},"placements":{"description":"{mode:'advantage_plus'} = automatic placements; {mode:'manual', publisher_platforms, …_positions}","oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"advantage_plus"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"manual"},"publisher_platforms":{"minItems":1,"type":"array","items":{"type":"string","enum":["facebook","instagram"]}},"facebook_positions":{"minItems":1,"type":"array","items":{"type":"string","enum":["feed","facebook_reels","story","video_feeds"]}},"instagram_positions":{"minItems":1,"type":"array","items":{"type":"string","enum":["stream","story","reels","explore"]}},"device_platforms":{"minItems":1,"type":"array","items":{"type":"string","enum":["mobile","desktop"]}}},"required":["mode","publisher_platforms"],"additionalProperties":false}]}},"additionalProperties":false},"expected":{"type":"object","properties":{"status":{"type":"string"},"daily_budget":{"type":"number"},"lifetime_budget":{"type":"number"},"bid_amount":{"type":"number"}},"additionalProperties":false},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["mode","platform","entity_type","entity_id","changes"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"update_ad_copy"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"platform":{"type":"string","const":"meta_ads"},"ad_id":{"type":"string","minLength":1},"changes":{"type":"object","properties":{"primary_text":{"type":"string","minLength":1,"maxLength":5000},"headline":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":255},"call_to_action":{"description":"Meta CTA type, e.g. LEARN_MORE, SHOP_NOW, SIGN_UP, BOOK_NOW, CONTACT_US, ORDER_NOW","type":"string","pattern":"^[A-Z_]+$"},"link_url":{"type":"string","format":"uri"},"creative_id":{"type":"string","minLength":1}},"additionalProperties":false},"expected_creative_id":{"type":"string"},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["mode","platform","ad_id","changes"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"duplicate"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"platform":{"type":"string","const":"meta_ads"},"entity_type":{"type":"string","enum":["campaign","adset","ad"]},"entity_id":{"type":"string","minLength":1},"deep_copy":{"type":"boolean"},"parent_id":{"type":"string","minLength":1},"overrides":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":400},"daily_budget":{"type":"number","exclusiveMinimum":0},"lifetime_budget":{"type":"number","exclusiveMinimum":0},"start_time":{"type":"string","minLength":1},"end_time":{"type":"string","minLength":1},"targeting":{"type":"object","properties":{"age_min":{"anyOf":[{"type":"integer","minimum":13,"maximum":65},{"type":"null"}]},"age_max":{"anyOf":[{"type":"integer","minimum":13,"maximum":65},{"type":"null"}]},"genders":{"description":"[1]=men, [2]=women, null=all","anyOf":[{"type":"array","items":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2}]}},{"type":"null"}]},"geo_locations":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Meta geo spec: countries [\"US\"], regions [{key}], cities [{key, radius, distance_unit:\"mile\"|\"kilometer\"}], custom_locations [{latitude, longitude, radius, distance_unit}] (radius targeting), zips [{key}], location_types."},{"type":"null"}]},"excluded_geo_locations":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Meta geo spec: countries [\"US\"], regions [{key}], cities [{key, radius, distance_unit:\"mile\"|\"kilometer\"}], custom_locations [{latitude, longitude, radius, distance_unit}] (radius targeting), zips [{key}], location_types."},{"type":"null"}]},"interests":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"],"additionalProperties":{}}},{"type":"null"}]},"custom_audiences":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"],"additionalProperties":{}}},{"type":"null"}]},"excluded_custom_audiences":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"],"additionalProperties":{}}},{"type":"null"}]},"targeting_automation":{"anyOf":[{"type":"object","properties":{"advantage_audience":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1}]}},"required":["advantage_audience"],"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},"placements":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"advantage_plus"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"manual"},"publisher_platforms":{"minItems":1,"type":"array","items":{"type":"string","enum":["facebook","instagram"]}},"facebook_positions":{"minItems":1,"type":"array","items":{"type":"string","enum":["feed","facebook_reels","story","video_feeds"]}},"instagram_positions":{"minItems":1,"type":"array","items":{"type":"string","enum":["stream","story","reels","explore"]}},"device_platforms":{"minItems":1,"type":"array","items":{"type":"string","enum":["mobile","desktop"]}}},"required":["mode","publisher_platforms"],"additionalProperties":false}]},"creative_id":{"type":"string","minLength":1}},"additionalProperties":false},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["mode","platform","entity_type","entity_id"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"create_audience"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"ad_account_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"subtype":{"type":"string","enum":["WEBSITE","ENGAGEMENT","APP"]},"pixel_id":{"type":"string"},"retention_days":{"type":"integer","exclusiveMinimum":0,"maximum":180},"engagement_type":{"type":"string"},"idempotency_key":{"type":"string","minLength":1},"confirm_token":{"type":"string"}},"required":["mode","ad_account_id","name","subtype","idempotency_key"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"create_lookalike"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"ad_account_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"origin_audience_id":{"type":"string","minLength":1},"country":{"type":"string","minLength":2,"maxLength":2},"ratio":{"type":"number","exclusiveMinimum":0,"maximum":0.2},"lookalike_type":{"type":"string","enum":["similarity","reach"]},"idempotency_key":{"type":"string","minLength":1},"confirm_token":{"type":"string"}},"required":["mode","ad_account_id","name","origin_audience_id","country","ratio","lookalike_type","idempotency_key"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"create_customer_list_audience"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"],"description":"'preview' returns counts + a confirm_token; 'confirm' creates/uploads."},"platform":{"type":"string","const":"meta_ads"},"ad_account_id":{"description":"Meta ad account (with or without act_). Required when creating a new audience.","type":"string","minLength":1},"audience_id":{"description":"Append to this existing customer-list audience instead of creating one.","type":"string","minLength":1},"name":{"description":"New audience name (required when creating).","type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":500},"customer_file_source":{"description":"Where the list came from (Meta-required). Default USER_PROVIDED_ONLY.","type":"string","enum":["USER_PROVIDED_ONLY","PARTNER_PROVIDED_ONLY","BOTH_USER_AND_PARTNER_PROVIDED"]},"default_country_code":{"description":"Dialing code added to phones without one, e.g. '52' for Mexico.","type":"string","pattern":"^\\d{1,4}$"},"members":{"minItems":1,"maxItems":50000,"type":"array","items":{"type":"object","properties":{"email":{"description":"Email address. Raw or already SHA-256 hashed (64 hex).","type":"string","maxLength":512},"phone":{"description":"Phone; include the country code or set default_country_code. Raw or already SHA-256 hashed (64 hex).","type":"string","maxLength":512},"first_name":{"description":"First name. Raw or already SHA-256 hashed (64 hex).","type":"string","maxLength":512},"last_name":{"description":"Last name. Raw or already SHA-256 hashed (64 hex).","type":"string","maxLength":512},"city":{"description":"City. Raw or already SHA-256 hashed (64 hex).","type":"string","maxLength":512},"state":{"description":"State / province code. Raw or already SHA-256 hashed (64 hex).","type":"string","maxLength":512},"zip":{"description":"Postal code. Raw or already SHA-256 hashed (64 hex).","type":"string","maxLength":512},"country":{"description":"ISO-3166 alpha-2 country code. Raw or already SHA-256 hashed (64 hex).","type":"string","maxLength":512},"external_id":{"description":"Your CRM id for this person. Raw or already SHA-256 hashed (64 hex).","type":"string","maxLength":512}},"additionalProperties":false},"description":"People to add. Hashed server-side; uploaded in batches of 10,000."},"idempotency_key":{"description":"Caller operation id; an exact retry replays the receipt.","type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["mode","platform","members"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"delete_audience"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"platform":{"type":"string","const":"meta_ads"},"audience_id":{"type":"string","minLength":1},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["mode","platform","audience_id"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"send_conversions"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"],"description":"'preview' summarizes + returns a confirm_token; 'confirm' sends to Meta."},"platform":{"type":"string","const":"meta_ads"},"dataset_id":{"type":"string","pattern":"^\\d+$","description":"Meta pixel / dataset id that receives the events."},"events":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"event_name":{"type":"string","minLength":1,"maxLength":100,"description":"Standard (Purchase, Lead, CompleteRegistration, Subscribe…) or custom name. Offline sign-ups (\"altas\") are usually CompleteRegistration or Subscribe."},"event_time":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"Unix seconds or ISO-8601. ≤7 days old (≤62 days for physical_store), not in the future."},"action_source":{"type":"string","enum":["website","physical_store","system_generated","business_messaging","other"]},"event_id":{"description":"Dedup key (match your pixel event_id). Derived from the event when omitted.","type":"string","minLength":1,"maxLength":200},"event_source_url":{"description":"Required for action_source='website'.","type":"string","format":"uri"},"value":{"type":"number","minimum":0},"currency":{"description":"ISO-4217, e.g. MXN. Required with value.","type":"string","pattern":"^[A-Za-z]{3}$"},"user_data":{"type":"object","properties":{"em":{"description":"Email. Raw or already SHA-256 hashed; hashed server-side.","anyOf":[{"type":"string","maxLength":512},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":512}}]},"ph":{"description":"Phone; include country code or set default_country_code. Raw or already SHA-256 hashed; hashed server-side.","anyOf":[{"type":"string","maxLength":512},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":512}}]},"external_id":{"description":"Your CRM / customer id. Raw or already SHA-256 hashed; hashed server-side.","anyOf":[{"type":"string","maxLength":512},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":512}}]},"fn":{"description":"First name. Raw or already SHA-256 hashed; hashed server-side.","anyOf":[{"type":"string","maxLength":512},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":512}}]},"ln":{"description":"Last name. Raw or already SHA-256 hashed; hashed server-side.","anyOf":[{"type":"string","maxLength":512},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":512}}]},"ct":{"description":"City. Raw or already SHA-256 hashed; hashed server-side.","anyOf":[{"type":"string","maxLength":512},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":512}}]},"st":{"description":"State / province code. Raw or already SHA-256 hashed; hashed server-side.","anyOf":[{"type":"string","maxLength":512},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":512}}]},"zp":{"description":"Postal code. Raw or already SHA-256 hashed; hashed server-side.","anyOf":[{"type":"string","maxLength":512},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":512}}]},"country":{"description":"ISO-3166 alpha-2 country. Raw or already SHA-256 hashed; hashed server-side.","anyOf":[{"type":"string","maxLength":512},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":512}}]},"client_ip_address":{"description":"Sent unhashed (Meta requirement).","type":"string","maxLength":64},"client_user_agent":{"description":"Sent unhashed. Required for action_source='website'.","type":"string","maxLength":1024},"fbc":{"description":"_fbc click id cookie, unhashed.","type":"string","maxLength":512},"fbp":{"description":"_fbp browser id cookie, unhashed.","type":"string","maxLength":512}},"additionalProperties":false}},"required":["event_name","event_time","action_source","user_data"],"additionalProperties":false},"description":"Sent in batches of 1,000."},"default_country_code":{"description":"Dialing code added to phones without one, e.g. '52' for Mexico.","type":"string","pattern":"^\\d{1,4}$"},"test_event_code":{"description":"Events Manager test code: events show in Test Events and do not count.","type":"string","minLength":1,"maxLength":64},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"}},"required":["mode","platform","dataset_id","events"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"manage_rules"},"params":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"list"},"platform":{"type":"string","const":"meta_ads"},"ad_account_id":{"type":"string","minLength":1}},"required":["op","platform","ad_account_id"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create"},"mode":{"type":"string","enum":["preview","confirm"],"description":"'preview' returns a confirm_token; 'confirm' writes."},"platform":{"type":"string","const":"meta_ads"},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"},"ad_account_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"evaluation_spec":{"type":"object","properties":{"evaluation_type":{"type":"string","enum":["SCHEDULE","TRIGGER"]},"filters":{"minItems":1,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"description":"e.g. 'entity_type' (CAMPAIGN|ADSET|AD), 'time_preset' (TODAY, LIFETIME…), 'spent', 'id'"},"operator":{"type":"string","enum":["GREATER_THAN","LESS_THAN","EQUAL","NOT_EQUAL","IN_RANGE","NOT_IN_RANGE","IN","NOT_IN","CONTAIN","NOT_CONTAIN","ANY","ALL","NONE"]},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{"type":["number","string"]}}],"description":"Money fields (spent, cpa…) are in the account currency minor units: 10000 = 100.00."}},"required":["field","operator","value"],"additionalProperties":false},"description":"Must include entity_type and time_preset; e.g. spent GREATER_THAN 50000."},"trigger":{"description":"Only for evaluation_type='TRIGGER'.","type":"object","properties":{"type":{"type":"string","minLength":1},"field":{"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{"type":["number","string"]}}]},"operator":{"type":"string"}},"required":["type"],"additionalProperties":false}},"required":["evaluation_type","filters"],"additionalProperties":false},"execution_spec":{"type":"object","properties":{"execution_type":{"type":"string","enum":["PAUSE","NOTIFICATION"],"description":"PAUSE stops the matching entities; NOTIFICATION only alerts."},"execution_options":{"description":"e.g. { field: 'user_ids', value: ['<fb user id>'], operator: 'EQUAL' } for who gets notified.","type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{"type":["number","string"]}}]},"operator":{"type":"string"}},"required":["field","value","operator"],"additionalProperties":false}}},"required":["execution_type"],"additionalProperties":false},"schedule_spec":{"type":"object","properties":{"schedule_type":{"type":"string","enum":["DAILY","HOURLY","SEMI_HOURLY","CUSTOM"]},"schedule":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["schedule_type"],"additionalProperties":false},"status":{"description":"Default ENABLED (needs admin approval); DISABLED creates it switched off.","type":"string","enum":["ENABLED","DISABLED"]}},"required":["op","mode","platform","ad_account_id","name","evaluation_spec","execution_spec"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"delete"},"mode":{"type":"string","enum":["preview","confirm"],"description":"'preview' returns a confirm_token; 'confirm' writes."},"platform":{"type":"string","const":"meta_ads"},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"},"rule_id":{"type":"string","minLength":1}},"required":["op","mode","platform","rule_id"],"additionalProperties":false}]}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"google_ads"},"params":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"update_campaign_budget"},"mode":{"type":"string","enum":["preview","confirm"],"description":"'preview' returns a confirm_token; 'confirm' writes."},"customer_id":{"type":"string","pattern":"^[\\d-]+$","description":"Google Ads customer ID (dashes optional)."},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"},"campaign_id":{"type":"string","pattern":"^\\d+$"},"amount_micros":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The new DAILY budget, in micros."},"expected":{"type":"object","properties":{"amount_micros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["amount_micros"],"additionalProperties":false}},"required":["op","mode","customer_id","campaign_id","amount_micros"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"set_status"},"mode":{"type":"string","enum":["preview","confirm"],"description":"'preview' returns a confirm_token; 'confirm' writes."},"customer_id":{"type":"string","pattern":"^[\\d-]+$","description":"Google Ads customer ID (dashes optional)."},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"},"resource":{"type":"string","enum":["campaign","ad_group","ad_group_ad"]},"id":{"type":"string","pattern":"^\\d+(~\\d+)?$","description":"Campaign / ad group ID; for ad_group_ad, '<ad_group_id>~<ad_id>'."},"status":{"type":"string","enum":["PAUSED","ENABLED"],"description":"ENABLED needs an admin (guardrails)."},"expected":{"type":"object","properties":{"status":{"type":"string"}},"required":["status"],"additionalProperties":false}},"required":["op","mode","customer_id","resource","id","status"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create_campaign"},"mode":{"type":"string","enum":["preview","confirm"],"description":"'preview' returns a confirm_token; 'confirm' writes."},"customer_id":{"type":"string","pattern":"^[\\d-]+$","description":"Google Ads customer ID (dashes optional)."},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":255},"daily_budget_micros":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Micros of the account currency: 1000000 = 1.00."},"bidding":{"type":"string","enum":["MANUAL_CPC","MAXIMIZE_CLICKS","MAXIMIZE_CONVERSIONS"]},"search_partners":{"description":"Also serve on Search partners. Default false.","type":"boolean"}},"required":["op","mode","customer_id","name","daily_budget_micros"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create_ad_group"},"mode":{"type":"string","enum":["preview","confirm"],"description":"'preview' returns a confirm_token; 'confirm' writes."},"customer_id":{"type":"string","pattern":"^[\\d-]+$","description":"Google Ads customer ID (dashes optional)."},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"},"campaign_id":{"type":"string","pattern":"^\\d+$"},"name":{"type":"string","minLength":1,"maxLength":255},"cpc_bid_micros":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Micros of the account currency: 1000000 = 1.00."}},"required":["op","mode","customer_id","campaign_id","name"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"add_keywords"},"mode":{"type":"string","enum":["preview","confirm"],"description":"'preview' returns a confirm_token; 'confirm' writes."},"customer_id":{"type":"string","pattern":"^[\\d-]+$","description":"Google Ads customer ID (dashes optional)."},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"confirm_token":{"type":"string"},"ad_group_id":{"type":"string","pattern":"^\\d+$"},"keywords":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]},"negative":{"type":"boolean"}},"required":["text","match_type"],"additionalProperties":false}}},"required":["op","mode","customer_id","ad_group_id","keywords"],"additionalProperties":false}]}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"batch"},"params":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","confirm"]},"ops":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["create_campaign","create_adset","create_ad","upload_media","update_entity","update_ad_copy","duplicate","create_audience","create_lookalike","create_customer_list_audience","delete_audience","send_conversions","manage_rules","google_ads"]},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"That action's params WITHOUT mode/confirm_token — the batch sets them."}},"required":["action","params"],"additionalProperties":false},"description":"Executed in order at confirm; the first failure stops the rest."},"confirm_token":{"type":"string"}},"required":["mode","ops"],"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"activity"},"params":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":200},"tool":{"description":"Backing tool name prefix to filter, e.g. paid_entity_update. Default: all paid_*","type":"string"}},"additionalProperties":false}},"required":["action","params"]},{"type":"object","properties":{"action":{"type":"string","const":"guardrails"},"params":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"get"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"set"},"max_daily_budget_minor":{"description":"Max daily budget per entity in minor units (cents); null removes the cap.","anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"max_increase_pct":{"description":"Max budget increase per change without admin approval (default 30).","type":"number","minimum":0}},"required":["mode"],"additionalProperties":false}]}},"required":["action","params"]}]}}
