Campaigns, ad sets, ads and their numbers are refreshed from each ad platform in the background, typically every 15 to 60 minutes, and Google Ads up to about 3 hours. A read of the campaigns says when they were last refreshed. Audience breakdowns are read from the platform at the moment they are asked for.
Actions and fields
Each tool takes anaction, and the action’s values go in fields. The fields action describes them: with nothing else it lists every action of the tool with a line on what it does; with of it lists what one action takes; field reads inside one field by its path, such as targeting or placements; match keeps the fields whose name or text has those letters. A field that is not on the list is refused by name.
Every action on an ad account takes account_id, an ad account connection from manage_social_accounts list. ad_account_id names an ad account on that connection, from manage_ads ad_accounts. id is the campaign, ad set, ad, audience or other thing the action is about, and sub_id a second id where one thing is inside another, such as a comment on an ad.
The campaign tree
Campaigns, ad sets and ads are made and changed on their own:create_campaign, create_ad_set, create, then update_campaign, update_ad_set and update_ad. boost runs an existing post as an ad, and create_message_ad and create_call_ad make message and call ads. duplicate_campaign, duplicate_ad_set and duplicate_ad copy one, and a copy is made paused. delete_campaign, delete_ad_set and end remove them.
health checks an ad account before creating. validate_only in fields checks a call without creating anything. preview and ad_preview return how an ad looks, and review the platform’s review of it.
Creatives
A media field takes a library item, so a picture or a video in the workspace is the ad’s creative.create_creative, upload_image and upload_video add to the ad account’s own library, and boostable_posts lists the posts that can run as ads.
On and off
create, boost, create_message_ad and create_call_ad start live unless fields.status is PAUSED. campaign_status, ad_set_status and ad_status switch one level on or off. In a workspace that keeps agents’ posts and ads for approval, an agent’s new ad is made paused for a person to switch on; see Approval and what agents can do.
Meta holds an ad account for days after a burst of writes, so writes to it go one at a time. A Meta Ads connection takes 25 changes in 5 minutes. Past that, a change is refused with the minutes until the next one can go.
Running ads
An ad account slot includes 100 ads running at once, and an ad pack adds 500 (manage_social_accounts add_ad_pack, $10 a month). allowance on manage_ads returns running and included. With every included ad running, switching another on is refused until one is paused or a pack is added.
Audiences
Onmanage_ad_audiences, search finds targeting ids (places, interests, behaviors, job titles, employers, industries, languages), browse walks Meta’s categories, and reach estimates an audience’s size. bid_pricing and forecast return LinkedIn’s bid bounds and expected delivery. list, get, create, update and delete manage custom audiences: a customer list, website visitors by pixel, people who engaged, a lookalike of another audience, or a saved targeting. add_people and remove_people take emails or phone numbers, hashed before they reach the platform.
Tracking and lead forms
Onmanage_ad_tracking, pixels lists an ad account’s pixels, and tags and set_tags read and set an ad’s URL tags. create_lead_form, lead_forms and archive_lead_form manage lead forms, leads and form_leads read what people submitted, and set_lead_status marks one. send_conversions and adjust_conversions report conversions, destinations lists where events go with their campaigns and metrics, and match_quality reads Meta’s Event Match Quality.
Rules
A rule onmanage_ad_rules has a level (campaign, adset or ad), conditions on a metric over a window, one action (pause, activate, adjust_budget, adjust_bid, reallocate_budget, duplicate, edit_name, notify) and a schedule. templates lists ready-made rules. A rule made with enabled false can be checked with preview before update switches it on. runs, changes and alerts read what a rule did, and undo takes one change back.
An ad account includes 750 rule checks a month across its enabled rules, counted from their schedules: an hourly rule is 744 checks, a daily one 31. allowance reads the count. A rule that switches ads on counts against the running ads.
Results
Onread_ad_results, tree returns campaigns, ad sets and ads with their metrics over a window: spend, impressions, clicks, ctr, cpc, cpm, reach, conversions and roas, with a daily series on request. ranked orders ads by a metric, and timeline is the ad account by day. ad and campaign add breakdowns by age, gender, country, placement and device, and on Meta by each picture, video and text of an ad. insights is a live query at any level with attribution windows, and start_report and report run a large one. studies lists A/B and lift tests, and ad_library searches the public ad libraries of Meta and LinkedIn. Reach is counted within a day and is not summed across days.
Numbers and alerts of the workspace’s own
A number of the workspace’s own is a name and a formula over spend, impressions, clicks, results, purchase_value and reach: profit at a known margin, value per click, cost per thousand reached.manage_ads save_measure keeps one and delete_measure drops one. read_ad_results measures lists them, and with an ad account named returns each with its value over the window. A number can carry an alert, alert_when above or below with alert_value: past that value it is listed under Needs attention on the Campaigns page and comes back with alerting true. Each alert is also checked once a day over the last seven days, and a number that has just passed its value sends the workspace’s people a phone notification.
What needs attention has three sources. The ad platforms’ own alerts (a rejected ad, a failed payment, spend with no result, a budget at its cap) are read with manage_ads alerts and cleared with dismiss_alert; get_workspace_overview returns the open ones as ads_attention. A rule whose action is notify alerts on any condition a rule can hold, per campaign, ad set or ad. A number of the workspace’s own alerts on a figure no platform reports. All three are shown to the user on the Campaigns page.

