API Reference
Update an ad set
/v27.0/{adset_id}https://meta-ads.mimicr.dev · provider: https://graph.facebook.comUpdates an ad set or changes its status. The budget can change at most 4 times per hour per ad set (613/1487632); send it only when it changes. Switching between daily and lifetime budget returns 100/1487046, and start_time can't change after the start (100/1487101). Status rules: ARCHIVED can only go to DELETED; a DELETED object only accepts a new name. Pausing or archiving a parent makes its children inherit CAMPAIGN_PAUSED/ADSET_PAUSED/ARCHIVED/DELETED. Requires ads_management and a role on the ad account. Disabled or closed accounts (status 2, 101) answer (#200) The ad account is disabled.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Path parameters
ID of the ad set.
"120200539998049713"Body
application/x-www-form-urlencodedName of the ad set, up to 400 characters. [sem-entrega] in the name keeps it from delivering (Mimicr trigger).
ACTIVE, PAUSED, ARCHIVED or DELETED.
ACTIVEPAUSEDARCHIVEDDELETEDWhat you pay for. Click-to-WhatsApp requires IMPRESSIONS.
APP_INSTALLSCLICKSIMPRESSIONSLINK_CLICKSLISTING_INTERACTIONNONEOFFER_CLAIMSPAGE_LIKESPOST_ENGAGEMENTPURCHASETHRUPLAYWhat delivery optimizes for. Must fit the objective: ENGAGEMENT → CONVERSATIONS, LINK_CLICKS; TRAFFIC → LINK_CLICKS, LANDING_PAGE_VIEWS, REACH, …; LEADS → LEAD_GENERATION, QUALITY_LEAD, CONVERSATIONS; otherwise 100/2490408.
33 values
ADVERTISER_SILOED_VALUEAD_RECALL_LIFTAPP_INSTALLSAPP_INSTALLS_AND_OFFSITE_CONVERSIONSAUTOMATIC_OBJECTIVECONVERSATIONSDERIVED_EVENTSENGAGED_PAGE_VIEWSENGAGED_USERSEVENT_RESPONSESIMPRESSIONSIN_APP_VALUELANDING_PAGE_VIEWSLEAD_GENERATIONLINK_CLICKSMEANINGFUL_CALL_ATTEMPTMESSAGING_APPOINTMENT_CONVERSIONMESSAGING_DEEP_CONVERSATION_AND_FOLLOWMESSAGING_PURCHASE_CONVERSIONNONEOFFSITE_CONVERSIONSPAGE_LIKESPOST_ENGAGEMENTPROFILE_AND_PAGE_ENGAGEMENTPROFILE_VISITQUALITY_CALLQUALITY_LEADREACHREMINDERS_SETSUBSCRIBERSTHRUPLAYVALUEVISIT_INSTAGRAM_PROFILEBid strategy. LOWEST_COST_WITH_BID_CAP and COST_CAP need bid_amount.
COST_CAPLOWEST_COST_WITHOUT_CAPLOWEST_COST_WITH_BID_CAPLOWEST_COST_WITH_MIN_ROASBid in the minor unit.
Daily budget in the minor unit; only for ad sets that run more than 24 h. Below the minimum for the goal returns 100/1885272 (sandbox minimums: R$ 1.00 impressions/reach, R$ 2.50 clicks, R$ 5.00 conversations/leads).
Lifetime budget in the minor unit; requires end_time (100/1487171).
New start time; only while the ad set hasn't started (100/1487101).
End time; 0 for ongoing daily-budget ad sets. In the past returns 1487033.
WHATSAPP for click-to-WhatsApp (needs promoted_object.page_id with a WhatsApp number, else 100/2446880), WEBSITE, ON_AD for lead forms, …
23 values
APPAPPLINKS_AUTOMATICFACEBOOKFACEBOOK_LIVEFACEBOOK_PAGEIMAGINEINSTAGRAM_DIRECTINSTAGRAM_LIVEINSTAGRAM_PROFILEINSTAGRAM_PROFILE_AND_FACEBOOK_PAGEMESSAGING_INSTAGRAM_DIRECT_MESSENGERMESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPPMESSAGING_INSTAGRAM_DIRECT_WHATSAPPMESSAGING_MESSENGER_WHATSAPPMESSENGERON_ADON_EVENTON_PAGEON_POSTON_VIDEOSHOP_AUTOMATICWEBSITEWHATSAPPPromoted object: {page_id, whatsapp_phone_number} for WhatsApp, {page_id} for leads, {pixel_id, custom_event_type} for conversions.
Show child attributes
ID of the Page. Required for WhatsApp and lead generation ad sets.
WhatsApp number (digits) the ads open a chat with. Must be the Page's number.
Phone number ID of the WhatsApp Business account.
ID of the dataset (pixel) for conversion optimization.
Conversion event to optimize for (PURCHASE, LEAD, …).
29 values
ACHIEVEMENT_UNLOCKEDADD_PAYMENT_INFOADD_TO_CARTADD_TO_WISHLISTAD_IMPRESSIONCOMPLETE_REGISTRATIONCONTACTCONTENT_VIEWCUSTOMIZE_PRODUCTD2_RETENTIOND7_RETENTIONDONATEFIND_LOCATIONINITIATED_CHECKOUTLEADLEVEL_ACHIEVEDLISTING_INTERACTIONMESSAGING_CONVERSATION_STARTED_7DOTHERPURCHASERATESCHEDULESEARCHSERVICE_BOOKING_REQUESTSPENT_CREDITSSTART_TRIALSUBMIT_APPLICATIONSUBSCRIBETUTORIAL_COMPLETIONID of the app for app promotion.
Audience. geo_locations is required (100/1487079).
Show child attributes
Locations to target. Required.
Show child attributes
ISO-2 country codes.
Regions as {key}.
Cities as {key, radius, distance_unit}; radius 10–50 mi or 17–80 km.
Points with a radius: {latitude, longitude, radius, distance_unit} or {address_string, radius}; radius 1–80 km or 0.63–50 mi; up to 200 items.
Show child attributes
Latitude of the point.
Longitude of the point.
Radius around the point.
kilometer or mile (default).
Address, instead of coordinates.
home and/or recent.
Minimum age, 13 or more (default 18). With Advantage+ audience only 18 to 25.
Maximum age, up to 65.
[1] men, [2] women. Omit for all.
Advantage+ audience settings.
Show child attributes
1 lets Meta expand the audience (Advantage+ audience), 0 keeps it. Must be set explicitly on create when the audience is constrained.
Per-dimension automation settings (age, gender, device).
Platforms: facebook, instagram, messenger, audience_network.
Facebook placements.
Instagram placements.
Messenger placements. story is dropped since v26.0.
mobile and/or desktop.
connected_tvdesktopmobileDetailed targeting. In Mimicr it is stored, not resolved.
Excluded detailed targeting. Stored, not resolved.
Custom audiences. Custom audiences are not simulated (501).
Interests. Stored, not resolved.
["standard"] or ["day_parting"] with adset_schedule.
Day parting; lifetime budget only (100/1487201).
Show child attributes
Start minute of the day (0–1439), on the hour.
End minute of the day; 1440 is the end of the day.
Days of the week, 0 (Sunday) to 6.
USER or ADVERTISER.
Stored.
Stored.
Refused since v27.0 (version error).
["validate_only"] runs every validation and returns {"success":true} without writing.
validate_onlyResponses
200OK.
true when the change was applied.
400Error in the Graph envelope: 613/1487632 budget changed more than 4 times in an hour, 100/1487101 start time of a started ad set, 100/1487056 deleted ad set.
Show child attributes
Description of the error.
"(#100) The parameter special_ad_categories is required"OAuthException for most codes (the Marketing API uses it for validation too), GraphMethodException for unknown objects, FacebookApiException for transient errors. In Mimicr, routes outside the integration core answer MimicrNotSimulated with HTTP 501.
"OAuthException"Error code (100 invalid parameter, 190 invalid token, 200 permission, 2635 deprecated version, 613/17/80004 rate limits, …).
100Error subcode with more detail (1885272 budget too low, 463 token expired, …).
1885272Whether retrying the same request may succeed. Present on every Marketing API error; true for codes 1 and 2.
Title of the error, to show to people.
Message of the error, to show to people.
Extra data. blame_field_specs lists the params that caused a validation error.
Show child attributes
Internal support identifier of the request.
"AbCdEf12345"