Skip to content

Campaigns

CutX connects to ad platforms via OAuth and lets you launch campaigns with your generated assets.

GET /api/campaigns?projectId=<uuid>&status=active&platform=meta
Authorization: Bearer <token>
ParamTypeDescription
projectIduuidFilter by project
statusstringdraft, active, paused, completed, error
platformstringmeta, tiktok, google

Response (200):

{
"campaigns": [
{
"id": "uuid",
"name": "Summer Sale Push",
"platform": "meta",
"status": "active",
"objective": "sales",
"budget_daily": 50.00,
"start_date": "2026-03-10",
"created_at": "2026-03-09T10:00:00Z"
}
]
}
POST /api/campaigns
Authorization: Bearer <token>
Content-Type: application/json
{
"projectId": "uuid",
"platform": "meta",
"name": "Summer Sale Push",
"objective": "sales",
"budgetDaily": 50.00,
"startDate": "2026-03-10",
"endDate": "2026-03-31",
"targeting": { "age_min": 25, "age_max": 45 },
"assetIds": ["uuid", "uuid"]
}
FieldTypeRequiredOptions
projectIduuidYes
platformstringYesmeta, tiktok, google
namestringYes1-200 chars
objectivestringNoawareness, traffic, engagement, leads, sales
budgetDailynumberNoPositive
budgetTotalnumberNoPositive
startDatestringNoISO date
endDatestringNoISO date
targetingobjectNoPlatform-specific targeting
assetIdsuuid[]NoLink generated assets
PUT /api/campaigns/<id>
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Updated Name",
"budgetDaily": 75.00,
"status": "paused"
}

Pushes the campaign to the connected ad platform.

POST /api/campaigns/<id>/launch
Authorization: Bearer <token>

Requires an active platform connection (see below). The campaign transitions from draft to pending_review or active depending on the platform.

DELETE /api/campaigns/<id>
Authorization: Bearer <token>

Only draft campaigns can be deleted.

GET /api/campaigns/connect/meta
Authorization: Bearer <token>

Redirects to the platform’s OAuth flow. After authorization:

GET /api/campaigns/connect/callback?code=<code>&state=<state>
GET /api/campaigns/connections
Authorization: Bearer <token>

Response (200):

{
"connections": [
{
"id": "uuid",
"platform": "meta",
"account_name": "My Business",
"platform_account_id": "123456",
"status": "active",
"connected_at": "2026-03-01T10:00:00Z"
}
]
}

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

GET /api/campaigns/fees
Authorization: Bearer <token>
TierFee
Default6% of ad spend
Agency plan4% of ad spend

Pull latest spend data from connected platforms.

POST /api/campaigns/sync-spend
Authorization: Bearer <token>

Syncs the last 7 days of spend data and updates campaign_analytics.

StatusMeaning
draftNot yet launched
pending_reviewAwaiting platform approval
activeRunning
pausedTemporarily stopped
completedEnded
rejectedPlatform rejected
errorSync or API error