Skip to content

Ads

Audiences, Campaigns and Ads on your own Meta, Google, Bing, LinkedIn, Reddit, X and TikTok ad accounts, spent only under a standing approval.

System
Ads
Nouns
4
Verbs
6
Events
6
Ad.create
You, to your agent

Add the third ad to the LinkedIn test: the renewal-notice angle, with the checklist image.

curl -X POST "https://api.sb/leaseline.app/ads/create?mode=try" \
  -H "Authorization: Bearer $SB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"campaign":"campaign_Li4tX9pQ2w","format":"image","headline":"Every renewal notice, 60 days out, for every owner","body":"Leaseline tracks rent and lease renewals for property managers with 20 to 400 units. $149 a month per portfolio.","media":["file_Rn6cK2vT8m"],"landingUrl":"https://leaseline.app/renewals","cta":"learn-more","variant":"renewal-notice"}'
npx startup-builder do Ad.create --try --data '{"campaign":"campaign_Li4tX9pQ2w","format":"image","headline":"Every renewal notice, 60 days out, for every owner","body":"Leaseline tracks rent and lease renewals for property managers with 20 to 400 units. $149 a month per portfolio.","media":["file_Rn6cK2vT8m"],"landingUrl":"https://leaseline.app/renewals","cta":"learn-more","variant":"renewal-notice"}'
{
  "name": "do",
  "arguments": {
    "mode": "try",
    "code": "return await $.Ad.create({ campaign: 'campaign_Li4tX9pQ2w', format: 'image', headline: 'Every renewal notice, 60 days out, for every owner', body: 'Leaseline tracks rent and lease renewals for property managers with 20 to 400 units. $149 a month per portfolio.', media: ['file_Rn6cK2vT8m'], landingUrl: 'https://leaseline.app/renewals', cta: 'learn-more', variant: 'renewal-notice' })"
  }
}
import { $ } from 'startup-builder'

const result = await $.try.Ad.create({ campaign: 'campaign_Li4tX9pQ2w', format: 'image', headline: 'Every renewal notice, 60 days out, for every owner', body: 'Leaseline tracks rent and lease renewals for property managers with 20 to 400 units. $149 a month per portfolio.', media: ['file_Rn6cK2vT8m'], landingUrl: 'https://leaseline.app/renewals', cta: 'learn-more', variant: 'renewal-notice' })
Response
{
  "api": "https://api.sb/leaseline.app",
  "ad": {
    "$type": "Ad",
    "campaign": "https://api.sb/leaseline.app/campaigns/campaign_Li4tX9pQ2w",
    "format": "image",
    "variant": "renewal-notice",
    "state": "inReview",
    "landingUrl": "https://leaseline.app/renewals?utm_source=linkedin&utm_medium=paid&utm_campaign=campaign_Li4tX9pQ2w&utm_content=renewal-notice",
    "spend": null,
    "outside": null
  },
  "action": {
    "operation": "Ad.create",
    "mode": "try",
    "status": "done"
  }
}
Try mode reads, stores nothing and spends nothingAPI referenceIts Nouns

Nouns

NounWhat it is
CampaignA Campaign is a bounded effort toward a Goal, with a budget, a window, and the Ads or Messages it sends to Audiences.
AdAn Ad is one paid or house placement promoting an offer to an Audience, in a format such as search, display, or video.
AudienceAn Audience is a saved query over Visitors, leads, Prospects, or customers, used to target Ads and Messages.
Demand BudgetA Demand Budget is the money a founder commits each month to demand Plays, recorded as a Decision with a target and a stop rule.

Properties

The hub defines each Noun’s core Properties; Ads adds the ones a sale needs.

Campaign

PropertyTypeWhat it holdsDefined by
budgetmoneyWhat it may spend.The hub
startsAtdatetimeWhen it starts.The hub
endsAtdatetimeWhen it ends.The hub
venueVenueIdWhere it runs, such as facebook or linkedin.Ads
state'draft' | 'live' | 'paused' | 'ended'Where it stands on the ad account.Ads
stopRulestringThe reading that pauses it, read each day from your own results.Ads
billBillThe budget, booked as a Bill you owe the site.Ads

Ad

PropertyTypeWhat it holdsDefined by
formatstringOne of search, display, image, or video.The hub
spendmoneyWhat it has cost so far.The hub
review'pending' | 'approved' | 'rejected'The site’s review; a rejected Ad comes back with the site’s reason.Ads
headlinestringAt the site’s length, such as 27 characters on a Meta feed ad.Ads
landingUrlstringThe page it sends clicks to; it must answer before the Ad is created.Ads

Audience

PropertyTypeWhat it holdsDefined by
sizeintegerHow many people match.The hub
matchedintegerHow many members the ad account matched, as it reports.Ads

Demand Budget

PropertyTypeWhat it holdsDefined by
amountmoneyThe monthly spend it funds; zero is the default.The hub
tierstringOne of $0, $100, $1k, $10k or $100k: the highest tier at or below the amount, whose Play mix it buys.The hub
targetstringThe Metric value the spend must reach, such as cost per first Order under $40.The hub
stopRulestringThe reading that closes the budget, such as acquisition cost above margin for two weeks.The hub
untildateThe last day the budget runs before its Decision is read.The hub
statusstringOne of Open, Stopped or Closed. A closed budget is kept with its Evidence.The hub

Lifecycle

Every move names the Verb that makes it, or the Event it waits on.

Campaign

StateWhat it meansMoves to
draftOn the ad account, not serving: its first Ad has not passed review.live on Ad.updated; ended by Campaign.update
liveServing and spending inside its budget and your standing approval.paused by Campaign.update; ended by Campaign.update
pausedStopped by its stop rule or by you; its spend so far is booked.live by Campaign.update; ended by Campaign.update
endedPast its end date, or closed; its results stay readable.None: it ends here.

Verbs

VerbWhat it doesApprovalOn each siteLimits
Campaign.createOpens a Campaign on your connected ad account, with its budget, window and stop rule, and books the budget as a Bill.Asks you first above its seat ruleGoogle Search, Google Display, YouTube, LinkedIn, Facebook, Instagram, Bing, Reddit, TikTok, XThe budget is booked as a Bill; over your approval rule it asks first unless a standing approval covers it.
Campaign.updatePauses a Campaign, or changes its budget, bid or end date on your ad account, inside your standing approval.Asks you first above its seat ruleGoogle Search, Google Display, YouTube, LinkedIn, Facebook, Instagram, Bing, Reddit, TikTok, XA raise past your standing approval waits with over-mandate.
Ad.createBuilds one ad in a Campaign on your connected ad account; it runs once the site’s review passes.Goes out on its ownGoogle Search, Google Display, YouTube, LinkedIn, Facebook, Instagram, Bing, Reddit, TikTokEvery new Ad passes the site’s own review before it serves.
Audience.createMatches a list from your records, such as your waitlist, to an Audience on your ad account, every email hashed first.Runs on its ownGoogle Search, Google Display, YouTube, LinkedIn, Facebook, InstagramNone.
Mandate.spendPays an outside party with a single-use card, inside your standing approval.Asks you first above its seat ruleNone.None.
Ad.updateChanges an Ad’s copy, creative or status; a changed Ad goes back through the site’s review.Runs on its ownNone.None.

A Verb that asks you first runs on its own inside a standing approval: a Mandate you grant once with Mandate.authorize.

Events

EventEmitted by
Campaign.createdCampaign.create
Campaign.updatedCampaign.update
Ad.createdAd.create
Ad.updatedAd.update
Audience.createdAudience.create
Mandate.spentMandate.spend

A Trigger can start a Workflow on any of them, and a Watch delivers each to your endpoint, signed (Events and webhooks).

Who operates it

PartAds
AccountablePaid Media Manager
Also calls its VerbsMarketing lead
SeatAn agent holds each seat until you seat a person in it.
Asks you firstCampaign.create, Campaign.update, Mandate.spend, unless a standing approval covers it

Integrations

Meta Ads · Google Ads · Microsoft Ads · LinkedIn Ads · Reddit Ads · X Ads · TikTok Ads

Import and export

DirectionWhatHow
ImportCampaigns already on your ad accountIntegration.sync reads them in as Campaigns and Ads, with their spend to date
ExportSpend and results by Ad and dayMetric.query, or Collection.export to your warehouse

Example

A $100 test that pauses its own losers.

  1. Campaign.create opens a one-week Campaign on Meta with $100 and a stop rule: pause an Ad past $15 with no trial.
  2. Ad.create adds four Ads, one per angle; Meta rejects one for implying a guaranteed result, and it is rewritten.
  3. On day 3, two Ads pass $15 with no trial. Campaign.update pauses them and moves their $39 to the leaders.
  4. Metric.query reads trials per dollar from your own account each day until the winner rule names one.

Contents