Create and Manage Campaigns by API
Quick answer
All paths start with https://traffic-creator.com/api/v1/account and need a full-access key in the X-API-KEY header (reading and the cost preview work with a read-only key).
1. Preview the Cost#
POST /campaigns/preview takes the same body as creating a campaign and creates nothing. It returns the wallet that pays, the total (empty without an end), whether your balance covers it, and how many days your balance lasts at this daily volume.
{
"type": "website",
"name": "Spring launch",
"url": "https://example.com/landing",
"daily_visits": 500,
"duration_days": 14,
"countries": { "US": 70, "DE": 30 },
"timezone": "Europe/Berlin"
}
2. Create the Campaign#
Send the same body to POST /campaigns. Add an Idempotency-Key header with a value you choose (8–128 printable ASCII characters, no spaces): if you retry with the same body, you get the first campaign back instead of a second one.
type:website(visits tourl),search_console(needskeywords) orlocal(needskeywordsandbusiness_name).daily_visits: visits or verified clicks per day.duration_days: leave it out to run until the wallet is empty. A campaign with an end needs at least 100 visits or clicks in total.countries: share per two-letter country code, adding up to 100. Default: US 100.tier:economy,professionalorexpertfor website campaigns. Without it, the highest tier that has credits pays (expert, then professional, then economy). Search Console and local campaigns use the SEO wallet.
Credits are charged as the campaign delivers, one per visit or verified click, not when it is created. A campaign with an end can only be created if the wallet already holds its full total.
A website campaign needs a GA4 Measurement ID: send it as ga_measurement_id, or we try to detect it on the page. Without one, the campaign waits with status pending_ga and delivers nothing. Add it with PATCH (settings.gaId), then call POST /campaigns/{id}/resume.
Up to five campaigns can be created per minute.
3. Read Campaigns and Statistics#
GET /balance: credits per wallet.GET /campaigns: list, up to 100 per page; passnext_cursorasafterfor the next page.GET /campaigns/{id}: settings, status, delivered visits, target and remaining visits.GET /campaigns/{id}/daily(1–90 days) and/hourly(1–168 hours): visits, or verified clicks for search campaigns. Times are UTC.GET /campaigns/{id}/analytics: the dashboard analytics, 1–90 days.
4. Change Settings#
PATCH /campaigns/{id} changes name, daily_limit, total_target, tier and settings. For settings, first read the campaign and send its current settings_version. If someone changed the campaign in the meantime, you get 409: read it again and review your change before retrying.
Proxy settings and the delivery engine can only be changed in the dashboard.
5. Pause and Resume#
POST /campaigns/{id}/pause: stops new visits at once. Visits already under way finish and are counted. Nothing else is charged.POST /campaigns/{id}/resume: starts again with the saved settings, after the same checks as the dashboard: verified e-mail, a GA4 ID and target URL for website campaigns, and enough SEO credits for the next run of a search campaign.
Cloning and deleting campaigns stay in the dashboard.
Was this article helpful?
Still need help?
Open a ticket from your dashboard. Include your project ID and a screenshot for the fastest help.