Skip to content

Campaigns

CutX campaigns let sellers launch ads on Meta, TikTok, and Google Ads directly from the platform.

draft → active → paused → active → completed
│ │
└→ canceled └→ canceled
StatusDescription
draftCampaign created but not yet launched
activeLive on the ad platform, spending budget
pausedTemporarily stopped, can be resumed
completedBudget exhausted or end date reached
canceledManually stopped, cannot be resumed

Each ad platform has a dedicated adapter implementing a common interface:

PlatformAPICapabilities
MetaGraph API v21.0Facebook + Instagram ads
TikTokBusiness API v1.3TikTok feed ads
Google AdsAds API v17Search + Display campaigns

All adapters support:

  • createCampaign() — create campaign, ad sets, and ads
  • pauseCampaign() / resumeCampaign() — lifecycle control
  • getSpend() — fetch spend and performance data
  • uploadCreative() — upload images or videos as ad creatives

Before launching campaigns, users must connect their ad platform accounts via OAuth:

GET /api/campaigns/connect/meta
GET /api/campaigns/connect/tiktok
GET /api/campaigns/connect/google

These initiate OAuth flows that store access/refresh tokens in ad_platform_connections. Tokens are encrypted at rest and refreshed automatically.

CutX charges a percentage fee on ad spend managed through the platform:

Subscription TierFee Rate
Free6%
Starter6%
Pro5%
Agency4%

Fees are calculated during the daily analytics sync and recorded in the ad_spend_fees table.

Example: A Pro-tier user spending $100/day on Meta ads pays $5/day in platform fees.

Campaign performance data is pulled daily from each platform and stored in campaign_analytics:

MetricDescription
impressionsNumber of times the ad was shown
clicksNumber of clicks on the ad
spendAmount spent in the user’s currency
conversionsTracked conversion events
ctrClick-through rate (clicks/impressions)
cpcCost per click (spend/clicks)
roasReturn on ad spend (revenue/spend)

The sync pulls the last 7 days of data on each run to capture any attribution updates from the ad platforms.

Each campaign can have multiple creative assets attached:

POST /api/campaigns/<id>/assets
Content-Type: application/json
{
"asset_id": "uuid",
"role": "primary"
}

Assets are generated through the generation system and linked to campaigns for deployment to the ad platform.