> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eversince.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Ads

> Campaigns, creatives, audiences, tracking, rules and results on the connected ad accounts, in five tools.

Five tools work on the connected ad accounts: Meta, TikTok, LinkedIn, Google, Pinterest, X, Reddit and ChatGPT. The tools are free to call. Ad spend is billed by the platform to the user's own ad account.

| Tool | Covers |
| - | - |
| `manage_ads` | The ad account, campaigns, ad sets and ads, creatives, previews, catalogs, ad comments |
| `read_ad_results` | What the ads did |
| `manage_ad_audiences` | Who an ad reaches |
| `manage_ad_tracking` | Pixels, URL tags, lead forms, leads and conversions |
| `manage_ad_rules` | Rules that watch the ads and act |

Campaigns, ad sets, ads and their numbers are refreshed from each ad platform in the background, typically every 15 to 60 minutes, and Google Ads up to about 3 hours. A read of the campaigns says when they were last refreshed. Audience breakdowns are read from the platform at the moment they are asked for.

## Actions and fields

Each tool takes an `action`, and the action's values go in `fields`. The `fields` action describes them: with nothing else it lists every action of the tool with a line on what it does; with `of` it lists what one action takes; `field` reads inside one field by its path, such as targeting or placements; `match` keeps the fields whose name or text has those letters. A field that is not on the list is refused by name.

Every action on an ad account takes `account_id`, an ad account connection from `manage_social_accounts` `list`. `ad_account_id` names an ad account on that connection, from `manage_ads` `ad_accounts`. `id` is the campaign, ad set, ad, audience or other thing the action is about, and `sub_id` a second id where one thing is inside another, such as a comment on an ad.

## The campaign tree

Campaigns, ad sets and ads are made and changed on their own: `create_campaign`, `create_ad_set`, `create`, then `update_campaign`, `update_ad_set` and `update_ad`. `boost` runs an existing post as an ad, and `create_message_ad` and `create_call_ad` make message and call ads. `duplicate_campaign`, `duplicate_ad_set` and `duplicate_ad` copy one, and a copy is made paused. `delete_campaign`, `delete_ad_set` and `end` remove them.

`health` checks an ad account before creating. `validate_only` in `fields` checks a call without creating anything. `preview` and `ad_preview` return how an ad looks, and `review` the platform's review of it.

## Creatives

A media field takes a library item, so a picture or a video in the workspace is the ad's creative. `create_creative`, `upload_image` and `upload_video` add to the ad account's own library, and `boostable_posts` lists the posts that can run as ads.

## On and off

`create`, `boost`, `create_message_ad` and `create_call_ad` start live unless `fields.status` is PAUSED. `campaign_status`, `ad_set_status` and `ad_status` switch one level on or off. In a workspace that keeps agents' posts and ads for approval, an agent's new ad is made paused for a person to switch on; see [Approval and what agents can do](https://docs.eversince.ai/publish/approval.md).

Meta holds an ad account for days after a burst of writes, so writes to it go one at a time. A Meta Ads connection takes 25 changes in 5 minutes. Past that, a change is refused with the minutes until the next one can go.

## Running ads

An ad account slot includes 100 ads running at once, and an ad pack adds 500 (`manage_social_accounts` `add_ad_pack`, \$10 a month). `allowance` on `manage_ads` returns `running` and `included`. With every included ad running, switching another on is refused until one is paused or a pack is added.

## Audiences

On `manage_ad_audiences`, `search` finds targeting ids (places, interests, behaviors, job titles, employers, industries, languages), `browse` walks Meta's categories, and `reach` estimates an audience's size. `bid_pricing` and `forecast` return LinkedIn's bid bounds and expected delivery. `list`, `get`, `create`, `update` and `delete` manage custom audiences: a customer list, website visitors by pixel, people who engaged, a lookalike of another audience, or a saved targeting. `add_people` and `remove_people` take emails or phone numbers, hashed before they reach the platform.

## Tracking and lead forms

On `manage_ad_tracking`, `pixels` lists an ad account's pixels, and `tags` and `set_tags` read and set an ad's URL tags. `create_lead_form`, `lead_forms` and `archive_lead_form` manage lead forms, `leads` and `form_leads` read what people submitted, and `set_lead_status` marks one. `send_conversions` and `adjust_conversions` report conversions, `destinations` lists where events go with their campaigns and metrics, and `match_quality` reads Meta's Event Match Quality.

## Rules

A rule on `manage_ad_rules` has a level (campaign, adset or ad), conditions on a metric over a window, one action (pause, activate, `adjust_budget`, `adjust_bid`, `reallocate_budget`, duplicate, `edit_name`, notify) and a schedule. `templates` lists ready-made rules. A rule made with `enabled` false can be checked with `preview` before `update` switches it on. `runs`, `changes` and `alerts` read what a rule did, and `undo` takes one change back.

An ad account includes 750 rule checks a month across its enabled rules, counted from their schedules: an hourly rule is 744 checks, a daily one 31. `allowance` reads the count. A rule that switches ads on counts against the running ads.

## Results

On `read_ad_results`, `tree` returns campaigns, ad sets and ads with their metrics over a window: spend, impressions, clicks, ctr, cpc, cpm, reach, conversions and roas, with a daily series on request. `ranked` orders ads by a metric, and `timeline` is the ad account by day. `ad` and `campaign` add breakdowns by age, gender, country, placement and device, and on Meta by each picture, video and text of an ad. `insights` is a live query at any level with attribution windows, and `start_report` and `report` run a large one. `studies` lists A/B and lift tests, and `ad_library` searches the public ad libraries of Meta and LinkedIn. Reach is counted within a day and is not summed across days.

## Numbers and alerts of the workspace's own

A number of the workspace's own is a name and a formula over spend, impressions, clicks, results, purchase\_value and reach: profit at a known margin, value per click, cost per thousand reached. `manage_ads` `save_measure` keeps one and `delete_measure` drops one. `read_ad_results` `measures` lists them, and with an ad account named returns each with its value over the window. A number can carry an alert, `alert_when` above or below with `alert_value`: past that value it is listed under Needs attention on the Campaigns page and comes back with `alerting` true. Each alert is also checked once a day over the last seven days, and a number that has just passed its value sends the workspace's people a phone notification.

What needs attention has three sources. The ad platforms' own alerts (a rejected ad, a failed payment, spend with no result, a budget at its cap) are read with `manage_ads` `alerts` and cleared with `dismiss_alert`; `get_workspace_overview` returns the open ones as `ads_attention`. A rule whose action is notify alerts on any condition a rule can hold, per campaign, ad set or ad. A number of the workspace's own alerts on a figure no platform reports. All three are shown to the user on the Campaigns page.

## Why run ads from the workspace

The footage, the ads and their results are in one place. An ad's creative is a library item, and its results come back per ad and, on Meta, per picture, video and text. A creative that did well or badly can be analyzed and remade where it was made: a new hook, a shorter cut or a variation on its timeline, or a new generation, then run as the next ad. A connector that reaches only the ad account, such as Meta's MCP, manages the ads; here the creative's source item and the tools that edit it are in the same workspace.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.