Berg

berg.ad docs

Your paid-social expert, wired into Meta.

berg.ad gives an AI expert the tools and automations to max one goal on Facebook, Instagram, TikTok and YouTube (views, followers or leads) and hands every lead to whoever answers it. Home: mcp.boosterberg.com.

Connect

Address: https://mcp.boosterberg.com (https://mcp.boosterberg.com/mcp works too). You sign in with Google or with a link emailed to you; a script that can't sign in uses a key.

  1. ChatGPT

    Settings → Apps & Connectors → Advanced → turn on Developer mode → Create. Name berg.ad, URL https://mcp.boosterberg.com, authentication OAuth. Sign in with Google, or type your email and open the link Berg sends, then click Allow. Then start a new chat; if it answers without berg.ad, turn berg.ad on from the + menu under the message box.

  2. Claude (claude.ai)

    Settings → Connectors → Add custom connector, the same address, then sign in with Google or by email and click Allow.

  3. Claude Code

    claude mcp add --transport http bergad https://mcp.boosterberg.com, then run /mcp in Claude Code, pick bergad and sign in with Google or by email.

Keys and sign-in

  • Static key. Send it as Authorization: Bearer <key> on every request (your own code). It is checked first.
  • OAuth (ChatGPT, claude.ai). The app names itself by its client metadata document URL, or registers at /register (https redirect URIs, or http on a loopback host), sends you to /authorize, where you sign in (with Google, or by email: type e.g. joe@example.com, click Email me a sign-in link, open the mail and click Sign in) and click Allow as your email, then trades the code at /token with PKCE S256. The app gets its own token, never a key. It stays signed in until 30 days without use. 20 registrations per IP per hour, then try again in an hour.
  • Full key: every account tool below; a tool tagged signed-in person or signed-in member of the account is listed only to a person signed in (Google or an emailed link) or a create_key key. Restricted key: only the tools it was issued for, any account tool below, plus hook (the hook), e.g. {"tools": ["get_post_stats", "set_post_overrides", "hook"]} reads post stats and switches posts off and on, and nothing else. Other tools are not listed to it and cannot be called.
  • Signed in (admin, partner or client): at /authorize click Sign in with Google, or type your email, e.g. joe@example.com, and click Email me a sign-in link: the mail's link works once, for 15 minutes, opens a page whose Sign in button signs you in (opening the link alone signs nobody in, so a mail scanner uses nothing up), and comes back to the same Allow page. The answer is the same whether or not the address has a Berg person; the address of a person made with Google signs into that person, and a new address makes a client. An admin signs in only with Google: an admin's address by link answers "This is an admin email: sign in with Google." Then Allow as your email; or a key you made with create_key. Every account tool then takes account (id or name, e.g. {account: 'bills_a'}; a partner may name his customer's account by the ref he gave connect_link, e.g. {account: {ref: '3f2a9c1e'}}), and only accounts you reach (list_accounts) are accepted. Your own tools: whoami, list_accounts, create_account (a partner or admin: you become the new account's first member, and your email its report email, e.g. bill@example.com; a client sets up at /admin, starting from Facebook, Instagram, TikTok or YouTube, each by connecting that platform's own account and picking it (a sign-in that offers one, as a Google sign-in's one channel or a TikTok login's one account, is taken with no pick); page_id is optional, an account with none starts from TikTok or YouTube, e.g. create_account {name: "acme", privacy_url: "acme.example/privacy", markets: [{name: "Croatia", countries: ["hr"]}]}, its ads on berg.ad's own ad account; Instagram comes only with a Facebook page, which Meta asks for in every Instagram ad), assign_account (adds a member, admin or the account's partner, e.g. {account: 'bills_b', member: 'joe@example.com'}), list_members, invite_link (e.g. {new: true} answers {url: 'https://mcp.boosterberg.com/join/…'}; whoever opens it and signs in, with Google or by email, becomes a member; a new link ends the old), remove_member (e.g. {user_id: 'u_8f2c'}; the last member stays). Every member manages the account equally, top-ups and the automatic top-up included; the wallet credit is the admin's, list_people, set_person (admin), create_key, list_keys, revoke_key, disconnect, save_affiliate (a partner's own code, e.g. {code: 'sailing-joe', share_pct: 10}; the admin saves one for a partner by naming him, id or email, e.g. {code: 'harbour-ann', partner: 'bill@example.com', share_pct: 5}, and edits any partner's code, which stays that partner's), list_partner_cuts (his cut per client, month and currency, in minor units: top_ups and cut, his profit_share_pct of berg.ad's fee minus Stripe's fee, e.g. {account: 2, month: '2026-10', currency: 'EUR', top_ups: 10000, cut: 1072}; a credit recorded by hand earns none; cut: null with cut_unknown while Stripe's fee is unread or no share is set), list_affiliates (per code and currency, in minor units: sold, pending, due, paid, e.g. {currency: 'EUR', sold: 15000, pending: 500, due: 700, paid: 300}: a top-up's share_pct is pending for 30 days, then due, less what was paid), log_affiliate_payment (e.g. {code: 'sailing-joe', amount: 1250, currency: 'EUR', paid_on: '2026-10-30'}; the admin logs on any partner's code, kept in that partner's ledger), list_affiliate_payments, delete_affiliate_payment, delete_playbook, allow_playbooks. berg.ad shows what each code sold and is due and keeps the ledger of payments the partner logs; the payment itself is made outside berg.ad.

Make your own key with create_key, e.g. {name: 'laptop'}; revoke_key ends it. An account's full key is minted by the admin or the account's partner. Only a key's sha256 is stored.

Pricing

No subscription and no separate price. You top up a wallet and set a budget on each campaign, and that is all you pay (plus tax where it applies). berg.ad keeps a cut of the ad spend: it is already inside every amount you see.

Why run ads through berg.ad

Ad prices are not fixed. Meta runs an auction for every ad on Facebook and Instagram, and says it may use data about you and your ad account to make adjustments that could affect auction outcomes and prices.1 berg.ad runs your ads on its own ad accounts, which carry the history of every business on them, so you don't start from a new, empty account. Every ad still goes through each platform's ad review and policies.

  1. Meta: About ad auctions

Lead webhook

Each lead from an Instant Form on your page, on your TikTok advertiser, or from a lead gen form of your LinkedIn Page's ad account (platform: 'linkedin', e.g. {lead_id: 'aaaabbbb-0000-cccc-1111-dddd00000005', platform: 'linkedin', page_id: '512345678', form_id: '7001234'}), is POSTed to your webhook URL as JSON. berg.ad gets it from Meta's leadgen webhook (TikTok's lead webhook, LinkedIn's lead push) and also reads your forms every 15 minutes (leads since the last read that covered every form, at least the last 2 days, at most the platform's 90), whichever comes first. Set or change the URL with set_account_settings lead_webhook_url; the first one, and one on a new host, returns a new lead_secret once. Each change of the URL or the report email is announced to Boosterberg and to your previous report email.

A page or advertiser several accounts hold: each lead goes to the account whose ad it came from, else whose ad set, else whose form (its default form), else to the page's one account when only one holds it, e.g. a lead of ad 120210 made for account 5 is POSTed to account 5's webhook alone while account 3 holds the same page. A lead two accounts could claim, or none, is sent to no one and counts in health_check lead_health.leads_no_consumer; it is looked at again every hour and sent once an account owns it.

POST <your webhook URL>
Content-Type: application/json
X-BergAd-Signature: sha256=<hex HMAC-SHA256(lead_secret, raw body)>

{"consumer":"acme","lead_id":"123","page_id":"222","form_id":"f1","ad_id":"ad1",
 "created_time":"2026-10-16T10:00:00+0000",
 "field_data":[{"name":"email","values":["a@b.c"]},{"name":"phone_number","values":["0911234567"]}],
 "platform":"instagram",
 "post":{"id":"222_9","url":"https://sailing-split.example/boats/dufour-430-gl-bibi?d=2026-12-12,2026-12-19","caption":"Dufour 430 GL Bibi, Split, a week in December"}}

A TikTok lead, in the same shape (page_id is the TikTok advertiser, form_id the form's TikTok id):

{"consumer":"acme","lead_id":"7412345678901234567","page_id":"7298765432109876543","form_id":"7301234567890123456",
 "ad_id":"1812345678901234","created_time":"2026-10-27T10:00:00.000Z",
 "field_data":[{"name":"name","values":["Jana Novak"]},{"name":"email","values":["jana@example.com"]}],
 "platform":"tiktok","post":{"id":"7310000000000000001","url":null,"caption":"A week on Bibi"}}
FieldMeaning
consumerYour business's name in berg.ad.
lead_idThe platform's lead id (Meta's, or TikTok's 19-digit one, always a string). A lead can arrive more than once (a retry after your endpoint stored it but answered late): dedupe on lead_id.
page_idThe page the form belongs to; on TikTok, the advertiser (e.g. "7298765432109876543").
form_id, ad_idThe form and the ad the lead came from; null when Meta gave none.
created_timeWhen the person sent the form, as Meta reports it (2026-10-16T10:00:00+0000). If Meta could not be read, the webhook's time as 2026-10-16T10:00:00.000Z, or null.
field_dataThe answers, as Meta gives them: [{"name", "values": [...]}]. null when the lead could not be read (see fetch_error), or when a lead resent by hand had its answers deleted (lead_data_days) and Meta no longer gives them (a TikTok lead never does: fetch_error REFUSED). berg.ad keeps the answers only until it delivered them to you (or gave up) plus lead_data_days, e.g. 30 days after a lead delivered on 1 March they are deleted on 31 March: store them on your side. Phone numbers are passed on as Meta gives them and may lack a country code.
platformThe app the lead's ad runs on, read from its ad set's placements: "facebook" or "instagram" when they name one app; null when they name both, are automatic, the ad could not be read, or the lead has no ad. "tiktok" for a TikTok lead.
postThe post the lead's ad ran for, on every platform: id, url (the post's first link, where Berg's ad lands, e.g. {id: '222_9', url: 'https://sailing-split.example/boats/dufour-430-gl-bibi?d=2026-12-12,2026-12-19', caption: 'Dufour 430 GL Bibi, Split, a week in December'}; null when the post has no link read) and caption. post: null when the lead names no ad berg.ad made. The lead email shows the same link as Link: ….
fetch_errorOnly when berg.ad could not read the lead from Meta (tried with its own token, then the page's): the error type, for example PERMISSION_MISSING or PLATFORM_ERROR. The lead exists; its answers are in Meta's Leads Center.

Verify the signature

HMAC-SHA256 of the raw body with your lead_secret, hex, prefixed sha256=. Compute it over the bytes you received, not over re-serialised JSON.

import { createHmac, timingSafeEqual } from 'node:crypto'

// raw: the request body exactly as received (a Buffer), before any JSON parsing.
function verify(raw, header, leadSecret) {
  const expected = 'sha256=' + createHmac('sha256', leadSecret).update(raw).digest('hex')
  return !!header && header.length === expected.length && timingSafeEqual(Buffer.from(header), Buffer.from(expected))
}

Delivery

  • One POST per lead attempt. Answer 2xx within 25 seconds.
  • A non-2xx answer (a redirect too: berg.ad does not follow it), a timeout or a network error is retried by the 15-minute cron: after 15 minutes, then doubling to at most 12 hours apart, lead_forward_attempts_max (10) attempts in all (about 2 days). After the last, berg.ad stops and alerts Boosterberg. Each retry is signed with your current lead_secret.
  • No webhook URL set: nothing is POSTed. Each new lead goes to Boosterberg's operator Slack channel (a message that failed or timed out is sent again, so it can arrive twice) with a link to Meta's Leads Center for your page (https://business.facebook.com/latest/leads_center?asset_id=<page_id>, a link, not an API), without the lead's answers; you answer it there. TikTok gives no such link: a TikTok lead says Open it in TikTok Ads Manager's Leads Center (advertiser 7298765432109876543; TikTok gives no link to one lead). Setting a URL later sends those leads to it on the next 15-minute run.
  • No tool returns lead contents; this webhook is the only way leads leave berg.ad (the account's admin Stats page shows them inside berg.ad to a signed-in person who reaches it, until lead_data_days deleted them: then The answers were deleted after 30 days (lead_data_days).).

Stats

Two read-only tools. Spend, costs and Meta's lead counts are Meta's paid numbers (ad insights); get_ad_stats adds what berg.ad delivered (leads_received) and account health. Figures are in the ad account's currency (ISO code; one key is one ad account, so one currency). Every amount every tool takes or answers, spend, costs, budgets, caps and the wallet alike, is in major units of its named currency; berg.ad keeps minor units only in its own storage. Meta may revise the last ~48 hours.

Tables. A long list of entries of one shape comes as a table, {"columns": [...], "rows": [[...], ...]}: the keys once, in columns, then one array per entry in rows, its values in the columns' order, null in a slot a value not given; a map keyed by post is a table with the key as its first column, post_id. They are get_ad_stats rows, get_post_stats posts, organic_by_post and post_types, and each app's posts in list_posts. A row reads back as an object by its columns, e.g. in JavaScript t.rows.map((r) => Object.fromEntries(t.columns.map((c, i) => [c, r[i]]))). Example, organic_by_post of two posts: {"columns":["post_id","platform","views","likes","comments","clicks","organic_at"],"rows":[["222_9","facebook",60,2,1,110,"2026-11-10T18:00:50Z"],["18132391468838812","instagram",72,2,1,null,"2026-11-10T18:00:50Z"]]} (Instagram gives no organic clicks: null).

get_post_stats: per post

{ "timezone": "Europe/Zagreb", "currency": "EUR", "bucket": "hour",
  "landing_unread": ["17890077"],   // only with group_by url, while a listed post's URL is not read yet
  "items": [{ "id", "title", "posted_at", "parts": [{ "platform", "post_id", "posted_at", "thumb",
              "campaigns": [{ "run_key": "organic", "source": "organic", "status", "before_series": { "views": 267, "likes": 4 }, "series": { "slot_from", "slot_unit", "views": [], "likes": [], "comments": [], "clicks": [], "measures_unreported" } },
                            { ...a lifecycle campaign (no events), "series": { "slot_from", "slot_unit", "views": [], "impressions": [], "likes": [], "comments": [], "clicks": [], "followers": [], "leads": [], "spend": [], "currency" } }] }] }],
  "campaigns_by_age": [{ "experiment", "type", "posts", "statuses", "window_hours": { "from", "to" }, "organic": { "slot_from", "slot_unit", ... }, "paid": { "slot_from", "slot_unit", ..., "currency", "spend_by_currency", "spend_note" } }],
  "posts": { "columns": ["platform", "post_id", "source_post_id", "promoted", "ad_ids", "spend", "currency", "impressions", "views", ..., "daily", "adsets"],   // a table (Tables, below): a post's ids, its total's measures, then with detail its lists
             "rows": [[ ..., [{ "date", ... }], [{ "adset_id", "adset_name", "campaign_id", "campaign_stage", "purpose", "ad_ids", "total", "daily" }] ]] },   // source_post_id null where it is the post_id; rows name no platform, the post does
  "lifecycle": [{ "source_post_id", "app", "organic_vs_average", "projection": { "estimate", "from_utc", "series": [ ... ] },
                  "campaigns": [{ "adset_id", "campaign_id", "experiment", "run_key", "label", "campaign_stage", "optimization_goal", "status", "reason", "by", "line", "learning_status", "learning_events", "learning_needed", "events": [{ "at", "what", "by", "reason" }], "start_utc", "end_utc", "stopped_utc",
                                  "budget": { "kind", "amount", "spent", "spent_pct", "day", "total_spent", "currency" }, "remaining",
                                  "projection": { "estimate", "from_utc", "basis", "series": [ ... ] },
                                  "shared_budget", "shared_posts", "in_campaign": [{ "from_utc", "to_utc", "why", "approx" }], "delivery": { "anchor_utc", "hours", "states" } }] }],
  "hourly": [{ "ad_id", "adset_id", "adset_name", "campaign_stage", "fb_post_id", "ig_media_id", "source_post_id", "platform", "currency",
               "slot_from", "slot_unit", "spend": [], "impressions": [], "views": [], "likes": [], ..., "measures_unreported" }],   // by default for 2 days or less; hourly: true up to 30 days
  "organic_by_post": { "columns": ["post_id", "platform", "views", "likes", "comments", "clicks", "organic_at"], "rows": [[ ... ]] },   // a table, post_id first; post_types the same, its columns post_id, type, confidence, classified_at, note
  "leads_received": { "": { "received" } },
  "youtube_ads_error", "tiktok_ads_error", "lifecycle_error", "lifetime_paid_error", "hourly_error",   // only when that read failed (lifecycle_error: lifecycle is null; a failed default hourly read of Meta's leaves Meta's hours out, YouTube's stay)
  "paid_days_error",   // Meta's days in the range the cron has not read yet, e.g. "Meta's day 2026-10-27: not read yet by the cron"
  "note" }

Meta's paid days come from berg.ad's store (ad_stats), which the cron fills; get_post_stats never reads them from Meta. The wallet and the month refuse a day of their range the cron has not read, e.g. "Meta's spend on act_123 for 2026-10-11 and 16 more days is not read yet by the cron, so nothing starts or grows on a guess", never counting it as no spend. A day the cron has not stored is left out of posts[] and named in paid_days_error, never answered as no delivery: e.g. since: "2026-10-26", until: "2026-10-28" with only 2026-10-28 read gives that day's rows and "paid_days_error": "Meta's days 2026-10-26, 2026-10-27: not read yet by the cron". Items over such a day (or an hour of it, for hourly) fail with the same words in items_error; hourly ones in hourly_error, e.g. "Meta's hours: Meta's hours of day 2026-10-28: not read yet by the cron". read_at is when the answer was read; every read tool answers from the store at the time it is asked, never from a kept answer.

Every settled day's spend is checked once a day against each platform account's own total, to the cent; spend on an ad no account owns is caught the same way. Both are operator alerts, not part of any tool's answer.

What is stored and what is read live. Stored by the cron's jobs (the readers make no platform call): each unit's days and hours (ad_stats: a unit is a paid ad, or a post's organic with placement organic; an hour row holds each measure as a list of the day's 24 hours, a day row the day's totals, on every platform; a number means the platform answered: an hour a read covered and the platform returned no row for is 0, and null is an hour not read yet or a read that failed, e.g. an ad that spent 0.25 EUR in hours 2–5 of yesterday is spend [0,0,0.25,0.25,0.25,0.25,0,…,0] (24 slots), and one read today at 10:20 in its account's zone holds numbers in hours 0–9 and none from 10) and rolled lifetimes (ad_totals); hours are kept 60 days in the database and then each whole month in a file berg.ad reads the same way, and days 90, a day past 90 summed into its unit's lifetime row, so a post that runs for 120 days still has its right total, e.g. its spend = ad_totals through day 90 back + the 90 stored days; the account's campaigns, ad sets and ads as its delivery job last listed them (Meta's lists); the posts and their latest counts (the tick's organic pass); retargeting reach over 7 and 30 days (settle). A campaign or ad set gone from the account's lists is deleted on the platform: its row goes and no reader counts its budget, while its ads' spend stays in every total, e.g. an ad set deleted after spending 2.00 EUR drops out of health_check run_rate's live_per_day and its 2.00 stays in the wallet's used. A Meta ad gone from the filtered ads list (archived or deleted; which one is not read) has its status cleared to not known and leaves the ad sets' ads, as Meta's own edge leaves archived ads out. TikTok's and Google's days are read over every ad of the account, berg.ad's or not: one berg.ad never made is stored unowned and its campaign named once on /admin/errors, e.g. TikTok campaign cx on 7298765432109876543 spends through the ad account and was not made by berg.ad. A failed, stale (over two ticks) or never-made posts read is recorded per app, so health_check last_post is unknown naming it, e.g. "could not read: instagram: (#10) needs instagram_basic" or "could not read: facebook: not read yet by the cron", never "no post for 9 days"; review_posts, get_autopilot and get_post_stats name it in posts_error (an app whose posts' organic insights the tick's read was refused is named in organic_error, its posts' organic counts not known rather than 0, e.g. "instagram: could not read the posts' insights: (#10) Application does not have permission for this action", gone at the next read that works), and list_posts gives "instagram": null with "unread": {"instagram": "could not read: …"} for an app never read, never []. Read live, as one-call details: the access check (/me/permissions, /act_x, /page, /ig), debug_token, lead forms and leads, account activities and Google's account budget.

  • followers: the account's net change in followers by day over since–until, every connected channel together, a series as below with one measure, followers_net, which can be negative, e.g. { "slot_from": "2026-11-06", "slot_unit": "day", "followers_net": [null, -1, 5] }: kept once a day after 04:00 UTC from Facebook's Page follows (Meta's daily total), Instagram's followers, YouTube's subscribers by YouTube Analytics' day under a channel sign-in that allows Analytics (reported about two days behind; the public count, rounded by YouTube over 1,000, under an older sign-in) and TikTok's followers under a TikTok sign-in that allows its stats (user.info.stats, asked at the connect since TikTok approved it on 2026-11-18; a sign-in made before it keeps none until its Reconnect); a day's net is its total less the one kept before it, null where none is kept yet. A channel connected before berg.ad asked for these adds them at its next Reconnect, e.g. a YouTube sign-in without Analytics keeps the public count. No platform gives a post's own organic new followers; an ad's are page_likes in posts[] and followers in each campaign's series (Meta's Page likes on a Facebook post's ad, TikTok's follows), null on an Instagram post's or YouTube's campaign, which the platform gives none, e.g. a Facebook fb_followers day reads followers: 3, its Instagram twin followers: null.
  • timezone: the account's (set_account_settings time_zone, else its Meta ad account's), e.g. "America/Los_Angeles"; since, until and the items' days are days in it. A posts[] row's date is its ad account's day (a Meta row's the Meta ad account's, a TikTok row's its advertiser's), the same as timezone's until a time_zone is set.
  • Metrics in a post's row (its total) and each day, the same keys on every platform, with platform: spend and currency (the row's account's own: a Meta row its ad account's, a YouTube row its Google account's; never converted, and a post on two accounts in two currencies is two entries), impressions, views (the views the post shows on its platform: Meta's paid views are the ads' impressions, e.g. a lead ad set with 288 impressions reads views: 288; TikTok's the ads' plays (video_play_actions), e.g. an ad with 100 impressions and 90 plays reads views: 90; YouTube's TrueView views), clicks (link clicks), engagements, likes (every like or reaction), comments, shares, saves, leads (= form_leads + dm_leads, Meta's count; TikTok's are its Instant Form submissions, with its shares, page_likes (follows) and profile_visits, e.g. "page_likes":5,"profile_visits":10); what a platform reports none of is null, never 0 (YouTube: likes, comments, shares, saves, leads, page likes, profile visits). A YouTube video berg.ad promoted is a post like a Meta one (platform: "youtube", post_id its video id, one ad set per Google campaign).
  • platform: the placement's app. Instagram placements count on the Instagram media the ad ran; every other placement on the Facebook post. source_post_id is the organic post the ad was made from, null where it is the post_id itself.
  • Spend by age: a campaigns_by_age group over two currencies has no one spend: paid.spend is empty, paid.spend_by_currency holds one series per currency and paid.spend_note says why, e.g. { "currency": null, "spend": [], "spend_by_currency": { "EUR": { "slot_from": 0, "slot_unit": "since_post_6h", "spend": [1] }, "JPY": { "slot_from": 0, "slot_unit": "since_post_6h", "spend": [1] } }, "spend_note": "spend is per currency (EUR, JPY): a total never adds two" }. A group with empty spend always has a note: no paid run in this row or a paid part of this row was not read.
  • Series (every series in items, campaigns_by_age and hourly) are columns: slot_from is the first slot berg.ad has a number for, slot_unit the step (hour: slot_from is the first hour's start as a UTC instant, 2026-10-27T15:00:00Z, so a reader can show it in any zone; an ad account in a :30 zone has hourly hours starting at :30 UTC; day: YYYY-MM-DD, a date of timezone, from which hours: Items; since_post_6h: hours since the post went up, in 6-hour bins), and one array per measure, where slot i is slot_from + i × slot_unit. 0 is zero and is always sent: for a paid hour, the platform answered for it and returned nothing (no delivery); null is not known (an hour not read yet, a read that failed, or before berg.ad's first snapshot). Each array ends at its own last number, so a slot past an array's end is not known; a series with no number at all has slot_from: null and empty arrays. A measure the platform does not report is left out and named in measures_unreported. A paid series names its currency once. No total is sent beside a series: add its array. Example, an Instagram reel's organic hours: {"slot_from":"2026-10-27T07:00:00Z","slot_unit":"hour","views":[0,0,12,4],"likes":[0,0,1,0],"comments":[0,0,0,0],"measures_unreported":["clicks"]} (hour 07:00Z 0 views, 09:00Z 12, 10:00Z 4; Instagram reports no organic clicks). A Meta campaign's: {"slot_from":"2026-10-14T07:00:00Z","slot_unit":"hour","views":[40,0,120],"impressions":[40,0,120],"likes":[0,0,2],"comments":[0,0,0],"clicks":[0,0,1],"leads":[0,0,0],"spend":[0.25,0,0.75],"currency":"EUR"} (views by the hour are Meta's own impressions: 40 at 07:00Z, none at 08:00Z, 120 at 09:00Z).
  • Items (only with items: true, with bucket and campaigns_by_age; a failed read leaves them null with items_error, the rest stands): every Facebook post, Instagram media and YouTube video (of the youtube_channel) published in the range or with a number above 0 in it, whatever day it went up (a post from last week with 40 views yesterday is listed for yesterday, its series yesterday's alone), from berg.ad's posts store (the 15-minute tick reads them, so no platform is called: a reel posted at 09:05 is listed from the 09:15 tick; its thumbnail and link follow each tick's read) (the account's days, as since and until are everywhere: for an account in Los Angeles, since: "2026-10-27" starts at 2026-10-27T07:00Z), promoted or not, newest first; the posts with the same destination URL or first hashtag (set_account_settings group_by) are one item, its parts Instagram then Facebook, else each post is its own item. Each part's link is the post on its platform: Meta's permalink (e.g. https://www.instagram.com/reel/DfB-0jOCAGr/), a YouTube video's watch page (https://www.youtube.com/watch?v=I0Tz60ZmETA); absent when Meta gave none. With url a post's URL is the landing rule's: its text's first link (a video's description), else the business's own first comment's (Instagram, YouTube; Meta does not give berg.ad a Facebook post's comments), a short link followed to where it lands, compared by the url key (lower-case host, no trailing slash, utm_* and fbclid dropped, the query in one encoding); a post with no link is its own item, never the account's landing. Example: an Instagram reel with https://example.net/s/k9Q (a short link to the page below) in its caption and the Facebook post with https://example.com/boats/aurora?d=2027-09-04,2027-09-11&utm_source=facebook are one item, id: "url:https://example.com/boats/aurora?d=2027-09-04%2C2027-09-11". Each post's URL is kept a day, 15 minutes while it has none or its short link could not be followed; a post whose URL the 15-minute tick has not read yet is its own item, named in landing_unread, e.g. "landing_unread": ["17890077"], and joins its URL's item once read. Each part's campaigns are its organic one (run_key: "organic", every published post's) and the paid campaigns made from it (its lifecycle entries), each with a series: hourly (slot_unit: "hour", from the account's first midnight in UTC) when the range is 7 days or less, else daily (slot_unit: "day", the account's dates: a day from the hours read on, the stats page's last 7, is that zone's midnight to midnight from every source's hours; an earlier one is each source's stored day, Meta's and TikTok's their ad account's, organic's the UTC day, e.g. in Los Angeles a read at 03:05 UTC on 20 Oct is 19 Oct's from the hours, 20 Oct's before them). A copy berg.ad posted of the post on another platform whose organic it reads (a TikTok push of an Instagram reel) is the item's part on that platform, its organic the copy's, its posted_at the platform's own publish time (TikTok's create_time), so one first read late shows that read in before_series, never in a bucket; an experiment's ads-only copy adds no part. A campaign's events are on lifecycle only. Organic comes from berg.ad's own snapshots of the post's lifetime counts, taken each 15-minute tick for a post under 8 days old or promoted and once a day (the first tick after 04:00 UTC) for every other post (e.g. a 20-day-old unpromoted post's hourly buckets move once a day): a bucket is the growth over it, less berg.ad's paid on the post itself (Facebook views are already the organic part; likes less the ads' reactions; Facebook clicks are every click, less the ads' link clicks); null before the post's first snapshot (the platforms keep no history), 0 only before the post went up. A paid campaign's buckets are Meta's own rows (views = the ads' impressions, as the post counts them, clicks = link clicks, spend in major units) and the leads berg.ad received from its ads; a YouTube or TikTok campaign's are its platform's (views, impressions, clicks, spend in its account's currency; a YouTube campaign's measures_unreported: ["likes","comments","leads"]; a TikTok campaign's views are its impressions and it carries its likes and comments, measures_unreported: ["leads"], e.g. {"slot_from":"2026-10-27T12:00:00Z","slot_unit":"hour","views":[99,526,101],"likes":[0,1,0],"comments":[0,0,0],…,"measures_unreported":["leads"]}); a planned campaign has series: null.
  • campaigns_by_age: per experiment (null: the account's own) and campaign type, over the posts published in the range: organic and paid summed by hours since each post went up, in 6-hour bins over 7 days, as two series, organic and paid (slot_unit: "since_post_6h"; a bin not begun yet, or with any unknown hour, is null), the campaigns' window as hours after the post, and their statuses. Example: "organic":{"slot_from":0,"slot_unit":"since_post_6h","views":[120,40,null,15],"likes":[3,1,null,0],"comments":[0,0,null,0],"clicks":[]} (hours 0–6 after the post 120 views, hours 12–18 not known, nothing known of clicks). paid names its currency once; a group over two currencies has no spend ([]), and what its platform gives none of is []: a YouTube type's likes, comments and leads, a TikTok type's leads (its likes and comments are TikTok's, e.g. "likes":[0,1,0]). Kept 15 minutes.
  • Organic before the series: before_series on the organic part of a post published in the range (or asked by post_ids) is what the post has that its series does not hold, null on an older post listed for its numbers in the range (its life before the range is not the range's), the post's latest count less the buckets on a range read through today, a past range's answer holding what came after it too, each measure berg.ad knows, null when the buckets hold it all, e.g. a video first read at 267 views, 400 now, with 133 in the buckets has { "views": 267 }; a late first read is no growth, so no bucket shows it.
  • Paid vs organic: posts are paid only. organic_by_post is the one home of a post's organic: per post the answer returns (in posts or lifecycle), its lifetime counts as of berg.ad's latest snapshot less berg.ad's own paid on it over its life, never below 0, null while that paid is unknown; views are each platform's own (Facebook organic showings, Instagram views, YouTube viewCount), never added across platforms. Never compute organic from posts. Paid in the rest of the day a Meta lifetime was read is taken off from the next day's read. In items, each part's organic campaign is the same rule per bucket.
  • optimization_goal per lifecycle campaign: what the platform optimizes its delivery for, a Meta ad set's goal as Meta names it, e.g. "LEAD_GENERATION" or "THRUPLAY"; a TikTok or YouTube run, which berg.ad names by its run, the run's objective, e.g. "TRAFFIC" or "VIDEO_VIEWS". It is not a run's campaign.objective setting ("LEADS", "VIDEO_VIEWS", …): a Meta LEADS run's campaign reads "optimization_goal": "LEAD_GENERATION".
  • campaign_stage per ad set, hourly row and lifecycle campaign: its step of the account's funnel (campaign_stages, set_account_settings), derived from its goal, whether it runs in the market and whether its traffic leaves the platform, never set by hand. Industry: awareness (every views and reach goal, in or outside the market), engagement (likes, comments, follows, visits that stay on the platform), conversion (leads, messages, visits to the landing). Bill: social_proof (anything outside the market that is not an ask), grow_retarget (the same inside it), ask (leads, messages, visits to the landing). E.g. a LEAD_GENERATION ad set is conversion / ask; a THRUPLAY ad set in the market awareness / grow_retarget; 2-second views outside it awareness / social_proof. null: no goal known, or on Bill's funnel no market or geo to tell in from out.
  • The projected hours (projection.series), on every platform, are one series per currency, each its platform and currency once and an array per measure, slot i being slot_from + i hours: spend, impressions, views, likes, comments, leads, and clicks empty (not estimated). E.g. [{ "platform": "facebook", "currency": "USD", "slot_from": "2026-10-31T10:00:00Z", "slot_unit": "hour", "spend": [0.21, 0.21, 0.2], "impressions": [40, 41, 38], "views": [12, 12, 11], "likes": [0, 1, 0], "comments": [0, 0, 0], "clicks": [], "leads": [0, 0, 1] }] (3 of its 24 hours shown). A campaign has one series; a post whose campaigns spend in two currencies has two.
  • hourly: one series per ad, by default when since–until is 2 days or less, with hourly: true up to 30 days at a time, of any age the store holds hours of, none with hourly: false. Its ids and names once, then its hours from the first berg.ad holds a number for to the last: every hour a successful read covered is a number, 0 where the platform returned no row (it leaves out an hour with no delivery), so an ad that spent in hours 2–5 of a past day has 24 slots, 0 outside them; the hour in progress and later are not sent. Its measures are the posts rows' (spend, impressions, views, likes, comments, shares, saves, leads, form_leads, dm_leads, page_likes, form_opens, clicks, engagements); one the platform does not report by the hour is named in measures_unreported (Meta's hours carry its views, its impressions, but no profile_visits: an hour's are berg.ad's own, from its 15-minute reads of Meta's day, the last read in each hour less the one before; what the reads leave of the day's total (all of it on a day never read while open) is shared evenly, in whole numbers, over the ad's delivering hours the reads leave unknown, e.g. 30 profile visits over 3 hours read 10 each; a day total below what the reads gave leaves those hours null). Meta cannot split hours by placement, so its platform is the ad's one placement in the range, else "all". Example: {"ad_id":"120211001","adset_id":"120211","adset_name":"berg.ad auto · meta_leads","campaign_stage":"conversion","fb_post_id":"222_9","ig_media_id":"18051234567890123","source_post_id":"222_9","platform":"all","currency":"USD","slot_from":"2026-10-27T15:00:00Z","slot_unit":"hour","spend":[0.42,0,0.38],"impressions":[310,0,280],"views":[120,0,95],…}: 0.42 USD at 15:00Z, nothing at 16:00Z, 0.38 at 17:00Z; an India account's first hour is "slot_from":"2026-10-16T01:30:00Z".
  • Lifecycle, per organic post: every campaign on it that delivered in the range or is not over, plus every run berg.ad plans for it but has not made (adset_id null): the rules' runs while the autopilot is on, the account's, each running experiment's and, for an experiment stopped while its runs are live, the runs it still owes on the posts it took (experiment), and every add. label: awareness, or target + engage / lead / dm / views / reach. An ad set that carries several posts (a rotation) has one budget for all of them: it is listed under each of its posts with shared_budget: true, budget, remaining and projection null (its budget cannot be split by post), and that post's own status (finished once its rules took the post out while the ad set runs on, stopped when anything else did), in_campaign and delivery; every other entry has shared_budget: false. status, one word for every run, made or not: waiting (not delivering yet, made or not; reason says what it waits for), blocked (not made, and not retried: its attempts failed, or the run before it is blocked; reason says why), created (made and switched on, before its start or in review), active (delivering), stopped (paused, or halted by its platform for money, before its end, not by its own rules; by says who, reason why), finished (over: nothing of it can deliver any more, or its own rules ended it; another pause reads stopped), cancelled (will not deliver, now or again; reason says why), n/a (never applied to this post: its window ended before berg.ad first read the post, or its campaign's channel is not connected; holds no ads_running place; reason says which). A run its own rules ended (its budget, held by berg.ad under a platform's minimum, its hours, a metric's stop, a rotation's newer posts) is finished with reason null, e.g. a run berg.ad paused at its budget_per_post reads { status: "finished", reason: null }. by on a stop: Jev, the wallet, a post taken down, an LLM, the operator (user), Meta Ads Manager, Google Ads, Google, TikTok (an ad it stopped delivering for money: budget exceeded by TikTok: AD_STATUS_CAMPAIGN_EXCEED), or outside berg.ad. A rejection by Meta reads rejected by Meta with Meta's words, and stays cancelled after the ad is paused, archived or ended; a YouTube run's review is Google's: rejected by Google and in review by Google, and its status changes are events by Google (Google: <status>). A run switched on in Ads Manager or Google Ads after its stop_at_spend paused it is active with reason resumed in <Meta Ads Manager|Google Ads> past its stop_at_spend, which its line says. line: the campaign in one plain sentence for a client, built by berg.ad from these fields (what a waiting run waits for, else its start, how far through its window's time it is, e.g. stopped at 71% of its time, who stopped it and why in words, what it spent of its budget; each time in the ad account's zone with its offset from UTC); show it as given. events: what berg.ad's tick, Jev, each status write and each override did to the run, Meta's status changes, and the creative features Meta turned on or off (creative check, by Meta), in time order; a run refused again on later ticks for the same reason is one event, the first (autopilot: refused), and a new one when the reason changes, e.g. a run held by rejections_30d for a day reads one event until a fourth ad is flagged. setting: the run's override setting (its post's 0 first, else a made run's own 0, else its post's: value 1 or 0, by, at, reason, from), null when the rules decide; kept_on_by: who keeps a created or active run on. learning_status: the platform's learning word for the ad set or campaign this post's ad ran under (Meta's learning_stage_info: LEARNING → learning, SUCCESS → learned, FAIL → learning limited; Google's campaign primary_status LEARNING or bidding_strategy_system_status LEARNING_* → learning; bidding_strategy_system_status ENABLED → learned; anything else, e.g. ELIGIBLE with LIMITED_BY_INVENTORY, no word), written by the tick only while the ad delivers and kept once it stops, so a finished run shows what it ran under, never its ad set's later state, e.g. an awareness run paused while its ad set was LEARNING stays learning after Meta reports SUCCESS; null when none was read or the platform reports none; where Meta gives no learning_stage_info (Berg's ad account gets none), berg.ad counts Meta's rule over the account's last 7 days: learned with 50 of the goal's events (form leads on a leads run, 2-second views on a views run), learning under 50 while the ad set is under 7 days old, learning limited after (e.g. 12 form leads on day 3 reads learning, 3 leads in the week of day 20 learning limited); TikTok has no learning field, so berg.ad counts it per ad group: learning until 25 goal events or 7 days since its start, then learned (e.g. 25 clicks on a click run, 25 plays on a 6-second views run). learning_events is the count written with the word (Meta, where berg.ad counts it: the goal's events in the account's last 7 days, null beside Meta's own word; TikTok: since the ad group started; null on Google) and learning_needed the count that ends learning, e.g. learning_status: "learning", learning_events: 12, learning_needed: 50 on a Meta leads run with 12 form leads this week, learning_events: 18, learning_needed: 25 on a TikTok click run with 18 clicks. start_utc / end_utc are the planned window (Meta's start_time / end_time), not when it delivered; stopped_utc is when it stopped before that end (paused, rejected, archived, budget gone early; approximate: berg.ad's 15-minute record for its own ads, else Meta's last update time), null while created or active or when it ran to its end. Delivery itself: budget.spent, and the days with spend in posts[].adsets[].daily. reason is null for a run created, active or finished.
  • budget (with its currency, its account's own): with an end date, the whole budget and what it has spent since it started (kind: "lifetime"; a daily budget with an end date counts as daily × the days it runs); only an ad set with no end date, its daily budget and what it spent today (kind: "daily", day in the account time zone; with no end that has stopped or ended, total_spent: all it spent, left out when Meta could not give it). spent_pct = spent ÷ amount; remaining = amount − spent. Major units. budget: null: the budget is set on the campaign (shared by its ad sets), so no per-ad-set figure is given.
  • projection (created, active, and waiting runs not made yet only): the next 24 hours from the current UTC hour, one number per hour, e.g. 24 rows from 2026-10-31T10:00:00Z to 2026-11-01T09:00:00Z. Spend follows the ad set's own pace once it has run 3 hours (else its budget spread to its end), and never passes its end or what it has left. Each metric = spend × a rate: the account's last 30 days for the same stage and goal (basis: "norm"), moving to the ad set's own results as they grow ("norm+own"); likes, comments and leads are scaled by organic_vs_average (views, a Meta ad's impressions, are bought by spend like impressions and are not), the post's likes + comments against the average of the same app's posts in 30 days (held to 0.5–2). Every count is a whole number and spend whole cents: an hour gets what the running total reaches in it (floor of the total to that hour − floor of the total to the hour before), so the hours add up exactly. The post's own projection is all its campaigns together, made whole from their summed totals, one set of hours per currency (a video's made run in its Google account's, a planned one in the account's; spend is never added across two): read it rather than adding the campaigns' hours. Every projection carries estimate: true: it is never delivery, and posts stays the only actual figure. lifecycle: null = it could not be read this time; posts is unaffected.
  • When the post was advertised (two fields per campaign entry; the campaign's own window is start_utc / end_utc / stopped_utc). in_campaign: each stretch this post's ad was live in this campaign (from the ad set's start at the earliest), from berg.ad's own record: from_utc, to_utc (null while still in), why it left (null while in; "ended" its end date; "jev dropped"; "rotation: past max_ads" (newer posts took its slot); "stopped by rule"; "cancelled"; "wallet out"; "post gone"; "paused", by a person or in Ads Manager, seen within 15 minutes; a campaign that stopped before its planned end closes the stretch at stopped_utc) and approx (true: rebuilt afterwards from berg.ad's logs). A post switched off and on again has several. in_campaign: null: not recorded (an ad from before berg.ad kept this record, or made outside its autopilot and tools); []: not made yet. Every platform records it alike, e.g. a TikTok run stopped at its spend reads [{ "from_utc": "2026-11-01T14:29:00Z", "to_utc": "2026-11-02T10:45:00Z", "why": "stopped by rule", "approx": false }].
  • delivery: per hour of the stretch, whether the ad spent, as { "anchor_utc", "hours", "states" }. Hour 1 is the ad account's hour that contains the first from_utc (anchor_utc, UTC; HH:30Z in a half-hour zone), hour h runs [anchor_utc + (h−1) h, anchor_utc + h h), and hours counts them up to now or the last to_utc. states lists switch points only, { from_hour, state }, each state holding until the next point's hour − 1: spent that hour, no_spend in the campaign, not_reported in it but not known (the hour in progress, an hour no successful read covered yet, or before the range read), not_in_campaign (between two stretches). An hour is no_spend when that ad's own data covers it: its own hour row at or after it (a stored 0 counts: a successful read returned nothing for that hour), or a past day whose own day total equals the sum of its hours; never from other ads' rows, and the hour in progress is always not_reported unless it already shows spend. Example: a Meta ad that spent only in hours 3–6 of a day it was in the campaign from 00:00, read the next day at 13:30: [{ from_hour: 1, state: "no_spend" }, { from_hour: 3, state: "spent" }, { from_hour: 7, state: "no_spend" }, { from_hour: 38, state: "not_reported" }] with hours: 38, hour 38 the one in progress. Example: [{ from_hour: 1, state: "spent" }, { from_hour: 5, state: "no_spend" }, { from_hour: 6, state: "spent" }, { from_hour: 15, state: "no_spend" }] with hours: 20 = spent hours 1–4, none in 5, spent 6–14, none 15–20. Given with the hours, by default for 2 days or less or with hourly: true (from the same hourly read, no extra call; hours before since come from berg.ad's stored copy, else ?), or without it for a finished ad whose hours berg.ad stored (kept daily, final 48 hours after its last hour); else null. With no in_campaign record it is drawn over the campaign's own window. Meta may revise the last ~48 hours. A YouTube or TikTok campaign's is drawn the same way from its stored hours (the rows its hourly carries), given only with the hours: an hour is n up to its own last row, its stored 0s included, e.g. a TikTok run that started at 08:10 and spent only in its 10:00 hour, read at 12:20, reads [{ from_hour: 1, state: "no_spend" }, { from_hour: 3, state: "spent" }, { from_hour: 4, state: "no_spend" }, { from_hour: 5, state: "not_reported" }].

get_ad_stats: the overview

{ "held", "currency": "EUR",
  "goals", "runs",
  "purposes": [{ "purpose", "stage", "success_metric", "campaign_ids" }],
  "rows": { "columns": ["campaign_id", "adset_id", "ad_id", "name", "run_key", "spend", "impressions",
             "cpm", "views", "cost_per_1k_views", "thruplays", "cost_per_thruplay",
             "avg_watch_seconds", "hold_pct", "engagements", "cost_per_engagement", "clicks",
             "leads", "form_leads", "dm_leads", "cost_per_lead", "page_likes", "profile_visits", "cost_per_follower", "currency",
             "campaign_stage", "experiment", "platform", "vs_norm", "leads_received", "source_post_id"], "rows": [[ ... ]] },   // a table (Tables, above)
  "lead_health", "flagged", "delivery", "access", "outside_changes", "note" }
  • held: first in the answer and only while an account guard holds new starts, the same lines as get_autopilot guards.held, e.g. ["held by rejections_30d 3: 3 berg.ad ads rejected or flagged by Meta in 30 days (each with its reason in health_check rejections_30d); nothing new starts on Meta; …"]. A failed read of them is held_error.
  • delivery: each lifetime-budget ad set still running that overlaps since..until: an ad set ended yesterday is not in it, though Meta keeps it ACTIVE.
  • flagged: berg.ad's own campaigns, ad sets and ads that can still run, each with its reason and the stop instruction, e.g. { "level": "ad", "id": "a_bad", "effective_status": "DISAPPROVED", "reason": "Misleading claims", "instruction": "stopped: needs a person; do not edit and resubmit" }. One made outside berg.ad, or ended, is not; health_check ad_review lists the outside ones with made_by: "outside".
  • statuses: only with statuses: true: every campaign, ad set and ad with its effective_status, e.g. { "level": "ad", "id": "a1", "name": "Spring reel", "effective_status": "ACTIVE" }. It is the platform's word, so an ended ad still reads ACTIVE.
  • Rows per level (campaign, adset or ad). Costs are null when there is nothing to divide by.
  • platform: "facebook" or "instagram" when the row's ad sets place on that one app, else null; "youtube" for berg.ad's YouTube campaigns, one row each, in their Google account's currency, views their TrueView views, what Google has none of (reach, frequency, thruplays, leads) null. A TikTok row's thruplays are TikTok's 15-second focused views, e.g. 4284 on a tt_engage ad that spent 4.15, with cost_per_thruplay 0.001. views: the views the post shows on its platform (Meta's: the ads' impressions). A failed Google read is youtube_ads_error.
  • purposes: each purpose once, the stage (awareness / target) and what the campaign is for, from create_ad or set_campaign_purpose, with the campaign_ids of the rows that carry it, e.g. { "purpose": "awareness: social proof views outside the market", "stage": "awareness", "success_metric": null, "campaign_ids": ["52626726369045", "52626726369046"] }; a row's campaign with no purpose recorded is in none. A row's source_post_id is the post its campaign was made from, null when none is recorded.
  • campaign_stage: the row's campaign stage (get_post_stats explains it), a campaign row's when its ad sets share one, e.g. "conversion".
  • vs_norm: the row's key cost for its ad set's own optimization goal, whatever its campaign stage (2-second views, REACH or Meta's older VIDEO_VIEWS goal: cost_per_1k_views, by impressions; ThruPlay or engagement: cost_per_thruplay, e.g. a ThruPlay ad set reads cost per ThruPlay as awareness on the industry funnel and as grow_retarget on Bill's; leads or DMs: cost_per_lead; followers: cost_per_follower, Page likes on Facebook, profile visits on Instagram, never follows; link clicks (Visits): cost_per_click, Meta's link clicks, e.g. 8.00 for 40 link clicks reads 0.2), on the account's own campaigns only, against the median of this account's other ad sets judged on the same key cost, each with at least 20 events in the last 30 days. Fields: metric, value, median, n (ad sets), events, events_needed (20), pct_better (above 0 = cheaper than the norm; "too_few_events" under 20 events or with no norm yet). Not judged, it says only what it has: value once the row has an event, median and n once there is a norm, e.g. { "metric": "cost_per_lead", "pct_better": "too_few_events", "events": 0, "events_needed": 20 } for a lead ad set with no lead and no norm yet. vs_norm is null when the campaign is not the account's or its goal has no norm, e.g. an ad set with goal NONE.
  • leads_received (level ad): leads berg.ad delivered (forward_status ok, fetch_failed_forwarded, emailed, fetch_failed_emailed or surfaced; never pending, failed, gave_up, no_webhook or test), e.g. ad a1 with 3 ok, 1 surfaced, 1 failed and 1 gave_up lead reads received: 4.

Autopilot

With autopilot on, every post a per-post run admits gets one ad set for that run, each with its own lifetime budget. Nothing spends until the owner says yes to the runs' budgets (set_autopilot with confirm: true); new rules on a running autopilot need a new yes to the posts they reach (posts_count). Read the current rules and a preview with get_autopilot: each post's runs with their lifecycle status and reason.

Run types

  • Awareness (stage: "awareness", named for Meta's awareness objective, e.g. run keys meta_views, yt_views, tt_views): cheap views for social proof, a run like any other: its stage is a label, and where it runs is its own geo, e.g. audience: { geo: { include: ["worldwide"], exclude: ["market", "IN", "SG", "TW"] } } runs everywhere but the market and those three. exclude: ["market"] adds the market's countries to the run's exclusions on Meta, TikTok and YouTube, on any run whatever its stage; listed beside an in-market country it is refused: geo: { include: ["DE", "US"], exclude: ["market"] } → geo.exclude_market keeps the run outside the market; DE is in it. With several markets, exclude: ["market:Europe"] adds only that market's countries, e.g. geo: { include: ["worldwide"], exclude: ["market:Europe", "IN"] } reaches the US market and everywhere outside Europe and India, and include: ["market:Europe"] runs in that one market where include: ["market"] runs in all of them. An awareness run without it is not kept out: geo: { include: ["worldwide"] } reaches the market too. Viewer runs stay in the market, so they never reach the viewers of a run kept outside it. Each experiment's awareness run is its own campaign, made whether or not another experiment's or a buy's awareness run is live on the post. No run waits for the awareness run: every run, rotation and create_ad ad starts at its own start. A target that should follow the awareness run is given a later start of its own, by time, e.g. a 24 h tt_views and { key: "tt_click", rules: { since_post_hours: [24, null] } }, or by a metric, e.g. { key: "meta_leads", rules: { views_total: [10000, null] } } starts meta_leads once the post has 10,000 views. Without an awareness run: remove it, e.g. set_autopilot { rules: { campaigns: [{ key: "meta_views", removed: true }] } }, or leave it out of an experiment's campaigns. A post with a Special Ad Category skips every per-post run whose geo excludes countries, whose ages are other than 18-65 or whose gender is one, its awareness run or any other (Meta forbids each under a category; berg.ad never widens a run to fit), e.g. meta_leads at ages 25-65; its other runs start at their own start.
  • Target engage (stage: "target", views or ThruPlay): views in the market; these build the viewer audience.
  • Target convert (stage: "target", LEADS or MESSAGES): the ask, a quote form or a DM.
  • Target followers (stage: "target", FOLLOWERS): grows the page's and the Instagram account's followers on the post's own app, on the post itself: a Facebook post through Page-like ads, an Instagram reel through profile-visit ads (Meta platform facts below). Never in the playbook's runs; an owner who wants followers adds a FOLLOWERS run with its own budget (plan_campaigns followers proposes one).
  • Target visits (stage: "target", TRAFFIC): link clicks to each post's landing (its caption's first link, else its channel's default link, else the account's ad_texts landing), e.g. fb_click on Facebook posts, tt_click on TikTok, yt_click on YouTube.
  • Rotating (mode: "rotating"): one long-lived ad set that shows the newest posts of the one app in its campaign.content_source (e.g. ["facebook"], ["tiktok"] on a TikTok run its own posts as Spark ads, nothing pushed, or ["instagram"] its Instagram media) to a viewer audience in its campaign.audience.geo (default "market", e.g. { include: ["worldwide"] }), one ad per post, at most the stop of rules.ads_running (1 to 50) running. When more posts qualify than it has places, rules.drop_by says which ads leave: "cost_per_result" (the choice of Bill's playbook) keeps the running ads and, on every check (each 15-minute tick and each write) with all places taken, lets each waiting post replace one ad, one out for one in: first an ad past the judge floor (they spent at least judge_after × the run's usual cost per result, the median of its ads of the last baseline_days that got one; with none, judge_floor_share × its daily) whose cost per result (the run's goal: a ThruPlay, a person reached, a lead) is worse than usual or that got none, the worst first, then an ad still under the floor after baseline_days (the platform passed it over) that got no result or got it worse than usual, the longest running first; an ad better than usual never leaves, and with none to replace the post waits, and a cut ad is archived and out of the run for good, its reason cut: … (a post past rotation_posts_days still leaves, and a lowered ads_running still pauses the oldest), e.g. { drop_by: "cost_per_result", ads_running: [null, 5] } with 5 ads running and 2 new posts cuts the 2 worst ads that are worse than usual, or 1 if only 1 is; "post_age", the default, pauses the oldest posts' ads for the newest, each coming back when a place frees, e.g. { drop_by: "post_age" }. The stats page shows how many posts wait (posts_waiting). Its one money value is per day, campaign.budget_daily, required and at least the platform's known minimum (under it refused, naming it): on Meta its pool's daily budget (campaign.pool, below), an end ending its ad set; elsewhere with no campaign.end a daily budget with no end date, with an end a lifetime budget of daily × its days; the month maximum counts it as daily × 31. Each post's ad may also have its own time and money, as a per-post run's: the start of rules.since_post_hours (it joins that long after posting), campaign.length_hours (it runs that long from its first activation) and campaign.budget_per_post (the most it spends, counted over every ad the post had in the run, e.g. 0.70 in an archived ad + 0.30 in the one made again reaches 1.00); at either it is archived, e.g. { budget_daily: 10, budget_per_post: 1.00, length_hours: 24 } spends 10.00 a day over its posts, at most 1.00 on each. It has no spend stop: its total reads budget_daily × its days, e.g. 10 a day to 1 Dec reads 280. An ad that stops for good (no longer qualifying, a safety stop, a rejection, its hours or budget, its ad set ended or retired, or paused past its ads_running stop with its post older than rotation_posts_days) is archived (YouTube: removed), so only ads that can still run count toward Meta's 50 per ad set; one paused only for a slot stays paused and comes back. Safety stops are no_<metric>_hours stops in its rules, none unless written: no_reach_hours: [null, 48] pauses an ad that reached no one in its last 48 h, no_views_hours: [null, 168] (THRUPLAY) one with no ThruPlay in its last 168 h; an ad live less than that is not judged yet. Its judge_floor is Jev's data floor, as a per-post run's. A full ad set (Meta's 50 ads) is paused, renamed "- full" and followed by a new one; a run taken out of the rules, the autopilot turned off or its experiment stopped pauses its ad set.

Run keys

A key is a free name; berg.ad writes the campaigns it names <app>_<goal>: app the one its ads show on, fb, ig, tt or yt; goal views, click, leads, followers (plus reach, engage, engagement where a run's objective is that), e.g. fb_views, ig_leads, tt_views. Another campaign of the same app and goal takes the next number straight after the goal, e.g. ig_views2 beside ig_views. A further channel of an app the account already has brings the playbook's campaigns of that app the same way, each naming the new channel, e.g. connecting a second Page beside fb_views adds fb_views2 with content_channel: "2222". A campaign made before keeps its key, e.g. meta_leads or meta_views_fb: each post's run is filed under its key, so a new key runs the posts again. A key never names an audience: the audience is the campaign's.

  • meta_leads: Meta's lead campaign; fb_click Meta's clicks on Facebook posts, tt_leads is TikTok's, tt_click TikTok's clicks, yt_views YouTube's views, yt_click YouTube's clicks, fb_views2 a second Meta views campaign.
  • fb_followers, ig_followers, fb_followers2 and ig_followers2: four followers campaigns, Facebook engagers, Instagram engagers and the cold market on each app; { "key": "ig_followers", "campaign": { "content_source": ["instagram"], "audience": { "custom": { "include": ["ig_engagers"] } } } } says who it reaches in campaign.audience, never in its name.
  • An experiment's copy and a buy keep their suffix: meta_leads#1, meta_engage@a1b2c3d4e5f60718.

Audiences

campaign.audience.custom.include and exclude are lists; each entry is a named audience or an audience id, mixed freely. A name not synced yet is refused by name (run sync_viewer_audience). A Meta rotation names any of them, or none to reach everyone its geo, ages and gender allow, as a per-post run, e.g. { "include": [] } on fb_leads. Names are built per platform: Meta takes all of them; TikTok takes viewers_30 and viewers_90, the 6-second viewers of the account's berg.ad ad groups, e.g. { "include": ["viewers_30"] } on a tt_reach run, and refuses any other name by name, e.g. a TikTok run cannot take leads_90: berg.ad builds viewers_30, viewers_90 on TikTok; a TikTok audience TikTok is still processing (about an hour after it is made) is refused by name until a sync reads it ready. LinkedIn takes viewers_30 and viewers_90 too, the people who watched a quarter of a video of the Page's berg.ad video campaigns, e.g. { "include": ["viewers_90"] } on an li_views run; a run on one waits by name until LinkedIn reads its segment READY (up to 48 hours after its rules), e.g. run li_views uses viewers_90, which LinkedIn is still processing.

  • { "custom": { "include": ["viewers_90", "page_engagers", "23851234567890"], "exclude": ["page_fans"] } }: people who watched in the last 90 days, the page's engagers and one audience by id, minus the page's fans.
  • { "custom": { "exclude": ["leads_90"] } }: everyone the run targets but people who sent one of the page's Instant Forms in the last 90 days; { "custom": { "include": ["form_dropoffs_90"] } }: people who opened one and did not send it, a second ask.

Reporting group

A run's reporting_group (optional, a plain name: letters, digits, spaces, _ and -, up to 40) decides only which row its campaigns report under in get_post_stats: each lifecycle campaign's reporting_group, and campaigns_by_age. The stats page's Campaign stages tab groups by campaign_stage instead (the account's funnel, set_account_settings campaign_stages), never by it. Audiences, geo, money, timing and conditions stay on each run; nothing else reads it. Unset, it is the campaign's type, its label as one word (awareness, target-lead, target-clicks), so awareness, yt_views and tt_views share one Awareness row, each run keeping its own budget, geo and length. Rows are grouped by experiment first, then reporting_group; a buy reports under the run it bought; totals stay per currency. Set it like any run field, by key (set_autopilot rules, set_experiments update, /admin); null gives it back to the playbook's. A TikTok run's type is its own objective: a tt_leads reads target lead and reports under target-lead, a tt_click reads target clicks.

  • { "key": "meta_leads", "reporting_group": "clicks" } with { "key": "tt_click", "reporting_group": "clicks" }: Meta's lead run and TikTok's click run in one clicks group of campaigns_by_age.
  • { "key": "yt_views", "reporting_group": "yt test" }: YouTube's awareness run in a campaigns_by_age group of its own for a look, each of its lifecycle campaigns reading reporting_group: "yt test", its settings untouched; on the stats page it stays in the Awareness stage.
  • Organic has an address of its own, /stats/campaigns/organic: the posts with their organic numbers, no campaigns.

The campaign window makes, edits and removes every campaign on the Campaigns tab. Each group lists its campaigns (key, purpose, goal, per post or per day, money); a row, or a run's bar on a campaign's detail, opens the window on every stored setting, its source, target, goal and per post or per day fixed (another is a new campaign), and + Add campaign on the group's head opens it on the playbook's run for the first connected target. Its choices come from the data: the targets connected (one that cannot publish there greyed with the permission it lacks), the goals that target has (one it lacks greyed with why; Reach and Messages shown only where it has them, e.g. Messages on Facebook and Instagram, a MESSAGES run named meta_messages), one source video. A new campaign takes the key <app>_<goal>, the app its ads show on, and the next number straight after the goal when it is taken, e.g. ig_views2 beside ig_views; an edited campaign keeps its key. Leads asks for a privacy link only when the account has none. Start / stop is None, After publishing (since_post_hours) or When the post reaches (a metric's pair). Every save previews first and saves on the second press.

+ Add campaign and + Add experiment (right of the same tab's filters, a small window with the experiment's name) write through POST /admin/consumers/:id/stats/campaign: without confirm a preview that writes nothing, with confirm: true the same body saved by set_autopilot or set_experiments, under their checks. An experiment left unnamed is the next experiment-<n>, e.g. experiment-1 beside only base, experiment-5 after experiment-4. Amounts are in major units of the account currency.

  • { "experiment": null, "campaign": { "key": "meta_leads_2", "campaign": { "platform": "meta", "stage": "target", "objective": "LEADS", "content_source": ["facebook"], "budget_per_post": 5, "length_hours": 72 }, "rules": { "since_post_hours": [6, null] } } }: a second lead campaign in Default. It answers { "needs_confirm": true, "posts_count": 12, "month_max": 150, "reach": […], "rotations": [], "warnings": [] }: on stats/campaign and stats/rule posts_count is that one run's posts, here the 12 meta_leads_2 takes, while set_autopilot on the same rules answers every run's union, e.g. 40; reach lists every run and month_max is the experiment's.
  • "experiment": 3: the same in experiment 3. "experiment": { "new": { "name": "spring-sale" } }: a new experiment on the yes, on the account's playbook, running just that campaign.
  • A key the experiment runs is refused by name, so a create never edits; was, the experiment's rules as the page read them, answers 409 when they changed since.
  • A new campaign names one source video: "content_source": ["facebook", "instagram"] is refused by name, facebook and instagram each a campaign of its own. A stored campaign of two keeps them while its source is unchanged.
  • "privacy_url": "example.com/privacy" beside a LEADS campaign is saved to the account's settings on the yes, never on the preview; refused when the account has one already.

An edit or a remove from the window writes through POST /admin/consumers/:id/stats/rule with run (the key, key#id in an experiment), was (the campaign as the page read it, 409 when it changed since) and campaign (the whole campaign as it should be) or removed: true, through set_autopilot or set_experiments. The preview answers what it removes, adds and stops.

  • { "run": "meta_engage", "campaign": { "key": "meta_engage", …, "campaign": { …, "budget_per_post": 6 } }, "was": {…} }: an edit in place. It answers { "needs_confirm": true, "removes": null, "adds": "meta_engage", "ads_stopping": 0, "posts_count": 14 }, then on confirm: true { "saved": true, "removed": null, "run_key": "meta_engage", "ads_stopped": 0 }.
  • A goal, per post or per day, target or source cannot change on a made campaign: under the same key it is refused by name; under a new key, e.g. "key": "meta_engagement" with "objective": "ENGAGEMENT", the old campaign is removed and the new one added in one write, the preview answering "removes": "meta_engage", "adds": "meta_engagement".
  • { "run": "meta_engage", "removed": true, "was": {…} }: a remove. Its live ads pause at once on every platform as a rule stop, their spend kept; the preview answers "ads_stopping": 1, the yes "ads_stopped": 1, the pauses the platform confirmed. A pause it refuses is named in "ads_not_stopped": ["meta_engage: its campaign was removed, but the pause failed: …"] and every check tries it again; a pause step that failed once the campaign was saved is named in "ads_stop_error": "the pause of the runs out of the rules failed: …", the campaign saved and the ads it paused before the failure counted in "ads_stopped". A rename or goal change says the same of the old key's ads. A buy of it is its own line and keeps running.
  • The campaign unchanged answers { "saved": false, "reason": "nothing changed" } and writes nothing.

How it spends

  • Each post is promoted on its own app: a Facebook post on Facebook, Instagram media on Instagram. A run's campaign.placements names one app, never both, e.g. "own_app" or ["ig_reels"]; "automatic" is refused: placements: 'automatic' puts Facebook and Instagram in one ad set; each post is advertised on its own app: use "own_app", or one app's positions, e.g. ["ig_reels"].
  • campaign.pool_budget_daily (with campaign.pool): the named pool's own day, whatever number of runs it holds, in place of budget_daily × its live runs, major units of the client's money; every run of the pool that names it names the same figure, else refused by name. E.g. CB's pool "leads" at pool_budget_daily: 10 is 10.00 a day on Facebook and 10.00 a day on Instagram (one pool campaign per app) whether it holds 1 run or 3; budget_totals reads it leads pool 10.00 EUR/day = 10.00 EUR/day.
  • campaign.pool (a rotating run on Meta or TikTok; "Share budget with" in the admin and the stats window): the daily pool its money joins, named by you; none (the default) keeps the run's own daily budget, never pooled, e.g. pool: "leads" on fb_leads and fb_leads_2 share one budget, and pool: null takes a run back out. A pool's money is at unit prices: its campaign budget is each live run's budget_daily × the runs live in it, e.g. two runs at 5.00 are 5.00/day × 2 = 10.00 a day, one stopped 5.00. Every rotating run of the account on one platform with the same goal and bid strategy (on Meta the same app too), the same market (its campaign.audience.geo, the same countries in any order one) and the same audience (a retargeting run, e.g. audience: "viewers_90", apart from the cold runs with none), with the same pool name, shares one campaign with one daily budget (Meta's Advantage campaign budget, TikTok's campaign budget): the sum of their budget_daily_minor, which the platform moves to the ad sets or ad groups that deliver; a pool never mixes goals, apps, platforms, markets or audiences, e.g. fb_views in { include: ["DE"] } and fb_views_us in { include: ["US"] } are two campaigns, and fb_warm on viewers_90 is apart from the cold fb_views. TikTok makes a pool only for 2 rotations or more, as its campaign budget needs 2 active ad groups, e.g. tt_views alone keeps its own daily budget and tt_views with tt_views_2 share one; TikTok Leads rotations (Smart+) keep their own. E.g. fb_leads at 6.00 with pool: "de" and fb_leads_south at 4.00 with pool: "south" are two campaigns of 6.00 and 4.00 a day, and without names each keeps its own campaign. get_autopilot answers it on the run, e.g. rules.campaigns[0].pool: "leads", and leaves it out on a run that keeps its own. A rotation made before pools keeps its own campaign and daily budget until it is replaced. Refused on a per-post run and on a platform with no pools yet, e.g. campaign.pool is not built on YouTube yet.
  • campaign.budget_per_post is per post per run, a lifetime budget in major units of the account currency, the money the client deposited. A run starts at the start of rules.since_post_hours after the post (not before now) and lasts campaign.length_hours. No run waits on another, so the order runs are listed in orders nothing, e.g. meta_leads with since_post_hours: [6, null] starts at hour 6 whatever the awareness run does.
  • A YouTube run's money is its Google account's own: the rule's figure (the account's currency) is converted once, at that day's ECB rate, when its campaign is made (its budget, a rotating run's daily), and held in that currency from then on; a rule changed later is converted once at that day's rate. adjust and set_post_overrides on a made YouTube run take and answer its Google account's currency, named. Only the wallet and the month maximum count it in the account's currency: money spent at its day's kept rate, money still to spend at today's.
  • A per-post run's own rules.ads_running: [null, n] limits how many of its posts run at once, newest first (the run's own, else its playbook's; none: no limit; [null, null]: no limit over the playbook's); a run that ends, is cancelled or is n/a frees its place at once, and one waiting for money, or failed with attempts left, keeps it, e.g. [null, 1] with three posts waiting on an empty wallet makes one once money lands, and meta_engage at [null, 2] with two posts running holds a third until one of them ends. A run's rules.since_post_hours stop is how old a post may be when it takes it; with no stop and no posted_at it takes posts of any age, and the save answers how many (posts_count). A tick reads each app's post list once: the last 60 days live, at least its newest page of 100, at most 10 pages (last_tick.posts_capped says when it stopped there), and older posts from the posts store; such a stored post is read by id before an ad of it is made, also after a wait for money, and one the platform answers is not there has its runs cancelled, never made; a rotation reaching further back than that list reads its own days live, e.g. rotation_posts_days: 90. Posts are funded newest first while the wallet holds them, so money runs out on older posts; with a per-post run, month_max reads null (any number of posts may come).
  • How an ad starts: berg.ad checks the money before it writes anything, on every platform, then writes each campaign, ad set and ad paused and switches it on in the same tick once it meets the money checks (the money rule): Everything that starts or raises spend (the tick's activations, adds, overrides, set_status ACTIVE, adjust) is checked when it is applied: what it can take from the wallet stays within the available credit, e.g. an ad of 10.00 on a wallet with 5.00 available does not start, and only an ad set or campaign with a lifetime budget is switched on or raised (a rotation's rotating ad set or YouTube campaign excepted, holding one day of its daily budget, e.g. 1.00 a day holds 1.00 on the 1st as on the 15th). A run whose budget is under its platform's minimum is sent to the platform at that minimum, and it is checked at what the platform was sent, e.g. a budget of 5.00 under a minimum of 20.00 starts with 20.00 available and does not with 10.00; berg.ad still stops it at its budget, and while live it locks what the platform was sent and has not spent, e.g. a 5.00 TikTok run sent at TikTok's 20.00 minimum locks 20.00. A run's own budget_per_post or budget_daily is the money, in an experiment as on the account; live_per_day and run_rate read what the live ads are set to spend a day, and limit nothing. A person's change that can raise spend writes nothing without confirm:true, given after the owner said yes to the stated amount. A refusal names the check that held it. One that does not fit is not made, or stays paused if the money moved in between, and is re-checked on later ticks (a per-post run or an add for the playbook's money_wait_hours, 24 by default, a rotation's ad set hourly until its end, forever with none). No ad waits for a person to switch it on.
  • Wallet out (the wallet's spend is the account's own ads on every platform: an Ads Manager ad promoting its page counts only while the account is alone on its ad account, e.g. on a shared act_123 a hand-made ad is in no wallet, so it is never why a wallet runs out): wallet out: when the wallet's available falls below zero, each tick berg.ad pauses its own live ad sets, oldest first, until the rest fits (all of them when nothing is left); never an ad it did not make; each pause audited (wallet_out), one alert. Each tick while available is not below zero, whatever made it so (a top-up through the link get_topup_link gives, an automatic top-up, the admin recording a payment, or money freed as other ads end), switches back on, newest first, each run the wallet paused once available covers what it holds (a lifetime budget what it has left, a daily budget its next 24 hours: the most it should spend, not what it will) and it passes the money checks, so one paused to make room stays paused until the money for it is there; one the wallet refused is tried again when available changes, any other at the next tick; a run a person or platform turned off stays off, a rotation past its end and a run made ahead of its start with its rule gone or the autopilot off stay paused, and an old create_ad ad, made before berg.ad kept a run row for it, stays paused until the owner switches it on with set_status. While a platform's spend cannot be read, its runs count at their whole budgets: nothing new starts or rises while one of them can still spend, nothing is charged, runs come back only when the wallet holds even at those budgets, and a pause reads the wallet with them at nothing, e.g. a TikTok read that fails with Meta ads live pauses a Meta ad only when Meta's own spend takes the wallet out. An ad of a run can also be brought back by hand: set_post_overrides with a 1, on its same ad.
  • Account guards hold, they never pause: company settings, each the account's value (thresholds in set_account_settings, or the /admin Account form) else the playbook's (an experiment: its playbook's). While one is reached on a platform, every new start there (a per-post run, an add or buy, a rotation's ad set or an ad never switched on) waits, named held by <guard> <value>: …, as a money wait does: re-checked each tick, and a per-post run or add still held after money_wait_hours (24) is not made (waited 24 h), so a hold longer than that costs those posts their runs; a rotation's ad set or ad is re-checked hourly. Live ads keep running, and a paused ad coming back is not held. Each is a health_check problem (alerted to the operator in Slack), a get_autopilot guards reading and a warning. Counted per platform, berg.ad's own ads only; rejected or flagged is Meta's DISAPPROVED, WITH_ISSUES or any issues_info or review feedback on an ad that can deliver, TikTok's rejection, Google's DISAPPROVED; an ad active again after it (an appeal Meta approved, an issue gone) stops counting, one rejected and then paused or archived keeps counting.
    • rejections_30d (Bill's 3): set_account_settings { "thresholds": { "rejections_30d": 5 } } → nothing new starts on a platform once 5 berg.ad ads were rejected or flagged there in 30 days, e.g. held by rejections_30d 5: 5 berg.ad ads rejected or flagged by Meta in 30 days (each with its reason in health_check rejections_30d); nothing new starts on Meta; live ads keep running: the ads and Meta's reasons are listed once, in that check's value.platforms.meta.ads, never in the held text.
    • spend_cap_used_pct (Bill's 90): nothing new starts on a platform once that % of its account spending limit is used (Meta's spend_cap, Google's account budget; TikTok has none: not applicable; no limit set: never held), e.g. held by spend_cap_used_pct 90: 92% of the Meta account spending limit used (the account's spend and limit are shown to admins only: a client reads used_pct, e.g. { "used_pct": 92 }). { "thresholds": { "spend_cap_used_pct": null } } → back to the playbook's 90. An experiment answers to the lower of its playbook's and the account's, e.g. at 80% used the account's 70 holds an experiment on a playbook at 90: held by spend_cap_used_pct 70: …. A start reads the limit live; get_autopilot and health_check show it as the cron last read it, with read_at (Meta's each sync job, Google's once a day), e.g. { "used_pct": 42, "spend_cap": 1000, "amount_spent": 420, "currency": "EUR", "read_at": "2026-10-30T12:15:03.000Z" }.
    • rejections_url_30d (Bill's 1): after one rejection of an ad to https://example.com/boats/x (where the ad lands: the post's own link, and for an ad that takes a landing (a traffic or link ad) else its channel's default link, else the account's ad_texts landing, compared by the url key, so ?utm_source=… or a trailing slash is the same URL), nothing new starts to that URL on that platform for 30 days; a post to another URL, or with none, still starts. The post's own later runs still go (a flag only counts), so the hold reads held by rejections_url_30d 1: https://example.com/boats/x rejected or flagged by Meta on 1 berg.ad ads (each with its reason in health_check rejections_30d); nothing new starts to that URL on Meta from another post ….
  • lead_data_days (30): how many days a lead's answers are kept after berg.ad delivered it to the webhook (with or without its answers) or gave up on it; then the 15-minute run deletes them. The lead itself (its id, form, ad, times and delivery state) stays, so leads_received, the weekly report, lead_health and every series count it as before. A lead whose answers were not sent to a webhook yet keeps them until they are: pending, failed, no_webhook, and surfaced (received, so counted, answers not yet sent to a webhook: a webhook or lead email set later sends them; a lead emailed with no webhook, emailed, is delivered and its answers go after lead_data_days as a forwarded one's), e.g. a lead surfaced on 1 March still has its answers on 1 May. The account's value (set_account_settings, or the /admin Account form) else the playbook's, e.g. set_account_settings { "thresholds": { "lead_data_days": 7 } } → a lead delivered on 1 March has its answers deleted on 8 March, and the admin Stats page shows The answers were deleted after 7 days (lead_data_days). where they were; { "lead_data_days": null } → back to the playbook's 30.
  • Playbook thresholds: the expert's fixed numbers, in the playbook defaults' rules (/admin playbook editor), the same for every account of the playbook unless the account sets its own (set_account_settings { "thresholds": { "average_posts": 10 } } judges that account's posts against its last 10, { "thresholds": { "average_posts": null } } gives it back; every key below takes this; an experiment is a second client with no account above its playbook, so its own playbook's thresholds beat the account's, e.g. the account's { "money_wait_hours": 48 } leaves an experiment on a playbook at 24 waiting 24 h, and its guards and jev_steps are the playbook's the same way), each a whole number from 1:
    • jev_review (0, or 1): Jev's daily review of each campaign, 1 on, 0 off. Off, Jev is asked about no campaign whatever its jev switches: it makes no new change to a setting and turns no post off for its numbers (what it set before stays until a person changes it), while the policy check still runs on every post, e.g. "jev_review": 1 → Jev answers once a day on each run with a switch on.
    • average_posts (25, at most 100): Jev's facts compare a post with the average of its app's (or YouTube channel's) newest this many posts, e.g. "average_posts": 10 → organic views 300 (225% of this app's usual) against the last 10 posts.
    • rotation_posts_days (30): a rotating run takes posts of the last this many days, e.g. "rotation_posts_days": 14 → a post from 20 days ago never joins; one already in the ad set keeps running.
    • create_attempts_max (3): a run, add, rotation or rotation ad that failed to be made (or died mid-create) is tried this many times in all, then shows blocked, e.g. "create_attempts_max": 1 → no retry after a refusal. A refusal for policy (Google POLICY_FINDING, Meta code 500) is the platform's rejection instead: never retried, its post set to 0 by the platform's review.
    • successor_attempts_max (2): a full ad set's successor is given up after this many failed creates, e.g. the alert meta_leads: no successor for full ad set 123 after 2 failed creates (successor_attempts_max); the rotation stops here.
    • wallet_low_days (7): the wallet is running low (health_check wallet warns, /admin shows it) once what is available lasts under this many days at the current pace, e.g. "wallet_low_days": 14 → 10 days left warns.
    • recheck_hours (1): a skipped rotation or rotation ad is looked at again after this many hours, e.g. "recheck_hours": 6 → a rotation held for no viewer audience is checked every 6 hours. A per-post run is looked at each tick, and so is a rotation ad held by a failed spend read.
    • stuck_hours (1): a row a worker left mid-create this many hours ago counts as dead, is retried as a counted attempt and no longer holds its post, e.g. "stuck_hours": 3 → a create stuck for 2 hours is left alone, one stuck for 4 is retried.
    • A run made ahead of its start (Meta, TikTok; YouTube makes a run when it is due, so it has none) and not started yet, whose rule leaves or whose autopilot goes off, is paused so it never starts and spends, as a rotation is, e.g. meta_views with since_post_hours: [72, null] reads stopped by rule: paused before its start: the autopilot was turned off, and set_autopilot lists it in runs_paused. Every check does the same for a live ad whose run is in neither the account's or its experiment's rules nor a buy, however its run left (a remove, a playbook change through default_expert, an experiment's rules), e.g. meta_engage gone from the playbook reads stopped by rule: its campaign was removed. Autopilot on or the rule back resumes it at the next tick, through the money checks, while its end is ahead. An experiment stopped leaves its made runs: they finish. One a person paused stays theirs.
    • money_wait_hours (24): a per-post run or add that cannot start yet (money, an account guard, a busy lock, a throttle) is re-checked each tick for this many hours after it was first written, or after its start where that is later, then cancelled, e.g. with 24 a run made 72 h ahead and refused starts on a top-up at hour 30, and ends 24 h after its start if none comes; "money_wait_hours": 72 → a post held at deploy for no wallet credit still starts when credit comes on day 2, and one still held after 72 h reads cancelled: waited 72 h: REFUSED: no wallet credit set. A platform that could not be read starts this wait again at each refusal: wallet unknown: … never ends while the read fails, and a run has its full hours after it.
    • lead_forward_attempts_max (10): a lead whose POST to the webhook failed is sent this many times in all, then gave_up and alerted, e.g. "lead_forward_attempts_max": 5 → given up after the 5th failure (about 4 hours).
  • Optional cost_cap per run (major units, like budget): the ad set is created with Meta's COST_CAP bid strategy and that bid amount, so Meta aims to keep the average cost per result under it. Not for REACH. Too low a cap under-delivers. Without it the ad set bids lowest cost.
  • Optional bid_strategy and bid_amount (major units) in campaign: the platform's own bid, sent as given and refused by name where the platform has no such pair. Meta: LOWEST_COST_WITHOUT_CAP (no amount), LOWEST_COST_WITH_BID_CAP or COST_CAP (each needs its amount), e.g. { "bid_strategy": "LOWEST_COST_WITH_BID_CAP", "bid_amount": 0.5 } sends bid_amount: 50; cost_cap with either is refused. TikTok: its bid_type (default BID_TYPE_NO_BID), the amount as bid_price, or conversion_bid_price on LEADS. YouTube: target_spend (Maximize Clicks, the default), target_cpc, maximize_conversions, target_cpa; target_cpc and target_cpa take bid_amount as their target, e.g. { "bid_strategy": "target_cpc", "bid_amount": 0.4 } sends targetCpc: { targetCpcMicros: "400000" } on a EUR account, and bid_amount with the other two is refused. LinkedIn: its campaign's optimizationTargetType, each on the objectives LinkedIn offers it for: REACH MAX_REACH (the default), MAX_IMPRESSION, TARGET_COST_PER_IMPRESSION, CAP_COST_AND_MAXIMIZE_IMPRESSIONS; VIDEO_VIEWS MAX_VIDEO_VIEW (the default), TARGET_COST_PER_VIDEO_VIEW, CAP_COST_AND_MAXIMIZE_VIDEO_VIEWS; TRAFFIC, ENGAGEMENT and FOLLOWERS MAX_CLICK (the default), TARGET_COST_PER_CLICK, CAP_COST_AND_MAXIMIZE_CLICKS; LEADS MAX_LEAD (the default), MAX_QUALIFIED_LEAD, CAP_COST_AND_MAXIMIZE_LEADS; a TARGET_COST_ or CAP_COST_ one needs its bid_amount, a MAX_ one takes none, e.g. { "bid_strategy": "TARGET_COST_PER_CLICK", "bid_amount": 0.4 } sends costType: "CPC", unitCost: { amount: "0.4", currencyCode: "EUR" } on a EUR account, and MAX_LEAD on a TRAFFIC run is refused naming TRAFFIC's three. A REACH run takes no COST_CAP, as cost_cap or as bid_strategy.
  • Other native settings in campaign, each refused by name on a platform that does not take it: frequency_cap: { impressions, days } (Meta REACH and THRUPLAY views, TikTok REACH and THRUPLAY views as frequency / frequency_schedule, e.g. { "impressions": 2, "days": 7 }; TikTok takes at most 30 days on REACH and 7 on views and refuses more at the create, its words on the run's row, e.g. tt_reach with { "impressions": 4, "days": 30 } and tt_views2 with { "impressions": 1, "days": 7 }; sent only when the ad set is made, as Meta refuses a change on a started one, so a change on a live rotation reaches its next ad set, said in warnings by the save that makes it (set_autopilot, set_experiments update, save_playbook per account); on Meta its days fit inside the ad set, e.g. { "impressions": 4, "days": 30 } with length_hours: 24, or a rotation's end 3 days off under a 7-day cap, is refused by name); device targeting, in each platform's own setting and values: device_platforms (Meta, e.g. ["mobile"]) with user_os (Meta's operating systems, e.g. ["iOS"] or ["Android_ver_10.0_and_above"]), operating_systems (TikTok, e.g. ["IOS"] or ["ANDROID"], sent on the ad group), devices (YouTube, Google's device types MOBILE, DESKTOP, TABLET, CONNECTED_TV, e.g. ["MOBILE", "TABLET"], sent on the campaign, where Google takes them); another platform's setting is refused by name with this platform's, e.g. operating_systems on a Meta run reads Meta targets devices by device_platforms, e.g. ["mobile"], and operating systems by user_os, e.g. ["iOS"]; audience.interests, .behaviors (Meta's { id, name } targeting objects, e.g. interests: [{ "id": "6003139266461", "name": "Sailing" }]; audience.exclusions is refused by name, as Meta removed detailed targeting exclusions in v22: keep people out with audience.custom.exclude, e.g. { "custom": { "exclude": ["page_fans"] } }); audience.interest_category_ids, .interest_keyword_ids (TikTok's ids, e.g. ["25101"]); search_result_enabled and pacing (TikTok, e.g. "PACING_MODE_FAST"; not on LEADS). A TikTok run's audience.custom takes the advertiser's audience ids, e.g. ["7123456789"] sent as audience_ids; berg.ad's names viewers_30 and viewers_90 are taken there too, as the account's TikTok viewers (sync_viewer_audience), e.g. Bill's tt_reach with { "custom": { "include": ["viewers_90"] } }; other names are Meta audiences and are refused there.
  • Start conditions (in a per-post run's rules): since_post_hours: [start, stop] (its stop is the oldest post it takes; none: posts of any age), posted_at: [after, before] (e.g. posted_at: ["2026-10-01T00:00:00Z", "2026-10-31T00:00:00Z"] takes only October's posts), spend: [start, null] (a start only: the post's paid spend so far across its runs in the run's own experiment (base included), its per-post runs and its own ads in other rotations; spend: [1, null] waits until the post's runs spent 1; a stop is refused by name, the run's money being its budget_per_post; a spend not readable or in another currency holds the post, named), ads_running: [null, n] (how many of its posts run at once, newest first; none: no limit; e.g. ads_running: [null, 2] holds a third post until one of the two ends, is cancelled or is n/a), metric pairs on the post's own counts (all must hold; any: [...] is an either-or group that holds when one of its conditions does) and rank_<metric>: [from, n] (the post must rank from..n by that metric among the posts the run takes; ties go to the newer post; rank_views: [6, 10] takes the next five after the top five). The conditions: views_organic and views_total, likes_organic and likes_total, comments_organic and comments_total, clicks_organic and clicks_total, each read by the stats' organic rule (the one get_post_stats organic_by_post reads) from the post's snapshots, the tick's own read as the latest, on every platform: _total is the platform's count, _organic that count less berg.ad's paid on the post itself (its paid read failed: not known, a start waits, a stop does nothing). Facebook's views_total is every media view of the post and views_organic the unpaid ones (is_from_ads 0); Instagram's views_total is every view the post shows, ads included, and views_organic those less its ads' views (e.g. an Instagram post showing 1,200 views, 300 of them from its ad: views_total 1200, views_organic 900); YouTube's are its public counts less berg.ad's TrueView views; TikTok's its public views, likes and comments less berg.ad's own TikTok ads' on that post, since a Spark ad's engagement lands on the post (e.g. 650 likes, 350 of them on its Spark ad: likes_organic 300), not known while its TikTok delivery is not read; clicks is every click on the post, Facebook and LinkedIn only (Instagram does not report them; LinkedIn's is the clicks it counts on the post, e.g. a LinkedIn post with 12 clicks reads clicks: 12); likes every like or reaction. E.g. { "likes_organic": [null, 50] } on a post with 80 likes, 40 of them reactions to berg.ad's ad, reads 40 and keeps the ad. Their gains per hour, <metric>_<form>_per_hour: the value now less the value at the latest snapshot at least an hour before, per hour between the two, e.g. likes_organic_per_hour 12 after 12 new organic likes in the hour; each snapshot keeps the paid read with it and its organic is its total less that paid (40 paid reactions an hour, snapshots at :40, likes 12, 64, 110 with paid 0, 40, 80: 12 then 6 an hour); a snapshot with no paid kept (its paid read failed) leaves the rate not known (… not known: berg.ad's paid on the post not read); no snapshot an hour before (a new post): not known (entry: none of likes_organic_per_hour not known: no snapshot an hour before). Beside them reach_total (its reach, read live, e.g. reach_total: [800, 30000]), engagements_total (its clicks, e.g. engagements_total: [50, 2000]; on Instagram its interactions, read live) and leads (the leads berg.ad received from the post's ads across all its runs; Facebook and Instagram). Beside them the ratios on berg.ad's paid on the post: ctr (paid link clicks ÷ paid impressions × 100) and cost_per_views, cost_per_clicks, cost_per_likes, cost_per_comments, cost_per_leads (berg.ad's own per-post runs on the post's platform: their spend ÷ their paid count, both from the same Meta rows (a video's from Google's lifetime of its campaigns), in major units of the account currency; a campaign made by hand on the post counts on neither side: berg.ad's 10 clicks for 5.00 beside a hand-made campaign's 90 is 0.50 a click); a running ad is paused once a ratio leaves its window either way, e.g. { "ctr": [1.5, null] } starts a post whose earlier ads clicked 3% and pauses when its CTR falls to 1 (stopped by rule: ctr 1 < 1.5), { "cost_per_clicks": [null, 0.8] } starts at 0.50 a click and pauses at 0.90 (stopped by rule: cost_per_clicks 0.9 ≥ stop 0.8), and comes back once it is in its window again, its end ahead, as { "ctr": [1.5, null] } does at 2; no paid impressions or none of the count yet, a paid read that failed, or a spend in another currency or a rotation's is not known (entry: none of ctr not known: …), never 0; Meta reports them all, YouTube cost_per_views only, a TikTok run none, and a rotation takes no cost (refused, named). Each is a pair [start, stop] (null where not set), met at or past its start and under its stop. no_views_hours, no_likes_hours, no_comments_hours and no_clicks_hours take a start: the whole hours the post's own total has not grown, read from its snapshots (none yet: not known, it waits), e.g. { "no_likes_hours": [6, null] } takes a post whose likes have not grown for 6 hours (entry: none of no_likes_hours 3 < 6 while they grew 3 h ago). A buy is made only once its post meets these start conditions of its run (the caller's fields over them); until then it waits, named (entry: none of views_total 500 < 1000). A post at or past a stop is never started (entry: none of views_total 6000 ≥ stop 5000); a running ad, a buy's included, is paused once its post's count reaches a stop in any group (stopped by rule: views_total 5000 ≥ stop 5000), never for falling under a start, and a failed read pauses nothing. A rate goes up and down, so a running ad is paused once its rate leaves its window either way: { "likes_organic_per_hour": [10, null] } (a hit) starts at 12 an hour and pauses when it slows to 6 (stopped by rule: likes_organic_per_hour 6 < 10) and comes back at 14 an hour, its end ahead and under the money checks; { "likes_organic_per_hour": [null, 3] } (stalled) starts at 1 an hour and pauses once it grows to 3 (stopped by rule: likes_organic_per_hour 3 ≥ stop 3). A running ad is judged on its stops however old it is. E.g. { "views_total": [1000, 5000] } starts at 1000 views and pauses at 5000; { "leads": [null, 25] } pauses the post's ad at its 25th lead; { "leads": [3, null] } takes a post that already brought 3 leads. Boosterberg's names map as organic_fans = views_organic, total_reach_fans = reach_total, engagement_fans = engagements_total, link_clicks = clicks_total, video_views = views_total; berg.ad takes only its own names, and refuses the bare views, likes, comments, clicks and organic_views naming their forms (rules.views is views_organic or views_total). A group also takes a platform's own thresholds beside its own, { "views_total": [1000, null], "youtube": { "views_total": [100, null] } }: a post of that platform is met by its platform's, which add to or override the group's own, never removing them for the other platforms. Refused: a condition on a metric none of the run's apps reports, a platform's block on a run that takes no post of it, and a platform block that leaves a platform the run takes with no condition. A started post is judged by the time of its first run, so its series never changes as it ages. The insights are read once for every post and kept 15 minutes, a run waits while its post's app cannot be read. A run waiting on them owes no month money: it may never start, so its money is checked when it is made. Instagram's insights need the optional instagram_manage_insights permission. set_autopilot without confirm answers reach: per run, how many recent posts it admits now and the first condition each other post misses.
  • A post advertised outside the rules stays in them like any other, e.g. a post with an ad made by create_ad or a campaign someone made in Ads Manager still gets its meta_leads run. An ad made by create_ad and a buy are both adds of the post (get_autopilot lists them among its runs, source: "add"): each its own per-post campaign outside the rules (no ads_running place, never in Jev's judging), made by berg.ad and switched on with its own dates once it meets the money checks, e.g. a buy of meta_leads starting 09:00 starts at 09:00 whatever the post's awareness run does.
  • posts.lock: true keeps every post on (setting 1); false, the default, leaves it to the rules; a post's own setting (set_post_overrides) wins either way. Jev never sets a post kept on or off to 0. Example: { "posts": { "lock": true } } shows each post's setting as {"value":1,"by":"playbook","from":"playbook"}.
  • The rules are the playbook's latest with the account's own overrides on top; set_autopilot stores only what differs. A playbook update that can spend more needs no yes: the wallet holds every start.
  • Every amount is the account's money as the client pays it: every budget typed and every figure answered (wallet, spend, costs, a platform's minimum) is in that one money, e.g. budget_per_post: 10 reads 10 back from get_autopilot and takes 10 from the wallet as the account reads it.
  • Run budgets are the only money input: a run's budget_per_post or budget_daily is what it spends, e.g. set_autopilot { "rules": { "campaigns": [{ "key": "meta_leads", "campaign": { "budget_per_post": 4 } }] } }. Nothing is set per objective, per day or per post on the account; a write naming rules.goals is refused.
  • There is no monthly number. The run rate is what active campaigns are budgeted a day, added up, not what they spent: health_check run_rate's live_per_day with run_rate per campaign, e.g. a rotation at 10.00 and one at 3.00 read 13.00 a day. It is a reading: a person's raise meets only the wallet, e.g. 20.00 available and live ads taking 13.00 a day refuse a raise of 25.00 and take one of 10.00.
  • Low money: the automatic top-up charges the card when the money free for new ads (credit − used − locked − pulls, the wallet's available) is under topup_below, e.g. credit 300.00 with 280.00 locked on running ads is 20.00 free and charges at a topup_below of 50.00, while 200.00 locked leaves 100.00 free and charges nothing; one invoice at a time, so as new ads lock the money a top-up brought, the next tick under the level charges again; with it off, report_email gets a link (get_topup_link) once a day when the wallet is empty or its days left fall under wallet_low_days. Not enough money: the oldest ads pause first (wallet_out), so the money left runs the newest posts, and each tick the wallet is not below zero (a paid link, the automatic top-up's invoice, a payment recorded on /admin, or money freed as other ads end) brings them back newest first, each that fits under the usual checks, once available covers what it holds (a lifetime budget what it has left, a daily budget its next 24 hours), e.g. a run holding 10.00, paused at available -5.00, comes back once available reaches 10.00; a person's pause stays off. Berg's own TikTok advertisers are read hourly for their prepaid balance: one that is empty or holds under wallet_low_days days at its pace (its last 7 complete days of spend ÷ 7, fewer while it is younger), or cannot be read for 3 hours, goes to the operator's Slack with its top-up link, once a day while it lasts and a note when it clears, e.g. "🟠 TikTok balance low: Berg TikTok" with "Berg TikTok: 30.47 EUR left, about 3 days. At the current spend of 9.93 EUR a day. Top up before it runs out, or its ads stop." and its Top up on TikTok link.
  • An experiment has no budget of its own: a run in it meets the same checks as the account's, and its rows count apart, e.g. get_experiments reads 2.01 spent, 5.99 live from its own campaigns while the wallet holds every experiment.
  • get_autopilot spend_by_objective is the split as a reading, per objective of the runs and of what the month holds: { objective: "LEADS", budget_daily: 10, budget_per_post: 0, committed: 290, committed_pct: 96.67 }. A rotation's THRUPLAY reads as VIDEO_VIEWS (both buy video views). Each row keeps the objective it was made under, so a later rules change never moves money already taken.
  • Jev compares a run's own ads with each other, on the result the run's objective buys (cost per lead on a lead run, per view on a views run), never one run or objective against another, on every platform. Its money step moves one run's own budget up or down (jev: { money: 1 }, off by default), so money never moves between runs by itself; the operator moves it by changing the runs' budgets.
  • judge_floor (optional, on a target run, per-post or rotating, on every platform, e.g. on Bill's fb_engage, tt_engage and yt_engage): Jev's data floor for the run's daily pass (its jev switches); nothing else drops, raises or moves money (its drop is jev.post, its raise jev.money). Jev is asked about a run once 2 of its live ads of its last baseline_days (7) days have spent the judge floor: judge_after (1) × the run's baseline cost per goal event (the median over its finished ads with a goal event), or, until it has one, judge_floor_share (0.5) × the run's budget (a rotation's daily). It reads those ads one sentence each, at most batch_max (80), and one line for the rest. guidance (at most 200 characters) goes to Jev word for word on each daily pass, e.g. "guidance": "Favour ads that bring bookings for June" reads Guidance for this run: Favour ads that bring bookings for June. A run without a judge_floor takes these defaults. Example: { "key": "meta_leads", "rules": { "judge_floor": { "judge_after": 2 } } } asks Jev about meta_leads only once 2 of its live ads each spent twice its baseline cost per goal event (until it has a baseline, judge_floor_share × its budget). drop_max, realloc, drop_spend_x, drop_margin, raise_cap and min_hours_left are refused, named: run meta_leads: judge_floor.drop_max is retired; use jev.post (Jev keeps a post off for its life; Jev's drop), e.g. { key: "meta_leads", rules: { jev: { post: 1 } } }.

Hook

An outside system (the business's booking site, its CRM) switches the ads of a set of posts on or off without knowing campaigns. The hook is set_post_overrides' own per-post setting, post.setting: 0 kept off, 1 kept on, null the rules decide. It adds only a scope that picks the posts, and writes that same setting: no rule, no other state. The assistant calls the same over MCP: set_post_overrides with a scope.

POST https://mcp.boosterberg.com/hook
Authorization: Bearer <key>
Content-Type: application/json

{"scope":{"url":"https://example.com/boats/gulet-aurora*"},"post":{"setting":0},"reason":"booked out"}

The key: the account's full key, or a restricted key that lists hook (made and revoked on /admin → Keys; revoked, it stops at once). The body is set_post_overrides' arguments with a scope, without post_id or runs.

Scope: exactly one key

KeyExamplePicks
url{"url":"https://example.com/boats/gulet-aurora*"}
{"url":"https://example.com/boats/*"}
{"url":"https://example.com/boats/gulet-aurora?d=2027-09-04,2027-09-11"}
Posts whose destination URL (the landing rule's: the text's first link, else the business's own first comment's, short links followed; never the account's fallback landing) is that URL by the url key (lower-case host, no trailing slash, utm_* and fbclid dropped; every other query part kept). One boat is its prefix, …/gulet-aurora*: every week of it (?d=…) too. Without * it is one exact URL: …/gulet-aurora?d=2027-09-04,2027-09-11 is that one boat week, and plain …/gulet-aurora picks only posts linking to it with no week. A short link that could not be followed is not picked, named unread. Ending in *: every URL under it; the slash before the * stays, so …/boats/* picks every boat and never …/boatsale. A post with no link is never picked.
tag{"tag":"#gulet"}Posts whose caption (a YouTube video's title and description) carries that hashtag, any case, whole tag only: #Gulet week, never #gulets. # is optional.
a metric{"spend":[50,10000]}
{"views":[null,500]}
[min, max], both included, null no bound. spend: what berg.ad spent on the post, its per-post runs and its own ads in rotations, outside experiments, major units of the account currency; spend: [50, 10000] is 50 or more, e.g. a post whose ad in the viewers rotation spent 60 is picked. A post whose spend can't be read (unread) or with a run in another currency (other_currency) is not picked, named. views_organic, reach, engagements, clicks, views, likes, comments: the counts a run's entry condition reads (Meta's insights, a video's channel snapshots), only where the app reports the metric; views: [null, 500] is at most 500.
all{"all":true}Every post.

The posts looked at are the account's Facebook, Instagram and YouTube posts of the last 60 days, as get_post_stats lists them, plus every older post with a berg.ad run still running or paused on it: a boat post from 90 days ago whose meta_leads still runs is picked by {"url":"https://example.com/boats/gulet-aurora*"}. A post whose run has ended by what berg.ad stores is left out (its ad set closed or ended, or a rule run past its window: made + delay_hours + hours, or a person's end); nothing is read to find that out. One whose post was taken down is not read: not_picked.gone; one whose read failed otherwise is not_picked.unread, and a 0 names it in not_switched_off ({"post_id":"222_45","why":"could not read"}).

What a setting does

  • 0 (off): also written by a platform when it rejects one of the post's ads, in review or when the ad is made (by Meta review, TikTok review or Google review, with its reason), and by Jev when the policy check skips the post (Policy check: Meta policy: prohibited_commercial_practices 0.94, Policy check: Google policy: misleading_claims_youtube 0.92). Each made run of the post is paused, also one a person switched on before the 0 (its own 1 goes; nothing runs under a 0); a run not made yet is held: it gets no row and holds no money while the post is 0 (it shows waiting, kept off by Jev), so a later 1 or null sends the post through it while its window is ahead, e.g. a post set to 0 at hour 2 and back to null at hour 3 still gets its meta_leads at hour 6; in a rotation (rotating retargeting, a YouTube rotating run's ad group) the post takes no part: its live ad is paused, paused, no longer qualifies: kept off by hook, and its slot goes to the next post. Example: {"scope":{"url":"https://example.com/boats/gulet-aurora*"},"post":{"setting":0},"reason":"booked out"}.
  • 1 (on): kept on, for the post's life, on its current and future ads, out of Jev's reach (Jev never drops, raises or switches it off, and its runs start from your run settings, never Jev's: under a meta_leads run whose budget Jev moved to 4.00, a post kept on is made at your 5.00); a run's own stops (its budget, its end) still apply. It sends the post through the runs its 0 held while their windows are ahead and the post is inside each run's max_age_hours (a post with no run yet, held 50 hours, is past a since_post_hours: [0, 48] stop and takes none; a post that started keeps its series), each new run under the money checks, so it can spend. It switches back on only the made runs the post's 0 paused (berg.ad records them when it applies the 0): their ad set, campaign and ad, each run under the money checks and only with "confirm":true; its dry run lists per run what it switches on (starts) and what it can spend (a money refusal waits up to the playbook's money_wait_hours, 24 by default). It never undoes another pause: a run a person paused (its own 0, set with set_status or recorded from Ads Manager), one resumed past its stop, and one a rule ended (cancelled, stopped at its spend, dropped by Jev, taken down) stay as they are; each needs its own action, set_status ACTIVE or adjust on the run's ad set, under the same checks. Examples: a 0 then a 1 says switches meta_leads back on: the post's 0 paused it (under the money checks); a run a person paused says meta_leads stays paused: a person paused it in Meta Ads Manager on 2026-10-20T10:00:00Z; switch it on with set_status; a run the wallet paused says meta_leads stays paused: paused, wallet out: credit 0; a 1 with no 0 before it says meta_leads stays as it is: only what the post's 0 paused is switched back on. A run a platform's rejection already cancelled (the post's 0 by its review) stays cancelled under your later 1: only the runs that 0 paused come back. Example: Meta rejects awareness, so engage (made) is paused and meta_leads (not made) is cancelled; your 1 the next day switches engage back on, and meta_leads stays cancelled. The same value sent again is written again, at the hook and over MCP alike. A rotation follows its own rules: a post kept off and then set to 1 or null may take a slot again. Example: {"scope":{"tag":"#gulet"},"post":{"setting":1},"reason":"season open"}.
  • null: back to the rules and Jev (the post's entry is cleared, so posts.lock decides again). It lifts a 0: the runs the 0 paused come back on through the same switch-on and money checks as a 1, then Jev may judge them, and the runs it held are made while their windows are ahead and the post is inside each run's max_age_hours, as under a 1; nothing else is switched on. While it waits for money, posts.lock decides; refused for good, it is removed all the same. On a post its platform rejected, a null does not lift the rejection's 0: it comes back at the next tick, and the answer says so, e.g. null on a post Meta rejected returns to the rejection's 0 (by Meta review); send 1 to advertise it anyway; a 1 lifts it. Example: {"scope":{"all":true},"post":{"setting":null},"reason":"back to the rules"}.
  • Jev writes only a 0, on a post whose setting is null (no setting of its own, no posts.lock), for the post's life, by Jev with its reason: {"value":0,"by":"Jev","at":"2026-10-28T06:00:00Z","reason":"0 leads on 9 EUR; its caption is a dated promo","from":"post"}. A post you set to 1 or 0 is never Jev's to change.
  • A made campaign switched off, in berg.ad or on the platform (its own 0), stays off under its post's 1 or null and stops only that campaign; set_status ACTIVE brings it back and leaves no setting. A post's 0 wins over everything: set_status ACTIVE under it is refused, naming the post. value is not built: a call with one is refused, value: not built yet; the hook sets on or off only: post.setting 1 (on), 0 (off), null (the rules decide).

A body out of date

A field set_post_overrides does not define is refused with HTTP 400 before anything runs, e.g. {"error":{"type":"REFUSED","stale":true,"name":"confirmed","message":"confirmed: no such field on set_post_overrides; it takes post_id, post, scope, runs, reason, confirm. On an old tool list, reload it."}}. A missing field is refused with what it takes, e.g. {"error":{"type":"REFUSED","name":"reason","message":"reason: required, why the change is made; kept in the audit."}}. Any other refusal stays {"error": ""}.

Dry run, then confirm

Without "confirm":true nothing is written: the answer lists each post the scope picks and what its change does.

{"changed":false,"needs_confirm":true,"scope":{"url":"https://example.com/boats/gulet-aurora*"},"setting":0,"posts":[{"post_id":"17890077","platform":"instagram","title":"A rare find","url":"https://example.com/boats/gulet-aurora","setting":{"old":null,"new":0},"does":["pauses meta_leads (Meta ad set 120211)","holds engage: a 1 or null later sends the post through it while its window is ahead and the post is inside the age limit"]}],"not_picked":{"no_url":4,"not_matching":31},"next":"Nothing written. 1 post(s) change as each one's does says; call again with the same values and confirm:true."}

The confirm picks the posts again, as they are then: a post that started linking to the boat, or reached 50 spent, since the dry run is picked; one that stopped is not. Example: a dry run of {"scope":{"spend":[50,10000]},"post":{"setting":0},"reason":"enough"} lists 3 posts; a fourth passes 50 before the confirm, so the confirm writes 4 and lists them.

The same body with "confirm":true writes the setting on each picked post whose setting changes (a post already at it says no change), audits each, sends the operator one message, and queues the account's check (the 15-minute tick's own steps and money checks), which runs within about a minute when no other check holds its ad account, else at the next 15-minute tick: the accounts on one ad account are checked one at a time, and a check still waiting after 3 tries of a minute each is dropped, named on /admin/errors (e.g. check of account 1 dropped: act_111 was busy with another check through 3 retries; the next 15-minute tick runs the same steps). checked says when it was queued. The call answers at once; get_autopilot shows what the check made. A check that fails, or one whose steps fail, leaves the write standing and is named on /admin/errors, and the next 15-minute tick runs it again; one that could not be queued answers checked.error. Each post is tried once per call: what the write itself tried (a pause Meta refused for now, an ad it could not make) waits for the next tick.

{"changed":true,"scope":{"url":"https://example.com/boats/gulet-aurora*"},"setting":0,"posts":[{"post_id":"17890077","setting":{"old":null,"new":0},"does":["pauses meta_leads (Meta ad set 120211)"]}],"not_picked":{"no_url":4,"not_matching":31},"checked":{"queued_at":"2026-10-27T10:02:11Z"}}

Every write by the assistant or /admin queues the check the same way: set_post_overrides, set_autopilot, set_experiments (create, update). Each setting shows as the post's override, by hook, in get_autopilot, get_post_stats and the audit. In get_post_stats items each post part carries it as setting: {"value":0,"by":"hook","at":"2026-10-27T10:02:11Z","reason":"url https://example.com/boats/*: booked out","from":"post"}; under posts.lock {"value":1,"by":"playbook","at":null,"reason":null,"from":"playbook"}; null when the rules decide.

Answers

  • 200: the tool's answer, as above.
  • 400 {"error": …}: scope: the hook picks posts by url, tag, a metric pair or all (no scope); url: a full http(s) URL, * only at the end; tag: a hashtag, # optional; spend: [min, max], each a number or null (no bound), min ≤ max; all: true; post_id, runs: a scope sets only post.setting; post: give post.setting; value: not built yet. Nothing is written.
  • 401 a missing or wrong key (counted: 20 wrong keys an hour from one address lock it for the hour, 429); 403 this key may not call the hook: add hook to a restricted key on /admin → Keys; 405 anything but POST; 429 more than 10 calls in 10 seconds from one address (Retry-After).

Platforms

One name per metric and setting on every platform; each platform gives it its own meaning, e.g. views is a Meta ad's impressions and a YouTube campaign's TrueView views. Every row names its platform, and every amount its currency (the account's own, never converted).

Meta (facebook, instagram)YouTube (Google Ads Demand Gen)TikTok (Marketing API)
viewswhat the post shows as views: a post's total Facebook's post_media_view (e.g. 17,459, the post shows 17,459 Views), Instagram's total_views (e.g. 15,797, the reel shows 15,797); an ad's are its impressions (e.g. 17,458)the video's public viewCount (e.g. 44,759); a campaign's TrueView viewsthe post's public view_count (e.g. 86,700); an ad's plays, video_play_actions: plays started, at most one per impression, no replays (e.g. 54,784 of those 86,700; its impressions can pass what the post shows)
clickslink clicksclicksclicks to the landing
impressionsimpressionsimpressionsimpressions
engagementspost engagementsengagementsTikTok's engagements
likes, commentsMeta'snullTikTok's (likes, comments)
leadsMeta'snullnull in posts[] rows; its campaign series, campaigns_by_age and projections count the leads berg.ad delivered from its ads (e.g. 2 delivered and 1 failed lead on its ad: leads 2)
stopped for moneyMeta's PENDING_BILLING_INFO on the ad: platform_status budget exceeded, its lifecycle stopped by Meta (budget exceeded by Meta: PENDING_BILLING_INFO) and a health_check autopilot problem while it lasts; the account itself in health_check ad_accountGoogle stops every ad of the account once its account budget in force is served (monthly invoicing; an account with no budget in force, or an unlimited one, never reads this): each live YouTube run Google would deliver reads platform_status budget exceeded, its lifecycle stopped by Google (budget exceeded by Google: account budget spent: 100.00 of 100.00 EUR served), read each tick with the start's spending limit guard, kept from the run's history past its end unless it delivered again, and a health_check autopilot problem while it lasts; the limit in effect is Google's adjusted spending limit, as spend_cap_used_pct reads itTikTok's AD_STATUS_CAMPAIGN_EXCEED (berg.ad's campaigns have no budget of their own) or a …BALANCE… status on the ad: platform_status budget exceeded, its lifecycle stopped by TikTok (budget exceeded by TikTok: AD_STATUS_CAMPAIGN_EXCEED), past its end too, kept from the run's history once TikTok says something else (its campaign switched off, read paused, then done) unless the ad delivered again, and a health_check autopilot problem while it lasts
spend, currencythe ad account'sthe Google Ads account'sthe advertiser's
daysthe ad account's zonethe Google account's zonethe advertiser's zone (health_check accounts, get_autopilot accounts)
a runcampaign, ad set (its money), ad: the post itself (an experiment's: its own ads-only copy; a creator's Facebook post with a button goal (LEADS, TRAFFIC, MESSAGES, FOLLOWERS): Meta's unpublished copy of it, listed under the post as promoted copy)campaign (its money), ad group, video ad: the channel's video, or another channel's video posted once on the channel as a public video, then that video (an experiment's: cancelled, YouTube's API gives no video's file)campaign, ad group (its money), ad: the Instagram or Facebook video posted once as a TikTok post, then that post, pushed with dark_post_status: "OFF" (a normal profile post; dark_post: true sends "ON", ads only; a LEADS run's Smart+ push sends none) (an experiment's: its own dark post)
link tagsa new ad's link carries berg.ad's UTM tags, a utm_* the URL already has kept: utm_source=facebook&utm_medium=paid&utm_campaign=berg.ad-meta_leads&utm_content=222_9 (source the app the ad runs on, facebook or instagram: a post copied to Instagram reads instagram)the same, utm_source=youtube, an Instagram reel posted on the channel toothe same, utm_source=tiktok; a LEADS or FOLLOWERS run has no link
objectiveLEADS, ENGAGEMENT, VIDEO_VIEWS, REACH, MESSAGES, FOLLOWERS, TRAFFIC (link clicks to the post's landing: a traffic campaign whose ad set is optimised for LINK_CLICKS to a website, its ad the post itself with a Learn more button to the landing, the caption's first link, else the business's own first comment's on Instagram, else its channel's default link (channel_landing), else the account's ad_texts landing; a post with none waits, named, e.g. { key: "fb_click", campaign: { platform: "meta", objective: "TRAFFIC", content_source: ["facebook"] } } sends each Facebook post's visitors to https://example.com/boats/aurora?utm_source=facebook&utm_medium=paid&utm_campaign=berg.ad-fb_click&utm_content=222_9)VIDEO_VIEWS (yt_views), TRAFFIC (yt_click); Demand Gen has no views bidding, so both bid by bid_strategy, Maximize Clicks (target_spend) by default: a VIDEO_VIEWS run today bids for clicksVIDEO_VIEWS, REACH (views), TRAFFIC (link clicks), LEADS (an Instant Form lead ad, made as Smart+), FOLLOWERS (new followers of the TikTok account: TikTok's Community interaction, an ad with no link and no button, its results TikTok's follows, e.g. { key: "tt_followers", campaign: { platform: "tiktok", objective: "FOLLOWERS", content_source: ["tiktok"] } } makes each TikTok post's ad grow the account's followers), MESSAGES (TikTok direct messages: a Smart+ lead generation ad with the Send message button, its chat opened with the account's tiktok_welcome_message (set_account_settings), its results TikTok's direct message conversations as dm_leads; while no welcome message is set its posts wait, named, e.g. { key: "tt_messages", campaign: { platform: "tiktok", objective: "MESSAGES", content_source: ["tiktok"] } } with tiktok_welcome_message: { greeting: "Hi! Want a quote for your dates?", questions: [{ question: "Prices", answer: "Tell us your dates and group size." }] } opens a chat with that greeting and the tap Prices)
budget_per_post under the platform's minimumthe ad set's lifetime budget; under Meta's known minimum (the ad account's min_daily_budget, or a refusal's figure, kept) the minimum × its days, and berg.ad's cap at the budget, e.g. 1.00 a day: budget_per_post: 0.5 for 72 h is made at 3.00 and stopped by berg.ad at 0.50 spentthe campaign's total; under Google's floor (5.00 a day of the account's currency) the floor's total, and berg.ad's cap at the budget, e.g. budget_per_post: 3 over two days is made at 10.00 and stopped by berg.ad at 3.00 spent. Read every 5 minutes (the spend pass), it stops once the spend plus its rate since the last read over Google's 30 minutes of late cost and half the next check (32.5 minutes) reaches the stop, e.g. at 0.04 a minute a 3.00 stop is reached at 1.70 + 1.30, and a 2.00 stop read at 0 and at 1.00 five minutes later is stopped at once (1.00 + 0.20 × 32.5 = 7.50); it can pass the stop by what Google spent and had not reported yetthe ad group's total; under TikTok's floor (a total minimum that grows with the schedule, about 20.00 a day of it, e.g. 20 EUR up to about 2 days, 40 EUR at about 3; a 7-day run under 140.00 is made at 140.00) the floor's total, and berg.ad's cap at the budget, e.g. a LEADS run with budget_per_post: 10 is made at 20.00 ("Your budget must be €20.00 or more.") and stopped by berg.ad at 10.00 spent. TikTok's minimum is held by berg.ad's stop, read every 5 minutes (the spend pass). TikTok reports spend late and delivers for a while after an ad group is switched off (e.g. an ad group stopped at a reported 1.51 EUR reported 2.79 EUR afterwards), so berg.ad projects: once the spend read plus its rate since the last read over TikTok's 35 minutes and half the next check (37.5 minutes) reaches the stop, it switches off the ad group and its ad and asks the budget down to TikTok's floor, e.g. a 2.00 stop read at 0 and at 1.00 five minutes later is stopped at once (1.00 + 0.20 × 37.5 = 8.50). A run of under 24 hours is sent the minimum over 24 hours, so TikTok spends it slower, and berg.ad ends it at its own hours, e.g. budget_per_post: 1.5 for 5 hours is sent 20.00 over 24 hours and paused at hour 5. Runs end on their stop on average, some under, some over; what TikTok still delivers after the switch-off can pass the stop
budget_daily under the platform's minimumrefused at write once the minimum is known, naming it, e.g. rules: run meta_rot: budget_daily 0.5 is under Meta's minimum here, 3.00 EUR a day: a rotating run's daily is at least it, e.g. budget_daily: 3; not known yet, the platform's refusal fails the run in its own words and its figure is kept
hours (its end)the ad set's end_timethe campaign's whole days in the Google account's zone (Google takes no other end), and berg.ad pauses it at start + hours, e.g. a 24 h run made 26 Oct 08:30 UTC on a Prague account: Google runs it to 27 Oct 22:59:59 UTC, berg.ad pauses it 27 Oct 08:30 UTC and it reads finishedthe ad group's schedule end; a run sent at TikTok's minimum for under 24 hours gets a 24-hour schedule and berg.ad pauses it at start + hours, e.g. a 5 h run made 13 Nov 10:15 UTC is scheduled to 14 Nov 10:15 UTC, paused 13 Nov 15:15 UTC and reads finished
reviewMeta'sGoogle's approvalTikTok's ad review

Pinterest: a profile connects on the account's Channels page and is a channel of the account, e.g. list_accounts answers channels: [{app: 'pinterest', channel_id: '549755885175'}]; berg.ad reads its Pins each tick, e.g. a Pin's views are its impressions, as Pinterest shows no public view count, with clicks (outbound), pin_clicks, saves, likes (reactions) and comments (a count: Pinterest's API gives no comment text), and can post another channel's video on it as a Pin. A Pinterest campaign is per post, as every platform's per-post run: each public Pin, or another channel's video posted once as a public Pin, gets one Pinterest campaign capped at its budget_per_post over its length_hours, e.g. set_autopilot {rules: {campaigns: [{key: 'pt_views', mode: 'per_post', campaign: {platform: 'pinterest', content_source: ['facebook'], stage: 'awareness', objective: 'VIDEO_VIEWS', audience: {geo: {include: ['market']}}, budget_per_post: 1, length_hours: 24}}]}} puts 1.00 of views on each new Facebook video, posted on the profile as a Pin; a buy on one Pin works as on every platform, e.g. buy {post_id: '1080863880213548', run: 'pt_click', budget: 5, end: '2026-11-20T10:00:00Z', confirm: true}. Its goals: VIDEO_VIEWS and REACH buy impressions (a Pin's views are its impressions), TRAFFIC clicks, FOLLOWERS clicks to the profile (Pinterest has no follow objective, so the ad leads to the profile page, as Instagram's followers buy profile visits), LEADS a lead form's leads, naming the form (campaign: {form: '549770000001'}, from create_lead_form platform pinterest), its leads pushed by Pinterest to berg.ad and forwarded to the lead webhook as every lead, with platform: 'pinterest'. A rotation (mode: 'rotating') naming platform: 'pinterest' is refused by name (a pinterest run is per post), and an experiment's Pinterest campaign is cancelled by name, as it would need an ads-only Pin and Berg posts only public ones.

LinkedIn is coming. LinkedIn is paused for now: no LinkedIn Company Page or profile connects, and no LinkedIn ad starts. The LinkedIn group on the account's Channels page reads LinkedIn is coming where its Connect, Reconnect and + Add brand page were, and a LinkedIn connect link opened anyway, or a LinkedIn sign-in coming back, answers LinkedIn is coming soon: no LinkedIn Page or profile connects and no LinkedIn ad starts for now. A buy on LinkedIn is refused, e.g. buy {post_id: 'urn:li:ugcPost:7001', run: 'li_click', budget: 5, end: '2026-12-05T10:00:00Z', confirm: true} answers li_click: LinkedIn is coming soon: no LinkedIn Page or profile connects and no LinkedIn ad starts for now; nothing is bought on post urn:li:ugcPost:7001; a LinkedIn campaign of the rules waits, named, e.g. post urn:li:ugcPost:7001 waits: LinkedIn is coming soon: …, and set_status ACTIVE on a LinkedIn campaign is refused the same way. A Page connected before stays: its posts, their counts, its comments and followers are still read each tick, + Add post still posts on it, and the leads of its forms still reach your lead_webhook_url. The LinkedIn paragraphs below say how LinkedIn works once it is back.

LinkedIn (run live on one Page so far: the connect and the posts read; LinkedIn refused the read of that Page's comments, and the rest is built from LinkedIn's docs): once LinkedIn is back, a Page admin connects a Company Page on the account's Channels page and it is a channel of the account, e.g. list_accounts answers channels: [{app: 'linkedin', channel_id: '2414183'}]; a sign-in that administers several Pages picks one. LinkedIn ends a sign-in after a year, so the Page then reads Reconnect on its Channels page. berg.ad reads the Page's own public posts of the last 60 days each tick (drafts, posts that are not public, dark posts made for ads, reshares and berg.ad's own copies are left out), e.g. {post_id: 'urn:li:ugcPost:7001', platform: 'linkedin', media: 'video', link: 'https://www.linkedin.com/feed/update/urn:li:ugcPost:7001/'}, with their counts as the Page's admin sees them: a post's views are its impressions, as LinkedIn shows no public view count, with reach (unique impressions), likes, comments (a count; the comments themselves are kept for list_comments, a viewer's for under 48 hours, e.g. list_comments {post_id: 'urn:li:ugcPost:7001'}) and clicks, e.g. {views: 900, reach: 640, likes: 7, comments: 1, clicks: 12}. They are lifetime totals, so each tick's growth is its hour's, and they read in get_post_stats, e.g. get_post_stats {since: '2026-11-20', until: '2026-11-23'}, and list_posts lists them under linkedin. LinkedIn's counts of a post are organic only, so no paid is taken off them, e.g. a post with 900 views and an ad of 400 impressions reads views_organic: 900. A video post's type is read from its caption and what is said in the video, as a Facebook or Instagram video's, e.g. a video whose speaker names a price and says to book reads type: 'convert'; this part is not yet run live. The Page's follower count is kept once a day and counts in the account's followers.

LinkedIn profile (built from LinkedIn's docs, not yet run live): once LinkedIn is back, a person connects their own profile on the account's Channels page and it is a channel of the account beside any Company Page, e.g. list_accounts answers channels: [{app: 'linkedin_profile', channel_id: 'yrZCpj2Z12'}]. + Add post publishes a video on it as the person, with its title, text, thumbnail and first comment, e.g. picked as LinkedIn profile · Bob Smith. LinkedIn lets berg.ad read nothing of a profile, so its posts are not in list_posts (e.g. {platform: 'linkedin_profile'} is refused), have no stats, comments or followers, and no campaign runs on them, e.g. content_source: ['linkedin_profile'] is refused.

LinkedIn ads (run live for one goal so far: a video views campaign was made, delivered, read and paused at berg.ad's stop; the other goals and leads are built from LinkedIn's docs, not yet run live). Ad account: the ad account is Berg's, as on every platform. LinkedIn ties an ad account to one Company Page for good, so berg.ad makes one Berg ad account for each connected Page, by itself, within 15 minutes of the connect, and the Page's row on the account's Channels page then reads e.g. connected Sail Co · ads on Sail Co · berg.ad (EUR); nobody picks one. To sponsor the Page's posts Berg needs a role on the Page, which only the Page's own admin gives, on LinkedIn: until then the row reads waiting for LinkedIn access: a super admin of the Page adds Berg as Sponsored Content poster (the Page's Settings → Manage admins → Paid media admins); Berg picks it up by itself and the Page's campaigns wait, named, e.g. post urn:li:ugcPost:7001 waits: Berg has no role on LinkedIn Page Sail Co yet: a super admin of the Page adds Berg as Sponsored Content poster (the Page's Settings → Manage admins → Paid media admins); Berg picks it up by itself (the account's Channels page). A Page whose ad account is not made yet, or has no payment method yet (Berg's to add), makes nothing and waits the same way, e.g. post urn:li:ugcPost:7001 waits: Berg's ad account for this Page has no payment method yet (the operator adds one in Campaign Manager → Billing). Ads: a per-post LinkedIn campaign works as every platform's: each of the Page's posts gets one LinkedIn campaign with its budget_per_post as the total over its length_hours, e.g. set_autopilot {rules: {campaigns: [{key: 'li_views', mode: 'per_post', campaign: {platform: 'linkedin', content_source: ['linkedin'], stage: 'awareness', objective: 'VIDEO_VIEWS', audience: {geo: {include: ['market']}}, budget_per_post: 3, length_hours: 24}}]}} puts 3.00 of views on each new post of the Page; a buy on one post works as on every platform, e.g. buy {post_id: 'urn:li:ugcPost:7001', run: 'li_click', budget: 5, end: '2026-11-25T10:00:00Z', confirm: true}. Another channel's video runs as a copy, posted once on the Page as the Page's post, e.g. content_source: ['instagram'] on a LinkedIn campaign posts each Instagram video on the Page and promotes that post; a post that is not a video is cancelled by name. Its goals, all billed by impression: VIDEO_VIEWS buys video views (impressions on a post that is no video), REACH reach, TRAFFIC clicks, ENGAGEMENT engagement, FOLLOWERS engagement too, as LinkedIn has no follow objective and an engagement ad carries the Page's Follow button. Link: on LinkedIn the link button belongs to the post, not the ad, and shows on its ads, not on the public post. Every goal but FOLLOWERS and LEADS sets a Learn more button on the post, to its landing by the same rule as every platform (the post's first link, else its channel's default ad link, else ad_texts.landing), e.g. a post with no link on an account whose ad_texts.landing is https://example.com/ gets https://example.com/?utm_source=linkedin&utm_medium=paid&utm_campaign=berg.ad&utm_content=urn%3Ali%3AugcPost%3A7001. One post holds one link for all its campaigns, so utm_campaign reads berg.ad with no campaign key, and the button shows on every ad of that post, a followers or lead campaign's included. With no landing the campaign waits, named, e.g. post urn:li:ugcPost:7001 waits: its LinkedIn ad needs a landing (no https link in the caption or the account's first comment, no default ad link on its channel and no ad_texts landing); a button LinkedIn refuses makes no ad and is named on the campaign's row. Seen live on a video views ad; the other goals not yet. LinkedIn sponsors no reshare, multi-image post or poll, so a campaign on one is cancelled by name, e.g. cancelled: LinkedIn sponsors no multi-image post (post urn:li:share:7002). An experiment's LinkedIn run promotes its own dark post of the post, made by Berg's sign-in for the Page's ad account (set_experiments), e.g. li_click#1 on urn:li:ugcPost:7001 sponsors urn:li:ugcPost:9001. Not built, refused by name: berg.ad's viewer audiences (viewers_90). Rotations: a rotating LinkedIn campaign is one LinkedIn campaign with a budget a day that the Page's posts join and leave, each as one ad in it, e.g. set_autopilot {rules: {campaigns: [{key: 'li_rot', mode: 'rotating', campaign: {platform: 'linkedin', content_source: ['linkedin'], stage: 'awareness', objective: 'VIDEO_VIEWS', audience: {geo: {include: ['market']}}, budget_daily: 10}, rules: {ads_running: [null, 3]}}]}} spends 10.00 a day on the Page's 3 newest videos: a new video takes a place at the next 15-minute tick and the oldest is paused until a place frees. Its goals are VIDEO_VIEWS, REACH and LEADS (with form and cta_type, as a per-post lead campaign), and end ends it on a date, e.g. end: '2026-12-01T00:00:00Z'; with none it runs until stopped. LinkedIn shows one ad format in a campaign, so a rotation takes videos alone or no videos: media: ['video'] (the default) or e.g. media: ['photo', 'link'], and media: ['video', 'photo'] is refused, a LinkedIn rotation is one campaign, which shows one ad format: give it videos alone or none … and a second rotation for the rest. Change its money or end in the rules or with adjust, e.g. adjust {adset_id: '909291833', budget_daily: 8, from_budget: 5, confirm: true} (the id is its adset_id in get_autopilot), and pause or resume it with set_status {id: '909291833', level: 'adset', status: 'PAUSED'}. LinkedIn may bill up to 150% of the daily budget on one day; the wallet holds one day of it while the campaign is on. A daily budget under LinkedIn's minimum, where berg.ad knows it, is refused before it is saved, e.g. run li_rot: budget_daily 6 is under LinkedIn's minimum here, 10.00 EUR a day; where it is not known yet the budget is sent as written and LinkedIn's own refusal, if any, shows on the campaign in get_autopilot (not yet seen live: whether LinkedIn takes a daily budget under its minimum is unknown). LinkedIn does not let an ad in review be paused, so an ad that should leave its place while LinkedIn still reviews it is paused at the first tick after the review; in review it shows to no one. Not built on a LinkedIn rotation, each refused by name: no_reach_hours and the other no-delivery stops, and a leads condition. Leads: a LinkedIn lead campaign is a Page's post with a lead gen form behind its button. Make the form with create_lead_form {platform: 'linkedin', name: 'Get quote', questions: [{type: 'FULL_NAME'}, {type: 'EMAIL'}], thank_you: {title: 'Thanks', body: 'We reply within a day.', button_text: 'Visit', website_url: 'https://acme.example'}}, which answers its id, e.g. {platform: 'linkedin', id: '7001234', ad_account: '512345678', listed: true}, and name it on the campaign: {key: 'li_leads', mode: 'per_post', campaign: {platform: 'linkedin', content_source: ['linkedin'], stage: 'target', objective: 'LEADS', form: '7001234', cta_type: 'GET_QUOTE', audience: {geo: {include: ['market']}}, budget_per_post: 5, length_hours: 72}}; a campaign with no form is cancelled by name (cancelled: a LinkedIn lead run names its lead form). cta_type is the button: GET_QUOTE (LinkedIn's Get Quote), SIGN_UP, LEARN_MORE, APPLY_NOW or SUBSCRIBE. A lead campaign stays on LinkedIn: one that names audience_network is cancelled by name. Each lead is read within 15 minutes, at once where LinkedIn's push tells it, and POSTed to your lead_webhook_url as every platform's (Lead webhook), platform: 'linkedin', page_id the LinkedIn ad account, its answers named by the form's fields, e.g. field_data: [{name: 'first_name', values: ['Ana']}, {name: 'last_name', values: ['Kovac']}, {name: 'email', values: ['ana@example.com']}, {name: 'when', values: ['July']}]; the member's LinkedIn identity is not kept. Reading a lead needs LinkedIn's Lead Sync API on Berg's app and, for Berg, a role on the Page that reads leads, which the Page's admin gives beside the first: until both, a lead campaign makes nothing and waits, named, e.g. post urn:li:ugcPost:7001 waits: Berg cannot read this Page's leads yet: a super admin of the Page adds Berg as Lead gen forms manager too (the same place) (the account's Channels page). A lead its sender deletes on LinkedIn loses its answers on berg.ad when LinkedIn tells it, and removing the Page deletes the answers of its leads; the leads stay counted. Audience: the campaign's countries and places, the ones it keeps out, ages as LinkedIn's four ranges (18–24, 25–34, 35–54, 55+, e.g. age_min: 25, age_max: 54), gender, locales: [1001] (English) and the ad account's own audiences by id, e.g. custom: {include: ['12345']}; widen: true is LinkedIn's audience expansion and placements: ['linkedin', 'audience_network'] adds its Audience Network. A campaign names the places it includes, so none runs worldwide, and one whose audience is under 300 members is cancelled by name: cancelled: LinkedIn runs no campaign on an audience under 300 members, and this campaign reaches fewer. LinkedIn does not allow targeting that discriminates by gender, age or other protected traits. Measures: LinkedIn reports an ad's numbers by UTC day, so each day's numbers are shared evenly over the hours the campaign ran that day, e.g. 30 impressions over 4 hours read 8, 8, 7, 7; a campaign's views are its impressions, with clicks, views_2s, video_p25, video_p50, video_p100, likes, comments, shares and page_likes (its follows). Money: the wallet pays as on every platform, checked before the campaign is switched on; the campaign's total is the run's own budget, under LinkedIn's daily minimum too, and LinkedIn ends the campaign at it, e.g. buy {post_id: 'urn:li:ugcPost:7001', run: 'li_views', budget: 3, end: '2026-11-25T10:00:00Z', confirm: true} where LinkedIn's minimum is 10.00 EUR a day is sent a total of 3.00 and ends at 3.00, berg.ad's own stop at 3.00 staying as a second guard (LinkedIn does not document that it takes a total under its minimum: it was seen live on one video-views campaign of 3.00 EUR). When LinkedIn refuses a total for its budget, the campaign is sent once more at the total the refusal names, else at LinkedIn's daily minimum for its days, and berg.ad stops it at the budget, e.g. a refused 5.00 buy over one day is sent 10.00 and stopped at 5.00, its stop.route reading "floor + berg.ad cap". The refusal can come when the campaign is switched on, not when it is made: a lead campaign made paused with a total of 2.11 EUR was refused at its switch on (/Campaign/totalBudget/amount value 2.11 cannot be lower than 2.95., live 2026-11-25), so its total is raised to the 2.95 named and it is switched on at that, stopped by berg.ad at 2.11. On a campaign sent at LinkedIn's minimum, above your budget, berg.ad's stop comes ahead of the budget, as on TikTok and YouTube (a campaign sent at its own total is ended by LinkedIn at that total, e.g. a 3.00 EUR total ended at 3.00): read every 5 minutes (the spend pass), it stops once the spend plus its rate since the last read over 20 minutes and half the next check (22.5 minutes) reaches the stop, e.g. a 3.20 stop read at 0.40 and at 2.20 six minutes later is stopped at once (2.20 + 0.30 × 22.5 = 8.95), so a campaign LinkedIn spends fast can end under its budget; the 20 minutes come from one live campaign, whose spend went from 2.23 to 8.89 EUR between two reads 7 minutes apart. From the first refusal on minimums names LinkedIn's minimum on that ad account, e.g. { "li_views": "LinkedIn's minimum is 10.00 EUR a day. We stop at your budget, 5.00 EUR, but LinkedIn may spend a little more before it stops." }, and a run under it is still sent as its own total first. A campaign sent at more than its budget starts only when the wallet covers what LinkedIn was sent, e.g. a 2.11 budget raised to 2.95 needs 2.95 available (the money rule); once live the wallet holds its budget.

Meta platform facts

What Meta did on live accounts, with the date it was seen; berg.ad builds by these, and get_playbook gives every model the same list.

Facebook

  • An ad on the post itself (creative object_story_id) shows its counts on the post (observed 2026-10-19).
  • Followers, accepted: an OUTCOME_ENGAGEMENT campaign with a PAGE_LIKES ad set (destination ON_PAGE, promoted_object the page) on the post itself, with or without a LIKE_PAGE button (observed 2026-10-19).
  • Meta reports PAGE_LIKES results as actions:like (indicator observed 2026-10-20).
  • Audiences: the page's fans (page_liked, its current fans only) and page engagers (page_engaged, 365 days) (observed 2026-10-20).

Instagram

  • A lead ad on the reel shares the awareness ad's media (the same effective_instagram_media_id) (observed 2026-10-19).
  • The reel's public view count includes the ad's views; likes and comments on the ad stay on the ad's media (observed 2026-10-19).
  • A lead-form button on the reel needs a link: refused without one (2061015), accepted with http://fb.me/ (observed 2026-10-19).
  • Followers, accepted: VISIT_INSTAGRAM_PROFILE under OUTCOME_TRAFFIC (destination INSTAGRAM_PROFILE, promoted_object the page), on the reel itself with no button; refused: under OUTCOME_ENGAGEMENT (2490408), PROFILE_VISIT (2016153 account not eligible), CTA VIEW_INSTAGRAM_PROFILE without link (2061015) (observed 2026-10-19).
  • Meta reports VISIT_INSTAGRAM_PROFILE results as the insights field instagram_profile_visits, with no follow count per ad; insights name the campaign's objective LINK_CLICKS (observed 2026-10-20).
  • instagram_profile_visits is returned at ad, ad set and campaign level and per publisher_platform (Facebook rows 0); under the hourly breakdown Meta leaves it out without an error (observed 2026-10-20).
  • Audiences: engagers (ig_business_profile_all), profile visitors (ig_business_profile_visit) and post engagers (ig_business_profile_engaged), 365 days each, accepted (observed 2026-10-20).
  • No Instagram followers audience: Meta's engagement audience events list has none, so Instagram followers cannot be excluded (Meta docs).

Both

  • Engagement audiences are filled back at creation: page engagers 365d held 4,300-5,100 people 3 hours after it was made (observed 2026-10-20).
  • A lead-form creative is refused in an OUTCOME_AWARENESS ad set (1892040) (observed 2026-10-19).

Tools

62 tools, generated from the server's own tool list. read-only changes nothing; writes changes berg.ad or Meta. The read tools (get_autopilot, health_check, plan_campaigns, list_posts, review_posts, list_forms, list_audiences, weekly_report, get_post_stats, get_ad_stats, get_experiments) answer from the store when they are asked: ad_stats and ad_totals for delivery, posts for the posts, account_reads for the account, as the 15-minute cron wrote them. A day it has not read is named, never counted as 0, e.g. "paid_days_error": "Meta's day 2026-10-27: not read yet by the cron". So a read right after a write may show the platform's state from before it, e.g. get_ad_stats a second after set_status shows the ad running, until the next tick. A buy, an activation, a raise and list_audiences' YouTube user lists read the platform live. Spend starts or rises only with the owner's yes (confirm: true); berg.ad creates every ad PAUSED and switches it on only once its money checks pass.

get_playbook read-only

The playbook: berg.ad's core (which tool to use for which question, safety and money, reading delivery) around one expert's section. expert defaults to the account's default_expert, else Bill. Call it first in every session, e.g. {expert: 'bill'}.

The playbook: berg.ad's core (which tool to use for which question, safety and money, reading delivery) around one expert's section (strategy, ranges, reasons), with the currency its amounts are in, e.g. Bill's "Its amounts are in major units of USD, e.g. budget_per_post 3 = 3.00 USD a post"; an account in another currency reads them at that day's ECB rate, e.g. 3 USD at 0.924 is 2.77 EUR. expert defaults to the account's default_expert, else Bill. Call it first in every session, before advising or creating anything.

  • expert string · pattern ^[a-z0-9_-]{2,32}$
    an expert_id from list_playbooks

list_playbooks read-only

The experts whose playbook sections berg.ad holds: expert_id, name, focus, version, and this account's default. Use it to pick an expert for get_playbook.

The experts whose playbook sections berg.ad holds: expert_id, name, focus, version, and which one is this account's default (get_playbook reads it when no expert is named). On an account whose partner set allow_playbooks, a signed-in person other than that partner or the admin sees only those and the account's current one.

No parameters.

In the answer

  • experts[].updated_at When the playbook was last saved, e.g. "2026-10-30T12:00:00.000Z".
  • experts[].currency The currency the playbook's amounts are typed in, e.g. "USD" for Bill's budget_per_post 3 (USD); an account in another currency reads them at that day's ECB rate.

save_playbook writes (destructive)

Add or update an expert's section and its defaults; send only what changes, e.g. {expert_id: 'billpro', visibility: 'public'} or {expert_id: 'billpro', currency: 'EUR'}. Defaults that change the rules a running autopilot or experiment runs write nothing without confirm:true: the answer is {needs_confirm: true, rules_changed: true, accounts: ['cb'], posts_count: 12}. Spends nothing.

Add or update an expert's section (markdown: strategy, ranges, the factors that move them, the reasons) and its defaults. Defaults that change the rules a running autopilot or experiment runs write nothing without confirm:true: the answer is {needs_confirm: true, rules_changed: true, accounts: ['acme'], posts_count: 12}. Send only what changes: a new playbook needs name, focus and body, an existing one keeps what is left out, e.g. {expert_id: 'billpro', visibility: 'public'}. currency is the one its amounts are typed in (a new one: this account's), e.g. {expert_id: 'billpro', currency: 'EUR'} makes budget_per_post 3 read 3 EUR; the numbers stay as typed, and an account in another currency reads them at that day's ECB rate, e.g. 3 EUR as 3.25 USD at 1.082. The answer names it, e.g. {expert_id: 'billpro', version: 3, currency: 'EUR'}. defaults.campaign_stages sets the funnel its accounts name campaign stages by (industry or bill, as set_account_settings explains them), an account's own over it, e.g. {expert_id: 'billpro', defaults: {campaign_stages: 'bill'}} makes a ThruPlay retarget in the market grow_retarget on every billpro account that sets none; null gives it back to industry. The core stays berg.ad's and is put around it. Each text save bumps the version. Private to this account: other accounts see only Bill and their own. Saved by a signed-in person, it is that person's instead (shared, owner = you, private or public by visibility; delete_playbook removes it). Its # and ## headings are shown as ###; the core wins over it. bill (Boosterberg's, edited by the operator) and shared ids are refused. defaults: what every account on this playbook runs and is judged by, under its own overrides (the settings layers: system defaults, then the playbook's where it sets them, then the account's); each save is a new defaults version, refused when an account on it would no longer hold. Each campaign of the defaults names its platform and takes one app of its own, e.g. fb_views with content_source ['facebook'] and tt_views with ['tiktok']; one with ['facebook', 'instagram'] or tt_views with ['instagram'] is refused by name. Spends nothing.

  • expert_id string · required · pattern ^[a-z0-9_-]{2,32}$
  • name string · min length 1, max length 80
  • focus string · min length 1, max length 300
    one line: what this expert optimises for
  • body string · min length 1, max length 30000
  • currency "AUD" | "BGN" | "BRL" | "CAD" | "CHF" | "CNY" | "CZK" | "DKK" | "EUR" | "GBP" | "HKD" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JPY" | "KRW" | "MXN" | "MYR" | "NOK" | "NZD" | "PHP" | "PLN" | "RON" | "SEK" | "SGD" | "THB" | "TRY" | "USD" | "ZAR"
    the currency the playbook's amounts are typed in, e.g. 'EUR'; a new one's is this account's; a change relabels the amounts, the numbers as typed, and an account in another currency reads them at that day's ECB rate
  • visibility "private" | "public"
    a signed-in person's playbook only: private (new ones) reaches your own accounts, public every account; e.g. 'public'
  • confirm boolean
    the owner's yes to defaults that change the rules a running autopilot or experiment runs; without it such a save writes nothing and answers with the accounts and the posts they reach
  • defaults object
    only what changes, over the playbook's stored defaults (none yet: Bill's): posts and rules key by key (rules.jev_steps too; a rules key null gives it back to the system default), campaigns (every amount in major units of the playbook's currency) and account_step_split whole; the keys as on /admin playbooks and docs.berg.ad, save_playbook. e.g. {rules: {jev_steps: {money_pct: 5}}} lets Jev step money by 5%, every other key as before
  • defaults.posts object of any
  • defaults.campaigns array of any
  • defaults.rules object of any
  • defaults.account_step_split object of any
  • defaults.campaign_stages "industry" | "bill" | null
    the funnel this playbook's accounts name campaign stages by, an account's own campaign_stages over it (set_account_settings explains each), e.g. 'bill'; null: industry

log_advice writes

Record that the owner followed an expert's advice; weekly_report counts these. e.g. {expert: 'bill', advice: 'moved money to the top post'}. Spends nothing.

Record that the owner followed an expert's advice: the expert, the advice in a sentence, and the object it touched (post, ad set, campaign). weekly_report counts these per expert. Spends nothing.

  • expert string · required · pattern ^[a-z0-9_-]{2,32}$
  • advice string · required · min length 1, max length 1000
  • object_id string · max length 100

test_alert_email writes

Post a test alert to Boosterberg's operator Slack and email a test to the account's report_email; answers each channel, e.g. {slack: 'sent', email: 'sent'}. At most one an hour. Spends nothing.

Check both ways berg.ad reaches people: posts a test alert to Boosterberg's operator Slack channel, where every operator alert and the operator's weekly report go (never by email), and emails a test to the account's report_email, where the Monday report, top-up asks and destination-change notices go (subject 'Berg <account>: test email'). Answers each channel on its own, 'sent' or why not, e.g. {slack: 'sent', email: 'sent'}; with no report_email {slack: 'sent', email: 'no address: the account has no report_email (set_account_settings)'}; an email the provider refuses gives its words, e.g. email: 'error: SendGrid 403: …'; without SLACK_BOT_TOKEN and SLACK_CHANNEL slack: 'not configured: …'. report_email set to Boosterberg's operator address answers email: "not sent: report_email is the operator's address (ALERT_TO), which gets Slack only". At most one an hour: the hour is kept when either channel sent or timed out (it may have gone), and freed otherwise; when neither sent, the answer is an error naming both. Spends nothing.

No parameters.

test_lead_email writes

Email a sample lead, marked 'Test lead', to the account's lead_email in the real lead email's format; answers {email: 'sent'} or why not, e.g. 'no address: the account has no lead_email (set_account_settings)'. No lead is recorded or sent to the lead webhook. At most one an hour per account. Spends nothing.

Email a sample lead to the account's lead_email, so the business sees what a real lead looks like before one comes in: the same email a real lead sends (the form's answers, when it came in in the account's time zone, the lead center link, how long Berg keeps the answers), its subject 'Test lead for <account>: Ana Horvat' and its first line saying it is a sample, not a real person. The sample answers are Full name: Ana Horvat, Email: ana.horvat@example.com, Phone number: +385 91 234 5678, from an ad on Facebook. Nothing else happens: no lead is recorded, the lead webhook is not called, stats and the wallet are untouched. A partner names its customer's account, e.g. {account: 2} answers {email: 'sent'}; an account key or member sends {}. Refused in plain words: with no lead_email 'no address: the account has no lead_email (set_account_settings)'; lead_email set to Boosterberg's operator address "not sent: lead_email is the operator's address (ALERT_TO), which gets Slack only"; an account that is not yours names it, e.g. 'account 4: not one of the accounts you reach (list_accounts lists them)'; a second test within the hour 'at most once an hour: try again later'; a send that failed 'email: error: SendGrid 403: …' (the hour is freed, so try again). At most one an hour per account: the hour is kept when the email sent or timed out (it may have gone). Spends nothing.

No parameters.

list_forms read-only

The account's Instant Forms per platform, as the cron last listed them: id, name, status, leads, default. Reuse a form; make one only for a new language or new questions. A new form's id works before it is listed.

The account's Instant Forms on each platform: id, platform (meta, tiktok, pinterest or linkedin), name, status, locale and leads so far (Meta's; TikTok gives neither), created, question keys, and which one is the platform's default (default_form_id, tiktok_default_form_id). Reuse a form; one form per platform serves every lead ad (each lead still arrives with its ad). Make a new form only for a new language or new questions. TikTok's are the picked TikTok advertiser's published ones, built in TikTok Ads Manager. Pinterest's are Berg's Pinterest ad account's, listed when create_lead_form makes one, e.g. {id: '549770000001', platform: 'pinterest', name: 'Get quote', questions: ['FULL_NAME', 'EMAIL'], default: false}. LinkedIn's are the forms of the LinkedIn ad account of each connected Page, listed when create_lead_form makes one and by each 15-minute lead read, e.g. {id: '7001234', platform: 'linkedin', name: 'Get quote', status: 'PUBLISHED', created: '2026-11-18T08:00:00.000Z', questions: ['FIRST_NAME', 'LAST_NAME', 'EMAIL', 'when'], default: false}. As the cron last listed them, once a day (read_at per platform): a form made since is not listed yet; create_lead_form's id works at once.

No parameters.

In the answer

  • meta_forms_error Present while the cron has not listed the page's forms yet: "not listed yet by the cron".

set_account_settings writes (destructive)

Set the account's currency, default form, markets, default expert, report email, group_by, campaign_stages, time_zone, thresholds and lead webhook; only what is passed changes, each field's meaning is on its parameter. A default_expert change that alters the rules an enabled autopilot runs writes nothing without confirm:true: ask the owner first. A new lead_webhook_url host returns a new lead_secret once. A currency change converts what the account keeps at today's ECB rate and writes nothing without confirm:true: ask the owner first, then confirm with the preview's rate and wallet_before_amount as expected_rate and expected_wallet_before_amount, e.g. {currency: 'USD', confirm: true, expected_rate: 1.082, expected_wallet_before_amount: 200}; when either is no longer today's it answers the preview again with a reason and changes nothing. e.g. {thresholds: {rejections_30d: 5}}, {time_zone: 'Europe/Zagreb'}, {currency: 'USD'}. Spends nothing.

Set the account's default Instant Form (create_ad uses it when form_id is left out), markets (where the business sells: the whole list of its named markets, each a name of 1 to 30 letters, digits, spaces, - or _, unique ignoring case, holding countries, country groups or places to city level, e.g. [{ name: 'US', countries: ['US'] }, { name: 'Europe', country_groups: ['europe'] }] or [{ name: 'Split', places: [{ label: 'Split, Split-Dalmatia, Croatia', name: 'Split', region: 'Split-Dalmatia', country: 'HR', level: 'city', ids: { meta: '<key>' } }] }]; a city may take radius_km, Meta's 17 to 80 km around it, e.g. radius_km: 25, which TikTok and YouTube, having no radius, send as the city itself; a run whose audience.geo has include: ['market'] runs in all of them, include: ['market:Europe'] in that one (one market per campaign keeps their prices apart); exclude: ['market'] keeps it outside all of them, exclude: ['market:Europe'] outside that one, e.g. { include: ['worldwide'], exclude: ['market:Europe', 'IN'] } runs in the US market and everywhere but Europe and India; a market a campaign names cannot be removed or renamed until that campaign changes; a save that adds, removes or renames a market answers in warnings (one market replaced by one answers none: the runs on it follow it), by name, which campaigns aim at all markets and so now also run in it or no longer do, and which are kept outside all markets and so now also stay out of it or run in it, refusing nothing, e.g. [US, Canada] saved as [US, Europe] answers 'meta_leads, fb_views now also run in Europe and no longer run in Canada; aim one at a market with market:US' and 'meta_views now also stays out of Europe and now runs in Canada too'; viewer runs stay inside them; on TikTok, which excludes no place, it leaves the place's whole country out) default expert (get_playbook's when none is named, and the playbook whose defaults the autopilot runs when that expert has its own, else Bill's; a change that raises what the rules can spend needs no yes: the wallet holds every start), report email (the Monday report's recipient; an account made with create_account or the set-up page starts with its creator's email, e.g. owner@acme.example), group_by (url or hashtag: get_post_stats lists the posts across apps with the same destination URL, the landing rule's link, or the same first hashtag as one item; null: each post its own), campaign_stages (the funnel every campaign's campaign_stage is named by: industry, the default, awareness / engagement / conversion, e.g. a ThruPlay run is awareness, a lead form conversion; bill, social_proof / grow_retarget / ask, e.g. 2-second views outside the market are social_proof, a ThruPlay retarget in it grow_retarget, a lead form ask; null: the playbook's, else industry), time_zone (the account's own zone by its IANA name, e.g. 'Europe/Zagreb'; a new account starts with the browser's zone on the set-up page that made it, a partner's customer's from connect_link too, e.g. a business setting up from Split starts on 'Europe/Zagreb', else none: get_post_stats' timezone, its items, hourly rows and leads_received are that zone's (posts[] daily rows stay each ad account's own days, as get_ad_stats and money do; YouTube's, built from its hours, are this zone's), so an item's 4 Nov is midnight to midnight in Zagreb, a day from the hours read (the stats page's last 7 days) cut from every source's hours, an earlier one each source's stored day (Meta's and TikTok's their ad account's, organic's UTC); the stats page names it once, top left, e.g. '4 Nov → 6 Nov · 3 days (Europe/Zagreb)'; a name Intl does not know, e.g. 'Europe/Atlantis', is refused by name; null, the default: the Meta ad account's zone, e.g. America/Los_Angeles; money keeps each ad account's own day: spend, budgets and the wallet), ad_texts (set by key: landing, the link an ad takes for a post with none of its own, after its channel's default link, on every platform's link ads and the Meta lead form's website button; business_name and logo_url, what a YouTube ad takes beside its video; e.g. { ad_texts: { landing: 'https://acme.example/' } } keeps business_name and logo_url, { ad_texts: { logo_url: null } } clears the logo only, ad_texts: null clears all), channel_landing (one channel's default link, taken by an ad of that channel's post with no link of its own before the account's ad_texts landing, the channel found by its own id among the account's, e.g. { channel_landing: { channel_id: '2222', landing: 'https://acme.example/greece' } }; landing: null clears it; the answer's channel_landings lists them, e.g. [{ app: 'facebook', channel_id: '2222', landing: 'https://acme.example/greece' }]), thresholds (this account's own value for any playbook threshold, on top of its playbook, also over an experiment's playbook, e.g. { rejections_30d: 5 } or { lead_data_days: 7 }; only the keys given change, a key's null goes back to the playbook's, get_autopilot account_thresholds shows them, guards each guard's value and reading) lead_email (where each lead is emailed with its answers, on every platform with leads, beside the webhook when both are set, e.g. { lead_email: 'bookings@acme.example' }: subject 'New lead for Acme: Ana Kovač', the form's questions and answers, when it came in in the account's zone, its post and campaign when known and the platform's lead center link; a send that fails never holds the webhook: it is retried as a webhook's until sent or its attempts run out, each failure named on /admin/errors, the webhook not posted again, e.g. a lead the webhook took while the email provider was down is emailed once on a later 15-minute run; with no email provider and no webhook the lead goes to Boosterberg's operator channel; null stops it) and lead_webhook_url (where each lead is POSTed, signed; without one and without a lead email each lead goes to Boosterberg's operator channel with a link to Meta's Leads Center, and the owner answers it there). Setting the webhook the first time, or to a new host, returns a new lead_secret once, and sends the leads stored without a webhook to it on the next 15-minute run. Setting the lead email sends the leads stored with neither once, each said to be from before. Every change of lead_webhook_url, lead_email or report_email is announced to Boosterberg's operator and to the previous report email. currency is the currency the account reports in and its top-up link opens in: the wallet, every budget and every figure shown or typed, one the ECB rates (e.g. USD, EUR, GBP, CHF, HUF). A change converts every amount the account keeps (the wallet, the top-ups recorded, the automatic top-up's level and amount, the campaigns' budgets and money rules, post overrides and buys) at today's ECB rate, rounded to the cent; what each top-up was paid stays as it was paid, and a top-up paid in any currency is credited at that day's ECB rate. Without confirm: true it changes nothing and answers the change it would make, e.g. {currency: 'USD'} on an account with 200.00 EUR deposited answers {needs_confirm: true, currency: {from: 'EUR', to: 'USD', rate: 1.082, wallet_before: '200.00 EUR', wallet_before_amount: 200, wallet_after: '216.40 USD', converts: {run_budgets: 3, rule_amounts: 4, post_overrides: 1, top_ups_recorded: 1}, top_ups: 'top-ups open in USD; one paid in any currency is credited at that day’s rate'}}; {currency: 'USD', confirm: true, expected_rate: 1.082, expected_wallet_before_amount: 200} makes it at exactly those figures (the preview's rate and wallet_before_amount, sent back), the wallet then reads 216.40 USD; a confirm without them, or once today's rate or the wallet differs from them, changes nothing and answers the preview again with the figures of now and a reason, e.g. {needs_confirm: true, currency: {rate: 1.085, wallet_before_amount: 200, …}, reason: "Nothing changed: today's ECB rate is 1.085, not the 1.082 the owner said yes to. Ask the owner again with these figures."} or, after a top-up landed, reason: "Nothing changed: the wallet now reads 300.00 EUR, not the 200 the owner said yes to (money came in or went out since). Ask the owner again with these figures."; and a later 200.00 EUR top-up credits about 216.40 USD. The automatic top-up is invoiced in the currency the card's Stripe customer was first invoiced in, e.g. 200.00 USD charged as about 184.80 EUR. A code the ECB has no rate for is refused by name, e.g. currency: 'XYZ'. Only what is passed changes. Spends nothing.

  • default_form_id string | null
    the Instant Form create_ad uses when its form_id is left out, e.g. '1234567890'; null clears it
  • tiktok_default_form_id string | null
    the TikTok twin of default_form_id: the Instant Form (its TikTok page_id, from list_forms) every TikTok lead ad uses unless its run names another; a published Instant Form of the picked TikTok advertiser, built in TikTok Ads Manager. e.g. '7600000000000000001'; null clears it
  • tiktok_welcome_message object | null
    the welcome message every TikTok Messages ad (objective MESSAGES) opens its direct message conversation with: greeting (up to 200 characters) and 1 to 3 questions people can tap, each with the answer sent back (question up to 70, answer up to 500), e.g. { greeting: 'Hi! Want a quote for your dates?', questions: [{ question: 'Prices', answer: 'Tell us your dates and group size.' }, { question: 'Availability', answer: 'Which week are you looking at?' }] }. Saved to the picked TikTok advertiser's welcome message library at once (TikTok reviews it and cannot delete one, so a change adds a new one there); its id comes back. While none is set, each TikTok Messages run waits on its posts, named; null clears it
  • markets array of object | null
    where the business sells: the whole list of its markets, each named (1 to 30 letters, digits, spaces, - or _, unique ignoring case) and holding countries, country_groups or places, e.g. [{ name: 'US', countries: ['US'] }, { name: 'Europe', country_groups: ['europe'] }] or [{ name: 'Split', places: [{ label: 'Split, Split-Dalmatia, Croatia', name: 'Split', region: 'Split-Dalmatia', country: 'HR', level: 'city', ids: { meta: '<key>' }, radius_km: 25 }] }] (radius_km: Meta's 17 to 80 km around a city; TikTok and YouTube send the city itself). A campaign's audience.geo names them: include ["market"] is all of them, ["market:Europe"] that one (one market per campaign keeps their prices apart); exclude ["market"] keeps it outside all of them, ["market:Europe"] outside that one, e.g. { include: ['worldwide'], exclude: ['market:Europe', 'IN'] }. A market a campaign names cannot be removed or renamed until that campaign changes. On TikTok, which excludes no place, a place leaves its whole country out; with none, a run aimed at a market or kept outside one waits on each post, named 'no main region set'; null clears them
  • default_expert string | null
    an expert_id from list_playbooks; null goes back to Bill
  • confirm boolean
    the owner's yes to a default_expert that changes the rules a running autopilot runs, or to a currency change; without it such a change writes nothing and answers with what it would do
  • currency "AUD" | "BGN" | "BRL" | "CAD" | "CHF" | "CNY" | "CZK" | "DKK" | "EUR" | "GBP" | "HKD" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JPY" | "KRW" | "MXN" | "MYR" | "NOK" | "NZD" | "PHP" | "PLN" | "RON" | "SEK" | "SGD" | "THB" | "TRY" | "USD" | "ZAR"
    the currency the account reports in: the wallet, every budget and figure shown or typed, and the one its top-up link opens in; one the ECB rates (AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, USD, ZAR). A change converts every amount the account keeps (the wallet, the top-ups recorded, the automatic top-up's level and amount, the campaigns' budgets and money rules, post overrides and buys) at today's ECB rate, rounded to the cent; what each top-up was paid stays as paid, and the ad accounts' own money is converted as it is read, as before. A top-up paid in any currency is credited at that day's ECB rate. Without confirm: true it changes nothing and answers the rate, the wallet before and after and how many amounts it converts. e.g. {currency: 'USD'} on an account with 200.00 EUR deposited answers rate 1.082, wallet_before '200.00 EUR', wallet_before_amount 200, wallet_after '216.40 USD'; then {currency: 'USD', confirm: true, expected_rate: 1.082, expected_wallet_before_amount: 200} makes the change, and a later 200.00 EUR top-up credits about 216.40 USD; a confirm whose rate or wallet is no longer today's answers the preview again, needs_confirm with the figures of now and a reason, e.g. "Nothing changed: today's ECB rate is 1.085, not the 1.082 the owner said yes to. Ask the owner again with these figures."
  • expected_rate number
    with currency and confirm: true, the preview's currency.rate the owner said yes to, e.g. 1.082; a confirm without it, or at another rate than today's, changes nothing and answers the preview again with today's figures and its reason
  • expected_wallet_before_amount number | null
    with currency and confirm: true, the preview's currency.wallet_before_amount the owner said yes to, e.g. 200 (null: no money yet); a confirm without it, or with the wallet moved since, changes nothing and answers the preview again with its figures of now and its reason
  • report_email string | null
    where the Monday report is emailed (Boosterberg's operator gets it in Slack); null clears it
  • lead_email string | null
    where each lead is emailed with its answers, on every platform berg.ad reads leads from (Meta, TikTok, Pinterest, LinkedIn): the form's questions and answers, when it came in, its post and campaign when known and a link to the platform's lead center, e.g. 'bookings@acme.example'; sent beside lead_webhook_url when both are set; with a lead email and no webhook a lead is not posted to Boosterberg's operator. A change is announced to Boosterberg's operator and the report email; the leads stored and never delivered (no webhook, no lead email) are emailed once on the next 15-minute run, each said to be from before. null stops it
  • lead_webhook_url string | null
    the business's own https endpoint, where each lead is POSTed, signed, e.g. 'https://example.com/leads'; a change sends the leads stored without a webhook to the new URL on the next 15-minute run and is announced to Boosterberg's operator; null stops sending (leads then go to the operator with a Leads Center link)
  • privacy_url string | null
    the business's privacy policy, needed before a lead ad starts: with none, no lead ad starts and each such post says so; https is added to a bare domain and http:// is saved as https://, e.g. 'acme.example/privacy'; null clears it
  • group_by "url" | "hashtag" | null
    get_post_stats lists the posts of each app with the same destination URL (url: the landing rule's link, the text's first else the business's own first comment's, short links followed, compared by the url key; a post with none is its own item) or first hashtag (hashtag) as one item; null (the default): each post is its own item
  • campaign_stages "industry" | "bill" | null
    the funnel each campaign's campaign_stage is named by, in get_post_stats, get_ad_stats, review_posts, weekly_report, the get_autopilot preview and the stats page, derived from its goal, its market and where its traffic goes. industry: every views and reach campaign is awareness wherever it runs, likes, comments, follows and visits that stay on the platform are engagement, leads, messages and visits to your site are conversion (e.g. a ThruPlay run in the market is awareness, a lead form conversion); bill: leads, messages and visits to your site are ask, anything else outside the market is social_proof and inside it grow_retarget (e.g. 2-second views outside the market are social_proof, a ThruPlay retarget in it grow_retarget). null (the default): the playbook's, else industry
  • time_zone string | null
    the account's own time zone, by its IANA name, e.g. 'Europe/Zagreb': get_post_stats' timezone and the days and hours of its items, hourly rows and leads_received (every day and hour of the stats page too, named once, top left: '4 Nov → 6 Nov · 3 days (Europe/Zagreb)'); a new account starts with the browser's zone on the set-up page that made it (a partner's customer's from connect_link too), e.g. 'Europe/Zagreb' for a business setting up in Split; null (none of those): the Meta ad account's zone. posts[] daily rows, get_ad_stats, weekly_report and money (spend, budgets, the wallet) keep each ad account's own day; YouTube's posts[] rows, built from its hours, are this zone's
  • youtube_channel null
    null disconnects the YouTube channel, as Disconnect on the account's Channels page does: the owner's kept Google sign-in goes, so copies posted onto the channel and its daily subscribers stop; its campaigns, stored videos, stats and copies stay and its ads keep running (pause or stop them with set_autopilot); connecting the same channel again resumes it as it was, e.g. a business that left; a channel is set only by connecting it on the account's home
  • ad_texts object | null
    the account's texts that no post carries, set by key: only the keys given change, a key's null clears that key, ad_texts: null clears them all. landing: the link an ad takes for a post with none of its own (its caption's first link, else the business's own first comment's), after the default link of the post's channel (channel_landing), on every platform's link ads (Meta's traffic ads, TikTok's, YouTube's, LinkedIn's) and the website button of the Meta lead form berg.ad makes; business_name and logo_url (a square PNG, JPEG or GIF): what a YouTube ad takes beside its video's headline and description, the business name also a TikTok ad's text when its caption has none. e.g. { landing: 'https://acme.example/' } sets the landing and keeps business_name and logo_url; { logo_url: null } clears the logo only
  • channel_landing object
    one channel's default link: the link an ad of that channel's post takes when the post has none of its own, before the account's ad_texts landing, on every platform's link ads; channel_id is the channel's own id (a Facebook Page's, an Instagram account's, a YouTube channel's, a TikTok account's, a LinkedIn Page's), found among the account's channels, e.g. { channel_id: '2222', landing: 'https://acme.example/greece' } sends the clicks of that Page's posts with no link to /greece; landing: null clears it, so the account's applies. The answer's channel_landings lists every channel's default link
  • channel_landing.channel_id string · required · min length 1
  • channel_landing.landing string | null · required
  • thresholds object of any | null
    this account's own value for any playbook threshold (docs.berg.ad, Playbook thresholds, lists them), on top of its playbook: only the keys given change, jev_steps key by key, a key's null goes back to the playbook's, thresholds: null clears them all. e.g. { average_posts: 10 } judges a post against the account's last 10 posts, not the playbook's 25; { spend_cap_used_pct: 95, jev_steps: { money_pct: 5 } } holds at 95% and moves a budget of 5.00 to 5.25 or 4.75

set_topup writes

The automatic top-up, major units of the account currency: when the wallet's money free for new ads (credit − used − locked − pulls, health_check's available; money locked on running ads is not free) falls under below, e.g. credit 300 with 280 locked is 20 free, under below 50, Stripe charges amount (plus tax) to the card of the last top-up. Send only what changes: one left out keeps its stored value, and the pair must end up both set or both null; null for both turns it off. e.g. {below: 50, amount: 200}, then {amount: 300} keeps below 50

The pages' Auto box beside Top up (Billing, the Top up page) offers 100, 200, 500 and 1000 in the account's currency, at the level already set or 20 when none was, and turns it on through this tool, e.g. {below: 20, amount: 200}: when the money free for new ads drops under 20.00 EUR, Stripe charges 200.00 EUR plus tax to the card of the last top-up. Unticked, it asks first, then sends {below: null, amount: null}. With no card saved yet it says so and offers Top up first: a top-up saves its card.

  • below number | null
    major units of the account's currency, the client's money, e.g. 50 = 50.00: the money free for new ads it tops up under; null: off
  • amount number | null
    major units of the account's currency, the client's money, e.g. 50 = 50.00: what each top-up adds; null: off

In the answer

  • topup_amount The automatic top-up's amount, major units of the account currency; null: off, e.g. 100.

get_summary read-only

The account's Summary page as data, over its last `days` days (1, 7, 14, 30 or 60, the page's spans), every amount the client's money with fees: account (its id), currency, available (the header's Available: deposited minus spent, e.g. 60), planned_spend_daily (the campaigns as planned, a day: each per-post campaign's budget_per_post × one post a day on each connected channel it runs on, plus each daily campaign's budget_daily, e.g. 3 a post and 10 a day on Facebook and Instagram read 26; null when none), available_runway_hours (how long available lasts at planned_spend_daily: available ÷ planned_spend_daily × 24, rounded down to a whole hour, e.g. 10 at 26 a day reads 9; null with the autopilot off or nothing planned), range {since, until, time_zone}, e.g. {since: '2026-11-20', until: '2026-11-26', time_zone: 'Europe/Zagreb'}, totals {views, likes, comments, clicks, followers, leads, spent} as the page's tiles read them, e.g. {views: 5200, likes: 177, comments: 12, clicks: 40, followers: 3, leads: 2, spent: 18.5}, days [{day, views, likes, comments, clicks, leads}] one per day, leads that day's delivered leads as totals.leads counts them (0 when none), e.g. {day: '2026-11-26', views: 900, likes: 9, comments: 3, clicks: null, leads: 1}; topup {url: the Stripe top-up page (get_topup_link), auto: {below, amount} the automatic top-up (set_topup), e.g. {below: 20, amount: 100}, null when off, amount_min: the least a top-up may be now, the first top-up's before any money is in (100, or 2 days of the campaigns as planned when more, e.g. 104 at 52.00 a day), null after it (any amount above 0), amount_max: the most, null (no cap); e.g. {url: 'https://buy.stripe.com/…', auto: null, amount_min: 100, amount_max: null}}, settings {landing (ad_texts.landing), lead_email, report_email}, e.g. {landing: 'https://sail.example', lead_email: 'bookings@sail.example', report_email: 'boss@sail.example'}, channels [{id, platform, name, url}] each connected channel with its public page (url null until Berg's read kept its handle), e.g. {id: '222', platform: 'facebook', name: 'Sail Split', url: 'https://www.facebook.com/222'}; setup {channels: connected channels, paid: a top-up has landed, done: no set-up page is left}, e.g. {channels: 2, paid: true, done: true}; budgets {per_post, daily} the amounts a partner last sent (connect_link or set_autopilot budgets), each null when none was sent or no campaign still takes its share of it, budgets null when none were ever sent, e.g. {per_post: 3, daily: 20}; post_tag the one tag a post must hold to be advertised (set_autopilot post_tag), null: every post, e.g. '#gulet'; post_tag_posts {days, matching, total} the account's posts of the last 30 days and how many hold the tag, as set_autopilot's post_tag preview counts them, null with no post_tag, e.g. {days: 30, matching: 4, total: 15} (docs.berg.ad get_summary). A count a read failed to give is null, never 0 (followers null with none kept); a day's count nothing holds is null; with the stats unreadable range is null and every total null. For a partner's customer whose account is not made yet (account {ref}), it answers {account: null, channels: [], setup: {channels: 0, paid: false, done: false}}. e.g. {days: 7}

planned_spend_daily: what the account's campaigns are planned to spend a day, in the client's money with the fee, as available: each per-post campaign's budget_per_post × one post a day on each connected channel it runs on, plus each daily (rotating) campaign's budget_daily; a campaign of no connected channel counts nothing; null when none counts. E.g. fb_views and ig_views at 3 per post with fb_leads and ig_leads at 10 a day read 26 (3 + 3 + 10 + 10). available_runway_hours: how long available lasts at that pace, available ÷ planned_spend_daily × 24, rounded down to a whole hour so it never reads longer than the money lasts, e.g. available 10 at 26 a day is 9.2 hours and reads 9, 60 reads 55; null with the autopilot off or planned_spend_daily null; a wallet overdrawn reads 0. budgets: the two amounts a partner last sent for this account (connect_link or set_autopilot budgets), in the client's money, major units of the account's currency, as every other amount here, e.g. {per_post: 3, daily: 20}. Each reads the amount sent while at least one campaign still takes its share of it (its budget_per_post_pct or budget_daily_pct of it, at the account's fee, is its own budget, read under any move Jev made to it), and null when none was sent or no campaign does: one with a share whose budget was set directly no longer takes it. E.g. daily 20 sent with fb_leads and ig_leads at budget_daily_pct 50 (10 each) reads daily 20; fb_leads then set to 12 directly still reads 20 (ig_leads takes its share); ig_leads set too reads null. budgets is null on an account no amounts were ever sent for, e.g. one not made by a partner's customer. channels: the account's connected channels, one entry per Facebook Page, Instagram account, TikTok account, YouTube channel, Pinterest profile, LinkedIn Company Page and LinkedIn profile (the set setup.channels counts and list_accounts lists), oldest first, each {id: its id on the platform, platform, name: as Berg keeps it, null when none was kept, url: its public page}, e.g. [{id: '222', platform: 'facebook', name: 'Sail Split', url: 'https://www.facebook.com/222'}, {id: '17841400000000001', platform: 'instagram', name: '@sail.split', url: 'https://www.instagram.com/sail.split'}, {id: 'UCabc', platform: 'youtube', name: 'Sail TV', url: 'https://www.youtube.com/channel/UCabc'}, {id: '-000abc', platform: 'tiktok', name: 'Sail Split', url: 'https://www.tiktok.com/@sail.split'}]. url is made from what Berg already holds, no platform call: Facebook and YouTube from the id, LinkedIn's Company Page from its id, Instagram from the username its last read kept, TikTok from the handle of a video's link its last read kept, Pinterest from its @name; it is null until that read is kept (Instagram, TikTok) and always for a LinkedIn profile, whose address LinkedIn does not give. A partner's customer adds or disconnects channels on the account's Channels page, opened by connect_link {to: 'channels'}. post_tag: the one tag a post must hold to be advertised (set_autopilot post_tag), null when every post is, e.g. '#gulet'. Before the account exists (account {ref}) the answer is {account: null, channels: [], setup: …}, no budgets.

  • days 1 | 7 | 14 | 30 | 60 · required
    the span, as the Summary's buttons: 1, 7, 14, 30 or 60, e.g. 7

In the answer

  • days[].leads That day's leads: the delivered leads that came in on it, counted as totals.leads counts them; 0 when none, e.g. {day: '2026-11-26', views: 900, likes: 9, comments: 3, clicks: null, leads: 1}.
  • post_tag_posts With a post_tag: the account's posts stored of the last days days (total) and how many of them hold the tag (matching), the count set_autopilot's post_tag preview gives as posts_matching and posts_not_matching; null with no post_tag, e.g. {"days": 30, "matching": 4, "total": 15}: 11 of the last 30 days' posts are not advertised.
  • topup.amount_min, topup.amount_max The limits a top-up has now, as get_topup_link answers them: the first top-up's least before any money is in, 100 after it; no cap, null, e.g. {"url": "https://buy.stripe.com/…", "auto": null, "amount_min": 100, "amount_max": null}.

list_invoices read-only

The account's billing history: its Stripe top-ups, newest first, each as its Stripe invoice reads it, in the currency it was paid in, before tax and with it: date, kind ('top-up' or 'automatic top-up'), invoice_number, amount_before_tax, tax, tax_note (Stripe's reason for no tax, 'reverse charge' or 'exempt', else null), total, currency, status ('paid', 'partially refunded' or 'refunded'), pdf_url and hosted_url (Stripe's invoice page); a top-up paid before invoices were made has invoice_number, tax, total and both urls null; berg.ad's fee is never in it; a credit recorded by hand is not listed. Paged: limit (1 to 100, default 6) and offset (default 0); invoices_count is how many there are, next_offset the offset of the next page, null at the end. e.g. {limit: 6} answers {invoices: [{date: '2026-11-28', kind: 'top-up', invoice_number: 'B7F2A1C3-0003', amount_before_tax: 200, tax: 42, tax_note: null, total: 242, currency: 'EUR', status: 'paid', pdf_url: 'https://pay.stripe.com/invoice/acct_1Ab/LiveX12/pdf', hosted_url: 'https://invoice.stripe.com/i/acct_1Ab/LiveX12'}], invoices_count: 9, next_offset: 6}, then {limit: 6, offset: 6} the rest

Every invoice is Stripe's, made at the top-up from the Stripe account the payment lands in, its line "Advertising services – prepaid credit", tax added by Stripe Tax and a VAT ID taken on Stripe's page; berg.ad's fee is on no invoice and in no field here. A Checkout Session's or link's invoice is kept when its payment lands, an automatic top-up's when Stripe says it was paid; one whose pages were never kept is read from Stripe the first time it is listed. A refund taken in Stripe shows on its top-up as status, e.g. 50 back of 200 reads 'partially refunded'; berg.ad makes no credit note. E.g. {limit: 6, offset: 6} after a first page answering next_offset 6 gives the next six, next_offset null at the end.

  • limit integer · ≥ 1, ≤ 100
    how many, newest first, e.g. 6 (the default)
  • offset integer · ≥ 0
    how many newer ones to skip, the next_offset of the page before, e.g. 6; default 0

list_posts read-only

Recent posts of each connected app (Facebook, Instagram, YouTube, TikTok, Pinterest, LinkedIn) with basic metrics, as the cron last read them, each app's a table ({columns, rows}: the keys once, then one array per post), plus access and channels (each app connected, or where to connect it: a connect is a sign-in on the account's page, never a tool), e.g. channels: { facebook: 'connected', instagram: 'not connected: connect it on its Channels page, https://mcp.boosterberg.com/admin/consumers/5', linkedin: 'connected' }. Use it to pick the post for an ad or a buy, or explain a PERMISSION_MISSING, NO_ACCOUNT_ACCESS or NO_FUNDING_SOURCE error. e.g. { platform: 'tiktok', limit: 5 }.

Recent posts of each connected app (Facebook, Instagram, YouTube, TikTok, Pinterest, LinkedIn; e.g. { platform: "linkedin" } lists a connected Page's posts alone, post_id its LinkedIn URN, "urn:li:ugcPost:7001"), each app's posts a table under its name ({columns, rows}: the keys once, then one array per post in their order; the app names the platform, so no row repeats it): post_id, posted_at, text, link, media_type, likes, comments, e.g. "facebook": { "columns": ["post_id", "posted_at", "text", "link", "media_type", "is_eligible_for_promotion", "likes", "comments"], "rows": [["222_1", "2026-10-20T09:00:00Z", "Sail Croatia", "https://www.facebook.com/222/posts/1", "video", true, 12, 3]] } (from the posts store and its latest snapshot, as the cron kept them: a count not read yet is null; an app whose posts were never read is null, its error under unread), plus access (permissions, ad account, funding source, page, Instagram) as the cron last read them, each with its read_at (reachable null: not read yet). Use it to pick the post for an ad, to check access before creating anything, and to explain a PERMISSION_MISSING / NO_ACCOUNT_ACCESS / NO_FUNDING_SOURCE error.

  • platform "facebook" | "instagram" | "youtube" | "tiktok" | "pinterest" | "linkedin"
    one app's posts, e.g. 'youtube'; left out: every app the account has
  • limit integer · default 10 · ≥ 1, ≤ 50
    posts per app, not in all: 20 means up to 20 Facebook posts and 20 Instagram media

In the answer

  • facebook.rows[].is_eligible_for_promotion Meta's own answer whether the post can be boosted, as stored, a column of Facebook's and Instagram's tables, read with every list of the posts; null when Meta did not give it, e.g. true.
  • facebook.rows[].width_px A video's width in pixels, read once when berg.ad first keeps the post; null for a post that is not a video or not read yet, e.g. 480.
  • facebook.rows[].cannot_advertise Each app this post's ads cannot run on and why, from Meta's own answer and the video's width against the app's minimum (Instagram 500 px, Facebook 120 px); no campaign takes the post on that app; null when it can run everywhere, e.g. {"instagram": "Video is 480 px wide; Instagram ads need at least 500 px. Post it again at 1080×1920 to boost it."}.

list_comments read-only

A post's public comments as the 15-minute tick kept them, newest first, a table ({columns, rows}): comment_id, parent_id (the comment a reply answers, else null), platform (where it was written: 'youtube', 'facebook', 'instagram', 'linkedin', or 'tiktok' for a TikTok ad's video of the post, e.g. an Instagram reel's; a copy's comments under the post it copies), by ('business': the account's own channel, Page or Instagram account, 'viewer': anyone else, null: not told apart, e.g. a TikTok comment before the account's TikTok user id is read, or a Facebook comment Meta gives without its author), text, created_at. The first read after a platform connects keeps the 30 days before it (TikTok: 28), each read after only what is new, never the whole history. A comment is kept as its text only: the commenter's name or handle, its likes and other reactions and its reply count are not kept. A later reply to an older comment (except on Facebook), an edit and a deletion are not read. The newest 100 by default (limit), more: true when older ones were left out. YouTube: the channel's videos; TikTok: the videos of berg.ad's TikTok ads of the last 30 days; Facebook and Instagram: the posts of the last 30 days or with a berg.ad ad made in them, once Meta's connection holds pages_read_user_content (Facebook) or instagram_manage_comments (Instagram); LinkedIn: the Page's posts of the last 30 days or with a berg.ad ad made in them, comment_id LinkedIn's comment URN, e.g. 'urn:li:comment:(urn:li:activity:9001,1)', and a viewer's LinkedIn comment is kept under 48 hours, the longest LinkedIn allows, then deleted, e.g. one written Monday 10:00 is gone by Wednesday 10:00, while the Page's own stay. e.g. {post_id: 'lS615axIbNQ', since: '2026-11-13T10:00:00Z'}.

A post's public comments as berg.ad's 15-minute tick kept them, newest first, a table ({columns, rows}: the keys once, then one array per comment), e.g. {"columns": ["comment_id", "parent_id", "platform", "by", "text", "created_at"], "rows": [["Ugx2_r1", "Ugx2", "youtube", "business", "DM us for July", "2026-11-13T10:07:00Z"], ["Ugx2", null, "youtube", "viewer", "price for July?", "2026-11-13T10:05:00Z"]]}: a viewer asked and the business answered. platform is where it was written: 'youtube' on the channel's video, 'tiktok' on the TikTok video of berg.ad's TikTok ad of the post, e.g. an Instagram reel's TikTok comments under that reel's post_id, 'facebook' or 'instagram' on the Page's or Instagram account's post, or on its copy there under the post it copies, e.g. a YouTube video's Instagram copy's comments under that video's post_id, 'linkedin' on the LinkedIn Page's post or its copy there, e.g. ["urn:li:comment:(urn:li:activity:9001,4)", "urn:li:comment:(urn:li:activity:9001,1)", "linkedin", "business", "DM us for July", "2026-11-23T09:00:00Z"]: the Page's reply to comment 1, each id LinkedIn's comment URN. by is 'business' for the account's own channel, Page or Instagram account and 'viewer' for anyone else, null while berg.ad cannot tell them apart (a TikTok comment before the account's TikTok user id is read from its public profile, a Facebook comment Meta gives without its author); no commenter's name or profile, and no comment's likes, other reactions or reply count, is kept. parent_id names the comment a reply answers. The first tick after a platform is connected keeps its comments of the 30 days before (TikTok: 28, the most its 30-day date span allows), e.g. a YouTube channel connected on 13 Nov holds those from 14 Oct on; each tick after reads only the delta, never the whole history (on TikTok, the videos of berg.ad's TikTok ad groups made in the last 30 days, paused ones too; on Facebook and Instagram, the posts posted in the last 30 days or with a berg.ad ad made in them, e.g. a reel of 2 Oct boosted on 10 Nov); each tick reads the newest down to what it already holds (one page of 100 on a quiet channel). A reply added later to an older comment (on Facebook it is read), an edit and a deletion are not read, so the list can hold a comment the platform no longer shows. since (ISO) answers only those written at or after it, e.g. {post_id: 'lS615axIbNQ', since: '2026-11-13T10:00:00Z'} for what came in since the last call. limit (1 to 1000, default 100) answers the newest that many and adds more: true when older ones were left out, e.g. {post_id: 'lS615axIbNQ', limit: 20}. A post with none kept answers an empty table. Facebook's are read once berg.ad's Meta connection holds pages_read_user_content and Instagram's once it holds instagram_manage_comments; until then that app's posts answer an empty table. LinkedIn's (built from LinkedIn's docs, not yet run live) are read with the Page's sign-in from the Page's posts posted in the last 30 days or with a berg.ad ad made in them. LinkedIn allows a viewer's comment stored 48 hours, so a viewer's LinkedIn comment is kept only while it is under 48 hours old and then deleted, e.g. one written on 23 Nov at 10:00 is listed until 25 Nov, 9:30 to 9:45, and a LinkedIn Page connected on 23 Nov holds its own comments from 24 Oct on but viewers' only from 21 Nov, 12:30; the Page's own stay. Spends nothing.

  • post_id string · required · min length 1
    the post's id as list_posts names it, e.g. 'lS615axIbNQ' (a YouTube video)
  • since string
    only comments written at or after this time (ISO), e.g. '2026-11-13T10:00:00Z', to read what is new since the last call; left out: every kept comment
  • limit integer · default 100 · ≥ 1, ≤ 1000
    the newest this many; the answer says more: true when older ones were left out, e.g. 20

create_lead_form writes

Create an Instant Form on the account's page and return its id for create_ad (objective LEADS); with no privacy URL on the account it is refused: set_account_settings privacy_url, e.g. 'acme.example/privacy'. qualifiers: true without questions builds name, email, phone and one question per business-profile qualifier. The answer's manual_steps name what only Ads Manager can do: tell the owner. On Meta the form joins the lead audiences leads_90 and form_dropoffs_90 at once; their refusal reads audiences_refused. platform tiktok makes nothing but those steps. platform pinterest makes the form on Berg's Pinterest ad account (accepting Pinterest's Lead Ad Terms for it), its thank_you.body the completion message, e.g. {platform: 'pinterest', name: 'Get quote', questions: [{type: 'FULL_NAME'}, {type: 'EMAIL'}], thank_you: {title: 'Thanks', body: 'We reply within a day.', button_text: 'Visit', website_url: 'https://acme.example'}} answers {platform: 'pinterest', id: '549770000001', listed: true}; a Pinterest lead campaign names it as campaign.form, e.g. {platform: 'pinterest', objective: 'LEADS', form: '549770000001'}.

Create an Instant Form on the account's page (privacy URL from the account). platform pinterest makes a lead form on Berg's Pinterest ad account instead, ACTIVE, which accepts Pinterest's Lead Ad Terms for it, its thank_you.body the completion message, its questions FULL_NAME, EMAIL, PHONE, CITY and the like or CUSTOM (a text field, or a radio list with options; disqualify refused), e.g. {platform: 'pinterest', name: 'Get quote', questions: [{type: 'FULL_NAME'}, {type: 'EMAIL'}], thank_you: {title: 'Thanks', body: 'We reply within a day.', button_text: 'Visit', website_url: 'https://acme.example'}} answers {platform: 'pinterest', id: '549770000001', listed: true}; the first also subscribes the ad account's leads to berg.ad (webhook_refused says why one was not). A Pinterest lead campaign names it: {key: 'pt_leads', mode: 'per_post', campaign: {platform: 'pinterest', objective: 'LEADS', form: '549770000001', budget_per_post: 5, length_hours: 72}}. platform linkedin makes a lead gen form on the LinkedIn ad account of the account's connected Page (the first, with several), PUBLISHED: its headline is intro.title, else the name, its text intro.body, its thank-you thank_you.body with LinkedIn's own Visit company website button to thank_you.website_url (thank_you.title and button_text have no place on it), its questions LinkedIn's profile fields (FIRST_NAME, LAST_NAME, EMAIL, PHONE, CITY, COUNTRY, JOB_TITLE, COMPANY_NAME and the like; FULL_NAME asks first and last name, as LinkedIn has no full-name field) or CUSTOM (a text field, or a choice of 2 to 15 options; disqualify refused), e.g. {platform: 'linkedin', name: 'Get quote', questions: [{type: 'FULL_NAME'}, {type: 'EMAIL'}, {type: 'CUSTOM', label: 'When?', options: ['June', 'July']}], thank_you: {title: 'Thanks', body: 'We reply within a day.', button_text: 'Visit', website_url: 'https://acme.example'}} answers {platform: 'linkedin', id: '7001234', ad_account: '512345678', listed: true}; the first also asks LinkedIn to push the ad account's leads to berg.ad (webhook_refused says why it was not, e.g. while LinkedIn has not granted Berg's app its Lead Sync API). A LinkedIn lead campaign names it: {key: 'li_leads', mode: 'per_post', campaign: {platform: 'linkedin', content_source: ['linkedin'], objective: 'LEADS', form: '7001234', cta_type: 'GET_QUOTE', budget_per_post: 5, length_hours: 72}}. Returns the form id, read back from Meta; pass it to create_ad (objective LEADS). qualifiers: true without questions builds name, email, phone and one short-answer question per business-profile qualifier. A multiple-choice question can mark disqualify answers; Meta's API can't send those people to another end screen, so the result's manual_steps say how to add it in Ads Manager: tell the owner. Follow-up (conditional) questions are not supported here. platform tiktok makes nothing: TikTok's API cannot make a form, so manual_steps say how to build it in TikTok Ads Manager and set it as tiktok_default_form_id. Leads from the form reach the account's own system (webhook or a 15-minute fetch); no tool returns lead contents. A Meta form made joins the lead audiences at once (leads_90, form_dropoffs_90, over the page's forms listed again); a refusal of them is said in audiences_refused, e.g. "leads_90: …", and the form stays made.

  • platform "meta" | "tiktok" | "pinterest" | "linkedin" · default "meta"
    where the form is made: meta (the default), tiktok, whose form a person builds (manual_steps), pinterest, on Berg's Pinterest ad account, or linkedin, on the account's LinkedIn ad account, e.g. 'linkedin'
  • name string · required · min length 1
  • questions array of object · min items 1
    left out with qualifiers: true, built from the business profile
  • questions[].type string · required
    FULL_NAME, EMAIL, PHONE, CITY, ... or CUSTOM
  • questions[].key string
  • questions[].label string
  • questions[].options array of string
    CUSTOM multiple choice answers
  • questions[].disqualify array of string
    answers from options that mean the lead doesn't qualify
  • qualifiers boolean
    true without questions: name, email, phone, then each get_business_profile qualifier as a short-answer question
  • non_qualifier object
    end screen for people who give a disqualify answer; goes into manual_steps
  • non_qualifier.title string · required
  • non_qualifier.body string · required
  • non_qualifier.button_text string
  • non_qualifier.website_url string
  • intro object
  • intro.title string · required
  • intro.body string · required
  • thank_you object · required
  • thank_you.title string · required
  • thank_you.body string · required
  • thank_you.button_text string · required
  • thank_you.website_url string · required
  • locale string · default "en_US"
  • higher_intent boolean · default false
    Meta "Higher intent" form type (adds a review step)

create_ad writes (destructive)

One ad for an existing FB post or IG media outside the autopilot's rules: campaign + ad set + ad, made by berg.ad and switched on with its own dates. Objective LEADS (form_id, else the default form), MESSAGES, ENGAGEMENT, VIDEO_VIEWS, REACH, FOLLOWERS or TRAFFIC (link clicks to the post's landing). Without confirm:true nothing is written: the answer gives its run_key, budget and window; tell the owner what it spends and, on their yes, call again with the same input and confirm:true. Then it meets the money checks (the money rule, docs.berg.ad). Every rule: docs.berg.ad, create_ad.

One ad for an existing FB post or IG media outside the autopilot's rules: campaign + ad set + ad, made by berg.ad and switched on with its own dates. Objective LEADS (form_id, else the account's default form), MESSAGES (DMs, the post itself only), ENGAGEMENT, VIDEO_VIEWS (ThruPlay or 2s), REACH, FOLLOWERS (grows the post's own app: a FB post as PAGE_LIKES with a Like Page button, an IG reel as VISIT_INSTAGRAM_PROFILE; no other placements, no form), or TRAFFIC (link clicks, LINK_CLICKS, to the post's landing: its caption's first link where it lands, else its channel's default link (channel_landing), else the account's ad_texts landing, through a Learn more button on the post itself, e.g. a post reading "Sail here https://example.com/boats/aurora" sends its clicks to https://example.com/boats/aurora with berg.ad's tags; a post with no landing waits, named). budget: its total in major units of the account's currency (the client's money; sent to Meta converted at the day's rate, e.g. 50 on a EUR account with a USD ad account goes as 58.09 USD at 1.1617); an optional cost_cap (the same money, converted; not REACH) makes Meta hold the average cost per result under it. Optional bid_strategy (Meta's: LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP) with its bid_amount (the same money, converted), e.g. bid_strategy 'LOWEST_COST_WITH_BID_CAP' and bid_amount 0.5; frequency_cap, device_platforms, user_os (Meta's operating systems, e.g. ['iOS']), audience interests and behaviors and positions (facebook, instagram, audience_network) are sent on the ad set as on a run; audience.exclusions and geo.location_types are refused by name (Meta removed detailed targeting exclusions in v22: keep people out with audience.custom.exclude, e.g. { custom: { exclude: ["654321"] } }; berg.ad sends no location types, so Meta applies its own default). Every ad is the post itself, with its own caption. content_source: the app the post lives on (default facebook, e.g. 'instagram' for IG media); placements as a campaign's: 'own_app' (default) or a list of one app's positions, e.g. ['ig_feed', 'ig_reels']; 'automatic' or a list naming fb_ and ig_ positions is refused, each post being advertised on its own app. start and end: its dates, e.g. start '2026-11-03T08:00:00Z', end '2026-11-10T08:00:00Z'. The input is checked when it is given: a refusal says why and nothing is stored. Without confirm:true nothing is written: the answer gives its run_key, budget and window; tell the owner what it spends and, on their yes, call again with the same input and confirm:true. Then berg.ad makes it and switches it on once it meets the money checks (the money rule, docs.berg.ad), waiting for money up to the playbook's money_wait_hours (24 by default, e.g. 72 waits three days); it is an add of the post's overrides, so set_post_overrides keeps it off or changes its budget or end by its run_key. The same input again answers already. special_ad_category marks the campaign with Meta's Special Ad Category on top of the account's own. Awareness runs, naming and the rest: docs.berg.ad, create_ad.

One ad for an existing FB post or IG media outside the autopilot's rules: campaign + ad set + ad, made by berg.ad and switched on with its own dates. Objective LEADS (form_id, else the account's default form), MESSAGES (DMs: Messenger / Instagram Direct conversations, target stage only, the post itself only), ENGAGEMENT, VIDEO_VIEWS (ThruPlay or 2s), REACH, or FOLLOWERS (grows the post's own app, target stage only, the post itself only, no other placements, no form: a FB post as PAGE_LIKES under OUTCOME_ENGAGEMENT with a Like Page button, an IG reel as VISIT_INSTAGRAM_PROFILE under OUTCOME_TRAFFIC with no button). budget: its total in major units of the account's currency, the money the client deposited, as in every tool; berg.ad sends it to Meta in the ad account's currency at the day's rate, e.g. budget: 50 on a EUR account whose Meta ad account is in USD goes to Meta as 58.09 USD at 1.1617, and the same currency goes as given; an optional cost_cap (major units of the account's currency, sent converted the same way, not REACH) makes Meta hold the average cost per result under it, e.g. cost_cap: 0.4 is 0.40 EUR, sent as 0.46 USD. Optional bid_strategy (Meta's: LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP) with its bid_amount (major units of the account's currency, sent converted), e.g. bid_strategy 'LOWEST_COST_WITH_BID_CAP' and bid_amount 0.5; frequency_cap, device_platforms, user_os (Meta's operating systems, e.g. ['iOS']), audience interests and behaviors and positions (facebook, instagram, audience_network) are sent on the ad set as on a run; audience.exclusions and geo.location_types are refused by name (Meta removed detailed targeting exclusions in v22: keep people out with audience.custom.exclude, e.g. { custom: { exclude: ["654321"] } }; berg.ad sends no location types, so Meta applies its own default). Every ad is the post itself (FB post or IG media), with its own caption; no copy of the post is ever made, and berg.ad never edits the post. content_source: the app the post lives on (default facebook, e.g. 'instagram' for IG media); placements as a campaign's: 'own_app' (default) or a list of one app's positions, e.g. ['ig_feed', 'ig_reels']; 'automatic' or a list naming fb_ and ig_ positions is refused, each post being advertised on its own app. The input is checked when it is given: a refusal says why and nothing is stored. Without confirm:true nothing is written: the answer gives its run_key, budget and window; tell the owner what it spends and, on their yes, call again with the same input and confirm:true. Then it is an add of the post's overrides (set_post_overrides keeps it off, or changes its budget or end, by its run_key): berg.ad makes it and switches it on at once, or at a later tick once it meets the money checks (the money rule, docs.berg.ad), waiting for money up to the playbook's money_wait_hours (24 by default, e.g. 72 waits three days); the answer gives its status and, once made, its ids. It starts at its own start, whatever berg.ad awareness runs on its post (it names no run it starts after), e.g. start 2026-10-28T09:00:00Z beside an awareness run ending 12:00 starts 09:00. The same input again answers already. A post with such an ad is boosted by hand: the autopilot's rules make no run on it. Name campaigns so their purpose is clear; get_ad_stats and get_post_stats show the names. special_ad_category marks the campaign with Meta's Special Ad Category on top of the account's own; berg.ad turns widen off under it and sends ages and gender as given, e.g. age_min 25 goes as 25, so a refusal of Meta's comes back as the ad's status.

  • name string · required · min length 1
    the campaign's name in the ad account, e.g. 'Summer sailing courses, leads'
  • objective "LEADS" | "ENGAGEMENT" | "VIDEO_VIEWS" | "REACH" | "MESSAGES" | "FOLLOWERS" | "TRAFFIC" · required
    what the ad is bought for, e.g. 'LEADS' gets form leads, 'MESSAGES' opens conversations; 'FOLLOWERS' grows the post's own app, a FB post as PAGE_LIKES, an IG reel as VISIT_INSTAGRAM_PROFILE; 'TRAFFIC' buys link clicks (LINK_CLICKS) to the post's landing: its caption's first link, else the account's ad_texts landing, e.g. https://example.com/boats/aurora, a Learn more button on the post itself
  • destination "MESSENGER" | "INSTAGRAM_DIRECT" | "MESSAGING_INSTAGRAM_DIRECT_MESSENGER"
    MESSAGES only: where the conversation opens; default MESSENGER for a FB post, INSTAGRAM_DIRECT for an IG post
  • greeting string · min length 1
    MESSAGES only: the welcome message people see when the conversation opens
  • ice_breakers array of string · min items 1
    MESSAGES only, with greeting: questions people can tap to start
  • video_goal "TWO_SECOND" | "THRUPLAY" · default "TWO_SECOND"
    VIDEO_VIEWS only: what Meta delivers for, 2-second views or 15-second ThruPlays, e.g. 'THRUPLAY'
  • form_id string
    defaults to the account's default form for LEADS (list_forms)
  • post_id string · required
    FB post id (pageid_postid) or IG media id
  • audience object · required
    who sees the ad, e.g. { geo: { countries: ['HR'] }, age_min: 30, gender: 'female' }
  • audience.geo object · required
  • audience.geo.countries array of string
  • audience.geo.country_groups array of string
    Meta's country group names
  • audience.geo.places array of object
    a market's places below country (markets[].places), each with its Meta id
  • audience.geo.places[].label string · required · min length 1
  • audience.geo.places[].name string · required · min length 1
  • audience.geo.places[].region string
  • audience.geo.places[].country string · required · min length 2, max length 2
  • audience.geo.places[].level "city" | "region" · required
  • audience.geo.places[].ids object · required
  • audience.geo.places[].ids.meta string
  • audience.geo.places[].ids.tiktok string
  • audience.geo.places[].ids.youtube string
  • audience.geo.places[].ids.linkedin string
  • audience.geo.places[].radius_km integer · ≥ 17, ≤ 80
  • audience.geo.excluded_countries array of string
  • audience.geo.excluded_areas object
    Meta's excluded cities and regions; exclude_market fills them from market.places
  • audience.geo.excluded_areas.cities array of object
  • audience.geo.excluded_areas.cities[].key string · required
  • audience.geo.excluded_areas.regions array of object
  • audience.geo.excluded_areas.regions[].key string · required
  • audience.geo.exclude_market boolean | array of string
    true: the countries of all of the account's markets are excluded too, a list of market names those markets' only, e.g. { country_groups: ['worldwide'], exclude_market: true } runs everywhere but the markets, { country_groups: ['worldwide'], exclude_market: ['Europe'] } everywhere but the Europe market; refused with an in-market country listed
  • audience.locales array of integer
    Meta's numeric locale ids
  • audience.age_min integer
  • audience.age_max integer
  • audience.gender "all" | "female" | "male"
  • audience.interests array of object · min items 1
    Meta interests, any of which a person matches (flexible_spec), e.g. [{ id: '6003139266461', name: 'Sailing' }]
  • audience.interests[].id string · required · min length 1
  • audience.interests[].name string · required · min length 1
  • audience.behaviors array of object · min items 1
    Meta behaviours, in the same flexible_spec entry as interests
  • audience.behaviors[].id string · required · min length 1
  • audience.behaviors[].name string · required · min length 1
  • audience.widen boolean · default false
  • audience.custom object
    custom audience ids, e.g. { include: ['123456'], exclude: ['654321'] }
  • audience.custom.include array of string
  • audience.custom.exclude array of string
  • device_platforms array of "mobile" | "desktop" · min items 1
    Meta's devices, e.g. ['mobile']; default both
  • user_os array of string · min items 1
    Meta's operating systems, e.g. ['iOS'] or ['Android_ver_10.0_and_above']; default all
  • frequency_cap object
    REACH or THRUPLAY only: at most this many impressions a person over days, no more days than the ad set lasts (Meta refuses a longer one), e.g. { impressions: 2, days: 7 }
  • frequency_cap.impressions integer · required · ≥ 1, ≤ 90
  • frequency_cap.days integer · required · ≥ 1, ≤ 90
  • bid_strategy string
    Meta's ad set bid strategy: LOWEST_COST_WITHOUT_CAP (no amount), LOWEST_COST_WITH_BID_CAP (with bid_amount), COST_CAP (with bid_amount); default LOWEST_COST_WITHOUT_CAP
  • cost_cap number
    major units of the account's currency, the client's money, e.g. 50 = 50.00: Meta cost cap, the average cost per result (lead, ThruPlay, 2s view, engagement, conversation) Meta aims to keep under; a Meta ad account in another currency gets it converted at the day's rate, e.g. 50 EUR as 58.09 USD at 1.1617. Not for REACH. A cap too low under-delivers. Omit for no cap (lowest cost).
  • bid_amount number
    major units of the account's currency, the client's money, e.g. 50 = 50.00: the bid that goes with bid_strategy LOWEST_COST_WITH_BID_CAP or COST_CAP; a Meta ad account in another currency gets it converted at the day's rate, e.g. 50 EUR as 58.09 USD at 1.1617
  • cta_type "SIGN_UP" | "LEARN_MORE" | "GET_QUOTE" | "APPLY_NOW" | "SUBSCRIBE" · default "SIGN_UP"
    LEADS only: the ad's button, e.g. 'GET_QUOTE'
  • stage "awareness" | "target" · required
    a label for reports (awareness = social-proof views, target = the market); where the ad runs is its geo, e.g. awareness with geo { country_groups: ['worldwide'], exclude_market: true }
  • purpose string · required · min length 1
    what this campaign is for, in one sentence
  • success_metric string
    the cost or result it is judged by
  • special_ad_category "HOUSING" | "EMPLOYMENT" | "FINANCIAL_PRODUCTS_SERVICES" | "ISSUES_ELECTIONS_POLITICS"
    Meta's Special Ad Category of this ad when it is about housing, employment, financial products and services, or social issues, elections or politics; added to the account's categories, never removes them. Meta then takes only ages 18-65 and all genders, no excluded countries or interests, and berg.ad turns Advantage+ Audience off; other ages or a gender are sent as given (e.g. age_min 25 goes as 25), and a refusal of Meta's comes back; ISSUES_ELECTIONS_POLITICS is refused
  • content_source "facebook" | "instagram" · default "facebook"
    the app post_id lives on, e.g. 'instagram' for IG media
  • placements string | array of string
    as a campaign's: 'own_app' (default: the post's own app) or a list of one app's positions, e.g. ['ig_feed', 'ig_reels']; 'automatic' and a list naming fb_ and ig_ positions are refused, as each post is advertised on its own app
  • budget number · required
    major units of the account's currency, the client's money, e.g. 50 = 50.00: its total; a Meta ad account in another currency gets it converted at the day's rate, e.g. 50 EUR as 58.09 USD at 1.1617
  • start string · required
    when it starts, ISO 8601, e.g. '2026-11-03T08:00:00Z'
  • end string · required
    when it ends, after start, ISO 8601, e.g. '2026-11-10T08:00:00Z'
  • confirm boolean
    true once the owner said yes to its budget

switch_ads writes (destructive)

The account's Ads switch, the one off for all its ads on every platform. Off pauses every campaign berg.ad runs for it that is live (per-post runs, buys, rotations; Meta, TikTok, YouTube, Pinterest and LinkedIn) and starts or raises nothing until it is on; a run whose ad set's end passed on its platform spends no more and is left as it is; on brings back exactly what the switch paused, each through the money checks, and the autopilot carries on. A change needs confirm:true after the owner's yes: the first call answers what it would pause or bring back, e.g. {on: false} answers {needs_confirm: true, pauses: {campaigns: 12, by_platform: {facebook: 5, instagram: 3, tiktok: 3, youtube: 1}}} (by_platform counts by app, a Meta ad set by the one app it runs on; one whose app is not known as 'meta (app unknown)'), then {on: false, confirm: true} sets the switch and answers at once, e.g. {changed: true, on: false, pauses: {campaigns: 12, ...}, next: 'Pausing 12 campaigns in the background; nothing starts or rises from now on. switch_ads {} reads how far it is (live, paused_by_switch), ...'}: nothing starts from that answer on, and the pauses run in the background, one platform write each. {} answers how it stands; for the admin, it and the first call of a change also carry the spend check: each platform account's own spend from 30 days ago through today against what berg.ad counted, e.g. {platform: 'meta', account_id: 'act_1', platform_spend: 120.40, counted: 120.40, difference: 0}. While the admin's switch for every account is off, this account stays off whatever its own switch says.

Off, every campaign berg.ad runs for the account that is live is paused at its money's level (a Meta ad set, a TikTok ad group, a YouTube campaign), per-post runs, buys and rotations of every experiment alike, each marked paused, ads switched off (get_autopilot's reason ads_off; the stats page reads it as paused by the Ads switch); a per-post run whose ad set's own end passed on its platform (Meta's end_time, TikTok's schedule end, kept when berg.ad moves it and by the sync for an Ads Manager edit; Meta still calls its ad active) spends no more and is left as it is, neither counted, paused nor marked, e.g. a lead ad set that ended yesterday; a YouTube run, whose last day berg.ad's time stop holds, and one whose end is not kept are paused. The yes answers at once from what berg.ad stores, with no platform call: the switch is set, so nothing starts or rises from that answer on, and the pauses (or, on, the switch-ons) run in the account's queued pass in the background, e.g. {on: false, confirm: true} answers {changed: true, on: false, pauses: {campaigns: 64, by_platform: {facebook: 40, instagram: 24}} (by app: facebook, instagram, tiktok, youtube, pinterest, linkedin; a Meta ad set whose app is not known counted and named 'meta (app unknown)'), next: 'Pausing 64 campaigns in the background; nothing starts or rises from now on. switch_ads {} reads how far it is (live, paused_by_switch), and the operator is told in Slack of what it changed.'}; {} reads live 0 once every pause landed, and the operator's Slack alert names what was paused or not; a pass reads the switch again before each campaign and stops once it is turned the other way, e.g. on then off a minute later brings nothing more back; a queue that refuses the message answers queue_error and the next 15-minute tick runs the pass. For the admin, the first call of a change (needs_confirm) and {} carry the spend check. One whose pause the platform did not take stays live and is paused again at the next tick, which also pauses anything a step running beside the switch started. While off nothing starts or rises: the autopilot, buys, overrides, set_status ACTIVE and adjust are refused by name (ads switched off) and wait, and the wallet's own switch-back waits too. On, each marked campaign comes back, newest first, through the money checks: one the wallet refuses stays marked and is tried at each tick, one whose post or run a person set to 0 meanwhile stays off (the operator is told once of those still refused, not at each tick), one past its stop_at_spend stays off as its stop, and one whose end passed meanwhile stays paused (a per-post run takes its time stop, hours_stop, so a later end reopens it; a rotation keeps the mark and comes back if its end is moved later). {} counts every campaign the switch paused (paused_by_switch); the on ask and the switch-on count what comes back (resumes), and the pass tells the operator what came back and what is still paused; each that stays off is named with why in stays_off, e.g. stays_off: ['ad set 52628424685245 (meta_views_fb@b875c2f0009f9617, post 66415653928_1599399845319082): stays off, its end 2026-11-07T22:24:38Z passed'], and the others read its stop_at_spend was reached, its post or run is set to 0, or the platform rejected it. Ads off before the switch stay off: a per-post run by its platform status, a rotation by a read of its money object (it keeps no status of its own). The spend check (admin): for each platform account the account's ads run on, the platform's own total of each day from 30 days ago through today (since and until, in the account's zone) against what berg.ad stored for those days, which every wallet on that account and the in-house spend count, e.g. {platform: 'tiktok', account_id: '7678290330684358674', currency: 'EUR', platform_spend: 41.20, counted: 40.95, difference: 0.25, days_apart: [{day: '2026-11-08', platform_spend: 3.10, counted: 2.85}]}; today and yesterday can differ while the platform still reports, older days are held to the cent by the daily settle (/admin/errors spend_gap).

  • on boolean
    false pauses every live campaign of the account; true brings back what the switch paused, e.g. false
  • confirm boolean
    true once the owner said yes to what the first call answered, e.g. true

set_status writes (destructive)

Set ACTIVE / PAUSED / ARCHIVED on a campaign, ad set or ad berg.ad made for this account; any other is refused. On an autopilot run's own object the change is that run's override, and the run leaves Jev's judging. ACTIVE can start spend: it needs confirm:true after the owner said yes, and meets the money checks (the money rule, docs.berg.ad). Pausing needs no confirm. Budget, end or geo: use adjust.

Set ACTIVE / PAUSED / ARCHIVED on a campaign, ad set or ad berg.ad made for this account; any other is refused, and the owner changes it in Ads Manager. On an autopilot run's own object the change is that run's override (set_post_overrides): ACTIVE keeps it on, PAUSED or ARCHIVED keeps it off, berg.ad applies it once, and the run leaves Jev's judging. ACTIVE can start spend: it needs confirm:true after the owner said yes, and meets the money checks (the money rule, docs.berg.ad). Pausing needs no confirm. To change an ad set's budget, end date or geo, use adjust; goal and creative can't be changed by berg.ad: tell the owner what to change in Ads Manager, or pause.

  • id string · required
    the campaign's, ad set's or ad's id, as level says, e.g. '120210000000123'
  • level "campaign" | "adset" | "ad" · required
    what id names, e.g. 'adset'
  • status "ACTIVE" | "PAUSED" | "ARCHIVED" · required
    the status to set, e.g. 'PAUSED'; ACTIVE can start spend
  • confirm boolean
    true once the owner said yes to ACTIVE; a pause or archive needs none

adjust writes (destructive)

Change an ad set berg.ad made for this account (any other is refused: the owner changes it in Ads Manager): budget (the new total), add_budget (the amount to add), end, geo or status. Reads the ad set first and returns old -> new, what it spent, what it can still spend, the added maximum spend, the run rate (live_per_day, this_per_day) and the wallet (credit, used, locked, available_after), learning status and warnings. A change that can raise spend changes nothing without confirm:true, given after the owner said yes to the stated amount, and meets the money checks (the money rule, docs.berg.ad); the confirm call repeats the preview's expected_budget (add_budget) or from_budget (budget). Lowering, pausing and geo apply at once, except a geo change on an ad set whose budget is on its campaign, which needs confirm. e.g. {adset_id: '120…', add_budget: 20, reason: 'cheapest ThruPlays this week'}. Every rule: docs.berg.ad, adjust.

Change an ad set berg.ad made for this account (any other is refused: the owner changes it in Ads Manager). On an autopilot run's own ad set a budget, end or status is that run's override (set_post_overrides): berg.ad applies it once under these same checks and the run leaves Jev's judging; a geo is written directly. Its lifetime budget (budget = the new total, or add_budget = the amount to add), end (later extends, earlier shortens), geo (market rules by stage, as in create_ad) and status ACTIVE / PAUSED. Reads the ad set first and returns old -> new, what it spent, what it can still spend, the added maximum spend, learning status and warnings. What it can still spend follows the ad set's budget: a lifetime ad set gives can_spend (before and after the change) and added_max_spend, e.g. ACTIVE on a paused 10.00 ad set ending 8 Nov answers { can_spend: { before: 10, after: 10 }, added_max_spend: 0, end_time: '2026-11-08T10:00:00Z' }, and one past its end reads can_spend after 0; an ad set with a daily budget gives its daily_budget instead, no can_spend or added_max_spend, e.g. { daily_budget: 5, end_time: null } (no end set: it spends 5.00 a day until stopped). Every answer carries end_time, the ad set's end after the change (null when it has none). The stats page's switch asks the owner only where something can spend: a preview whose can_spend after is 0 is written without a yes. A change that can raise spend (a higher budget, ACTIVE, a new end for an ad set that had ended, and a later end or geo on an ad set whose budget is on its campaign) changes nothing without confirm:true, given after the owner said yes to the stated amount, and meets the money checks (the money rule, docs.berg.ad); a new end on an ad set with a daily budget is refused. The confirm call repeats the preview's expected_budget (add_budget) or from_budget (budget); a retry after success answers 'already at'. Lowering (not below what was spent), pausing, a new end on a running ad set and geo apply at once. A later end on a berg.ad run's ad set is never refused, and moves no other run, e.g. awareness's end moved from 06:00 to 14:00 leaves meta_leads' own start as it is. Writes only the changed fields, reads them back, and logs reason. A geo edit, or a budget change over ~20%, while the ad set is learning can restart learning. On YouTube the answer also says when Google stops it: ends_utc (its last day runs whole), and for a part's total ends too (that last second in the Google account's zone); a Meta ad set ends at its end as written.

  • adset_id string · required
  • end string
    new end, ISO 8601, in the future
  • budget number
    major units of the account's currency, the client's money, e.g. 50 = 50.00: the new lifetime total; a Meta ad account in another currency gets it converted at the day's rate, e.g. 50 EUR as 58.09 USD at 1.1617
  • add_budget number
    major units of the account's currency, the client's money, e.g. 50 = 50.00: added to the current lifetime budget; a Meta ad account in another currency gets it converted at the day's rate, e.g. 50 EUR as 58.09 USD at 1.1617
  • budget_daily number
    major units of the account's currency, the client's money, e.g. 50 = 50.00: the new daily budget, only for an ad set with a daily budget (a rotation's; a YouTube rotation's is its Google Ads campaign, adset_id its campaign id, its daily in its Google Ads account's own currency, as its campaign's, named in the answer; a TikTok rotation's is its ad group, adset_id its campaign or ad group id, its daily in the advertiser's currency, e.g. daily_budget 25 on a 30 EUR/day rotation). On a rotation, a daily_budget or end_time is the run's override (override: who, when, why; set_autopilot's rules are untouched), so the tick keeps it; a later end on a rotation with a lifetime budget brings daily × the added days
  • expected_budget number
    major units, as the preview answered it: with add_budget and confirm: the new total the preview returned; a retry or a budget changed since can't add twice
  • from_budget number · ≥ 0
    major units, as the preview answered it: with budget or budget_daily and confirm: the budget the preview started from
  • geo object
    replaces the geo; the rest of the targeting stays, except that a widen-off ad set's expansion Meta turned on is sent off (widen), e.g. { country_groups: ['europe'] } on an ad set already in europe turns its custom-audience expansion off
  • geo.countries array of string
  • geo.country_groups array of string
    Meta's country group names
  • geo.places array of object
    a market's places below country (markets[].places), each with its Meta id
  • geo.places[].label string · required · min length 1
  • geo.places[].name string · required · min length 1
  • geo.places[].region string
  • geo.places[].country string · required · min length 2, max length 2
  • geo.places[].level "city" | "region" · required
  • geo.places[].ids object · required
  • geo.places[].ids.meta string
  • geo.places[].ids.tiktok string
  • geo.places[].ids.youtube string
  • geo.places[].ids.linkedin string
  • geo.places[].radius_km integer · ≥ 17, ≤ 80
  • geo.excluded_countries array of string
  • geo.excluded_areas object
    Meta's excluded cities and regions; exclude_market fills them from market.places
  • geo.excluded_areas.cities array of object
  • geo.excluded_areas.cities[].key string · required
  • geo.excluded_areas.regions array of object
  • geo.excluded_areas.regions[].key string · required
  • geo.exclude_market boolean | array of string
    true: the countries of all of the account's markets are excluded too, a list of market names those markets' only, e.g. { country_groups: ['worldwide'], exclude_market: true } runs everywhere but the markets, { country_groups: ['worldwide'], exclude_market: ['Europe'] } everywhere but the Europe market; refused with an in-market country listed
  • status "ACTIVE" | "PAUSED"
  • confirm boolean
  • reason string · required · min length 1
    why, in the owner's words when they gave them; kept in the change log

set_post_overrides writes (destructive)

Override the rules for one post or one of its runs (run keys as get_autopilot's preview names them). post.setting: null = the rules decide, 1 = kept on, 0 = kept off. A change that can raise spend writes nothing without confirm:true, given after the owner said yes. e.g. {"post_id":"17900000000000001","post":{"setting":0},"reason":"booked out"}. Every rule: docs.berg.ad, set_post_overrides.

Override the rules for one post or one of its runs (run keys as get_autopilot's preview names them), or set post.setting on every post a scope picks; the hook (POST /hook) is the same call. post.setting: null = the rules decide, 1 = kept on, 0 = kept off, for the post's life on its current and future ads. On a run: budget (the new lifetime total, major units, the money the client deposited), end (ISO 8601), start_now. A change that can raise spend writes nothing without confirm:true, given after the owner said yes to the preview's amounts. Examples: {"post_id":"17890077","post":{"setting":0},"reason":"booked out"} keeps that post off: its made runs pause, its runs not made are held and it leaves every rotation; {"scope":{"url":"https://example.com/boats/gulet-aurora*"},"post":{"setting":0},"reason":"booked out"} answers what that would do to every recent post linking to that boat, any week, and writes it when sent again with confirm:true. Every rule: docs.berg.ad, set_post_overrides.

Override the rules for one post of this account, or one of its runs (run keys as get_autopilot's preview names them). post.setting: null = the rules decide, 1 = kept on, 0 = kept off. A run has no on/off of its own here (runs.<key>.setting is refused): a person pauses a made run with set_status PAUSED on its ad set (recorded as that campaign's own 0: it stays off, in Jev's judging or under its post's 1 or null, and stops only that campaign; a stop made on the platform is recorded the same) and brings it back with set_status ACTIVE or adjust (status ACTIVE, with a budget when Jev dropped it), which clears the 0 and leaves no setting. Under its post's 0 that is refused: run meta_leads: post 222_9 is kept off (post 0 by Jev): a run does not run under its post's 0; set post 1 or null to bring it back; a run switched on in the platform's own tool under its post's 0 is paused again at once, and a run not made yet has no setting. On a run: budget (the new lifetime total, major units), end (ISO 8601; never refused, and it moves no other run, e.g. tt_views: { end: '2026-10-28T14:00:00Z' } leaves tt_click's own start as it is), start_now (no delay before it starts, e.g. meta_leads: { start_now: true } starts at the next tick; no run waits on another run). A post kept off holds its runs not made yet (a 1 or null sends it through them while their windows are ahead) and pauses its made ones; it also leaves every rotation (its ad there paused, its slot freed); a post's setting holds for its life, on its current and future ads; its 1 or null switches back on only the made runs its 0 paused (it can start spend: the preview shows each run's amount as adjust answers it, e.g. { can_spend: { before: 0, after: 10 }, end_time: '2026-11-08T10:00:00Z' } for a lifetime ad set, { daily_budget: 5, end_time: null } for a daily one, confirm:true, money checks), never a run a person paused (its own 0, set_status), one the wallet or the cap paused, or one a rule ended: those need set_status ACTIVE or adjust on the run's ad set; a null clears the post's setting and lifts its 0. get_post_stats items[].parts[].setting shows it, e.g. {"value":0,"by":"Jev","from":"post"} (Jev sets only a 0, only on a post whose setting is null). A run Jev dropped resumes on its same ad with adjust (status ACTIVE and a budget: Jev moved its money; an end when its ad set has ended), e.g. adjust { adset_id: '120211', status: 'ACTIVE', budget: 15, confirm: true }; that end is a setting, never refused, and moves no other run; one paused for the wallet resumes with set_status ACTIVE. A change that can raise spend writes nothing without confirm:true, given after the owner said yes to the previews' amounts, with each preview's from_budget on its run; berg.ad applies the change once, under the money checks (the money rule, docs.berg.ad), and retries a refusal for money for the playbook's money_wait_hours (24 by default). A run or post given as null is cleared, back to the rules; a run already cancelled by a 0 before it was made stays cancelled. An add (create_ad's ad, an operator's buy) takes these overrides by its run key like any run; cleared before it is made, it is never made. A YouTube run (a video's own: an operator's YouTube buy, or a rule's run per video; its post_id is the video) takes the same on its Google Ads campaign, a budget in major units of the run's money (a rule's run per video: the account's currency until it is made, then its Google Ads account's, as its campaign's total; a buy's part: its Google Ads account's): a new budget is its campaign's new total. On a made run berg.ad holds at its budget under a platform's minimum, a budget past that hold is refused, e.g. run tt_views: budget 25 is past the 3 berg.ad stops it at: a stop is never raised by a budget override; a run's budget is its rule's budget_per_post (set_autopilot). A part made before total budgets takes a new budget as its daily amount, what is left over the days left; a new end is its last day. Every change is audited with who and why and shows in the run's lifecycle and events. A rotation's own override (a person's daily or end, made with adjust on its ad set) lives under post_id "" by its run key: only a null clears it there (the rules decide again), e.g. {post_id: "", runs: {fb_views2: null}, reason: "back to the rules"}. Instead of post_id, a scope sets post.setting on every post it picks (the account's posts of the last 60 days and every older post with a berg.ad run still running or paused on it, a run ended by what berg.ad stores left out; post_id and runs are refused beside it): {"url":"https://example.com/boats/gulet-aurora*"} (one boat, every week of it, utm_* ignored), {"url":"https://example.com/boats/*"} (every boat), a URL without * is one exact URL, {"tag":"#gulet"}, {"spend":[50,10000]} (berg.ad's spend on the post, major units) or another metric pair such as {"views":[null,500]}, or {"all":true}; without confirm:true nothing is written and each picked post says what its change does; the hook (POST /hook) is the same call. A written change queues the account's check, which runs within about a minute when no other check holds its ad account, else at the next 15-minute tick (answer: checked.queued_at, e.g. 2026-10-27T10:02:11Z; get_autopilot shows what it made).

  • post_id string
    the post; left out when a scope picks the posts
  • post object | null
  • scope object of any
    instead of post_id: the posts it picks, exactly one key: {"url":"https://example.com/boats/gulet-a*"} (one boat, every week of it) or {"url":"https://example.com/boats/*"} (every boat), without * one exact URL, {"tag":"#gulet"}, a metric pair {"spend":[50,10000]} (major units) or {"views":[null,500]}, or {"all":true}; sets only post.setting
  • runs object of object | null
    per run key: budget, the new lifetime total in major units (a lower value writes at once, a higher one needs confirm); end, the new end, ISO 8601; start_now: true starts a waiting run now. e.g. {"meta_leads":{"budget":12,"end":"2026-11-10T08:00:00Z"}}
  • reason string · required · min length 1
    why the change is made; kept in the audit
  • confirm boolean

buy writes (destructive)

Buy one of the account's per-post runs on a post: all the run's conditions carry over, and the buy sets only its start, end and money, in its own campaign on the run's platform (Meta, YouTube, TikTok, Pinterest or LinkedIn), outside Jev's judging, inside the wallet (checked when it is made). Without confirm:true nothing is written and the answer says what it spends (total, wallet_after, most_that_fits). The same buy_id again adjusts that buy. Every amount is in major units of the account's currency, as in every tool. e.g. {post_id:'1234_5678', run:'meta_engage', end:'2026-11-01T18:00:00Z', budget:50}. Every rule: docs.berg.ad, buy.

Buy one of the account's per-post runs on a post: all the run's conditions carry over (audience, geo, objective, placements), and the buy sets only its start, end and money, in its own campaign on the run's platform (Meta, YouTube, TikTok, Pinterest or LinkedIn), outside Jev's judging (see the tool's description for its money checks). It is made at the first tick its run's own start conditions are met, sent its start ahead (a YouTube buy once its start is due: Google takes a future start only as a whole day), e.g. a buy of meta_leads with views_total [10000, null] waits for 10000 views. fields upserts over the run, as set_autopilot campaigns[] takes them, e.g. { campaign: { audience: { age_min: 30 } } }. No awareness run is added. A post kept off (post 0) is refused: set post 1 or null first. Stored as one add of the post's overrides, run key <run>@<buy_id>, with a copy of the run as bought: the buy follows its run while the run exists and reads its copy once no per-post run of its key is left (removed, renamed or made rotating), e.g. a tt_leads buy keeps running and reporting after tt_leads is removed from the playbook (its end and budget still change; new fields are refused). The same buy_id again adjusts that buy in place: before it is made its add, once made its budget and end, and its fields: an audience field (e.g. age_min) goes to a Meta ad set, a metric stop (e.g. views_total [null, 5000]) is held by the tick, a TikTok or YouTube audience and any other field are refused by name, a spend stop too (a buy's one money value is its budget); its start stays. Under the platform's known minimum the answer's minimum names it (null at or over it), e.g. "Meta's minimum is 3.00 EUR a day. We stop at your budget, 3.00 EUR, but Meta may spend a little more before it stops." Such a buy starts only on a wallet that covers the minimum, what the platform is sent (the money rule), and where the wallet does not, the answer's warnings say so, e.g. "TikTok is sent its minimum, 20.00 EUR, for this run, and the wallet has 10.00 EUR free for new ads: it starts once the wallet covers 20.00 EUR." Without confirm:true nothing is written and the answer says what it spends (total, wallet_after, most_that_fits). Every amount, budget and a money field alike, is in major units of the account's currency, the money the client deposited, as in every tool: budget 50 and fields { campaign: { cost_cap: 0.4 } } are 50.00 and 0.40. New: {post_id:'1234_5678', run:'meta_engage', end:'2026-11-01T18:00:00Z', budget:50, fields:{campaign:{audience:{age_min:30}}}}. Adjust: {post_id:'1234_5678', run:'meta_engage', buy_id:'0123456789abcdef', end:'2026-11-03T18:00:00Z', budget:80, confirm:true}.

A buy of an existing per-post run on a post: its start (default now; a buy given its <code>buy_id</code> keeps its own), end, budget and <code>fields</code> upserted over the run, every amount (budget and a money field such as <code>campaign.cost_cap</code>) in major units of the account's currency, the money the client deposited, as in every tool: <code>budget: 10, fields: { campaign: { cost_cap: 0.4 } }</code> is 10.00 with a cost cap of 0.40. The budget is the buy's one money value: a spend stop in <code>fields</code> is refused by name (<code>spend stop: a per-post run has one money value, budget_per_post, e.g. budget_per_post: 2</code>), and under the platform's known minimum the preview's <code>minimum</code> names it (null at or over it), e.g. <code>Meta's minimum is 3.00 EUR a day. We stop at your budget, 3.00 EUR, but Meta may spend a little more before it stops.</code> Such a buy starts only on a wallet that covers the minimum, what the platform is sent (the money rule): a budget of 5.00 under a minimum of 20.00 needs 20.00 available, and where the wallet has less the preview's <code>warnings</code> say so, e.g. <code>TikTok is sent its minimum, 20.00 EUR, for this run, and the wallet has 10.00 EUR free for new ads: it starts once the wallet covers 20.00 EUR.</code> New: <code>{ post_id: "222_9", run: "meta_leads", end: "2026-10-31T10:00:00Z", budget: 10, confirm: true }</code> answers <code>buy_id</code>, <code>run_key: "meta_leads@&lt;buy id&gt;"</code>, <code>total: 10</code> and <code>wallet_after</code>. Adjust: <code>{ post_id: "222_9", run: "meta_leads", buy_id: "0123456789abcdef", budget: 12, confirm: true }</code> rewrites that buy, or once made changes its budget and end. A made buy's <code>fields</code> reach it too: <code>{ post_id: "222_9", run: "meta_leads", buy_id: "0123456789abcdef", fields: { campaign: { audience: { age_min: 35 } } }, confirm: true }</code> sends the new audience to its Meta ad set (a TikTok or YouTube run keeps its audience: <code>age_min: a TikTok run keeps the audience it was made with; buy again</code>); a metric stop in <code>rules</code> (e.g. <code>views_total: [null, 5000]</code>) is held by the tick; its start stays, and any other field is refused by name: <code>cost_cap: Meta fixes it when the campaign is made; buy again</code>. Without <code>confirm: true</code> it previews and writes nothing.

  • post_id string · required · min length 1
    the post: a Facebook or Instagram post id, or a YouTube video id for a YouTube run
  • run string · required · min length 1
    the run bought, a per-post run key as get_autopilot names it, or Berg's default for a goal and app the playbook runs none of, e.g. 'meta_engage', 'fb_followers'
  • start string
    ISO datetime it starts; left out or in the past: now, or on a buy_id written already its own start once that has passed, so a retry is the same buy
  • end string
    ISO datetime it ends, e.g. 2026-11-01T18:00:00Z; required for a new buy
  • budget number
    major units of the account's currency, the client's money, e.g. 50 = 50.00: its total, the buy's one money value; required for a new buy; any amount: under the platform's known minimum it is sent at the minimum and berg.ad stops it at the budget (the answer's minimum says so), e.g. 1 under Meta's 3.00 a day for 3 days is sent at 9.00 and stopped at 1.00
  • buy_id string
    16 hex characters: an existing buy (from run_key after @) to adjust; left out: a new buy
  • fields object of any
    run fields upserted over the run, as set_autopilot campaigns[] takes them, e.g. { campaign: { audience: { age_min: 30 } } }
  • reason string
    why; kept in the audit
  • confirm boolean
    the owner's yes to the spend

get_ad_stats read-only

Start here for any "how is it going" question and before advising on performance: one row per campaign, ad set or ad on Meta and one per campaign on other platforms, over a date range, from the days the cron stored, with spend, views, cost per result and vs_norm against this account's norm, every platform in one answer; goals (the business's, save_business_profile) and runs (the rows summed per run key: spend, views, leads, cost_per_1k_views, cost_per_lead) above them, e.g. {run_key: 'tt_leads', spend: 50.3, leads: 0, cost_per_lead: null}; delivery, lead_health and outside_changes beside the rows. rows is a table ({columns, rows}: the keys once, then one array per row); purposes says each campaign purpose once with its campaign_ids. flagged lists berg.ad's own ads that can still run and are DISAPPROVED or WITH_ISSUES; each means: stopped: needs a person; do not edit and resubmit. Per-post, daily or hourly detail: get_post_stats. Every field: docs.berg.ad, get_ad_stats.

Start here for any "how is it going" question and before advising on performance. goals: the goals the business set (save_business_profile goals), each 0 not needed, 1 nice to have or 2 must have, e.g. {leads: 2, views: 1, followers: 1} for a business that needs leads with views and follows nice to have, null when none. runs: the rows summed per run key and currency, most spend first, so a campaign's cost per result reads in one line across its ad sets, ads and apps, e.g. {run_key: 'ig_leads', platforms: ['instagram'], campaign_stage: 'conversion', currency: 'USD', spend: 28.45, views: 2357, cost_per_1k_views: 12.07, thruplays: 189, leads: 2, cost_per_lead: 14.23, clicks: 48} beside {run_key: 'tt_leads', platforms: ['tiktok'], currency: 'EUR', spend: 50.3, leads: 0, cost_per_lead: null}: 50.30 EUR for no lead; a row no run made (create_ad, an ad made outside berg.ad) sums under run_key null; each currency is its own line, never converted. Each row names its run_key too. rows is a table ({columns, rows}: the keys once, then one array per row in their order), e.g. {"columns": ["campaign_id", "adset_id", "ad_id", "name", "run_key", "spend", …, "vs_norm", "leads_received", "source_post_id"], "rows": [["5262", "5263", "5264", "Spring reel", "meta_leads", 2.22, …]]}; purposes says each campaign purpose once with its campaign_ids, e.g. {purpose: 'awareness: views outside the market', stage: 'awareness', success_metric: null, campaign_ids: ['5262']}, and a row names the post its campaign was made from (source_post_id). Insights per campaign/adset/ad over a date range, from the days the cron stored (spend, impressions, cpm, views (what the post shows as views: on Meta the impressions, e.g. an awareness ad set's 17,458 impressions are 17,458 views), cost_per_1k_views, ThruPlays, cost per ThruPlay, hook and hold: avg watch seconds and % of 2-second viewers reaching 25/50/75/100%, engagements, cost_per_engagement, leads (form leads + DM conversations started, split as form_leads / dm_leads), cost_per_lead; costs are null when there is nothing to divide by; leads are the platform's count (Meta: form + DM; TikTok: its form leads), which can differ from leads the account received), platform per row (facebook or instagram when its ad sets place on that one app, else null), vs_norm per row: the row's key cost for its ad set's own optimization goal, whatever its campaign stage (2-second views or reach: cost_per_1k_views; ThruPlay or engagement: cost_per_thruplay; leads or DMs: cost_per_lead; followers: cost_per_follower, Page likes on FB, profile visits on IG, never follows; link clicks (Visits): cost_per_click, e.g. 8.00 for 40 link clicks reads 0.2) against the median of this account's ad sets judged on the same key cost over the last 30 days, with n ad sets, events and pct_better (above 0 = cheaper; too_few_events below events_needed, and then only what it has: no value before an event, no median or n without a norm; vs_norm null on a campaign berg.ad did not make or a goal with no norm) plus, per lifetime-budget ad set still running that overlaps the range, delivery: start/end (UTC), hours run and left, share of budget spent vs share of the run gone (pace), learning status (Meta's, else berg.ad's estimate from optimization events in 7 days vs ~50), audience size (Meta's estimate as the cron reads it once a day, audience_read_at; null with no read time: not read yet), a targeting summary, plus access warnings (token expiry, Meta data-access window, missing permissions) and lead_health (leads Meta has per form in the last 2 days vs leads delivered; a stopped or failing lead fetch), and a flag (too_early / on_pace / under_delivering / ahead), and experiment per row: the experiment the campaign belongs to (null: the account's own), and outside_changes: changes people made to the ad account in the date range outside berg.ad (who, what, old and new value), from the change log the cron keeps; a day it has not read fails it, named. A day of the range the cron has not read is meta_ads_error, left out of the sums. Read the playbook's section on reading delivery before acting on a flag. Each row carries currency (its ad account's) and clicks (link clicks). berg.ad's YouTube and TikTok campaigns are rows too (platform youtube or tiktok, one per campaign at any level, named by post and run key, e.g. vid-aaaaaa1 · yt_views; a campaign with nothing in the range is no row): spend in its Google account's or its TikTok advertiser's own currency, impressions, views (YouTube's TrueView views, TikTok's plays (video_play_actions), what its post shows as views), clicks, engagements and their costs; what the platform has none of (thruplays, leads, followers) null; a failed read is youtube_ads_error or tiktok_ads_error. For per-post, daily or hourly detail, use get_post_stats with hourly: true; its rows carry adset_id. flagged lists berg.ad's own campaigns, ad sets and ads that can still run and are DISAPPROVED or WITH_ISSUES, or carry issues_info or ad_review_feedback; each means: stopped: needs a person; do not edit and resubmit. Ones made outside berg.ad are in health_check ad_review. held comes first and only while an account guard holds new starts, e.g. ["held by rejections_30d 3: 3 berg.ad ads rejected or flagged by Meta in 30 days (…); nothing new starts on Meta …"]; held_error names a failed read of it.

  • level "campaign" | "adset" | "ad" · default "ad"
    one row per this, e.g. 'campaign'
  • since string · required · pattern ^\d{4}-\d{2}-\d{2}$
    first day of the range, YYYY-MM-DD in the ad account's time zone, e.g. 2026-10-26
  • until string · required · pattern ^\d{4}-\d{2}-\d{2}$
    last day of the range, itself included, YYYY-MM-DD, e.g. 2026-11-01
  • campaign_ids array of string
    only these campaigns, e.g. ['120210000000123']; none: every campaign
  • statuses boolean
    true adds statuses: every campaign, ad set and ad with its effective_status, ended and foreign ones too, e.g. {level: "ad", id: "6012", name: "Spring reel", effective_status: "ACTIVE"}; Meta keeps an ended ad ACTIVE, so this list says nothing about what runs

In the answer

  • rows[].hold_pct.p25, p50, p75, p100 Share of the row's 2-second video viewers who watched 25, 50, 75 and 100% of the video, in %, one decimal, capped at 100; hold_pct is null without 2-second views, e.g. {"p25": 62.5, "p50": 40.1, "p75": 22, "p100": 11.3}.
  • rows[].vs_norm.norm_error Present when a day of the 30 days the norm is built from is not stored yet; the norm then has no ad sets (n 0), e.g. "Meta's day 2026-10-27: not read yet by the cron".
  • lead_health.last_poll The 15-minute lead fetch's last run, over every account it read (not this account alone), with minutes_ago and its counts; null when it never ran, e.g. {"minutes_ago": 6, "pages": 4, "forms": 9, "leads_seen": 2, "retried": 0, "delivered": 0, "gave_up": 0, "answers_deleted": 0, "errors": 0, "failed_sources": []}.
  • lead_health.last_poll.minutes_ago Minutes since that run; over the playbook's tick_stale_minutes it is a problem, e.g. 6.
  • lead_health.last_poll.pages Lead sources (Facebook pages and TikTok advertisers) the run read, every account's, e.g. 4.
  • lead_health.last_poll.leads_seen Leads the run read from the platforms, every account's, e.g. 2.
  • lead_health.last_poll.answers_deleted Leads whose answers the run deleted after lead_data_days, e.g. 3.
  • lead_health.last_poll.failed_sources Each source the run failed on: platform, source (page or advertiser id), consumer_id (null on a shared source), errors and the first error; this account's own are named in problems, e.g. [{"platform": "meta", "source": "222", "consumer_id": 7, "errors": 1, "error": "(#100) …"}].
  • lead_health.forms[].leads_2d Leads berg.ad stored from the form in the last 2 days, in any delivery state, e.g. 3.
  • lead_health.forms[].unread_minutes Minutes since the lead fetch last read every lead of the form; null never; over tick_stale_minutes it is a problem, e.g. 12.
  • lead_health.forms[].metadata_only Leads of the last 2 days forwarded without their answers, because Meta could not be read (fetch_failed_forwarded): answer them in Meta's Leads Center, e.g. 0.
  • lead_health.forms[].retrying Leads of the last 2 days whose POST failed and waits for its next retry (failed), e.g. 1.
  • lead_health.forms[].unreadable Meta's lifetime lead count for the form less the leads berg.ad stored from it, never below 0: leads berg.ad cannot read (lead access or permissions), e.g. 2; a problem in lead_health unless the form is ARCHIVED (it takes no new lead), e.g. a test form archived with 1 lead is listed with unreadable: 1 and leaves ok true.
  • lead_health.forms_read_at When the cron last listed the page's forms; null not yet; older than 2 days is a problem, e.g. "2026-11-03T04:10:00.000Z".
  • lead_health.given_up This account's leads given up on after lead_forward_attempts_max attempts in the last 7 days; resend them by hand, e.g. 0.
  • lead_health.leads_no_consumer Leads of this account's page (and, for an admin, its TikTok advertiser) in the last 7 days that reached no account, e.g. 0.
  • delivery[].optimization_goal Meta's optimization goal of the ad set, e.g. "LEAD_GENERATION".
  • delivery[].hours_run Hours since the ad set's start, one decimal, e.g. 30.5.
  • delivery[].hours_left Hours until the ad set's end, one decimal, e.g. 41.5.
  • delivery[].time_gone_pct Share of the ad set's window (start to end) that has passed, whole %, 0 to 100, e.g. 42.
  • delivery[].budget_spent_pct Share of the ad set's lifetime budget spent so far, whole %; pace is this ÷ time_gone_pct, e.g. 38 (pace 0.9).
  • delivery[].learning_source Who gave learning: "meta" (Meta's learning stage) or "berg.ad", its own count of events_7d against 50 (likely_learning, likely_exited, unknown while a day is not stored, not_applicable for a goal it does not count), e.g. "berg.ad".
  • delivery[].events_7d The ad set's optimization events over the last 7 days of the account's zone, today included; null when its goal has no count or a day is not stored, e.g. 23.
  • delivery[].audience_estimate Meta's estimated audience size of the ad set, {lower, upper} people, as the cron read it once a day (audience_read_at); null when Meta had none ready or it was not read yet, e.g. {"lower": 120000, "upper": 141000}.
  • delivery[].targeting.excluded_countries Country codes the ad set excludes, e.g. ["IN", "SG"].
  • delivery[].targeting.custom_audiences The custom audiences the ad set targets, by name (by id when Meta gave no name), e.g. ["berg.ad viewers 90d"].
  • access.expires_in_days Whole days until berg.ad's Meta token expires, as the cron checked it once a day; null: it does not expire; under 14 warns, e.g. 52.
  • access.data_access_expires_in_days Whole days until Meta's 90-day data-access window of the token ends; under 14 warns, e.g. 61.
  • access.missing_scopes Required Meta permissions the token lacks (of ads_management, pages_manage_ads, pages_read_engagement, pages_show_list, leads_retrieval, business_management), e.g. ["leads_retrieval"].
  • outside_changes.changes[].via The app the change was made in, as Meta's change log names it; null when it names none, e.g. "Ads Manager".
  • outside_changes.changes[].event_type Meta's own event type of the change (what is its readable form), e.g. "update_ad_set_budget".
  • outside_changes.changes[].object_type, object_id, object_name The changed object's type, id and name as Meta's change log gives them, e.g. "ADSET", "120211", "Spring reel".
  • outside_changes.changes[].old_value, new_value The value before and after, as Meta's change log gives them; null when it gives none, e.g. null.
  • outside_changes.truncated Present when more than 50 changes match: only the newest 50 are listed (count is all of them), e.g. "newest 50 shown".

get_post_stats read-only

The detail view next to get_ad_stats: paid delivery per promoted post over since..until: by default each post per placement with its total, each campaign on a post with one still to end (one stopped past its end has ended) with its status and a line to show a client (lifecycle_ended counts the rest), and organic_by_post; posts, organic_by_post and post_types are tables ({columns, rows}: the keys once, then one array per post; a post's row its ids then its total's measures); detail: true or post_ids adds each post's daily rows and adsets, each campaign's budget, events and projection, and the hourly series. Every amount is in major units of its row's currency; a part not read is null and named, the rest stands. e.g. {since: '2026-10-26', until: '2026-11-01', items: true}. Every field: docs.berg.ad, get_post_stats.

Paid delivery per promoted post over since..until (posts[] by each ad account's own days, YouTube's by the account's zone; items, hourly and leads_received by the account's zone, timezone), the detail view next to get_ad_stats. By default the summary: posts[] each post per placement (platform; a YouTube video is a post too) with its total, a table ({columns, rows}: a post's row its ids then its total's measures, e.g. {"columns": ["platform", "post_id", "source_post_id", "spend", "impressions", "views", "currency"], "rows": [["instagram", "17999", "222_1", 3, 900, 900, "EUR"]]}, abridged; source_post_id null where it is the post_id), and lifecycle each campaign's run_key, status and line, e.g. { run_key: 'meta_leads', status: 'active', line: 'started 2 Nov, 07:23 GMT-8' }, of the posts with a campaign still to end (or none; a campaign stopped past its end_utc has ended), the rest counted by status in lifecycle_ended, e.g. { posts: 198, campaigns: { cancelled: 386, finished: 38, stopped: 3 } }; detail: true adds every post's lifecycle, each post's daily rows and adsets (each ad set, its campaign_stage and purpose: how the post did per audience), each campaign's budget, events, delivery and projection, and the hourly rows; post_ids: ['222_9'] answers those posts with every detail. Every row names its currency and every amount is in major units of it, the money the client deposited. hourly: one series per ad (its ids once; hours UTC), in the full answer by default when since..until is 2 days or less, with hourly: true up to 30 days, none with hourly: false. Every series is columns: slot i is slot_from + i × slot_unit, one array per measure, 0 zero, null not known, each array ending at its last number; measures_unreported names what the platform does not report; currency once per paid series. lifecycle: per organic post, every campaign on it and every run berg.ad plans for it, each with its status (waiting (not delivering yet, made or not; reason says what it waits for), blocked (not made, and not retried: its attempts failed, or the run before it is blocked; reason says why), created (made and switched on, before its start or in review), active (delivering), stopped (paused, or halted by its platform for money, before its end, not by its own rules; by says who, reason why), finished (over: nothing of it can deliver any more, or its own rules ended it; another pause reads stopped), cancelled (will not deliver, now or again; reason says why), n/a (never applied to this post: its window ended before berg.ad first read the post, or its campaign's channel is not connected; holds no ads_running place; reason says which)), reason, line (the campaign in one plain sentence for a client: show it as given), window, budget and projection (the next 24 hours, whole numbers per hour: an estimate, never delivery), and the post's own projection over all its campaigns (read it rather than adding theirs). organic_by_post: the one home of each post's organic counts, a table with post_id first, e.g. {"columns": ["post_id", "platform", "views", "likes", "comments", "clicks", "organic_at"], "rows": [["222_9", "facebook", 60, 2, 1, 110, "2026-11-10T18:00:50Z"]]}; organic is never computed from posts[]. post_types: each of those posts' funnel type from the posts store, a table with post_id first ({type: aware|engage|convert, confidence, classified_at}, or {type: null, note} until it is classified). leads_received (by ad_id): the leads berg.ad delivered from each ad. followers: the account's net change in followers by day over every connected channel, e.g. { slot_from: '2026-11-06', slot_unit: 'day', followers_net: [-1, 5] }, negative for a loss, null where none is kept yet. items: true adds every post published in the range (the account's days) or with a number above 0 in it, whatever day it went up, with its organic and paid series of the range alone (bucket, items, campaigns_by_age). A part that could not be read is null or left out and named (youtube_ads_error, tiktok_ads_error, lifecycle_error, lifetime_paid_error, hourly_error, items_error); the rest of the answer stands. A post whose link the 15-minute tick has not read yet is its own item, named in landing_unread, e.g. landing_unread: ["17890077"], and joins its group once read. Every field and rule in detail: docs.berg.ad, get_post_stats.

The detail view next to get_ad_stats (the overview). By default the answer is the summary: each post's total and, on the posts with a campaign still to end, each lifecycle campaign's run_key, status and line, e.g. { run_key: 'meta_leads', status: 'active', line: 'started 2 Nov, 07:23 GMT-8' }, the rest (a campaign stopped past its end_utc has ended) counted in lifecycle_ended, e.g. { posts: 198, campaigns: { cancelled: 386, finished: 38, stopped: 3 } }; send detail: true for each post's daily rows and adsets, each campaign's budget, events, delivery and projection, every post's lifecycle and the hourly rows, or post_ids: ['222_9'] for those posts with every detail. Use it for: every post with organic or paid in the range, per hour or day (items: true), paid vs organic on a post, how a post did per audience (adsets), and when an ad set delivered (the hours, by default for 2 days or less or with hourly: true; one series per ad, carrying its adset_id). Paid numbers per promoted post. Rows are split by placement (platform): instagram counts on the IG media the ad ran (effective_instagram_media_id — ad-only media unless the ad was made from the IG post), every other placement on the FB post (effective_object_story_id). source_post_id is the organic post the ad was made from (FB post id, or IG media id for ads made from an IG post), null where it is the post_id itself (or not known), e.g. an Instagram placement ["instagram", "17999", "222_1", …] beside the Facebook one ["facebook", "222_1", null, …]. Each post is also split by ad set (adsets, with ad_ids and campaign_stage, matched from the ad set's goal to the account's campaign_stages), i.e. by audience. Dates are in the ad account time zone. Per-ad hourly series (UTC hours, slot_from a UTC instant) come in the full answer by default when since–until is 2 days or less, with hourly: true for up to 30 days, never with hourly: false; Meta cannot split hours by placement, so an hourly series' platform is the one placement its ad ran on in the range, else all. With the hours, each organic post of the answer has an hourly series of its own beside the ads' (placement organic, ad_id its post id, platform its app): its growth per UTC hour from berg.ad's reads, e.g. {"ad_id": "222_9", "platform": "facebook", "placement": "organic", "slot_from": "2026-10-30T10:00:00Z", "slot_unit": "hour", "views": [100, null, 150], "views_organic": [60, null, 90], "likes": [2, null, 3]} (null: an hour with no read; a post's hours before its first read are not known, never made up). Every series in the answer is columns: slot_from, slot_unit, one array per measure, 0 zero, null not known, each array ending at its last number, a measure the platform does not report named in measures_unreported, a paid series' currency once. Max 30 days with hourly. leads here are Meta's count of form leads + DM conversations started (form_leads / dm_leads); the account's received leads are the truth for lead counts. posts are actual delivery; lifecycle projections are estimates (estimate: true), never results. lifecycle: per organic post, each campaign, and each run berg.ad plans but has not made, the autopilot's while it is on and every add (adset_id null; the account's, each running experiment's and a stopped one's still owed on the posts it took, experiment naming it), with run_key, label, status (one word for every run, made or not: waiting (not delivering yet, made or not; reason says what it waits for), blocked (not made, and not retried: its attempts failed, or the run before it is blocked; reason says why), created (made and switched on, before its start or in review), active (delivering), stopped (paused, or halted by its platform for money, before its end, not by its own rules; by says who, reason why), finished (over: nothing of it can deliver any more, or its own rules ended it; another pause reads stopped), cancelled (will not deliver, now or again; reason says why), n/a (never applied to this post: its window ended before berg.ad first read the post, or its campaign's channel is not connected; holds no ads_running place; reason says which); a rejection by Meta stays cancelled after the ad is paused, archived or ended), reason (null when created, active or finished), by (who stopped it), line (the campaign in one plain sentence for a client, built from these fields: what a waiting run waits for, else its start, its real end once over, how far through its time it is (e.g. stopped at 71% of its time), not spending for an active one on a whole budget that has spent nothing since it started (e.g. started 6 Nov, 09:00 GMT+1 · not spending · 1d left · 50% of its time · 0.00 of 5.00 EUR; a daily budget's spent is today's only, so it never reads so), who stopped it and why in plain words, and what it spent; show it as given), setting (the run's override setting, its own else its post's: value 1 kept on or 0 kept off, by, at, reason, from; null when the rules decide), kept_on_by (who keeps a created or active run on), learning_status: the platform's learning word for the ad set (Meta learning_stage_info) or campaign (Google primary_status / bidding_strategy_system_status) this post's ad ran under, written by the tick only while the ad delivers and kept after it stops, never changed by the ad set's later learning: learning, learned, learning limited (Meta's FAIL), null when none was read or the platform reports none; where Meta gives no learning_stage_info, berg.ad counts Meta's rule (learned with 50 of the goal's events in the account's last 7 days, learning under 50 while the ad set is under 7 days old, learning limited after, e.g. 12 form leads on day 3 reads learning); TikTok's is berg.ad's count (learning until 25 goal events or 7 days, then learned); learning_events: the goal events counted with the word (Meta, where berg.ad counts it: in the account's last 7 days, null beside Meta's own word; TikTok: since the ad group started; null on Google, which gives only its word) and learning_needed: the count that ends learning (50 on Meta, 25 on TikTok), e.g. { learning_status: 'learning', learning_events: 12, learning_needed: 50 } on a Meta leads run with 12 form leads this week; e.g. an awareness run paused while its ad set was LEARNING stays learning after Meta's SUCCESS,events (what berg.ad's tick, Jev, status writes and overrides did to the run, Meta's status changes, the creative features Meta turned on or off (by Meta), and an ad set's targeting automation or placements Meta changed from what berg.ad sent, read once a day (by Meta), e.g. { what: 'targeting check: changed by Meta', by: 'Meta', reason: "Meta changed the ad set's automation: relaxation.custom_audience on; placements: facebook:story off" }, in time order: at, what, by, reason), start/end (the planned window), stopped_utc (when it stopped before its end; null while created or active, or when it ran to its end), budget (lifetime total, or daily with today's spend; a daily budget with no end that has stopped or ended also carries total_spent, all it spent, left out when Meta could not give it), spent, spent_pct, remaining and a 24-hour hourly projection (whole numbers per hour, spend in whole cents; an estimate; for runs created, active, or waiting and not made yet); in_campaign: each stretch this post's ad was live in that campaign (from_utc, to_utc null while in, why it left, approx), null when not recorded; delivery: per hour of those stretches whether the ad spent, { anchor_utc, hours, states } with states as switch points, e.g. [{ from_hour: 1, state: "spent" }, { from_hour: 5, state: "no_spend" }] (spent, no_spend as far as that ad's own data covers, not_reported yet incl. the hour in progress, not_in_campaign; each point's state holds until the next point, hours counted from 1, the account-zone hour holding the first from_utc), given with the hours (by default for 2 days or less, or hourly: true) or stored for a finished ad, else null; a rotation ad set appears under each of its posts with shared_budget: true, shared_posts (how many posts its ad set, ad group or campaign carries in the range, e.g. 5), share (its part of the ad set's spend since it joined, within the answer's days, 0 to 1, e.g. 0.60 of 0.80 USD is 0.75), days_in, and budget, remaining and projection null (others shared_budget: false, no shared_posts); experiment: the experiment the campaign belongs to (null: the account's own); reporting_group: the row the campaign reports under, its run's reporting_group (a buy's, the run it bought), else its type, its label as one word (awareness, target-lead, target-clicks), e.g. "leads" on a run set { key: "meta_leads", reporting_group: "leads" }. form_opens: link clicks on lead ads (the form opened). page_likes: Page likes from a followers ad on Facebook; profile_visits: Instagram profile visits from a followers ad (visits, not follows), by the hour taken from berg.ad's reads of the day, the rest of the day shared evenly over the delivering hours (Meta leaves it out of hours; views it gives by the hour), null when not known, never 0. leads_received (top level, by ad_id; join on posts[].ad_ids): leads berg.ad delivered from each ad, e.g. { received: 2 }, given once per ad because leads carry no placement; an ad with none is left out. YouTube: a video berg.ad promoted on YouTube is a post like a Meta one, in the same fields: posts[] has it with platform youtube, post_id and source_post_id its video id (a rotating run's video too), ad_ids, and adsets one per Google Ads Demand Gen campaign (adset_id the campaign id, as its lifecycle entry names it; campaign_stage from its run's goal; adset_name and purpose null), daily rows per day of the ad account's time zone (timezone, as Meta's; Google's hours dated there). Money is in each account's own currency, never converted: every posts[] row and lifecycle budget carries currency (a Meta row its ad account's, a YouTube row its Google account's), and a post on two accounts in two currencies is two entries, never one total. posts, organic_by_post and post_types are tables ({columns, rows}, the keys once, then one array per entry in their order; null in a slot is not given): a post's row is its ids (platform, post_id, source_post_id, promoted, ad_ids) then its total's measures, then with detail its daily and adsets lists, e.g. {"columns": ["platform", "post_id", "source_post_id", "promoted", "ad_ids", "spend", "impressions", "views", "currency", "daily", "adsets"], "rows": [["instagram", "17999", "222_1", "post", ["a3"], 3, 900, 900, "EUR", [{"date": "2026-10-16", "spend": 3, …}], […]]]}, abridged; organic_by_post's and post_types' rows have post_id first. Every post has the same keys on every platform; the post names its platform once and its daily rows and adsets' total and daily do not repeat it: spend, currency, impressions, views (the views the post shows on its platform: Meta's paid views are the ads' impressions, e.g. an awareness ad set's 17,458 impressions are 17,458 views; TikTok's the ads' plays (video_play_actions), e.g. 54,784 plays of a post showing 86,700; YouTube's TrueView views; a reader tells them apart by platform), clicks (link clicks), engagements (Meta post engagements, Google engagements); Meta's fields Google has no counterpart for (likes, comments, shares, saves, leads, form_leads, dm_leads, page_likes, profile_visits, form_opens) are null on YouTube, never 0. the hours, by default or with hourly: true, carry each video's hours like Meta's (platform youtube, fb_post_id and ig_media_id null; the repeated hour of a DST fall-back is filed at its first occurrence, as Meta's). Google's days come from the store (ad_stats and ad_totals), as the cron's jobs read them: the last 3 days each tick, older ones until they are final at 30 days, so a later Google credit still lands. A day not read costs only its part: the videos stay in posts[] with their paid null and their lifecycle budget null, named in youtube_ads_error, e.g. "Google Ads account 1112223333: day 2026-10-29 of run yt-roll not read yet by the cron". lifecycle lists the YouTube runs too, made and planned, under their video, with platform youtube, campaign_stage and the label from its run (objective VIDEO_VIEWS), their status, reason and events, and a made campaign's budget (lifetime: amount, spent and spent_pct in its Google account's currency, named in currency) and remaining, and start_utc / end_utc from the campaign's own window (its account's time zone, in UTC; end_utc the second after Google's last), stopped_utc when the tick stopped it, so its line says its dates and what it spent and through_pct is set as a Meta campaign's; a campaign whose last day is over in its account's time zone is finished (here, in get_autopilot and health_check alike), whatever Google's status still says. post_types: per organic post the answer returns (the same posts as organic_by_post), a table with post_id first, its funnel type from the posts store, e.g. {"columns": ["post_id", "type", "confidence", "classified_at", "note"], "rows": [["222_9", "convert", 0.91, "2026-10-27T13:00:00.000Z", null], ["17999", null, null, null, "not classified yet"]]} (null type until Jev has answered). organic_by_post (with or without items; the one home of a post's organic: never compute it from posts[]): per organic post the answer returns, in posts[] or lifecycle (a table, one row per post, its source_post_id first as post_id, once however many placements its ads ran on; Facebook, Instagram and YouTube alike) its organic lifetime counts as of berg.ad's latest snapshot of it: views (each platform's own: Facebook organic showings, Instagram views without the ads', YouTube viewCount; never add views across platforms), likes, comments, clicks (null where the platform reports none, or before the post's first snapshot) and organic_at (when that snapshot was read). The same rule as items' organic series: Facebook views are its organic views; Instagram views are not reduced (ads made from a media run on their own ad-only media); YouTube views are YouTube's public count (stored as Meta's are) less berg.ad's own paid TrueView views on the video (Google's, read live; null while Google is not read); likes (every reaction), comments and clicks (link clicks) less berg.ad's paid on the post itself over its life (the store's lifetime per placement, ad_stats and ad_totals, of every campaign berg.ad made on the post, by its own record, whenever it ran); never below 0; null while that paid is unknown. comments count every comment on the post, the business's own too (berg.ad cannot tell them apart). A failed or late (10 s) Meta paid read leaves a Meta post's likes, comments and clicks null, named in lifetime_paid_error (a video's take no Meta paid); paid in the rest of the day a lifetime was read is taken off from the next day's read. events' and reasons' Google refusals read as new ones do: each error once, Google's knock-on RESOURCE_NOT_FOUND left out. A video in a rotating YouTube run is listed under it with kind rotation, shared_budget: true, share (its part of the campaign's spend since it joined, 0 to 1) and days_in. A post in a TikTok rotation is listed under its source post the same way, its share of the rotation's ad group's spend since it joined within the answer's days, e.g. 0.60 of 0.80 EUR is share 0.75, with TikTok's words when it rejects the ad (cancelled: rejected by TikTok: AD_STATUS_REJECT). A part Google refused under its per-day minimum says so in its reason, with Google's floor and what was sent a day. Each lifecycle campaign carries through_pct (how far through its planned window, up to its stop or now; null without one), video_unfit when the post cannot be advertised on the app its ad shows on, so it can never run there: its video too narrow, or Meta's own answer that it can't be boosted there, e.g. 'Meta says this post can't be boosted on Instagram: …' (read when berg.ad kept the post, or berg.ad refused one of the post's campaigns on that app; every campaign of the post on that app not made yet carries the words (one made before keeps its state and spend, unless Meta flagged that ad for every app it shows on: then it carries Meta's words, e.g. 'Media Not Wide Enough: Your ad won’t run on Instagram because it contains media … less than 500px wide. Select media wider than 500px.'), e.g. video_unfit: 'Video is 480 px wide; Instagram ads need at least 500 px. Post it again at 1080×1920 to boost it.', and a campaign of the same post copied onto Facebook, whose minimum is 120 px, carries none), ad_app: the app the campaign's ad shows on (a copy's app, else a Meta campaign's post's own app, else its platform's), e.g. ad_app: 'instagram' on meta_views_copy_tt_ig of a TikTok post, 'youtube' on yt_views_copy_ig of an Instagram post, and, while waiting, condition: what it waits for as fields (kind: post, entry, top, ads_running or start; metric, current and target; hours until its start; any_of, each condition of an OR group, the nearest its target shown first as metric) beside reason. items: true (default false) adds bucket, items and campaigns_by_age, one list read for a posts or campaigns view (a failed read leaves them null with items_error or campaigns_by_age_error; everything else stands). bucket: hour with hourly: true or when since–until is 7 days or less, else day (organic days UTC, paid days the ad account's). items: every Facebook post, Instagram media and YouTube video (of the channel connected on the account's home) published in the range (the ad account's days) or with a number above 0 in it, e.g. a post from last week with 40 views yesterday is listed for yesterday with those 40 alone, from berg.ad's posts store (the 15-minute tick reads them, so the call reads no platform: a reel posted at 09:05 is listed from the 09:15 tick), promoted or not, newest first, the posts with the same destination URL or first hashtag one item when set_account_settings group_by says so (url: each post's link by the landing rule: its text's first link, a video's description's, else the business's own first comment's (Instagram, YouTube; Facebook's comments Meta does not give berg.ad), a short link followed to where it lands; compared by the url key: lower-case host, no trailing slash, utm_* and fbclid dropped, the query in one encoding; a post with no link is its own item, never the account's landing; e.g. an Instagram reel with https://example.net/s/k9Q in its caption (a short link to the page below) and the Facebook post with https://example.com/boats/aurora?d=2027-09-04,2027-09-11&utm_source=facebook are one item, id url:https://example.com/boats/aurora?d=2027-09-04%2C2027-09-11; each post's link kept a day, 15 minutes while it has none or its short link could not be followed; a post whose link is not read yet, a new one or one whose comment read failed, is its own item until the tick reads it, named in landing_unread, e.g. ["17890077"]); each part's setting_changes lists every change of its own setting, oldest first, once it has one, e.g. [{ at: '2026-10-31T13:45:12.000Z', value: 0, by: 'Jev', reason: 'Jev: off; ad 526 spent 3.92 USD, 0 goal events' }], value 0 off, 1 on, null the rules decide, a review's rejection also naming its run_key and the ad_app that campaign's ad showed on, e.g. { by: 'Google review', reason: 'Google rejected yt_views: UNAVAILABLE_VIDEO (PROHIBITED)', run_key: 'yt_views', ad_app: 'youtube' } on an Instagram post's part; each part's campaigns are its organic one (run_key organic, source organic) and its lifecycle campaigns, each with series per bucket: organic views, likes, comments and clicks from berg.ad's snapshots of the post's lifetime counts each 15 minutes, less berg.ad's paid on the post itself (YouTube views less berg.ad's own paid TrueView views through each bucket, its clicks named in measures_unreported; likes less the ads' reactions; Facebook clicks are every click on the post, less the ads' link clicks only), null before the post's first snapshot (no platform keeps organic history), 0 only before the post went up; a paid campaign's views (its impressions, as the post counts them, by the day and by the hour), impressions, likes, comments, clicks (link clicks), leads (received by berg.ad) and spend from Meta's own rows, its currency once (its ad account's); a YouTube campaign's from Google's hours (TrueView views, impressions, clicks, spend in its account's currency, named; likes, comments and leads named in measures_unreported); series null for planned campaigns. campaigns_by_age: per group and reporting_group (as lifecycle's), over the posts published in the range, organic and paid summed by hours since posting in 6-hour bins over 7 days as two series, organic and paid (slot_unit since_post_6h; null unknown, a bin not begun yet past the array's end; paid names its currency once, and a group over two currencies, or a YouTube type's likes, comments and leads, is []), window_hours after the post, statuses and posts, paid_bucket (hour; day when a post is older than the 30 days of hours the store keeps: its stored day rows, each at its day's first hour and never before the post, e.g. a post from 10-19 read on 10-30 has its ad's 10-19 day in hours 0–6); kept 15 minutes.

  • since string · required · pattern ^\d{4}-\d{2}-\d{2}$
    first day of the range, YYYY-MM-DD in the ad account's time zone, e.g. 2026-10-26
  • until string · required · pattern ^\d{4}-\d{2}-\d{2}$
    last day of the range, itself included, YYYY-MM-DD, e.g. 2026-11-01
  • hourly boolean
    true: one series per ad, up to 30 days; false: none; unset: in the full answer, the series when the range is 2 days or less
  • items boolean · default false
    true adds every post published in the range or with a number above 0 in it, organic or paid, with its series of the range alone, promoted or not
  • detail boolean
    false: the summary, each post's totals and, on the posts with a campaign still to end (one stopped past its end has ended), each campaign's run_key, status and line; true adds every post's lifecycle, each post's daily rows and adsets, each campaign's budget, events, delivery and projection, and the hourly rows
  • post_ids array of string · min items 1, max items 20
    these posts only, with every detail, e.g. ['1020296171156538_122141695053235544']

set_campaign_purpose writes

Record a campaign's stage, what it is for and how to judge it (stored in berg.ad, not Meta); get_ad_stats shows it on every row. Send only what changes, e.g. {campaign_id: '120…', stage: 'awareness'}.

Record a campaign's stage (awareness / target), what it is for and how to judge it (stored in berg.ad, not Meta). get_ad_stats returns it in purposes, once per purpose with its campaign_ids, so results are read against what the campaign is for. Use for campaigns created outside create_ad or to correct one. Send only what changes: a campaign's first label needs stage and purpose; after that what is left out keeps its stored value and success_metric null clears it, e.g. {campaign_id: '120…', stage: 'awareness'} keeps its purpose and success_metric.

  • campaign_id string · required
  • stage "awareness" | "target"
    a label for reports (awareness = social-proof views, target = the market); where the ad runs is its geo, e.g. awareness with geo { country_groups: ['worldwide'], exclude_market: true }
  • purpose string · min length 1
    what this campaign is for, in one sentence
  • success_metric string | null

get_autopilot read-only

The autopilot as the tick runs it, in summary: enabled, playbook, account: {wallet, experiments by name and campaign_keys}, rules, month_max, budget_totals (each app's units beside their total, e.g. {app: 'facebook', daily: '10.00 EUR/day × 2 = 20.00 EUR/day', per_post: '3.00 EUR/post × 4 = up to 12.00 EUR per post'}), spend_by_objective, guards (counts), the last tick, rotations (ads_count by status), and preview: the posts with a run still to end (one stopped past its end has ended), each run's status and reason, and while it can still run its budget, window, platform_status, platform_status_since_utc and platform_history_count; ended runs and passed windows are counted in preview_ended and window_passed_count. What each run spent and got against its goal: get_ad_stats runs (over all posts), get_post_stats (one post). detail: true answers every field (ids, settings, stops, the platform's history, each experiment's campaigns, each rotation's ads); run_key or post_id narrows to that run or post with its whole history, e.g. {run_key: 'tt_views'} or {post_id: '222_9'}. Every amount is in major units of the named currency. Every field: docs.berg.ad, get_autopilot.

The autopilot as the tick runs it. By default the answer is the summary, right-sized for a model to read whole; detail: true gives every field below, and run_key or post_id narrows to one run or one post with every field and its whole history, ended runs and passed windows included, e.g. {run_key: 'meta_leads'} or {post_id: '222_9'}. The summary: enabled; playbook; account: {wallet, experiments: [base first, each {id, name, status, playbook, campaign_keys}]}, e.g. {id: 1, name: 'leads-only', status: 'running', playbook: 'bill v4', campaign_keys: ['meta_leads']} (each experiment's posts and campaigns: detail: true or get_experiments); rules: base's, as the tick runs; month_max (a reading: the most the rules can spend in a month, null when they take every post); budget_totals (each app's money at unit prices, the units beside their total in the client's money: every rotation's budget_daily and every per-post run's budget_per_post, a pool on its own day once, e.g. {app: 'facebook', daily: '10.00 EUR/day × 2 = 20.00 EUR/day', daily_total: 20, per_post: '3.00 EUR/post × 4 = up to 12.00 EUR per post', per_post_total: 12}, or {app: 'instagram', daily: 'leads pool 10.00 EUR/day = 10.00 EUR/day'}); spend_by_objective (a reading per objective, calculated from what the runs have, none of it set, e.g. {objective: 'LEADS', budget_daily: 10, budget_per_post: 0, committed: 290, committed_pct: 96.67}); guards (the account guards rejections_30d, spend_cap_used_pct and rejections_url_30d: each one's value, the account's set_account_settings value else the playbook's, and its reading per platform, e.g. {rejections_30d: {value: 3, platforms: {meta: {count: 1}}}}, the ads counted listed with detail: true; while one is reached nothing new starts on that platform, named 'held by <guard> <value>: ...' in warnings and on the waiting run; live ads keep running); the last tick; preview: the posts with a run that can still run (waiting, blocked, created, active, or stopped before its end_utc), each with post_id, platform, created_time, message, overrides when the post or one of its runs has one (none: the rules decide), policy_status (the policy check's verdict, on every platform: ok, warn, skip or unavailable) and policy_reason when it is not ok, and each run with run_key, source, status (waiting (not delivering yet, made or not; reason says what it waits for), blocked (not made, and not retried: its attempts failed, or the run before it is blocked; reason says why), created (made and switched on, before its start or in review), active (delivering), stopped (paused, or halted by its platform for money, before its end, not by its own rules; by says who, reason why), finished (over: nothing of it can deliver any more, or its own rules ended it; another pause reads stopped), cancelled (will not deliver, now or again; reason says why), n/a (never applied to this post: its window ended before berg.ad first read the post, or its campaign's channel is not connected; holds no ads_running place; reason says which)) and reason (by, kept_on_by, condition when set; error when there is no reason; platform_reason, the platform's own words, when set, e.g. a Meta 'with issues' reason on a stopped run), and while it can still run (waiting, blocked, created, active, or stopped before its end_utc: a rate's or a budget's stop can lift) its budget, start_utc, end_utc, platform_status (the platform's raw word, e.g. active on an ad whose ad set ended, which status reads finished), platform_status_since_utc (when the platform's word last changed) and platform_history_count (how many changes it saw), e.g. {run_key: 'meta_views', source: 'rules', status: 'active', budget: 3, start_utc: '2026-11-05T09:19:50Z', end_utc: '2026-11-05T14:19:50Z', platform_status: 'active', platform_status_since_utc: '2026-11-05T08:45:47Z', platform_history_count: 2} or {run_key: 'fb_leads', source: 'rotation', status: 'stopped', reason: 'kept off by user', by: 'rules'}; a field with no value is left out, and a text over 200 characters is cut with …, whole in detail: true; rotations: each rotating run's ad set or campaign and ads_count, its ads by status, e.g. {active: 5, stopped: 4}; preview_ended: the posts whose every run ended or was stopped past its end_utc (nothing lifts that stop; its status still says who stopped it), counted by status, e.g. {posts: 230, runs: {finished: 40, cancelled: 279, 'n/a': 3, stopped: 12}}, and window_passed_count: how many runs' window passed before they were made, e.g. 278, each listed in window_passed by run_key or post_id; not_applicable (each campaign none of whose channels is connected, e.g. {run_key: 'meta_views', status: 'n/a', reason: 'none of its channels (Facebook, Instagram) is connected'}) and experiment_lines (one line per experiment) when there are any; jev: Jev's steps (jev_steps, each with its source) and, per run with switches, its switches and per switched-on setting your value, Jev's (null: none yet), at and reason, e.g. meta_leads: {switches: {money: 1}, values: {budget: {operator: 5, jev: 5.5}}}. What each run spent and got against its goal: over all posts, get_ad_stats' runs, e.g. {run_key: 'tt_leads', spend: 50.3, leads: 0, cost_per_lead: null}; on one post, get_post_stats' lifecycle (spent, spent_pct, line). detail: true adds, per run, setting, judged_by_jev, stage, campaign_stage, objective, stop, campaign_id, adset_id, ad_id, attempts, archived and platform_history (every change of the platform's word, e.g. [{status: 'pending_review', at: '2026-11-05T08:30:47Z'}, {status: 'active', at: '2026-11-05T08:45:47Z'}]); per post its whole policy; per rotation its ads; per experiment its posts and campaigns [{key, campaign, rules}], each whole. Every amount is in major units of the named currency, the money the client deposited; a figure that could not be read is null or carries its error beside it. Every field in detail: docs.berg.ad, get_autopilot.

By default get_autopilot answers the summary (above: each open post's runs by status, reason, and while they can still run budget, window, platform_status, platform_status_since_utc and platform_history_count; overrides only where set; rotations' ads_count; experiments by campaign_keys; guards' counts; texts cut at 200 characters); detail: true, run_key or post_id answer every field described here, e.g. {detail: true} or {post_id: '222_9'}. The autopilot: its rules (which new posts get which runs: stage, objective, budget, delay, hours, geo, form, ad text), whether it is on, the most it can spend in a month (a reading), the last cron tick, and a preview: which recent posts qualify now, each run's start, end and budget, and what was already created; each post's policy-check verdict, on every platform (policy: status ok, warn, skip or unavailable; the summary gives policy_status and, when not ok, policy_reason), its overrides (overrides: post, the post's setting with from 'post' (with by, at, reason) or 'playbook' (posts.lock), and runs, each run's stored override; a setting is null when the rules decide, 1 kept on, 0 kept off), its adds among its runs (source add; kind buy, a buy (the buy tool, the stats page or /admin), run key <run>@<buy id>, its platform meta, youtube, tiktok, pinterest or linkedin, made from its start, or lead_ad, create_ad's, run key lead_ad@<hash>; each its own per-post campaign, outside Jev's judging, paid from the wallet (a 10.00 buy takes 10.00 of what is available)), each run's setting (its post's 0 first, else a made run's own 0, else its post's; null when the rules decide) and judged_by_jev (true: neither the run nor its post has an override), each run's status (waiting (not delivering yet, made or not; reason says what it waits for), blocked (not made, and not retried: its attempts failed, or the run before it is blocked; reason says why), created (made and switched on, before its start or in review), active (delivering), stopped (paused, or halted by its platform for money, before its end, not by its own rules; by says who, reason why), finished (over: nothing of it can deliver any more, or its own rules ended it; another pause reads stopped), cancelled (will not deliver, now or again; reason says why), n/a (never applied to this post: its window ended before berg.ad first read the post, or its campaign's channel is not connected; holds no ads_running place; reason says which); kept_on_by names who keeps a created or active run on) and reason (the one condition a waiting run waits for: the post itself, the run's entry conditions, its start, or the guard's last refusal in its own words; why a run is blocked, cancelled or n/a), each run's history of the platform's status (platform_history, detail: true; the summary gives the last change's time, platform_status_since_utc, and the count, platform_history_count, e.g. '2026-11-05T08:45:47Z' and 2), and the post's rotation ads (source rotation); rotations: each rotating run's platform (meta or youtube), stage, daily and daily_source, and its one rotating ad set, on YouTube its one Google Ads campaign whose daily budget its videos share, each video its own ad group (campaign_id; daily: its budget per day; with no end, day: the day it is on; with an end, end_utc and total), its no_<metric>_hours stops in its rules' entry, and its ads in the same words (detail: true; the summary counts them by status, ads_count, e.g. {active: 5, stopped: 4}), each running one with stops_checked_from_utc (when each stop starts to be checked, e.g. { no_reach_hours: "2026-11-03T00:30:00Z" }). playbook names the playbook whose defaults the account runs (its default expert's when that expert has defaults of its own, else Bill's) and their version; advice_expert, when the account's default expert is someone else, is whose advice the models read. account (with detail: true; the summary gives each experiment's id, name, status, playbook and campaign_keys, e.g. ['meta_views', 'fb_leads']): the settings as written, account → experiments → campaigns → start/stop rules: { id, name, currency, wallet, experiments: [ base (the account's own campaigns: its playbook's under what it stored), then each experiment ] }, each experiment { id, name, status (an experiment's), playbook ("bill v4": expert and version), posts, campaigns: [ { key, mode, platform, source, purpose, campaign: { the platform's own settings }, rules: { berg.ad's own start/stop pairs, judge_floor, jev } } ] }, every campaign whole and the experiment's own (nothing in an experiment follows base), e.g. an account with one experiment (two of base's campaigns shown): {"account": {"id": 1, "name": "acme", "currency": "USD", "experiments": [{"id": null, "name": "base", "playbook": "bill v4", "posts": {"lock": false}, "campaigns": [{"key": "meta_views", "mode": "per_post", "purpose": "awareness: social proof views outside the market", "campaign": {"stage": "awareness", "objective": "VIDEO_VIEWS", "audience": {"geo": {"include": ["worldwide"], "exclude": ["market", "IN", "SG", "TW"]}, "age_min": 18, "age_max": 65}, "budget_per_post": 0.5, "length_hours": 5}}, {"key": "meta_leads", "mode": "per_post", "purpose": "target convert: Get quote, shared form, cold market", "campaign": {"stage": "target", "objective": "LEADS", "cta_type": "GET_QUOTE", "form": "default", "audience": {"geo": {"include": ["market"]}, "age_min": 25, "age_max": 65}, "budget_per_post": 4, "length_hours": 72}, "rules": {"since_post_hours": [6, null], "jev": {"post": 1, "money": 0}}}]}, {"id": 1, "name": "leads-only", "status": "running", "playbook": "bill v4", "campaigns": [{"key": "meta_leads", "mode": "per_post", "campaign": {"stage": "target", "objective": "LEADS", "cta_type": "GET_QUOTE", "form": "default", "audience": {"geo": {"include": ["market"]}, "age_min": 25, "age_max": 65}, "budget_per_post": 4, "length_hours": 72}, "rules": {"since_post_hours": [6, null], "jev": {"post": 1, "money": 0}}}]}]}} (fields trimmed: each campaign carries all of its own); leads-only runs only its own meta_leads, a copy of base's, and a change to base's meta_leads leaves it as it is. rules: base's campaigns as the tick runs them, Jev's values in them. account.wallet: the prepaid credit, the account's hard limit (credit, used: what the account's own ads spent since the wallet started (on Meta berg.ad's ads for it on the ad account, and, only while it is alone there, an Ads Manager ad promoting its page, e.g. two accounts on act_123 count neither a hand-made ad of the other nor one of their own; on TikTok and YouTube berg.ad's own runs), locked: held for the next 24 hours of running daily budgets plus what lifetime budgets have left: the most they should spend, not what they will, on every platform, each what the wallet takes for it, and available = credit − used − locked; e.g. {credit: 500, used: 127, locked: 40, available: 333}; an error when none is set or its spend can't be read: then nothing starts or grows). spend_by_objective: a reading per objective, calculated from what the runs have and never set: objective (e.g. LEADS; a rotation's THRUPLAY reads as VIDEO_VIEWS), budget_daily (its rotating runs' dailies added up), budget_per_post (its per-post runs' budgets added up), committed (what its ad sets spent this month, in the ad account's time zone, plus what the live ones can still spend and what started posts' runs still owe, a run waiting on entry insight conditions excepted: its money is checked when it is made) and committed_pct (its share of what the objectives hold), e.g. a rotating meta_leads run at budget_daily 10 and a meta_views run at budget_per_post 1, 10 posts in: [{objective: 'LEADS', budget_daily: 10, budget_per_post: 0, committed: 290, committed_pct: 96.67}, {objective: 'VIDEO_VIEWS', budget_daily: 0, budget_per_post: 1, committed: 10, committed_pct: 3.33}]; buys and adds are under no objective; committed and committed_pct are null with an error when Meta's spend could not be read (then nothing starts). window_passed: runs of started posts cancelled this month because their window (post time + delay + hours) passed before they were made (those posts leave the preview). Each post in the preview with a Special Ad Category shows category_skipped, naming each run whose geo excludes countries, whose ages are other than 18-65 or whose gender is one (Meta forbids each under a category; berg.ad never widens a run to fit), e.g. "special ad category HOUSING: awareness excludes countries; meta_leads targets ages 25-65, which Meta forbids under it, so the post skips those runs"; its other runs go on, e.g. meta_leads with rules { since_post_hours: [6, null] } starts at the post's hour 6. A run's judge_floor is Jev's data floor: Jev's daily pass on the run (its jev switches) logs every decision in audit_log (tool jev) and announces each change. experiment_lines (only when the account has experiments): the default and each experiment in one line each, as experiments list gives them (spent, live, posts, leads and cost per lead this month); everything else here is the account's own (base). A guard's reading is per platform, e.g. spend_cap_used_pct: {value: 90, platforms: {meta: {used_pct: 42, ...}, tiktok: 'not applicable: ...'}}.

  • run_key string
    only this run: its rule, its override, its part of each previewed post, its rotation
  • post_id string
    only this post in the preview
  • detail boolean
    false (default): the summary; true: every field of every run, rotation ad, guard reading and experiment campaign

In the answer

  • last_tick The cron's last tick over every account (not this account alone): minutes_ago; null when it never ticked, e.g. {"minutes_ago": 4}.
  • last_tick.minutes_ago Minutes since that tick, e.g. 4.
  • account.wallet.pulls What pulling YouTube videos' files (to run them on another platform) was charged, flat, taken off available, major units, e.g. 1.5 for 15 videos at 0.10.
  • account.wallet.meta_used Meta's part of used, given only when another platform's spend could not be read, major units, e.g. 42.1.
  • preview[].runs[].campaign_stage The run's step of the account's funnel (set_account_settings campaign_stages), from its objective, its geo against the market and whether its traffic leaves the platform; a buy's or a create_ad ad's from its own fields, e.g. "awareness" for a ThruPlay run on the industry funnel, "social_proof" on Bill's for one outside the market; null on Bill's for any run but an ask when the account has no market.
  • preview[].runs[].video_goal A Meta or TikTok VIDEO_VIEWS run's goal: "TWO_SECOND" (the default; on TikTok its 6-second focused view) or "THRUPLAY" (on TikTok its 15-second focused view), e.g. "THRUPLAY" on tt_engage.
  • preview[].runs[].start_note Present on a made run with no create record: "no create record: start_utc is when its row was first written".
  • preview[].runs[].end_note Present on a YouTube run whose end Google rounds to whole days, e.g. "Google runs whole days in its account's zone (Europe/Prague): planned to 2026-11-04T08:30:00.000Z, it runs to 2026-11-04 23:59:59 there".
  • preview[].runs[].stop.berg_ad_cap berg.ad's own pause point on the made run, the one stop field, in the run's own money (stop.currency): the run's budget where its platform holds a larger total, its minimum's; null when the platform's own total holds it; stop.route says which: "native total", "floor + berg.ad cap" or "berg.ad cap", e.g. 1.8 on a run with budget_per_post 2.00 USD sent at Google's 10.00 EUR floor.
  • preview[].runs[].platform_reason The platform's reason beside platform_status, e.g. a rejection's words; null when it gave none.
  • rotations[].campaign_stage The rotation's step of the account's funnel, read as a run's, e.g. "conversion" for a lead rotation on the industry funnel, "ask" on Bill's.
  • rotations[].daily_source Where the rotation's daily comes from: "rule" (its campaign.budget_daily) or "override" (a person's daily), e.g. "rule".
  • minimums By run key, each run whose money is under its platform's known minimum, the minimum a day: a per-post run under it is sent at the minimum and stopped at its budget, a rotating run's daily under it is refused; a run at or over its minimum, or with none known, is left out; set_autopilot's and set_experiments' previews carry the same, e.g. { "tt_views": "TikTok's minimum is 20.00 EUR a day. We stop at your budget, 1.12 EUR, but TikTok may spend a little more before it stops." }; in the account's own money with the fee, whatever its ad account's; a run over more than one day names the total its budget is compared with too, e.g. "Meta's minimum is 3.00 EUR a day, 9.00 EUR over its 3 days. We stop at your budget, 1.00 EUR, but Meta may spend a little more before it stops.".
  • rotations[].started_utc When the rotation's ad set or campaign started; null not yet, e.g. "2026-10-20T06:00:00.000Z".

set_autopilot writes (destructive)

Set the autopilot's rules and/or turn it on/off: base's settings. Send only what changes; null gives a field back to the playbook's, except a campaign's audience.custom include or exclude, where null or [] is none, e.g. { include: [] }. Enabling, or new rules on a running autopilot, needs confirm:true after the owner's yes to the runs' budgets or to posts_count, the posts they reach; without it nothing changes. e.g. {"rules":{"campaigns":[{"key":"meta_leads","campaign":{"budget_per_post":8},"rules":{"since_post_hours":[6,48]}}]}} gives meta_leads 8 per post, from the post's hour 6 to hour 48. A run has one money value, budget_per_post or budget_daily, no spend stop; the preview's minimums name the known platform minimum of each run whose money is under it, e.g. tt_views reads: TikTok's minimum is 20.00 EUR a day. We stop at your budget, 1.12 EUR, but TikTok may spend a little more before it stops. post_tag sets which posts are advertised at all, e.g. {post_tag: '#gulet'} only those holding #gulet, {post_tag: null} every post. Every field: docs.berg.ad, set_autopilot.

Set the autopilot's rules and/or turn it on/off: base's settings (get_autopilot {detail: true} account.experiments[0]). Stored over the playbook's rules; send only what changes (posts merge by field, campaigns by key; each campaign's budget_per_post or budget_daily is the money; null gives a field back to the playbook's; posts' exclude_match null: none; a campaign's audience.custom include or exclude null or []: none, e.g. { custom: { include: [] } }). A campaign is { key, campaign: { platform, content_source (a list), content_channel (one channel's id, for an account with several of one app), placements, media, audience, budget_per_post|budget_daily, … }, rules: { [start, stop] pairs, caption_match, post_type (the funnel types Jev gives the posts it takes, e.g. ["convert"]; a post not typed yet waits), judge_floor, jev, … } }, amounts in major units, the money the client deposited; a name the run shape does not take is refused, naming where it goes, e.g. rules.runs answers rules.campaigns, the same list. Enabling, or new rules on a running autopilot, needs confirm:true after the owner's yes to the runs' budgets or to posts_count, the posts they reach; without it nothing changes. Examples: {"rules":{"campaigns":[{"key":"meta_leads","campaign":{"budget_per_post":8},"rules":{"since_post_hours":[6,48]}}]}} gives base's meta_leads 8 per post, from the post's hour 6 to hour 48; {"rules":{"posts":{"exclude_match":{"keywords":["Michael Jordan"]}}}} boosts no post whose caption names Michael Jordan. Every field: docs.berg.ad, set_autopilot.

Set the autopilot's rules and/or turn it on or off. Rules are JSON (get_autopilot shows them with defaults filled in). Money is at unit prices: each rotation costs its budget_daily a day and each per-post run its budget_per_post on every post it runs, so an app's day is the price × its campaigns, e.g. 10.00/day × 2 = 20.00/day; the preview and the answer carry budget_totals as get_autopilot does, and a change that raises an app's day or post names it in totals_raised, old beside new, e.g. <code>{app: 'facebook', daily_was: '10.00 EUR/day × 1 = 10.00 EUR/day', daily_now: '10.00 EUR/day × 2 = 20.00 EUR/day'}</code> (save_playbook names the same per account it reaches). budgets sets the runs' money from two amounts instead of by run: each campaign with a share takes it, budget_per_post_pct of <code>per_post</code> and budget_daily_pct of <code>daily</code> (major units, the client's money), as its own budget_per_post or budget_daily, previewed and confirmed as any budget change, the others untouched, e.g. <code>{budgets: {daily: 20}}</code> sets fb_leads and ig_leads, each budget_daily_pct 50, to budget_daily 10; an amount left out or null (an empty box) is not sent, e.g. <code>{budgets: {per_post: 3, daily: null}}</code> sets the per-post campaigns only and keeps the daily amount last sent; sent with no campaign holding a share of it, it is refused in plain words a person can read, naming the goals whose playbook campaigns would take it, then by name for the caller, e.g. <code>No campaign spends a daily amount yet: turn on Leads to use one. budgets: no campaign of this account has a share of what was sent (campaign.budget_daily_pct)…</code>; an amount of 0 or less is refused, <code>An amount is above 0, or left empty.</code>; on a partner's customer's account the amounts are also kept for a campaign joining later, e.g. a channel connected after set-up. post_tag: the one tag a post's caption must hold for any campaign to advertise it, letters, digits and _ with or without its # (stored with it), e.g. <code>{post_tag: 'gulet'}</code> stores <code>'#gulet'</code>; a tag with a space or other sign is refused, <code>post_tag: one tag of letters, digits and _, with or without its #, e.g. '#gulet'</code>. Every campaign with no caption_match takes <code>rules.caption_match {keywords: ['#gulet']}</code> (exact, any case: <code>Sunset #Gulet!</code> is taken, <code>#guletlife</code> is not), and so does every campaign joining later (a channel connected or reconnected, a goal turned on); a campaign whose own caption_match is another keeps it, named in <code>caption_match_kept</code>, e.g. <code>[{key: 'fb_leads', campaign_name: 'Facebook · Leads · EU', caption_match: {keywords: ['#sale'], exact: true, case_sensitive: false}}]</code>. A new tag moves the old tag's caption_match to the new one; <code>{post_tag: null}</code> takes it off, every post advertised again. Every change is asked first, the autopilot on or off: <code>{post_tag: '#gulet'}</code> answers <code>{changed: false, needs_confirm: true, post_tag: {from: null, to: '#gulet'}, changes: [{key: 'fb_views', campaign_name: 'Facebook · Views · Off market', changed: {rules: {caption_match: [null, {keywords: ['#gulet'], exact: true, case_sensitive: false}]}}}], posts_days: 30, posts_matching: 4, posts_not_matching: 11, next: '…'}</code>, posts_matching and posts_not_matching counting the account's posts of the last 30 days the tag takes and leaves; the same call with <code>confirm: true</code> saves it and answers <code>post_tag: '#gulet'</code>; the same tag sent again asks nothing. get_summary reads it as post_tag. The account runs the playbook's latest rules; what you set is stored as the account's overrides of them (a value equal to the playbook's stores nothing). Send only what changes: posts fields merge into the current ones (null gives a field back to the playbook's, e.g. <code>{posts: {exclude_names: null}}</code>, except <code>caption_match</code>, <code>exclude_match</code> and <code>url_match</code>, whose null is no list); campaigns merge by key (<code>rules.campaigns</code>, base's campaigns as get_autopilot's rules.campaigns (and account.experiments[0] with detail: true) name them; a campaign's fields merge into that campaign, null gives a field back to the playbook's (its <code>audience.custom</code> include or exclude null or <code>[]</code> is none, e.g. <code>{custom: {include: []}}</code>), { key, removed: true } removes the run and pauses its ads already live at once as a rule stop, their spend kept (the preview's ads_stopping counts them, e.g. 1, then the yes's runs_paused names each it paused and runs_not_paused each pause the platform refused, e.g. meta_engage: its campaign was removed, but the pause failed: …, which every check tries again; a step that failed after the rules were saved is named in runs_paused_error with the rules saved and the pauses made before it still in runs_paused, e.g. the pause of the runs out of the rules failed: D1 boom, or the alert of the paused runs was not sent: …), a new key adds a run after the others, on every platform, e.g. a new awareness run is listed last, which orders nothing: no run waits on another); each run's budget_per_post or budget_daily is the money, e.g. {campaigns: [{key: 'meta_leads', campaign: {budget_per_post: 4}}]}, and rules.goals is refused: a split is a reading (get_autopilot spend_by_objective), never a setting. A run's purpose says what the run is for in words, taken as written, e.g. "awareness: stopped at $2"; the run's money and stops come from its settings, never from this text. Lowering the maximum takes effect at once. Enabling needs confirm:true after the owner said yes to the runs' budgets; there is no monthly number, the wallet holds every start (e.g. a wallet with 5.00 available starts no run of 6.00, whatever the rules could spend); a rotation without a budget_daily counts the ads_running stop × budget_per_post × 24 / length_hours, e.g. ads_running [null, 5], budget_per_post 1.00, length_hours 1 is 120.00 a day; without it nothing changes and the maximum, the preview and reach come back (reach: per run, how many recent posts it admits now and the first condition each other post misses, by the tick's own conditions; metrics and rank as of metrics_read_at; a rotating run, the posts of its source of the last <code>rotation_posts_days</code> (30) days its filter takes). Disabling needs no confirm. Changing the rules of a running autopilot needs <code>confirm: true</code> too, on the owner's yes to how many posts they reach: <code>set_autopilot { rules: { campaigns: [{ key: 'meta_leads', campaign: { budget_per_post: 6 } }] } }</code> answers <code>{ changed: false, needs_confirm: true, rules_changed: true, changes: [{ key: 'meta_leads', campaign_name: 'Facebook and Instagram · Leads · EU', changed: { campaign: { budget_per_post: [5, 6] } } }], posts_count: 12, next: 'Nothing changed. These rules reach 12 posts (reach names them); …' }</code>; each of changes names its campaign in words beside its key (campaign_name: what the campaign buys, never its key: the apps its ads show on, then Goal · Market · Audience, the market and audience only when set, and a number on a second campaign of the same apps, goal, market and audience), e.g. with the market EU, fb_leads reads Facebook · Leads · EU, ig_engage (VIDEO_VIEWS, THRUPLAY) to viewers_90 Instagram · Views · EU · Viewers 90d, a second such Instagram · Views · EU · Viewers 90d 2, tt_views kept outside the market TikTok · Views · Off market, yt_click aimed at DE and AT YouTube · Visits · DE, AT, a Meta campaign of both apps Facebook and Instagram · Leads · EU; the pages show the apps as their icons and the rest as written; set_experiments' changes name theirs the same way. The same call with <code>confirm: true</code> saves them. The same rules sent again, or turning it off, ask nothing. Each activation meets the money checks (the money rule, docs.berg.ad). Before a post's first run, its caption and frames are checked against Meta's advertising policies (a post likely to be rejected is skipped, with an alert) and its Special Ad Category is set on its campaigns; on every platform no run waits on another run: each starts at its own start, e.g. a Meta engage with since_post_hours [6, null] is made at the post's first tick to start at hour 6, whatever the awareness run does, and tt_click with since_post_hours [24, null] starts at hour 24, after a 24 h tt_views (to follow another run, start by time or by a metric, e.g. meta_leads { rules: { views_total: [10000, null] } }); so does an organic post whose call to action changed when its ad was made (that ad stays PAUSED); when it could not be read, the ad waits PAUSED and the post is read again next tick. A started post's runs keep going after it leaves max_age_hours, however old it is, while one of them can still start or its own window (post time + delay + hours) is ahead, e.g. meta_leads { rules: { views_total: [1000, null] } } on a post started 3 days ago is made when the post reaches 1000 views; so do a started YouTube video's (read back from YouTube) and a post waiting for its policy verdict. Such a post is read each tick until its runs are made or cancelled; once its platform answers that it is not there while the account's own posts read in the same tick, a run not made is cancelled, cancelled: not made: its post can no longer be read (its platform answers it is not there); a post berg.ad already found taken down (its ad paused) cancels it in that row's words, e.g. cancelled: post gone: deleted on instagram; ad paused; a lost page role or channel leaves it waiting, read again each tick; a post with no posted time cancels its run not made with cancelled: not made: its post has no posted time on record, so no window of it can be placed. A run has a since_post_hours stop only where its own [start, stop] sets one, and that stop is its real end: meta_leads with { since_post_hours: [6, 24] } and length_hours 72 starts at the post's hour 6 and ends at hour 24 (the earlier of its stop and start + hours; [6, null] ends at hour 78), and one still waiting at hour 24 is cancelled, cancelled: window passed (planned end ...); a later end override and a buy's own end win over it; with none it has no deadline: a meta_leads run on a metric start waits as long as its metric takes, e.g. meta_leads { rules: { views_total: [10000, null] } } still under 10000 views at hour 48 keeps waiting, and with no stop and no posted_at it takes posts of any age, newest first; set_autopilot's answer counts them (posts_count). The only window refused is one that contradicts itself: since_post_hours [48, 10] or [6, 6] is refused, rules: run meta_leads: since_post_hours stop 10 is not after its start 48. A post is judged by the time of its first run, so its series never changes as it ages. A run is taken in the run shape ({ key, campaign: { platform, content_source, placements, media, audience, budget_per_post | budget_daily, length_hours, objective, … }, rules: { since_post_hours, spend, … } }) only; a flat field name (budget, hours, age_min, delay_hours, stop_at_spend, entry, …) is refused, naming where it goes, e.g. budget answers campaign.budget_per_post (per post) or campaign.budget_daily (a rotation's per day). Every amount is in major units of the account currency, the money the client deposited, as every surface reads it back: budget_per_post: 10 reads 10 everywhere, as the wallet does. A run's jev is set only here (and in an experiment's campaigns), by the owner. A written change queues the account's check, which runs within about a minute when no other check holds its ad account, else at the next 15-minute tick (answer: checked.queued_at, e.g. 2026-10-27T10:02:11Z; get_autopilot shows what it made).

rules in full: Only a post its platform shows publicly is ever advertised, whatever the rules: a Facebook post unpublished or hidden from the Page, a TikTok video set to private or friends, a YouTube video set to Unlisted or Private is never taken, and a live ad on a post that stops being public is paused with post gone, e.g. a YouTube video switched to Unlisted reads post gone: no longer listed on youtube; ad paused within 15 minutes. Berg's own ads-only copies (an experiment's dark post) are not affected. { posts: { exclude_match (keywords: a caption holding any of them is never boosted, whatever the campaign; { keywords, exact, case_sensitive } as rules.caption_match; e.g. { "keywords": ["Michael Jordan"] }; null: none), exclude_names (names never boosted, whole words, any case, e.g. ["Michael Jordan"] never boosts "Sailing with Michael Jordan"; default []), lock (default false: true starts every post kept on; a post's own setting wins) }; posts.source, posts.media, posts.max_age_hours, posts.caption_match, posts.url_match and posts.max_per_week are refused, naming the campaign field that holds each; campaigns (rules.runs is refused, naming it): [{ key, reporting_group (optional, a plain name: only the row its campaigns report under on the stats page and in get_post_stats; default its type, e.g. { "key": "meta_leads", "reporting_group": "leads" } puts the meta_leads run on a Leads row), campaign: { platform ("meta" | "tiktok" | "youtube", where the ad runs), content_source (a list of "facebook" | "instagram" | "tiktok" | "youtube", where its posts come from; default both Meta apps, ["facebook", "instagram"], on Meta; budgets are per objective, so a campaign for Instagram only lists ["instagram"], and giving Instagram other money is a second campaign with its own key, e.g. { key: "ig_push", campaign: { content_source: ["instagram"], budget_per_post: 6 } }; a rotation or a TikTok or YouTube campaign takes one, e.g. { key: "tt_leads", campaign: { platform: "tiktok", content_source: ["instagram"] } } advertises Instagram videos on TikTok; a playbook's campaign names its platform and takes one app of its own, e.g. { key: "tt_views", campaign: { platform: "tiktok", content_source: ["tiktok"] } }, else its save is refused by name), content_channel (the one channel of the content_source app whose posts the campaign takes, by its id as the account's channels list it: a Page id, an Instagram account id, a YouTube channel id; for an account with several channels of one app, e.g. { key: "fb_views2", campaign: { content_source: ["facebook"], content_channel: "2222" } } takes the posts of Page 2222 and makes its ads as that Page; left out, the campaign takes the account's first channel of that app, so an account with one channel of each app never sets it; it needs one content_source; a channel the account does not have is refused by name, "run fb_views2: content_channel 9999 is not one of the account's Facebook channels (222 (CB Italy), 2222 (CB Greece))"; a creator's channel (an Instagram account, Facebook Page, YouTube channel or TikTok account added with + Add creator page) is one too: its posts run as ads of the posts themselves, e.g. { key: "fb_sow", campaign: { content_source: ["facebook"], content_channel: "513787182464159" } } runs Sail Our World's Facebook posts as partnership ads, and a campaign copying a creator's posts onto another app is refused, "run fb_sow: content_channel 513787182464159 is a creator's Facebook channel: its posts run as ads of the posts themselves and are never posted on Instagram, …"; get_autopilot shows it only where it was set), copy_channel (the id of the channel a campaign that copies its posts onto another app posts those copies on, e.g. { key: "fb_copy", campaign: { platform: "meta", content_source: ["tiktok"], placements: ["facebook"], copy_channel: "2222" } } posts each TikTok video as a post of Page 2222 and advertises that post as Page 2222; left out on an account with one channel of that app it is that channel, and a campaign saved before a second one was connected keeps the account's first; with several and none named a new campaign is refused, naming them, "run fb_copy: copy_channel: the account has 2 Facebook channels, name the one its copies are posted on: 222 (CB Italy), 2222 (CB Greece), e.g. { copy_channel: "222" }"; a copy between Facebook and Instagram stays with its post's own Page; on a campaign that copies nothing it is refused), placements ("own_app", the default: each post's ad on its own app, in its feed, story, in-stream and reels positions; or a list in the platform's own placements: on Meta fb_feed, fb_right_hand_column, fb_marketplace, fb_video_feeds, fb_story, fb_search, fb_instream_video, fb_reels, fb_reels_overlay, fb_profile_feed, fb_notification, ig_feed, ig_story, ig_explore, ig_explore_home, ig_reels, ig_profile_feed, ig_search, ig_profile_reels, an_classic, an_rewarded_video, e.g. ["ig_reels"] runs only in Reels, and Meta's pairings are refused by name before anything is sent (fb_marketplace, fb_search, fb_profile_feed and fb_notification need fb_feed; fb_story needs fb_feed; Audience Network only beside Facebook or Instagram, a views ad there only with video_goal THRUPLAY; on Meta "automatic" and a list naming fb_ and ig_ positions are refused, as each post is advertised on its own app, e.g. ["fb_feed", "ig_reels"] reads: placements: ["fb_feed","ig_reels"] puts Facebook and Instagram in one ad set; each post is advertised on its own app: use "own_app", or one app's positions); on TikTok tiktok, pangle, global_app_bundle, e.g. ["tiktok", "pangle"] sends PLACEMENT_TIKTOK and PLACEMENT_PANGLE; on YouTube youtube_in_stream, youtube_in_feed, youtube_shorts, discover, gmail, display, maps (Demand Gen channels), e.g. ["youtube_shorts"] sends youtubeShorts alone; "automatic", ["tiktok"] or ["youtube"] send what they did before; a placement its sources can't reach is refused by name, e.g. ["fb_feed"] with content_source ["instagram"], or ["youtube"] on a TikTok campaign), media (the post types it takes, Boosterberg main's names: Facebook video, video_reel, photo, link, status; Instagram video, reel, photo, carousel; e.g. ["reel"] takes only an Instagram reel; default its sources' videos and reels; ["video"] alone takes no reel), audience: { geo: { include, exclude } (lists: include ["market"] alone is all of the account's markets, ["market:Europe"] (one or more "market:<name>", alone) the named ones; else "worldwide", a group or countries, e.g. { include: ["worldwide"], exclude: ["market", "IN", "SG"] } runs everywhere but the markets and those two, { include: ["worldwide"], exclude: ["market:Europe", "IN"] } everywhere but the Europe market and India; a name the account has no market of is refused by name, e.g. "run meta_engage_sa: market South America is not one of the account's markets (US, Europe)"), age_min, age_max, gender, locales, custom: { include, exclude } (e.g. { include: ["viewers_90"], exclude: ["page_fans"] }; on YouTube the Google Ads account's own user list ids, list_audiences youtube, e.g. { include: ["8342426986"], exclude: ["8342657465"] }), widen }, budget_per_post (major units of the account currency, as every amount here, a per-post run's money and a rotation's per post, e.g. 4.00), budget_daily (a rotation's money per day, e.g. 1.29), budget_per_post_pct and budget_daily_pct (a per-post run's or a rotation's share, in percent, of the amount a caller sends: set_autopilot budgets, or connect_link budgets when the set-up copies the playbook, writes the run's budget_per_post or budget_daily as that share once, and the run's own amount is the fallback while none is sent; mostly set in a playbook, e.g. fb_leads and ig_leads each { mode: "rotating", campaign: { budget_daily: 5, budget_daily_pct: 50 } } with budgets { daily: 20 } run budget_daily 10 each, and a per-post fb_views at budget_per_post_pct 50 with budgets { per_post: 3 } runs 1.50 a post), length_hours, stage, objective, … }, rules: { since_post_hours, views_total and every [start, stop] pair, judge_floor, jev, caption_match, caption_exclude, url_match }, the run's fields, written in these places: campaign.stage, campaign.objective, campaign.budget_per_post, campaign.cost_cap (optional, major units, not REACH), rules.since_post_hours and campaign.length_hours (changed after a per-post run was made, a made run not ended follows them at the next tick: its window starts at the post's published time + the new since_post_hours start (a run with start conditions: at its first attempt, as when it was made) and runs the new hours, e.g. a run made under since_post_hours [1, null] and length_hours 1, saved as [0, null] and 4, ends at published + 4 h; a post no longer in berg.ad's posts (its last 60 days) keeps the start its run was made with; a Meta run not started yet moves its start too, to the next whole minute when the new start has passed; a run that already ended runs again only once its new window has opened, e.g. since_post_hours [1, null] and length_hours 1 ended, saved as since_post_hours [5, null] three hours after posting, stays ended; a rotation's ad counts its hours from its activation), audience.locales (optional, Meta, TikTok and YouTube: Meta's numeric locale ids, one value for all three: on Meta the ad set's targeting.locales, on TikTok the ad group's languages and on YouTube the ad group's Google language criteria, each by berg.ad's one table per platform, exact matches only, 1001 English (All) = TikTok en = Google languageConstants/1000; e.g. [1001] reaches people whose language is English on all three; a locale TikTok or YouTube has no exact language for is refused naming the ones it takes, e.g. 6 English (US) or 1010; a LinkedIn campaign takes 1001 alone, as its interface locale en_US; default every language; null clears it, also the playbook's), gender (optional; default "all"; "female" or "male": Meta genders [2]/[1], TikTok GENDER_FEMALE/GENDER_MALE, YouTube an Audience on the ad group with gender FEMALE/MALE; e.g. { key: "tt_leads", campaign: { audience: { gender: "female", age_min: 25, age_max: 44 } } }), ages on TikTok only in its bands 18-24, 25-34, 35-44, 45-54, 55+ and on YouTube in Google's 18-24, 25-34, 35-44, 45-54, 55-64, 65+ (YouTube 25-44 is sent as the Audience's age { minAge: 25, maxAge: 44 }, 55-65 as { minAge: 55 }, every age (age_min 18 with no age_max, or 18-65) as no age at all, as Google refuses an age of every age; 30-40 is refused naming them, never rounded), no geo.location_types (berg.ad sends none, so each platform applies its own default: a run naming it is refused by name, e.g. { key: "meta_leads", campaign: { audience: { geo: { include: ["HR"], location_types: ["home"] } } } } answers "location_types is retired: now left out: berg.ad sends no location types, so each platform applies its own default"), widen (optional, every platform, per-post runs and rotations; default false: the platform keeps to the run's geo, ages and audiences: Meta advantage_audience 0 with Advantage+ location off and custom-audience and lookalike expansion off, sent on every create, and by a geo adjust whenever it writes the targeting or Meta holds an expansion on, e.g. { targeting_automation: { advantage_audience: 0, individual_setting: { geo: 0 } }, targeting_relaxation_types: { lookalike: 0, custom_audience: 0 } }, YouTube optimizedTargetingEnabled false, a TikTok LEADS run's Smart+ ad group targeting_optimization_mode MANUAL; true lets the platform reach past them: Meta advantage_audience 1, YouTube optimizedTargetingEnabled true, TikTok Smart+ AUTOMATIC (no mode sent); a TikTok run on any other objective refuses it by name, as TikTok's limit: TikTok closed Targeting Expansion in June 2024 (sent, it is ignored), Smart Targeting refuses a group with no audience or interest tags (40002), and off LEADS Smart+ refuses it; inherited as every run setting: playbook, account, experiment, a buy's fields; e.g. { key: "meta_leads", campaign: { audience: { widen: true } } }; a Special Ad Category turns it off on Meta; on Meta it holds ages to age_min up to 25 and age_max 65, gender and interests suggestions under it, and a Meta widen run with other ages is refused by name before anything is sent, e.g. { widen: true, age_min: 30 } answers "Meta's Advantage+ audience (widen: true) takes age_min up to 25 and age_max 65: age 30-65 is not, e.g. { widen: true, age_min: 25, age_max: 65 }"), caption_match (only a post whose caption holds them is taken: { keywords, operator ("any", the default, or "all": every keyword), exact (default true: the keyword stands alone, no letter, digit or _ right before or after it), case_sensitive (default false) }, written whole; e.g. { "keywords": ["#real"] } takes "Sail #real!" and never "#reality", { "keywords": ["croatia", "split"], "exact": false } takes "Croatian islands", { "keywords": ["croatia", "catamaran"], "operator": "all" } takes only a caption with both; null: every caption), caption_exclude (the same keywords, this campaign only: a caption holding one is not taken, e.g. { "keywords": ["giveaway"] }), url_match (the same keywords on the post's landing by the one landing rule: the caption's first link, else the account's own first comment's (Instagram, YouTube), followed to where it lands; for a run whose ad takes a landing (Meta traffic ads, TikTok's and LinkedIn's link ads, every YouTube ad) else its channel's default link (channel_landing), else the account's ad_texts landing, while a views, engagement or followers run matches the post's own link only; a post with none never matches; absent or null: every post; e.g. { key: "fb_click", rules: { url_match: { "keywords": ["example.com/yacht"] } } } (a TRAFFIC run) takes a post linking https://example.com/yacht/aurora and never one linking https://example.com/yachts/hvar: exact by default), post_type (per-post campaigns: the funnel types Jev gives a post, aware, engage or convert, as get_post_stats post_types shows them, that this campaign takes, on every platform; a post Jev has not typed yet waits, its waiting condition "entry: waits for Jev's post type (convert)", and starts once typed in the list; a post typed outside it never starts this campaign (get_autopilot not_admitted post_type); absent or null: every type; e.g. { key: "meta_leads", rules: { post_type: ["convert"] } } runs the lead ad only on posts Jev typed convert), start conditions (optional, which posts the run admits, each in rules: since_post_hours's stop is the oldest post it takes (no default: without a stop or posted_at every post, newest first, e.g. { key: "meta_leads", rules: { since_post_hours: [6, 96] } } takes posts up to 4 days old and ends at the post's hour 96), posted_at [after, before] (ISO date-times), ads_running [null, n] (how many of its posts run at once, newest first; one that ends, is cancelled or is n/a frees its place at once, one waiting for money keeps it; [null, null]: no limit over the playbook's; none: no limit, e.g. { key: "meta_engage", rules: { ads_running: [null, 2] } } runs a third post once one of two has ended), metric pairs on the post's own counts, all of which must hold, and any: [...] (an either-or group: it holds when one of its conditions does); conditions views_organic, views_total, likes_organic, likes_total, comments_organic, comments_total, clicks_organic, clicks_total (each read by the stats' organic rule from the post's snapshots and the tick's read, on every platform: _organic less berg.ad's paid on the post, _total the platform's count; Facebook views_total every media view, views_organic the unpaid ones; Instagram views_total every view the post shows, ads included, views_organic those less its ads' views (e.g. an Instagram post showing 1,200 views, 300 of them from its ad: views_total 1200, views_organic 900); clicks every click on the post, Facebook and LinkedIn only (LinkedIn's is the clicks it counts on the post, e.g. 12): a run taking only Instagram is refused them; YouTube views, likes and comments its public counts), their gains per hour <metric>_<form>_per_hour (e.g. likes_organic_per_hour: the gain since the snapshot at least an hour before, per hour; none: not known), reach_total (its reach), engagements_total (its clicks; Instagram: its interactions); the rules also take a platform's own block beside them, { views_total: [1000, null], youtube: { views_total: [100, null] } }, a post of that platform met by its platform's, which add to or override the group's own for it, never removing them for the other platforms; a platform block that leaves a platform the run takes with no condition at all is refused, naming it. Every condition is a [start, stop] pair, null where a slot is not set: views_total: [1000, 5000], youtube: { views_total: [0, 100000] }, any: [{ views_organic: [1000, 5000] }, { likes_organic: [50, null] }]; a condition holds at or past its start and under its stop, so a post at or past a stop never starts (entry: none of views_total 6000 ≥ stop 5000), and a running ad, per-post or in a rotation, is paused once its post's count reaches its stop (stopped by rule: views_total 5000 ≥ stop 5000; a rotation's ad paused, no longer qualifies: entry: none of views_total 5000 ≥ stop 5000), never for falling under its start, while a rate (_per_hour) pauses it once it leaves its window either way (likes_organic_per_hour: [10, null] at 6: stopped by rule: likes_organic_per_hour 6 < 10), and a failed read pauses nothing. leads (Facebook and Instagram) is the leads berg.ad received from the post's ads across all its runs, TikTok's lead ads included: leads: [3, null] takes a post with 3 leads or more, leads: [null, 25] pauses its running ad at 25. ctr (the post's paid link clicks ÷ its paid impressions × 100, berg.ad's paid on it) and cost_per_views, cost_per_clicks, cost_per_likes, cost_per_comments, cost_per_leads (the post's paid spend across its per-post runs in the run's own experiment (base included) ÷ that paid count, major units of the account currency; another experiment's runs on the post never count) are ratios: a running ad pauses once one leaves its window either way, ctr: [1.5, null] starts a post whose earlier ads clicked 3% and pauses when its CTR falls to 1 (stopped by rule: ctr 1 < 1.5), cost_per_clicks: [null, 0.8] starts at 0.50 a click and pauses at 0.90; 0 paid impressions or 0 of the count, an unread paid or a spend in another currency or a rotation's is not known (a start waits, a stop does nothing); refused where the run's platform does not report it paid (YouTube: cost_per_views only; LinkedIn: every cost, its views its impressions, and no ctr, as its post counts are organic only, e.g. cost_per_clicks: [null, 0.8] on a LinkedIn run pauses its ad once the post's LinkedIn runs spent 12.00 for 12 clicks; TikTok: none; a cost on a rotation). spend: [start, null]: the start is the post's paid spend so far across its runs in the run's own experiment (an experiment's, or base's): its per-post runs and its own ads in other rotations (a rotation's own ads never count for its own start); a stop is refused by name, as a run has one money value, e.g. spend: [null, 20] answers "spend stop: a per-post run has one money value, budget_per_post, e.g. budget_per_post: 2"; spend: [1, null] takes a post once its runs spent 1, e.g. a post whose ad in the viewers rotation spent 1.20 is taken; a spend not readable or in another currency holds the post, named (entry: spend not readable). posted_at: [after, before], e.g. ["2026-10-01T00:00:00Z", "2026-10-31T00:00:00Z"] takes only October's posts; rank_<metric>: [from, n], [1, 5] the top five, [6, 10] the next five; no_<metric>_hours: [start, null] (views, likes, comments, clicks) takes a post whose own total has not grown for that many whole hours, read from its snapshots, e.g. no_likes_hours: [6, null] (entry: none of no_likes_hours 3 < 6 while its likes grew 3 h ago; no snapshot yet: not known, it waits); its stop is a rotation's no-result stop only. A buy is made only once its post meets its run's start conditions (the caller's fields over them), as a rule run's post: until then it waits, named (entry: none of views_total 500 < 1000).; BB main's names map as organic_fans = views_organic, total_reach_fans = reach_total, engagement_fans = engagements_total, link_clicks = clicks_total, video_views = views_total), rank_<metric>: [from, n] (the post must rank from..n by that metric among the posts the run takes, newer first on a tie, e.g. rank_views: [1, 5] the top five); ... } per post (no run waits on another: each starts at its own start, e.g. { key: "meta_leads", rules: { since_post_hours: [6, null] } } after a 1 h awareness run; in any order), or { key, mode: "rotating", campaign.audience.custom.include: ["viewers_90"], campaign.budget_daily (money per day, major units; left out, it is the ads_running stop × budget_per_post × 24 / length_hours, e.g. ads_running [null, 5], budget_per_post 1.00, length_hours 1 → 120.00), campaign.budget_per_post and campaign.length_hours (per post, as a per-post run's), end (optional, ISO date-time: a lifetime budget of daily × the days to it; none: a daily budget with no end), cost_cap (optional, THRUPLAY only), rules.ads_running [null, n] (at most n running, newest first; an older one is paused and returns when a newer one drops out), objective: "REACH" | "VIDEO_VIEWS" (ThruPlays) | "LEADS" (an Instant Form with form and cta_type, Meta and TikTok), frequency_cap (REACH; default 1 per 7 days), no_<metric>_hours stops in its rules (none unless written): no_reach_hours: [null, 48] pauses an ad that reached no one in its last 48 h, no_views_hours: [null, 168] (a THRUPLAY rotation's result) one with no ThruPlay in its last 168 h, an ad live less than that not judged yet, judge_floor (Jev's data floor, as a per-post run's) } rotating retargeting: one long-lived ad set, one ad per qualifying Facebook post; taken out of the rules, or with the autopilot turned off, its ad set is paused] (an awareness run is a run with stage "awareness": rules with one run it on each post from its own start, like any other run, rules without one make no awareness run, e.g. an experiment's { campaigns: [{ key: "meta_views", removed: true }] } runs meta_leads with no awareness run), a target run's rules.judge_floor: Jev's data floor { judge_after (× the baseline cost per result, default 1), judge_floor_share (until the run has a baseline, an ad is judged once it spent this share of its run's money, 0..1, default 0.5), baseline_days (7), guidance (at most 200 characters), batch_max (judged ads per Jev call, default 80) } (the playbook's meta_engage and meta_leads runs carry it with jev { post: 1, money: 0 }; judge_floor.drop_max, realloc, drop_spend_x, drop_margin, raise_cap and min_hours_left are refused, naming jev.post or jev.money) }, a run's jev (the operator's switches for Jev, 1 = Jev may change that setting, 0 or absent = it may not; a per-post run's post, money (its budget), hours, entry; a rotating run's post, money (its daily, or its per-post budget when it sets budget and no daily, e.g. { key: "retarget", mode: "rotating", campaign: { budget_per_post: 1, length_hours: 2 }, rules: { jev: { money: 1 } } } moves the 1.00 a post), max_ads (its ads_running stop), entry; who an ad reaches (ages, gender, geo, audiences, widen), placements and objective are never Jev's, and jev.age_min / jev.age_max are refused; e.g. { key: "meta_leads", rules: { jev: { post: 1, money: 1 } } }; a step moves past your value either way, e.g. ads_running 5 → 6 → 7, hours 72 → 71, budget 5.00 → 5.50 → 6.05 (each start held within the wallet); only the money limits (the wallet) and the schema's own limits (an age 13 to 65, ads_running 1 to 50) stop a step; turning a switch on is no spend raise by itself); campaign.audience.custom.include also takes "page_fans" / "page_engagers" / "ig_engagers" / "ig_profile_visitors" / "ig_post_engagers" / "leads_90" / "form_dropoffs_90" (a rotation too: a viewer audience waits until it has a size, another is made once synced), and custom.exclude takes the same values to keep an audience out, e.g. custom: { exclude: ["leads_90"] } keeps past leads out of a lead run; content_source ["youtube"] takes the connected channel's videos, each its own Demand Gen campaign and budget on YouTube: budget per video, for when each video must reach the run's goal (objective VIDEO_VIEWS; a field YouTube's create does not send is refused, named; audience.geo { include: ["market"] } for a target, an awareness run outside the market); a YouTube campaign with content_source ["instagram"], ["facebook"] or ["tiktok"] takes that channel's videos, posts each once on the connected YouTube channel as a public video (its title the caption's first line without links) and advertises that video, later runs of the post advertising the same video, e.g. { key: "yt_views", campaign: { platform: "youtube", content_source: ["instagram"] } }; a channel connected without youtube.upload waits, re-checked each tick, reading "YouTube's sign-in of the channel does not allow posting (youtube.upload): reconnect YouTube on the account's Channels page"; a Meta campaign with another channel's posts (content_source ["youtube"] or ["tiktok"], or the other Meta app's) names the one app it posts them on in placements, its name alone or its positions, e.g. { key: "meta_views", campaign: { platform: "meta", content_source: ["youtube"], placements: ["instagram"] } }: each video is posted once there (an Instagram reel, or a Page video on Facebook) and advertised as that app's own post, later runs and a rotation of the post advertising the same post, never an ads-only video; naming no app, both, "own_app" or "automatic" is refused, reading "a YouTube post runs on Meta as its copy posted on one app: name the Meta app the copy is posted on, e.g. placements: ["instagram"]"; a connection without the permission to post waits, re-checked each tick, reading "Meta's connection does not allow posting its copy: reconnect Facebook to allow posting on Instagram (instagram_content_publish)" (on the Page: pages_manage_posts); a copy is posted once: an answer Meta lost after posting waits, named, and is never posted again, and a copy deleted on its app cancels the post's later runs, reading "cancelled: post I0Tz60ZmETA's copy on Instagram (17895550004) was deleted: it is not posted again"; platform ("meta" | "youtube" | "tiktok"; default its source's: "youtube" for YouTube videos, else "meta") is where a run runs, apart from where its posts come from: platform "tiktok" with content_source ["instagram"] (or ["facebook"]) takes the account's Instagram (or Facebook) videos, posts each once on the advertiser's TikTok account (a normal post on the profile; dark_post: true for ads only) and promotes it there, later runs of the post promoting that TikTok post (objective VIDEO_VIEWS or REACH for an awareness run, bought as views; TRAFFIC for link clicks to the post's landing (the landing rule: the caption's first link, else its first comment's when the business wrote it, else its channel's default link, else ad_texts landing); LEADS on the account's TikTok Instant Form (the run's form, or tiktok_default_form_id with form: "default"), its button the run's cta_type, e.g. { key: "tt_leads", campaign: { platform: "tiktok", content_source: ["instagram"], objective: "LEADS", form: "default", cta_type: "GET_QUOTE" } }; no form: the run fails, named; none of the Meta fields; geo as YouTube's, the countries TikTok lets the advertiser target); a rotating run's content_source ["youtube"] is one Demand Gen campaign on its daily, its videos sharing it, one ad group each: budget per group, for a goal across the videos (stage "target" in the market or "awareness" outside it, objective VIDEO_VIEWS; a field YouTube's create does not send is refused, named); a rotating run takes since_post_hours, a posted_at start and metric pairs on each post's own metrics (no rank_<metric>) (a video's from the channel's snapshots: views_total, likes_total, comments_total and their _organic and _per_hour); a condition on a metric its source does not report is refused; money: a per-post run's one money value is campaign.budget_per_post, any amount, a rotating run's campaign.budget_daily (with its optional per-post max and end); a platform's minimum, once known for the ad account, currency and objective (Meta's min_daily_budget, or a platform's refusal, kept), is used up front: a per-post run under it is made on the first call at the minimum's total and berg.ad pauses it once it has spent its budget_per_post, and the platform may spend a little past that before the pause, e.g. budget_per_post 1.12 under TikTok's 20.00 is sent at 20.00 and stopped at 1.12; with no minimum known it is tried at its budget, and the platform's refusal is kept (TikTok and YouTube send the minimum at once, Meta at the run's next attempt); a rotating run's budget_daily under the known minimum is refused, naming it, e.g. "rules: run meta_rot: budget_daily 0.5 is under Meta's minimum here, 3.00 EUR a day: a rotating run's daily is at least it, e.g. budget_daily: 3", and one not known is the platform's refusal in its words; the preview's minimums name the minimum of each run whose money is under it, e.g. { tt_views: "TikTok's minimum is 20.00 EUR a day. We stop at your budget, 1.12 EUR, but TikTok may spend a little more before it stops." }; no run has a spend stop: rules.spend's stop and stop_at_spend are refused by name; get_autopilot's preview shows each made run's own stop (route and berg.ad's cap); a buy of the run is its own campaign at its confirmed budget, held the same way under a minimum; which way was taken is logged, and a stop reads stopped by the rules: spend cap reached; objective "FOLLOWERS" (goal followers) takes no platforms, and takes cost_cap as any Meta per-post run, e.g. { key: "grow", campaign: { objective: "FOLLOWERS", cost_cap: 0.40 } } (Meta answers it). Only what differs from the playbook's rules is stored; everything else follows the playbook. A field or condition a run's platform does not take is refused, named.

  • rules object of any
    { posts: {…}, campaigns: [ { key, campaign: {…}, rules: {…} } ] } only what changes; every field, its default and its rule: docs.berg.ad, set_autopilot rules.
  • budgets object
    the two amounts, major units of the account's currency, the client's money, e.g. 50 = 50.00: each campaign with a share (campaign.budget_per_post_pct of per_post, budget_daily_pct of daily) takes that share as its own budget (over one sent in the same call; a share set in the same call is the one used), written once, previewed and confirmed as any budget change; a campaign without one is untouched; an amount left out or null (an empty box) is not sent, e.g. {per_post: 3, daily: null} sets only the per-post campaigns; refused in plain words when no campaign has a share of what was sent, e.g. {daily: 20} with no daily campaign answers "No campaign spends a daily amount yet: turn on Leads to use one." and the API's hint after it; e.g. {daily: 20} sets fb_leads and ig_leads, each budget_daily_pct 50, to budget_daily 10
  • budgets.per_post number | null
    major units of the account's currency, the client's money, e.g. 50 = 50.00: each per-post campaign's amount, e.g. 3 = 3.00 a post
  • budgets.daily number | null
    major units of the account's currency, the client's money, e.g. 50 = 50.00: each rotating campaign's amount a day, e.g. 20 = 20.00 a day
  • post_tag string | null
    advertise only the posts whose caption holds this one tag, stored with its #, e.g. '#gulet' (or 'gulet'): every campaign takes it as rules.caption_match {keywords: ['#gulet']}, a campaign joining later too (a channel connected, a goal turned on); it matches #gulet and #Gulet, never #guletlife; null advertises every post again, taking that caption_match off; a campaign with a caption_match of its own keeps it (caption_match_kept). Always previewed first: without confirm:true it answers {needs_confirm: true, post_tag: {from: null, to: '#gulet'}, changes, posts_days: 30, posts_matching: 4, posts_not_matching: 11}; the same call with confirm:true saves it, e.g. {post_tag: '#gulet', confirm: true}
  • enabled boolean
  • confirm boolean

get_experiments read-only

The account's experiments (set_experiments makes and changes them), base first: each experiment's settings as get_autopilot {detail: true} account.experiments (posts, campaigns), playbook and version, status, verdict, money as one line, e.g. '2.01 spent, 5.99 live', and this_month (spend, posts, leads, cost_per_lead). Every field: docs.berg.ad, get_experiments.

The account's experiments, read only (set_experiments makes and changes them): experiments lists each, base first: its settings as get_autopilot {detail: true} account.experiments (posts, campaigns), playbook and version, spent this month, live (what its ad sets can still spend), committed, status, verdict, as one line each, e.g. '2.01 spent, 5.99 live', and this_month (spend, posts, leads, cost_per_lead in the account currency; a YouTube or TikTok account's spend in another currency is spend_other_currency in its own money, never converted or added, e.g. [{"currency":"EUR","spend":1.25}] on a USD account).

get_experiments gives each experiment, base first, with the settings get_autopilot {detail: true} account.experiments give (posts, campaigns) beside its month.

No parameters.

set_experiments writes (destructive)

Experiments: sets of campaigns inside the account, each like a second client on the same posts, with its own playbook and its own name on its campaigns. Money never leaves an experiment: its month and Jev count only its own campaigns; an experiment has no budget of its own, and the wallet is the limit across every experiment. action create, update, stop or list. Without confirm create answers the month maximum, the preview and reach and changes nothing; with confirm:true after the owner's yes it starts; changed rules or expert need the same. e.g. {action: 'create', name: 'no-awareness', expert: 'bill', campaigns: [{key: 'meta_leads'}]} runs only a copy of base's meta_leads. Every rule: docs.berg.ad, experiments.

Experiments: sets of campaigns inside the account, each like a second client on the same posts, with its own playbook and its own name on its campaigns ("<campaign name> · <run> · <name> · <caption>", e.g. "Instagram · Views · US · Sailors · ig_views · bill2 · Sunset sail", run keys <run>#<id>). Every experiment sees the same posts and its own rules decide which it takes, so a post may land in several. Money never leaves an experiment: its month and Jev count only its own campaigns; an experiment has no budget of its own, its money reads from its campaigns' budgets and spend, and the wallet is the limit across every experiment. An experiment runs while the account's autopilot is on (list says paused (autopilot off) otherwise). Each experiment's runs make their own campaigns on every platform, an awareness-stage run as any other: two experiments with an awareness run on one post make two awareness runs. An experiment's runs promote its own ads-only copy of the post, never the post itself: on Meta a video, photo, album, carousel, link or text post is copied (Meta's refusal in its words; any other type is refused, named, e.g. '222_7 has media type EVENT: an experiment's copy is made of a video, photo, album, carousel, link or text post only'; get_post_stats lifecycle gives the reason under the experiment); a TikTok post's own file is pushed dark, e.g. post 7423456789012345678 with tt_click#1, never a Spark ad of it; a LinkedIn Page's post is posted again on the Page as a dark post (ads only, never in a feed) with its text and media, e.g. urn:li:ugcPost:7001 with li_click#1 promotes its copy urn:li:ugcPost:9001, made once and promoted by every run of the experiment on that post, and another channel's video is uploaded as that dark post; an experiment's YouTube run is cancelled, named (its own unlisted copy is not built); a TikTok LEADS copy (Smart+) is pushed with no dark_post_status, so its visibility is unobserved. Two experiments on one post bid in the same auction, so a comparison is indicative, not clean. An experiment runs only the campaigns it lists, each whole in it (every field its own): a change to base's campaigns never changes an experiment's, and a campaign added to base never joins it. create (name, expert, campaigns, posts): campaigns is the list it runs; a key base runs is copied from base's campaign as it is at that moment, the fields given over it, and the answer names each copy (copied_from_base); none given copies all of base's; e.g. {action: 'create', name: 'leads-only', expert: 'bill', campaigns: [{key: 'meta_leads'}]} runs only a copy of base's meta_leads. Without confirm it returns the month maximum, the preview and reach (per run of the experiment's rules, how many recent posts it admits now, as set_autopilot's) and changes nothing; with confirm:true after the owner's yes it starts. update (id, campaigns, posts, expert, goals): a partial write onto the experiment's own settings: campaigns by key onto its own stored campaign (a field null deletes it; {key, removed: true} takes the campaign out; a new key joins as a copy of base's), posts fields by name; e.g. {action: 'update', id: 1, campaigns: [{key: 'meta_leads', campaign: {budget_per_post: 6}}]} sets leads-only's meta_leads to 6 a post, base's untouched. Changed rules or expert need confirm:true after the owner's yes, as create (they answer rules_changed and posts_count, how many posts they reach); the name is not updatable; a stopped experiment is refused. Its rotations no longer in its rules are paused at once. Two experiments may run the same campaigns: create, update and set_autopilot answer with warnings naming, per platform, each run key another experiment (the account's own included) also runs, a numbered key counting as its own (fb_leads2 beside fb_leads, or meta_leads_2 beside meta_leads), an awareness-stage run as any other (e.g. awareness on two experiments is named), never refusing. stop: the experiment takes no new posts; a post it already started still gets its remaining runs (e.g. its meta_leads) and Jev judges them until they end; its running ads finish their days; a create a dead worker left is cancelled (its PAUSED objects stay as they are, never activated); verdict is one line you write, also later with stop again. The experiments are read with get_experiments, e.g. get_experiments {}. Every create, update and stop is audited as set_experiments and announced to the operator. A written change queues the account's check, which runs within about a minute when no other check holds its ad account, else at the next 15-minute tick (answer: checked.queued_at, e.g. 2026-10-27T10:02:11Z; get_autopilot shows what it made).

An experiment runs only the campaigns it lists, each whole in it (every field its own): base's campaigns and an experiment's never change each other, and a campaign added to base never joins an experiment. create starts one: {action: "create", name: "leads-only", expert: "bill", campaigns: [{key: "meta_leads"}]} first answers with the month maximum and the preview and writes nothing; the same call with confirm: true after the owner's yes starts it, running a copy of base's meta_leads as it is at that moment (copied_from_base: "meta_leads: base's campaign as now, stored whole in leads-only …"). A campaign given with fields is that copy with the fields over it, e.g. [{key: "meta_leads", campaign: {budget_per_post: 6}, rules: {since_post_hours: [12, null]}}]; a key base does not run is given whole, as set_autopilot takes a new one; campaigns left out copies all of base's. posts are its own: create copies the account's and the fields given go over them, e.g. posts: {lock: true}; a later change to the account's posts never reaches it. update changes a running experiment with only what changes: campaigns by key onto its own stored campaign, posts fields by name. {action: "update", id: 1, campaigns: [{key: "meta_leads", campaign: {budget_per_post: 6}}]} sets leads-only's meta_leads to 6.00 a post, base's meta_leads untouched; {campaigns: [{key: "meta_leads", campaign: {cost_cap: null}}]} deletes leads-only's meta_leads cost cap; {campaigns: [{key: "meta_views"}]} adds a copy of base's awareness as it is now; {campaigns: [{key: "meta_leads", removed: true}]} takes meta_leads out and pauses its live ads at once, their spend kept. Changed campaigns or a changed expert need confirm: true after the owner's yes (without it: the month maximum and the preview, nothing written). An experiment has no budget of its own: its money reads from its campaigns' budgets and spend, and the wallet is the limit, e.g. a rotation at 5.00 a day reads 155.00 in month_max and nothing refuses it. The name is not updatable (it is on the live campaign names) and a stopped experiment is refused. A rotation the update leaves out of its campaigns is paused at once. Every update is audited as set_experiments and announced to the operator. get_experiments gives each experiment, base first, with the settings get_autopilot {detail: true} account.experiments give (posts, campaigns) beside its month, e.g. get_experiments {}. create, update and set_autopilot never refuse two experiments running the same campaigns; their answer's warnings name, per platform, each campaign key this experiment and another running one (base included) both run, a numbered key counting as its own (fb_leads2 beside fb_leads, or meta_leads_2 beside meta_leads), settings not compared, e.g. leads-only beside base: "meta: leads-only and the account's own both run meta_leads: a post both take gets one meta_leads campaign from each; if that is not meant, remove it from one, e.g. experiments update {id: 1, campaigns: [{key: "meta_leads", removed: true}]}". Tell the owner; whether it is the comparison or a copy is their call.

  • action "create" | "update" | "stop" · required
  • name string
    create: 1-24 lowercase letters, digits or -, unique in the account; it goes on every campaign of the experiment
  • expert string · pattern ^[a-z0-9_-]{2,32}$
    create, update: an expert_id from list_playbooks; the experiment runs its playbook defaults (Bill's when it has none of its own)
  • campaigns array of object of any
    create: the campaigns the experiment runs, each whole in it, { key, campaign: {…}, rules: {…} } as get_autopilot {detail: true} account.experiments show them; a key base runs is a copy of base's campaign as it is now with the fields given over it (e.g. [{key: 'meta_leads'}] copies base's meta_leads; none given copies all of base's). update: merged by key into its own campaigns (e.g. [{key: 'meta_leads', campaign: {budget_per_post: 6}}]; {key, removed: true} takes one out; a new key joins as a copy of base's)
  • posts object of any
    create: the fields that differ from the account's posts, which the experiment copies when made; update: its own posts by field. A later change to the account's posts never reaches it (e.g. {lock: true})
  • confirm boolean
  • id integer
    update, stop: the experiment id from get_experiments
  • verdict string · max length 300
    stop: one line on what the experiment showed

sync_viewer_audience writes

Create or update the viewer audiences (30 and 90 days) and the page's standard audiences (the lead audiences leads_90 and form_dropoffs_90 over the page's stored forms among them), with TikTok connected TikTok's viewers_30 and viewers_90 (6-second viewers of the account's ad groups), and with a LinkedIn Page connected LinkedIn's (viewers of a quarter of a video of the Page's berg.ad video campaigns, e.g. a LinkedIn run's include ['viewers_90']); reads each back, fixes drift, and returns the audience ids, video count and size of each. The autopilot runs it daily: call it to refresh now. Use the audiences only with market geo. Spends nothing.

Create or update the viewer audiences (30 and 90 days). Per window: people who watched 15 seconds of a video of the page's Facebook posts (every post of the last 90 days, plus older posts that ran target-stage ads), and, with an Instagram account, a second audience of everyone who engaged with that account or its content or ads. Meta cannot tell one run's viewers from another's in either, so every run's are included; only a run's geo keeps them apart, e.g. geo { include: ['worldwide'], exclude: ['market'] } keeps a run's viewers outside the market where the viewer runs are. Without a Facebook video post only the Instagram audience is built; each part is sized on its own (sizes in health_check, plan_campaigns and get_benchmarks are the Facebook part's) and viewer runs target whichever part exists. The same sync keeps the page's standard audiences, page fans (page_liked) and page engagers (page_engaged, 365 days), video or not (standard; a kind Meta refuses is named in standard_refused and the other is still made). If Meta refuses the Instagram audience, the Facebook one is kept and the result says so (instagram_refused). Reads each audience back and fixes drift; recreates a deleted one. Returns the audience ids, video count and size of each. The autopilot runs it daily, and viewer runs target both audiences of their window. Use the audiences only with market geo. With TikTok connected it also keeps TikTok's viewers_30 and viewers_90, the 6-second viewers of the account's berg.ad ad groups (tiktok; a window TikTok refuses is named in tiktok.refused), e.g. a TikTok run with include ['viewers_30']. With a LinkedIn Page connected it also keeps LinkedIn's viewers_30 and viewers_90 on each Page's Berg ad account, the people who watched a quarter of a video of the Page's berg.ad video campaigns (linkedin; a new segment takes its campaigns at the next sync, and a window LinkedIn refuses is named in linkedin.refused), e.g. a LinkedIn run with include ['viewers_90']. Spends nothing.

No parameters.

In the answer

  • video_ids The Facebook video ids the viewer audiences are built from, e.g. ["1234567890"].
  • audiences[].audience_id The window's Facebook viewer audience id; null without a Facebook video post, e.g. "23851234567890".
  • channels[] With several Facebook Pages: each later Page's own sync, the same fields as the top level under the Page's id, built from that Page's videos and named with the Page (berg.ad viewers 30d · CB Greece), e.g. { "channel": "104729", "video_ids": ["2233445566"], "audiences": [{ "days": 30, "audience_id": "23851234567999" }] }; the first Page's stay at the top level, and a campaign's viewers_30 is the audience of the Page it runs as.
  • tiktok.audiences[] With TikTok connected: viewers_30 and viewers_90 on TikTok, each its id, what the sync did and its size (null while TikTok processes it), e.g. { "kind": "viewers_30", "audience_id": "196404823", "action": "created", "size": null }.
  • tiktok.channels[] With several TikTok sign-ins: each later one's own two audiences, built from the ad groups that advertise its posts, e.g. { "channel": "open_b", "audiences": [{ "kind": "viewers_30", "audience_id": "196404901", "action": "created", "size": null }] }; the first sign-in's stay in tiktok.audiences, and stay the account's own when that sign-in is connected, replaced or disconnected.
  • tiktok.refused TikTok's words for a window it refused, the other still written, e.g. "viewers_90: Invalid Params".
  • linkedin.audiences[] With a LinkedIn Page connected: viewers_30 and viewers_90 of the first Page, each its DMP segment (segment_id), what the sync did, LinkedIn's status, the ad segment a campaign targets (audience_id, null until LinkedIn names it) and its size (null until LinkedIn reads it READY), e.g. { "kind": "viewers_90", "segment_id": "77618274", "action": "updated", "status": "BUILDING", "audience_id": "848336", "size": null }.
  • linkedin.channels[] With several LinkedIn Pages: each later Page's own two audiences on its own Berg ad account, e.g. { "channel": "2414183", "audiences": [{ "kind": "viewers_30", "segment_id": "77618290", "action": "created", "status": null, "audience_id": null, "size": null }] }.
  • linkedin.note Why the first Page has no audience, e.g. "no berg.ad video campaign on LinkedIn yet: no LinkedIn viewer audience".
  • linkedin.refused LinkedIn's words for what it refused, the rest still written, e.g. "viewers_30: LinkedIn refused a rule: campaign 909291833: Input engagement sources must be existing".

list_audiences read-only

The ad account's custom audiences as the cron last read them (read_at): id, name, subtype, size, status; viewer marks berg.ad's viewer audiences (days, video count, last sync; the Instagram one has app: instagram and no video count); kind names standard and dynamic ones. in_market: true also estimates each size inside the market, live from Meta. youtube: the user lists of the account's own Google Ads account, read live (id, name, type; none on Berg's shared account, whose lists are Boosterberg's own), e.g. { id: '8342426986', name: 'SPLASH_only - GA4', type: 'REMARKETING' }; a YouTube run takes one by id in campaign.audience.custom.include or .exclude. Read-only.

The ad account's custom audiences: id, name, subtype, size (Meta's approximate range), retention days, created time, delivery and operation status. viewer_audience marks berg.ad's viewer audiences (days, video count, last sync, the Instagram one has app: instagram and no video count). kind: 'standard' (the page's fans, page engagers, the Instagram engagers, profile visitors and post engagers, and the lead audiences over the page's Instant Forms, 90 days: who sent one (leads_90) and who opened one and did not send it (form_dropoffs_90); standard names which, page_fans / page_engagers / ig_engagers / ig_profile_visitors / ig_post_engagers / leads_90 / form_dropoffs_90 usable in a run's campaign.audience.custom.include or .exclude, e.g. { custom: { include: ['page_engagers'], exclude: ['page_fans'] } }, { custom: { exclude: ['leads_90'] } }, { custom: { include: ['form_dropoffs_90'] } }) or 'dynamic' (berg.ad's viewer audiences, their Instagram part included), null for any other. The list and sizes are as the cron last read them, once a day (read_at): an audience made since is not listed yet. in_market: true also estimates each audience's size inside the account's market, live from Meta, best-effort: 'not estimated' when Meta gives no estimate. youtube: the picked Google Ads account's user lists, read live from Google when asked (id, name, type), e.g. { id: '8342426986', name: 'SPLASH_only - GA4', type: 'REMARKETING' }; YouTube builds no list of its viewers by API, so a list is made in Google Ads and a YouTube run attaches it by id, e.g. { custom: { include: ['8342426986'] } }; youtube_error names a failed read. Read-only.

  • in_market boolean · default false

In the answer

  • audiences[].channel On an account with several Facebook Pages: the Page one of berg.ad's own audiences is built from, e.g. "2222"; left out with one Page and on an audience berg.ad did not make.
  • audiences[].retention_days How many days back the audience holds people, as Meta gives it; null when it has none, e.g. 90.
  • audiences[].delivery_status, operation_status Meta's own status objects for the audience, as the cron read them; null when Meta gave none, e.g. {"code": 200, "description": "This audience is ready for use."}.
  • audiences[].viewer_audience.synced_at When berg.ad last synced that viewer audience; null never, e.g. "2026-11-03T03:05:00.000Z".

review_posts read-only

Meta posts only (Facebook and Instagram): Bill's weekly look at recent posts, with paid results by stage, funnel type, and amplify: 3-5 posts worth more money, each with a ready adjust suggestion. Use it to pick what to boost. e.g. {days: 14}. Read-only: it never runs adjust.

Meta posts only (it reviews Meta creative; a YouTube video's numbers are in get_post_stats). Bill's weekly look at recent posts, Facebook posts and Instagram media per the apps its campaigns take (default 14 days, max 30 per app), each with its platform: per post paid ThruPlays, cost per ThruPlay, average watch seconds, hold %, views (impressions), leads (form + DM; cost per lead only from 50 leads; below that 'too few leads to judge'), split by stage (awareness / target), plus the post's own totals. Each post's type is its place in the funnel from the posts store (aware / engage / convert, Jev's choice from its caption and its video's transcript, with type_confidence; null with type_note until it is classified; type_rule says how). amplify: 3-5 aware or engage posts worth more money, ranked by seconds watched per unit of in-market cost per ThruPlay, each with its reason and a ready adjust suggestion (add_budget ~20%, end_time when it ends within 4 days). Read-only: it never runs adjust.

By default each post comes without its paid results per stage, and with no amplify pick the posts are counted by reason instead, e.g. <code>{ "posts_count": 40, "not_qualified": [{ "amplify_note": "convert post: audience builders are aware and engage posts", "posts": 22 }] }</code>; <code>detail: true</code> lists every post with its <code>stages</code>. The answer's <code>platforms</code> names what it covers: <code>["meta"]</code>, the Facebook and Instagram posts, never a YouTube or TikTok post. Each post carries <code>likes_organic</code> and <code>likes_paid</code>, the latest stored read split the way rules read them, e.g. <code>{ "post_totals": { "reactions": 12 }, "likes_organic": 7, "likes_paid": 5 }</code>; null is not known. Read these, never work organic out of <code>post_totals</code>: a platform's public count can lag its own paid figure (live: 11 paid likes on a post showing 9). Each post's type is its place in the funnel, stored once per post in the posts store: berg.ad's tick reads every post of the account, has AssemblyAI transcribe a video's speech, and asks Jev to choose aware (awareness: broad, educational, inspiring or entertaining, no sales intent), engage (consideration: a solution, expertise, guidance, comparisons or social proof, at most a soft call to action) or convert (conversion: a specific offer, prices or product details, urgency, or a strong call to action to call, book or buy) from its caption and transcript. Example post (a listing with its price): {"post_id": "222_9", "caption": "Gulet Aurora · 7 nights from Split · from 1,200 EUR a week…", "type": "convert", "type_confidence": 0.97, …}; before Jev has answered: {"type": null, "type_confidence": null, "type_note": "not classified yet"}. amplify takes aware and engage posts only: a convert post's amplify_note is "convert post: audience builders are aware and engage posts".

  • days integer · default 14 · ≥ 1, ≤ 30
  • experts array of string · min items 1, max items 5
    a second opinion: these experts' sections come back next to the same numbers (list_playbooks)
  • detail boolean · default false
    true: every post with its paid results per stage; otherwise each post without its stages, and with no amplify pick only why posts did not qualify and how many, e.g. {amplify_note: 'convert post: audience builders are aware and engage posts', posts: 29}

In the answer

  • by_stage Every paid row of the range by campaign stage under the account's campaign_stages (industry: awareness, engagement, conversion; bill: social_proof, grow_retarget, ask; unrecorded where none is known), posts older than the range included, in the same fields as posts[].paid, e.g. {"awareness": {"spend": 4.0, "thruplays": 400, …}, "conversion": {"spend": 5.0, "leads": 2, …}}.
  • by_day Each day of the range, oldest first, from every paid row of the day: spend, views (impressions) and leads, a day with no delivery read as 0; null while a day of the range is not read yet (paid_days_error names it), never a day of zeros, e.g. [{"day": "2026-11-02", "spend": 8.4, "views": 1900, "leads": 1}, …].
  • notes Reading notes for the answer, and "only 2 posts qualify as audience builders (3–5 wanted)" when fewer posts than the playbook's minimum qualify.
  • posts[].stages The post's paid totals split by its ad sets' campaign stage, keyed as by_stage, each as paid, e.g. on Bill's funnel {"social_proof": {"spend": 1.0, …}, "grow_retarget": {"spend": 3.0, …}}.
  • posts[].paid.lead_verdict "enough leads to judge" at the playbook's lead_verdict_min_leads (50) or more, else "too few leads to judge (12 of 50)"; cost_per_lead is null below it. Also in stages, in_market and by_stage.

health_check read-only

Bill's guardrails as checks, each {check, platforms, status: ok|warn|problem|unknown, value, rule, action}; actions lists what to do, problems first. Use it before advising and when asked what needs attention, e.g. {check: 'frequency_30d', platforms: ['meta'], status: 'ok', value: 3.6}. Among them: spend_month (what berg.ad spent this month on every platform), the wallet (the prepaid credit: credit, used = what the account's own ads spent since the start (on Meta berg.ad's ads for it on the ad account, and, only while it is alone there, an Ads Manager ad promoting its page, e.g. two accounts on act_123 count neither a hand-made ad of the other nor one of their own; on TikTok and YouTube berg.ad's own runs), locked = held for the next 24 hours of running daily budgets plus what lifetime budgets have left: the most they should spend, not what they will, on every platform, each what the wallet takes for it, available = credit − used − locked − pulls (video pulls, flat), spend_30d and pace_per_day: the same own ads' spend on Meta, TikTok, YouTube, Pinterest and LinkedIn, each day in the account's currency at that day's rate, days_left at that pace (a platform unread: pace_per_day and days_left null, pace_error why, the check unknown); a warn under wallet_low_days (the playbook's, 7) days, a problem when nothing is available or no credit is set; below zero, each tick pauses berg.ad's own live ad sets newest first until the rest fits: wallet out), run_rate (a reading: the live ads' expected spend per day, e.g. live_per_day 25.00 from runs of 10.00 and 15.00). Every check: docs.berg.ad, health_check. Read-only.

Bill's guardrails as checks, each {check, status: ok|warn|problem|unknown, value, rule, action}: see the tool's description for spend_month, the wallet and run_rate, viewer audience size and growth (growth_7d_pct: the newest size against the one 7 days before it, the same figure weekly_report gives) with the month's cost of nurturing it, 30-day frequency on viewer retargeting (3-5), the Meta connection, the followers goal (cost per Page like and per Instagram profile visit over 7 days; reports only; the account's follower change is <code>followers_net</code>), awareness cost (an awareness ad set of the last 24h paying over the playbook's awareness_alarm.times × the account's 7-day awareness average per 1,000 views (impressions) warns; thin data is unknown; alert only), days since the last post on either app its campaigns take (7+ is a problem), lead delivery, the autopilot (last tick; runs not made in 7 days: blocked and waiting each with its reason, cancelled one line per run with its count and latest, e.g. {run_key: 'meta_views', runs: 182, latest: {post_id: '222_9', status: 'cancelled', reason: 'window passed (planned end 2026-10-07T15:35:06Z)'}}, get_autopilot {run_key} listing each), the autopilot's policy check of each post (policy_check: a problem while it is down; new posts wait, none goes out unchecked), changes made outside berg.ad in 7 days, lead ad sets paused or re-budgeted before 50 leads, ads Meta disapproved or flagged (ad_review: a problem only for ads berg.ad made; its value is one entry per reason Meta gave, its ads under it, e.g. [{reason: 'POLICY: Misleading claims', ads: [{ad_id: '120211001', name: 'berg.ad auto · meta_leads · Sail Vis', effective_status: 'DISAPPROVED', made_by: 'berg.ad'}, {ad_id: '120211002', name: 'Spring offer', effective_status: 'DISAPPROVED', made_by: 'outside'}]}], and its action counts them, e.g. "1 berg.ad ad(s) rejected or flagged by Meta, for 1 reason(s), each with its ads in value: tell the owner Meta's reason; never edit and resubmit; pausing is safe. 1 more not made by berg.ad (made_by outside); the owner handles them in Ads Manager."), the ad account's status, payment method and spending limit (ad_account), the account guards (rejections_30d, spend_cap_used_pct, rejections_url_30d: a problem while one holds new starts on a platform, e.g. 3 berg.ad ads rejected or flagged by Meta in 30 days; nothing new starts there, live ads keep running; unknown when the spending limit or the posts' URLs could not be read), berg.ad ads still running in Meta's bottom 10% on quality, engagement or conversion ranking over 30 days (ad_quality), creative features Meta has on (creative_features: Advantage+ creative enhancements, product browsing, multi-advertiser ads, read from Meta once a day for every live berg.ad ad, the autopilot on or off; a problem; unknown when the daily read has not completed for 2 days; berg.ad changes nothing on the ad; every creative berg.ad makes is sent with the add-ons Meta turns on by default off, e.g. product_extensions (product showcase, on by default from Marketing API v27), product_browsing and contextual_multi_ads each { enroll_status: 'OPT_OUT' }, and only those, as Meta refuses a whole creative for a feature name it no longer takes), and Meta rate-limit usage of 75%+ on the account's ad account, page, Instagram account or the app (api_usage). actions lists each check's action as check: action, problems first, e.g. ["wallet: wallet running low: available 152.11 USD covers 5.4 days …"]; ad_review's action counts its ads and reasons, the reasons and ads stay in its value. Read-only.

Each check names what it covers in <code>platforms</code>; a Meta-only check says nothing about a YouTube or TikTok run, e.g. <code>{ "check": "frequency_30d", "platforms": ["meta"], "status": "ok" }</code> beside <code>{ "check": "spend_month", "platforms": ["meta", "youtube", "tiktok"], "status": "ok" }</code>.

No parameters.

In the answer

  • checks[youtube].value.floor_refusals YouTube runs refused under Google's per-day minimum in the last 30 days, newest first, at most 50: at, run_key, post_id, account, floor and sent a day as the money the client deposited, in the Google account's currency, e.g. [{"at": "2026-10-30T09:15:00.000Z", "run_key": "yt_views", "post_id": "vid-abc", "account": "1112223333", "floor": 5, "currency": "EUR", "sent": 3}].
  • checks[youtube].value.rolling Each rotating YouTube run: its videos with days_in, spend and share of the campaign's spend since they joined, its days ({day, cost}) and month ({cost, cap}), plus starved and days_over_budget, money in major units of its Google account's currency.
  • checks[youtube].value.rolling[].starved Video ids active in the run at least its no_views_hours stop in days (14 with none) that got under a quarter of an even share of the campaign's spend, e.g. ["vid-abc"].
  • checks[youtube].value.rolling[].days_over_budget Days this month the campaign cost more than its daily, each with that budget, e.g. [{"day": "2026-10-29", "cost": 7.4, "budget": 5}].
  • checks[google_api_usage].value.accounts_youtube_live On an account with a live YouTube run, how many accounts have one (null on an account with none). Google's daily operations limit (Basic access, 15,000) is one for all of them; from 25 the check warns to apply for Google Ads API Standard, e.g. 27 with the action 27 accounts have live YouTube runs: apply for Google Ads API Standard (10–15 business days).
  • checks[viewer_audience].value.as_of The date of the newest Facebook viewer audience size, e.g. "2026-11-02".
  • checks[viewer_audience].value.age_days Whole days since that size, e.g. 1.
  • checks[viewer_audience].value.growth_note Present when videos were added to the audience since the size 7 days before: "videos were added to the audience: growth not comparable yet".
  • checks[viewer_audience].value.viewers_30d The 30-day viewer audience projected 30 days ahead at its current growth (never below today's size), people, e.g. 1450.
  • checks[viewer_audience].value.nurture_cost_month What showing those projected viewers the playbook's minimum frequency (3) in a month costs at the last 30 days' in-market CPM, major units of the account currency; null without in-market delivery, e.g. 52.2.
  • checks[awareness_cost].value.adsets[].average_7d The account's 7-day cost per 1,000 views outside the market, the ad set's own spend left out, major units; times is the ad set's last-24h cost ÷ it (null when too thin to judge), e.g. 1.42.
  • checks[followers].value.facebook.cost_per_page_like Spend ÷ Page likes of the Facebook followers ad sets over the last 7 days, major units, e.g. 0.31.
  • checks[followers].value.instagram.cost_per_profile_visit Spend ÷ Instagram profile visits of the Instagram followers ad sets over the last 7 days, major units (visits, not follows), e.g. 0.08.
  • checks[followers].value.followers_net The account's net change in followers over the same 7 days, every connected channel's kept total (Facebook's Page follows, Instagram's followers, YouTube's subscribers, TikTok's followers), e.g. -2; null when no day of them is kept yet.
  • checks[autopilot].value.last_tick_minutes_ago Minutes since the cron's last tick; null never; over tick_stale_minutes it is a problem, e.g. 4.
  • checks[autopilot].value.rotations[].ads_added_7d Ads the rotation added in the last 7 days, e.g. 3.
  • checks[policy_check].value.warned, unavailable Posts the policy check warned on, and posts waiting for a verdict while the check was down, in the last 7 days, each {post_id, reason, checked_at}, e.g. [{"post_id": "222_9", "reason": "…", "checked_at": "2026-11-02T08:00:00.000Z"}].
  • checks[policy_check].value.down_since, down_reason Only while the check is down: since when and why; posts wait, none is promoted unchecked, e.g. "2026-11-02T07:45:00.000Z".
  • checks[ad_account].value.account_status Meta's account status number: 1 active; any other is a problem with its meaning in action, e.g. 9 (in its grace period: a payment failed).
  • checks[ad_account].value.disable_reason Meta's disable reason number, 0 none, named in action when the account is not active, e.g. 3 (RISK_PAYMENT).
  • checks[ad_account].value.funding_source Whether the ad account has a payment method; false is a problem, e.g. true.
  • checks[creative_features].value.not_checked Present when live ads had no creative spec to check, e.g. "2 live ads not checked: no creative spec".

plan_campaigns read-only

Bill's plan for the month, computed, never improvised: the stage, spend_month split across views / grow / retarget / ask, the posts each share buys, the frequency maths and proposed autopilot rules. Use it when the owner asks what to run, e.g. {spend_month: 600}. Read-only: the owner says yes, then set_autopilot takes the rules, their campaigns followed by campaigns_to_remove (the current campaigns the plan leaves out), with confirm.

Bill's plan for the month, computed, never improvised: the account_step (seasoning below 1,000 viewers; growing until a week of retargeting reaches 60% of viewers at 2x; nurturing until 30-day viewer frequency reaches 3; then asking), spend_month split across views / grow / retarget / ask by the playbook's % per account step (major units, adding up to spend_month), how many posts each share buys at the current autopilot prices and the proposed per-post amounts (posts a month = qualifying Facebook posts and Instagram media its campaigns take, each promoted on its own app; each run's money is divided over the posts it takes), Bill's frequency maths (viewers x 4 / 1000 x in-market CPM of the last 30 days = the monthly retargeting cost; below 3 a month the budget is too small), and proposed autopilot rules. followers: the owner's % of spend_month for page and Instagram followers, proposed as FOLLOWERS runs (the account's own, else fb_followers, ig_followers, fb_followers2 and ig_followers2). Retargeting is one rotating run (one long-lived ad set showing the viewers the newest posts, its share as a daily budget: the share ÷ 31). account_step, when given, overrides the measured step (else the profile's account_step, else the measured one), e.g. {spend_month: 100, account_step: 'nurturing'}. Read-only: the owner says yes, then set_autopilot takes the rules, their campaigns followed by campaigns_to_remove (the current campaigns the plan leaves out), with confirm.

  • account_step "seasoning" | "growing" | "nurturing" | "asking"
    the owner's account step, when it differs from the one the numbers give, e.g. 'nurturing'
  • spend_month number · required
    what the owner wants to spend a month, major units of the account's currency, the client's money, e.g. 50 = 50.00: the plan divides it into run budgets, it is never stored and limits nothing. With no amount from the owner, start from what the account spends: health_check spend_month (spent this month so far) or get_ad_stats runs' spend over the last 30 days
  • followers integer · ≥ 1, ≤ 99
    % of spend_month the owner gives to growing the page's and Instagram account's followers (FOLLOWERS runs); the stage's jobs share the rest by their %
  • experts array of string · min items 1, max items 5
    a second opinion: these experts' sections come back next to the same numbers (list_playbooks)

In the answer

  • account_step_source Where account_step came from: "input" (this call), "profile" (the business profile's account_step) or "rules" (the account's numbers), e.g. "rules".
  • account_step_why The numbers behind the step in one sentence, and what the numbers say when the step was given, e.g. "1200 viewers, not retargeting yet: start a small retargeting share and grow the audience".
  • account_step_measured The step the account's numbers give, whatever was asked, e.g. "growing".
  • account.viewers_audience_days, viewers_as_of The viewer size's window (always 90) and its date, e.g. "2026-11-02".
  • account.retarget.reach_7d_pct, frequency_7d The retargeting ad sets' 7-day reach as % of the viewers, and how often each reached person saw them in 7 days; retarget is null while nothing retargets, e.g. {"reach_7d_pct": 48, "frequency_7d": 1.6, "frequency_30d": 3.1}.
  • account.posts_per_month The posts a month each job's money is divided over, e.g. 24.
  • account.posts_source Where posts_per_month came from: "qualifying posts in the last 30 days", "posting_cadence" or "default (N a month)", with " × 2 apps" when posts are promoted on two apps, e.g. "posting_cadence × 2 apps".
  • account.buying_cycle_days The business profile's buying cycle, else the playbook's, in days, e.g. 90.
  • split.&lt;share&gt;.pct The share of spend_month at this account step, % (the shares are views, grow, retarget, ask, followers; a views share with no views run goes to the others), e.g. 40; amount is that share in major units.
  • split.&lt;job&gt;.run_keys_now, budget_per_post_now_all_runs, posts_at_budget_now_all_runs, budget_per_post_planned The current runs doing the job, their summed per-post budget (major units; null none), how many posts the job's amount buys at it, and the per-post budget of the job's run in the rules (null when it is not per post), e.g. ["meta_leads"], 4, 60, 4.
  • frequency.target_frequency The playbook's times a month each viewer should see the business, e.g. 4.
  • frequency.retarget_cost_month What showing every viewer target_frequency times a month costs at the last 30 days' in-market CPM (viewers × 4 ÷ 1000 × CPM), major units; null without in-market delivery, e.g. 69.6.
  • frequency.viewer_money The money the plan puts on the viewers: the retarget share, plus the ask share once a viewer audience exists, major units, e.g. 180.
  • frequency.frequency_bought How many times a month viewer_money shows each viewer: viewer_money × target_frequency ÷ retarget_cost_month, one decimal; under 3 the budget is too small, e.g. 3.4.
  • frequency.spend_month_covers Whether spend_month alone covers retarget_cost_month; null when that cost is not known, e.g. true.
  • ask_options The proposed ask run as a lead form or as DMs, beside the owner's sales_capacity; each option names when it fits, e.g. {"objective": "MESSAGES", "fits": "someone … answers every DM within 5 minutes …", "run": {…}}; null without an ask run.
  • notes What the plan left out or could not fund, and why, e.g. "retarget: no viewer audience yet (sync_viewer_audience); its share stays unspent until one exists".

weekly_report read-only

The Monday report as data plus a plain-text summary to send: spend so far this month and the run rate, results per stage, followers, viewers, leads received, the week's decisions and what needs the owner's yes. week (any date of that week) returns the report stored that Monday, with that week's keys and labels, e.g. {week: '2026-10-26'}. Read-only.

The Monday report as data plus a plain-text summary to send: spend / ThruPlays / leads / Page likes / profile visits per campaign stage over the last 7 days, followers results per app with their cost (followers), the viewer audience to retarget (Facebook video viewers, all geos) and its growth (growth_7d_pct, as health_check's), leads received, what the autopilot started or skipped (with reasons), every status or budget decision of the week (a run's override, set_status, adjust) and Jev's pauses, each experiment beside the account's own runs (experiments: spend, posts, leads received, cost per lead; only when the account has experiments), what needs the owner's yes (health_check actions, review_posts picks), and the owner's move. week (any date of that week) returns the report the cron stored that Monday (for accounts with the autopilot on, or off with a live berg.ad ad; a failed one is tried once more an hour later). Read-only.

  • week string · pattern ^\d{4}-\d{2}-\d{2}$
    a past week: any date in it (YYYY-MM-DD); omit for now

In the answer

  • stages The week's Meta paid totals per campaign stage, keyed as review_posts by_stage (industry: awareness, engagement, conversion; bill: social_proof, grow_retarget, ask; unrecorded): spend, views, thruplays, cost_per_thruplay, leads, form_leads, dm_leads, page_likes, profile_visits, e.g. {"awareness": {"spend": 3.0, "views": 3000, …}, "conversion": {"spend": 5.0, "leads": 2, …}}; each other platform's under its id, one entry per run stage, campaign_stage and currency, e.g. "tiktok": [{ "stage": "awareness", "campaign_stage": "awareness", "currency": "EUR", "spend": 2.1, "views": 900, … }].
  • by_day The week's Meta paid totals per day, review_posts by_day over the same days (spend, views, leads); null while a day is not read yet. The business's email draws the views as bars, e.g. [{"day": "2026-11-02", "spend": 8.4, "views": 1900, "leads": 1}, …].
  • top_post The week's post with the most paid views on Facebook or Instagram: its id, app, caption (60 characters), paid views and leads, and its thumbnail as the posts store keeps it (null when none is kept); null when no post had paid views, e.g. {"post_id": "17841_9", "platform": "instagram", "caption": "4 boats left for June", "views": 5940, "leads": 3, "thumb": "https://…"}.
  • week_before The week before's spend from its stored report, the Meta stages and the other platforms' in the account's currency; null when that week has no stored report, it failed, a part of it was not read or it holds spend in another currency, e.g. {"spend": 18.2}.
  • raises_spend What needs the owner's yes because it raises or moves spend: a viewer_audience or frequency_30d finding ({from: "health_check", check, action}) and each review_posts amplify pick ({from: "review_posts", post_id, caption, reason, adjust}), e.g. [{"from": "review_posts", "post_id": "222_9", "adjust": {"adset_id": "120211", "add_budget": 2}, …}].
  • fyi Every other health_check problem, warn or unknown, {check, status, action}, e.g. [{"check": "outside_changes", "status": "warn", "action": "2 change(s) made outside berg.ad in 7 days …"}].
  • your_move The owner's to-dos: a post reminder when the newest post is older than the owner's posting_cadence allows (else the playbook's max_days_without_post); [] when there is none, e.g. ["no post in 9 days: post this week (…)"].
  • advice_followed Per expert, how many log_advice records the week has, e.g. {"bill": 2}.
  • viewers.audience_days The viewer audience window the figures read, always 30.
  • viewers.week_ago The viewer audience size at least 7 days before the newest (the growth's base); null when there is none, e.g. 1180.
  • viewers.growth_note Present when videos were added to the audience: "videos were added to the audience: growth not comparable yet".
  • changes[].ts When the decision was recorded, e.g. "2026-10-28T09:12:44.120Z".
  • funnel.blended_pct, cohort_pct Per step (view_to_thruplay, thruplay_to_viewer, viewer_to_lead) the blended and cohort rates of get_benchmarks, in %; funnel is a one-line note instead until a cohort exists, e.g. {"view_to_thruplay": 11.8, "thruplay_to_viewer": 34.2, "viewer_to_lead": 0.9}.

get_benchmarks read-only

The funnel in percentages from Meta's delivery only: views → ThruPlay, ThruPlay → local viewer, viewer → DM/lead, over 30 days, each step beside its cohort, with the weakest step. Needs vertical, area, region and country in the business profile. Read-only, no Meta call.

The funnel in percentages, Meta's delivery only (YouTube has no ThruPlay and TikTok's, its 15-second focused view, is not counted here, so their views never enter the funnel; their numbers are in get_post_stats and get_ad_stats): views → ThruPlay (15s), ThruPlay → local viewer, viewer → DM/lead per month, over the last 30 days of daily snapshots (the cron writes one a day after 04:00 UTC for consumers with autopilot on). Per step: own rate and events, the cohort rate (same vertical and area, stepping up to region, country, then all businesses in the country; the narrowest level with 5+ opted-in businesses, each with 20+ events at the step; a trimmed mean and n only, never another business's numbers), the blended rate (own weight = events / (events + 50)), and the weakest step against its benchmark. Below 5 businesses: "not enough businesses yet (n of 5)". Needs vertical, area, region and country in the business profile. Read-only, no Meta call.

No parameters.

In the answer

  • cohort_profile The business profile fields the cohort uses, e.g. {"vertical": "sailing-school", "area": "Split", "region": "Split-Dalmatia", "country": "HR", "cohort_opt_in": true}.
  • steps[].own_pct This account's rate at the step over the 30 days, %, one decimal; null with no events, e.g. 12.4.
  • steps[].own_events The step's input events over the 30 days (views, ThruPlays or viewers), e.g. 5200.
  • steps[].own_note Present when the step has events but no comparable output: the viewer audience's videos changed in the window, or it has one size.
  • steps[].cohort.rate_pct, stat The cohort's rate at the step, %, and how it is averaged: "trimmed mean (highest and lowest business dropped)", e.g. 10.9.
  • steps[].own_weight_pct This account's weight in the blend, events ÷ (events + k), whole %; 100 without a cohort, e.g. 84.
  • steps[].blended_pct own × weight + cohort × (1 − weight), %, one decimal, e.g. 12.1.
  • steps[].vs_benchmark_pct The blended rate against the cohort's, % above (positive) or below (negative); null without a cohort, e.g. -18.5.
  • weakest.cohort_pct The weakest step's cohort rate, %, e.g. 14.2.

save_business_profile writes (destructive)

Store the owner's answers Bill needs before planning, the cohort for get_benchmarks, and the account's markets and special ad category. Partial answers merge; null clears one. Each field's meaning is on its parameter. e.g. {offer: 'week-long beginner sailing courses', buying_cycle_days: 60}.

Store the owner's answers Bill needs before planning: avatar (who loves the business and why), offer, qualifiers, buying cycle days (default 90), language, posting cadence, sales capacity (who answers leads and how fast); the cohort for get_benchmarks: vertical (stored as a lowercase slug), area (city or metro), region (state), country (ISO code), cohort_opt_in (default true: its rates count, only inside averages of 5+ businesses, in others' benchmarks); goals (how much followers, views, likes, visits and leads matter: 0 not needed, 1 nice to have, 2 must have, at least one above 0, e.g. { leads: 2, views: 1 } for warm-up views that feed lead ads; a goal above 0, at either level, brings its campaigns and sets no money; goals is stored whole, so a save names every goal kept on, e.g. { views: 2, leads: 2 } turns Leads on beside Views; a save that turns a goal on or off answers needs_confirm with ask, e.g. "Turn on 2 Leads campaigns?", campaigns_stopping and campaigns_starting, e.g. [] and ['fb_leads', 'ig_leads'], and campaign_budgets, the money of each, e.g. { fb_leads: { budget_daily: 10 }, ig_leads: { budget_daily: 10 } } (budget_per_post for a per-post campaign), nothing saved: confirm:true saves and changes them (a stopped campaign's running ads stop, their spend kept), keep_campaigns:true saves only the goals; get_ad_stats answers them beside each run's cost per result, and the set-up's Budget page splits its estimate equally over the goals above 0 among followers, views, likes and visits, e.g. { followers: 2, likes: 1 } splits it between followers and likes); and on the account itself: markets (as set_account_settings, its warnings too) and special ad category (new campaigns use it). Partial answers merge; null clears one.

  • avatar string | null
    who loves the business and why, e.g. 'adults who want to learn to sail on their summer holiday'
  • offer string | null
    what the business sells, e.g. 'week-long beginner sailing courses'
  • qualifiers array of string | null
    what makes a lead worth a call: budget, timeline, size, location, need, e.g. ['budget over 5,000', 'travels within 12 months']
  • buying_cycle_days integer | null
    days from first view to sale, e.g. 60; unset: the playbook's buying_cycle_days
  • language string | null
    the language of the ads and the form, e.g. 'English'
  • posting_cadence string | null
    how many posts of which kind, per week, e.g. '3 reels and 1 offer'
  • sales_capacity string | null
    who answers leads, on which channel, how fast, e.g. 'Ana answers WhatsApp within an hour'
  • account_step "seasoning" | "growing" | "nurturing" | "asking" | null
    account step hint for plan_campaigns when the owner knows better than the numbers; unset lets the account's numbers decide, e.g. 'nurturing'
  • vertical string | null
    the business type in plain words, e.g. 'Sailing school' is stored as the slug sailing-school
  • area string | null
    city or metro, e.g. 'Split'
  • region string | null
    state or region, e.g. 'Split-Dalmatia'
  • country string | null
    ISO 3166-1 alpha-2 country code, e.g. 'HR'
  • cohort_opt_in boolean | null
    default true: this business's rates count in other businesses' benchmarks, only inside averages of 5 or more businesses; false leaves it out, and get_benchmarks then shows only its own rates, e.g. false
  • goals object | null
    how much each goal matters to the business: 0 not needed, 1 nice to have, 2 must have; at least one above 0. A goal above 0, at either level, brings its runs (views: VIDEO_VIEWS, likes: ENGAGEMENT, followers: FOLLOWERS, visits: TRAFFIC, leads: LEADS): the playbook's, or Berg's default run where the playbook has none for it on a connected channel; the level sets no money, the runs' budgets do, and get_ad_stats reads it back beside each run's results. goals is stored whole, so a save names every goal kept on, e.g. {"views":2,"leads":2} turns Leads on beside Views. A save that turns a goal on or off answers needs_confirm with ask, e.g. "Turn on 2 Leads campaigns?", the keys in campaigns_stopping and campaigns_starting, e.g. [] and ['fb_leads', 'ig_leads'], and campaign_budgets, each one's money in the client's money, e.g. {fb_leads: {budget_daily: 10}, ig_leads: {budget_daily: 10}} (budget_per_post for a per-post one), nothing saved; confirm:true saves and changes the campaigns (a stopped one's running ads stop, their spend kept), keep_campaigns:true saves the goals and leaves the campaigns. The set-up stores each goal picked as 2. E.g. a business that needs leads, with views and follows nice to have: {"leads":2,"views":1,"followers":1}
  • markets array of object | null
    where the business sells, the whole list of its named markets as set_account_settings takes it, e.g. [{ name: 'US', countries: ['US'] }]; null clears them
  • special_ad_category "NONE" | "HOUSING" | "EMPLOYMENT" | "FINANCIAL_PRODUCTS_SERVICES" | "ISSUES_ELECTIONS_POLITICS"
    Meta's special ad category; new campaigns use it, e.g. 'HOUSING'
  • confirm boolean
    true: save goals that start or stop campaigns, and change them (the needs_confirm answer names them)
  • keep_campaigns boolean
    true: save goals that would start or stop campaigns and leave the campaigns as they are

get_business_profile read-only

The owner's stored answers (profile), goals_playbook: the goals the account's playbook runs serve, each true while it is on, e.g. {views: true, leads: false}, which save_business_profile goals turns on or off; and missing: the required answers not given yet. Interview for those before planning.

The owner's stored answers (save_business_profile), goals_playbook and missing: the required answers not given yet. Interview for those before planning. goals_playbook: the goals the account's playbook runs serve (the goals its set-up offers), each true while it is on (no goals stored reads every one on, as the campaigns were copied), e.g. { views: true, leads: false } for a views and leads playbook with Leads off; turn one on or off with save_business_profile goals, e.g. { goals: { views: 2, leads: 2 } } answers the campaigns it would start first.

No parameters.

graph read-only

Read-only escape hatch to the Graph API: GET under this account's objects, only when no other tool returns the field you need; it never returns leads. e.g. {path: '/222_9', params: {fields: 'shares'}}.

Read-only escape hatch to the Graph API: GET under this account's ad account, page, Instagram account or their objects. Use it only when no other tool returns the field you need; it never returns leads. Writes go through the other tools.

  • path string · required
    a Graph path from /: an object id, optionally followed by one of its edges, e.g. '/222_9'
  • params object of any

whoami read-only signed-in person

Who this connection acts as: the signed-in person (id, email, role: admin, partner or client) and, for a client, the partner they belong to. e.g. {} answers {id: 'u_8f2c', role: 'partner', …}

No parameters.

list_accounts read-only signed-in person

The accounts you reach: an admin every account, a partner those under him (partner_id) and those he is a member of, anyone else those he is a member of; each with its connected channels (channels: one entry per Facebook page, Instagram account, YouTube channel, TikTok account, Pinterest profile, LinkedIn Company Page and LinkedIn profile, its app and its id there; a person's own LinkedIn profile is {app: 'linkedin_profile', channel_id: 'yrZCpj2Z12'}, a channel + Add post posts on and nothing is read of) and its members (id, email), 100 at a time by id. Each account tool takes one of them as account (id or name). e.g. {limit: 50, offset: 50} answers [{id: 5, name: 'sailing-split', channels: [{app: 'facebook', channel_id: '222'}, {app: 'facebook', channel_id: '555'}, {app: 'youtube', channel_id: 'UCabc'}], currency: 'EUR', partner_id: 'u_8f2c', members: [{id: 'u_91ab', email: 'ana@sailing-split.example'}]}]

  • limit integer · ≥ 1, ≤ 500
  • offset integer · ≥ 0

assign_account writes signed-in person

Add a member to an account (member: a person's id or email; every member reaches and manages the account equally), or set the partner it is under (partner_id, admin only). An admin adds anyone to any account; a partner adds one of his clients (list_people) to his own accounts. Members leave through remove_member. e.g. {account: 'bills_b', member: 'joe@example.com'}

  • account integer | string · required
  • member string · min length 1
  • partner_id string | null

create_account writes signed-in person

Partners and admins: onboard a business as a new account, with the operator's onboarding checks (the page and permissions are verified on Meta; without page_id the account has no Facebook page; a page another account holds is fine, each account keeping its own posts, campaigns, money, leads and comments). Its ads run on berg.ad's own ad account, as every account's do; the business only gives berg.ad's business a role on its page. You become its first member, your email its report_email (e.g. bill@example.com; set_account_settings changes it), and it is under you (an admin: under your partner, if any); assign_account then adds the business's people. A client sets up his own account at https://mcp.boosterberg.com/admin instead. Answers the account's own key once. privacy_url is optional, a bare domain or http:// saved as https://, and no lead ad starts until the account has one (set_account_settings); markets is optional: until one is set, a run aimed at a market or kept outside one waits on each post, named 'no main region set', and ends after the playbook's money_wait_hours like any wait. An account under a partner gets its own affiliate link code, its name as a slug (affiliate_code), its playbook the account's when the partner's clients may pick it. e.g. {name: 'sailing-split', page_id: '1234', privacy_url: 'sailing-split.example/privacy', markets: [{name: 'HR', countries: ['hr']}]}, or without a page or markets {name: 'sailing-tt', privacy_url: 'https://sailing-split.example/privacy'}. The money is what the playbook's runs set; the wallet limits it.

  • playbook string
    the account's playbook, its runs copied onto the account (list_playbooks), e.g. 'billpro'; left out: the playbook of the account you joined last, else of the link you signed up through, else your partner's (you as a partner: your) latest playbook his clients may pick, else the admin's latest, else bill
  • goals array of "followers" | "views" | "likes" | "visits" | "leads" · min items 1
    what matters to the business, as the set-up page asks (leads too, which the page does not ask): only the playbook's runs of these goals are copied (views: VIDEO_VIEWS, likes: ENGAGEMENT, followers: FOLLOWERS, visits: TRAFFIC, leads: LEADS), each stored as 2 (must have) in the business profile, save_business_profile changes a goal to 1 (nice to have), e.g. ['views']; a goal the playbook has no run for on a channel takes Berg's default run for it, e.g. likes on Facebook brings fb_engagement; left out: every run of the connected channels
  • name string · required
  • page_id string
    the business's Facebook page; leave out for an account with no Facebook page (one started from TikTok or YouTube)
  • ig_id string
  • privacy_url string
    the business's privacy policy, needed before a lead ad starts; https is added to a bare domain, e.g. 'acme.example/privacy'
  • markets any
    the business's markets, as set_account_settings takes them, e.g. [{ name: 'HR', countries: ['hr'] }]; optional, set later on the account's Main region page or with set_account_settings
  • special_ad_categories array of string
  • lead_webhook_url string
  • default_form_id string

switch_all_ads writes (destructive) signed-in member of the account

Admin only: the Ads switch for every account at once. Off pauses every live campaign berg.ad runs on every platform, account by account in the queue, and every account's own switch reads off and cannot be turned on until this one is on; on brings back what it paused, and an account whose own switch was off stays off. A change needs confirm:true: the first call answers what it would do, e.g. {on: false} answers {needs_confirm: true, pauses: {accounts: 40, campaigns: 310}, spend_check: [...]}, up to: a rotation paused outside berg.ad and a run whose ad set's end passed on its platform are counted but left as they are; the yes answers at once with what it queued, e.g. {changed: true, on: false, queued: {accounts: 40, campaigns: 310}}, and each account's pass runs in the background; {} answers how it stands with each platform account's spend from 30 days ago through today against what berg.ad counted.

The admin's switch over every account's switch_ads: off pauses each account with something live through its own pass, one queue message an account (so 200 accounts run in parallel batches; the next 15-minute tick runs any the queue dropped), and every account reads off with its own switch shown as it was; the yes answers at once with what it queued, e.g. {changed: true, on: false, queued: {accounts: 3, campaigns: 162}}, its counts up to (a run whose ad set's end passed on its platform is counted, and its account's pass leaves it as it is), and the off ask carries the spend check; on brings back what was paused in each account whose own switch is on, and leaves the rest off, e.g. Sailing Split turned off by its owner on Monday stays off when the admin turns every account on again on Tuesday.

  • on boolean
    false pauses every account; true brings them back, e.g. false
  • confirm boolean
    true once you said yes to what the first call answered, e.g. true

list_people read-only signed-in person

The people you see: an admin everyone, a partner his clients, a client himself. Each: id, email, name, role, partner_id, affiliate_code (the code they signed up through, e.g. 'sailing-joe'; null: none), profit_share_pct, banned.

No parameters.

set_person writes signed-in person

The admin: a person's role (admin, partner, client; ban: true disables them, false lets them back), the partner a client belongs to, and a partner's profit_share_pct (his % of berg.ad's fee minus Stripe's on his clients' top-ups, list_partner_cuts computes it; berg.ad pays it outside). The admin, or a partner for himself: return_url (https only) and proxy_code (one of his affiliate codes), what connect_link needs. Only what is passed changes. e.g. {id: 'u_8f2c', role: 'partner', profit_share_pct: 30}, or as the partner {id: 'u_8f2c', return_url: 'https://partner.example/marketing', proxy_code: 'sail-ops'}

  • id string · required · min length 1
    the person (list_people)
  • role "admin" | "partner" | "client"
  • partner_id string | null
    the partner this client belongs to; null: none
  • profit_share_pct number | null
  • ban boolean
  • return_url string | null
    a partner's: where his customers (connect_link) go back to after Berg's set-up and from every other Berg page; null: connect_link is off, e.g. 'https://partner.example/marketing'
  • proxy_code string | null
    a partner's: the affiliate code, one of his own, a customer gets when connect_link sends no code; null: none, e.g. 'sail-ops'

create_key writes signed-in person

A new key for you, for an app or script that can't sign in with Google: Authorization: Bearer <key> at /mcp acts as you. Shown once; list_keys names it, revoke_key ends it. e.g. {name: 'laptop'}

  • name string · max length 80

list_keys read-only signed-in person

Your keys: id, name, first characters, created, last used. Never the key itself.

No parameters.

revoke_key writes (destructive) signed-in person

End one of your keys at once (list_keys gives its id).

  • id string · required · min length 1

disconnect writes (destructive) signed-in person

Sign a person out everywhere: their Google sessions, their keys and every app connected as them (OAuth). You may disconnect yourself, a partner his clients, an admin anyone. Account keys are not touched. e.g. {id: 'u_8f2c'}

  • id string · min length 1
    the person; left out: you

In the answer

  • disconnected The id of the person signed out, beside what was ended, e.g. "u_8f2c".

delete_playbook writes (destructive) signed-in person

Delete a playbook you own (an admin: any but bill), its versions and its place on allow lists. Refused while an account runs it, naming them. e.g. {expert_id: 'billpro'}

  • expert_id string · required · min length 1

allow_playbooks writes signed-in person

Partner: the playbooks anyone else on your accounts (the admin aside) may choose as default_expert or an experiment's expert, and all list_playbooks shows them besides the account's current one (replaces the list; [] lets them choose any they reach). Each must be yours, public or berg.ad's. A new account takes only a playbook on it: an affiliate link's playbook taken off the list falls back to your latest one on it. e.g. {expert_ids: ['billpro', 'bill']}

  • expert_ids array of string · required · max items 50

save_affiliate writes signed-in person

Partner, or the admin for a partner (partner, his id or email): add or update an affiliate link code (yours to choose, unique across berg.ad) with your notes (who, where and how you pay them), the share you pass on (share_pct, % of the top-ups of the accounts set up through the code: share_pct 50 and a 200 top-up show 100 pending, due after 30 days) and the playbook a new account made by someone who signed up through the code starts on (one your clients may pick; left out or null: your latest playbook your clients may pick, else the admin's latest; one they may not pick is refused by name). A field left out keeps its value. berg.ad shows what each code sold and is due and keeps the ledger of payments you log; the payment itself is made outside berg.ad. The admin's code is the named partner's, as if he saved it: his sales, due and ledger, his clients' playbooks; an existing code edited without partner stays its partner's; a partner naming another is refused. e.g. {code: 'sailing-joe', notes: 'Joe Smith, PayPal joe@example.com, 10% for 12 months', share_pct: 10, playbook: 'billpro'}, or as the admin {code: 'harbour-ann', partner: 'bill@example.com', share_pct: 5}

  • code string · required · pattern ^[a-z0-9][a-z0-9-]{1,38}[a-z0-9]$
  • notes string | null
  • share_pct number | null
  • playbook string | null
    the playbook a new account made through the code starts on, one your clients may pick (list_playbooks), e.g. 'billpro'; null: the fallback (your latest playbook your clients may pick, else the admin's latest)
  • partner string · min length 1
    admin only: the partner the code belongs to, his id or email, e.g. 'bill@example.com' or 'u_8f2c'; required on a new code, left out on an existing one it stays its partner's; a partner naming another is refused

list_affiliates read-only signed-in person

Your affiliate codes (an admin: every partner's, with partner_id): notes, share_pct, playbook (null: the fallback), people (signed up with the code) and totals per currency, in major units of its currency: sold (top-ups paid, before tax, by the accounts set up through the code), pending (share_pct of the top-ups of the last 30 days), due (share_pct of older top-ups minus paid), paid (the ledger, log_affiliate_payment); pending and due are null until share_pct is set. e.g. {} answers [{code: 'sailing-joe', share_pct: 10, playbook: 'billpro', people: 2, totals: [{currency: 'EUR', sold: 150, pending: 5, due: 7, paid: 3}]}]

No parameters.

list_partner_cuts read-only signed-in person

Partner: your cut of what your clients topped up, per client account and month (of the top-up) and currency, major units of that currency: top_ups (paid before tax, a refund taken off in its top-up's month) and cut (your profit share of berg.ad's profit on them, after Stripe's fees); a credit recorded by hand earns none; cut is null with cut_unknown saying why while Stripe's fee is not read yet or no share is set. An admin reads every partner's, with partner_id, fee and stripe_fee. e.g. {} answers [{account: 2, name: 'harbour-tours', month: '2026-10', currency: 'EUR', top_ups: 100, cut: 10.72}]

No parameters.

log_affiliate_payment writes signed-in person

Partner: record a payment you made to one of your affiliates (made outside berg.ad; the admin logs one on any partner's code, kept under that partner); it counts as paid and lowers the code's due. amount in major units of currency (12.50 EUR is 12.50, kept as 1250 cents); paid in another currency than the code's sales, it lowers the due by its value at paid_on's ECB rate (due, due_currency), e.g. 12.50 EUR against USD sales at 1.08 lowers it by 13.50 USD. A wrong row is deleted (delete_affiliate_payment) and logged again. e.g. {code: 'sailing-joe', amount: 12.5, currency: 'EUR', paid_on: '2026-10-30', note: 'PayPal joe@example.com, October'}

  • code string · required · pattern ^[a-z0-9][a-z0-9-]{1,38}[a-z0-9]$
  • amount number · required
    major units of currency, e.g. 12.50 = 12.50 EUR (kept as 1250 cents)
  • currency string · required · pattern ^[A-Z]{3}$
  • paid_on string · required · pattern ^\d{4}-\d{2}-\d{2}$
  • note string | null

list_affiliate_payments read-only signed-in person

The payments logged to your affiliates, newest first (an admin: every partner's): id, code, partner_id, amount (major units of currency, e.g. 12.5 = 12.50 EUR), currency, due (major units of due_currency: what it lowered the due by), due_currency, paid_on, note. e.g. {code: 'sailing-joe'}

  • code string · min length 1

In the answer

  • due_minor, due_currency What the payment lowers the code's due by, in the currency its sales are in: what was paid (amount, currency) at paid_on's ECB rate, e.g. 1350, "USD" for 12.50 EUR at 1.08; the same as amount and currency when it was paid in that currency.
  • created_at When the payment was logged, milliseconds since 1970 UTC, e.g. 1761900000000.

delete_affiliate_payment writes (destructive) signed-in person

Partner: delete a payment you logged by mistake, the admin any partner's (list_affiliate_payments gives its id); the code's due rises by its amount again. e.g. {id: 12}

  • id integer · required

list_members read-only signed-in member of the account

The account's members (every one reaches and manages it equally): id, email, name, added_by, added_at. e.g. {} answers [{id: 'u_8f2c', email: 'joe@example.com', …}]

  • account integer | string | object
    the account to act on, by id or name (list_accounts), e.g. 5 or 'sailing-split'; a partner names his customer's (connect_link) by its ref, e.g. {ref: '3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f'}; may be left out when you reach exactly one

remove_member writes (destructive) signed-in member of the account

Take a member off the account (list_members gives the id); the last member stays. e.g. {user_id: 'u_8f2c'}

  • user_id string · required · min length 1
  • account integer | string | object
    the account to act on, by id or name (list_accounts), e.g. 5 or 'sailing-split'; a partner names his customer's (connect_link) by its ref, e.g. {ref: '3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f'}; may be left out when you reach exactly one

archive_account writes (destructive) signed-in member of the account

Archive the account, the admin's or its partner's: the autopilot off, every channel removed (its live ads switched off, their spend still counted), automatic top-up off, the Stripe top-up link switched off and an automatic top-up invoice in progress voided; the account leaves every list and its keys stop working. Its deposits, spend, leads and log stay. Berg's staff get one Slack alert naming the account and its Available (deposited − spent, the client's money with fees, e.g. 60.00 EUR) to refund by hand; money still paid in later is credited and named to staff the same way. Already archived, or a partner's customer with no account yet (account {ref}), it answers success and changes nothing. e.g. {account: {ref: '3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f'}} answers {archived: 'sail-split', disconnected: ['facebook', 'instagram']}

  • account integer | string | object
    the account to act on, by id or name (list_accounts), e.g. 5 or 'sailing-split'; a partner names his customer's (connect_link) by its ref, e.g. {ref: '3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f'}; may be left out when you reach exactly one