Create Campaign
Create one outreach campaign for one client domain, with its own budget, price cap and quality rules.
curl --request POST \
--url https://api.aiclicks.io/api/v1/outreach/campaigns \
--header 'Authorization: Bearer ak_live_xxx' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: create-campaign-client_4821' \
--data '{
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"external_id": "client_4821",
"name": "Your Brand - Q1 2027 outreach",
"budget_cents": 500000,
"max_link_price_cents": 40000,
"low_balance_threshold_cents": 50000,
"approval_mode": "all",
"criteria": {
"min_domain_rating": 40,
"min_organic_traffic": 5000,
"exclude_competitors": true,
"excluded_domains": ["nordvpn.com", "expressvpn.com"],
"brand_reference_url": "https://yourbrand.com/vpn"
},
"status": "launched"
}'
import httpx, os
resp = httpx.post(
"https://api.aiclicks.io/api/v1/outreach/campaigns",
headers={
"Authorization": f"Bearer {os.environ['AICLICKS_API_KEY']}",
"Idempotency-Key": "create-campaign-client_4821",
},
json={
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"external_id": "client_4821",
"name": "Your Brand - Q1 2027 outreach",
"budget_cents": 500000,
"max_link_price_cents": 40000,
"approval_mode": "all",
"criteria": {
"min_domain_rating": 40,
"min_organic_traffic": 5000,
"exclude_competitors": True,
"excluded_domains": ["nordvpn.com", "expressvpn.com"],
"brand_reference_url": "https://yourbrand.com/vpn",
},
"status": "launched",
},
)
resp.raise_for_status()
campaign = resp.json()["data"]
print(campaign["id"], campaign["status"])
const resp = await fetch("https://api.aiclicks.io/api/v1/outreach/campaigns", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AICLICKS_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": "create-campaign-client_4821",
},
body: JSON.stringify({
domain_id: "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
external_id: "client_4821",
name: "Your Brand - Q1 2027 outreach",
budget_cents: 500000,
max_link_price_cents: 40000,
approval_mode: "all",
criteria: {
min_domain_rating: 40,
min_organic_traffic: 5000,
exclude_competitors: true,
excluded_domains: ["nordvpn.com", "expressvpn.com"],
brand_reference_url: "https://yourbrand.com/vpn",
},
status: "launched",
}),
});
const { data } = await resp.json();
console.log(data.id, data.status);
{
"data": {
"id": "5e7a1c2d-8b4f-4a6e-9d3c-1f2e3a4b5c6d",
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"external_id": "client_4821",
"name": "Your Brand - Q1 2027 outreach",
"status": "launched",
"approval_mode": "all",
"currency": "USD",
"budget_cents": 500000,
"max_link_price_cents": 40000,
"low_balance_threshold_cents": 50000,
"balance_cents": 0,
"reserved_cents": 0,
"spent_cents": 0,
"criteria": {
"min_domain_rating": 40,
"min_organic_traffic": 5000,
"exclude_competitors": true,
"excluded_domains": ["nordvpn.com", "expressvpn.com"],
"brand_reference_url": "https://yourbrand.com/vpn"
},
"opportunity_counts": {},
"created_at": "2026-12-04T09:12:44.501Z",
"updated_at": "2026-12-04T09:12:44.501Z"
},
"generated_at": "2026-12-04T09:12:44.612Z"
}
{
"detail": "A campaign with external_id 'client_4821' already exists for this team."
}
Creates an outreach campaign for a client domain. Use one campaign per client. Each campaign has its own budget, its own deposit and its own quality rules, so that the spend of one client never touches the deposit of another.
domain_id is required. Use GET /api/v1/domains to find the domains that the calling key can access. If the client is not tracked in AIclicks yet, create it first with POST /api/v1/domains.
When you create the campaign, AIclicks adds the pages it already found for the client domain (the Get Mentioned list) as opportunities with origin: "aiclicks". AIclicks finds new pages every day. They are added to the campaign each time you read it or its opportunities. A new campaign has the status planned. Send "status": "launched" to start outreach at once, or launch it later with PATCH /api/v1/outreach/campaigns/{campaign_id}.
Creating a campaign is free. Money moves only when you add funds to the deposit and when a placement goes live. To add funds, AIclicks sends you a Stripe payment link or bank transfer details.
Authorizations
Your API key formatted as Bearer ak_live_<your-key>. The key must have outreach enabled and must be scoped to the team that owns domain_id.
Optional unique string. A repeat request with the same key within 24 hours returns the first result and does not create a second campaign.
Body parameters
UUID of the client domain. Find it with GET /api/v1/domains.
Your own ID for this client or campaign, max 128 characters. It must be unique in the team. AIclicks returns it on every campaign, opportunity and webhook event, so that you can match records without a lookup table.
A label for the campaign. Defaults to the domain name and the month.
The total planned spend for the campaign, in cents. An approval that would take spent_cents + reserved_cents above it is refused with 409. Get Balance shows what is left as budget_remaining_cents. Defaults to 0 (no planned limit; the deposit is the only limit).
The price cap for one link, in cents. A quote above the cap always needs your approval, also when approval_mode is over_cap. Defaults to 0 (no cap).
When balance_cents drops below this value after a money movement, AIclicks sends the campaign.balance_low webhook. Default: no alert.
all(default) — every opportunity stops ataction_neededand waits for your decision before any money is reserved.over_cap— quotes at or belowmax_link_price_centsare approved automatically. Quotes above the cap stop ataction_needed.
Quality rules for every source. AIclicks applies the domain rules and the domain-rating rule when you send sources. The AIclicks team checks the other rules before outreach starts. Nothing is charged for a page that fails a rule.
min_domain_rating(integer, 0–100) — the lowest domain rating to accept.min_organic_traffic(integer) — the lowest monthly organic traffic to accept.exclude_competitors(boolean, defaulttrue) — decline pages owned by, or written mainly to promote, a tracked competitor of the domain. Pages on the sites of tracked competitors are always skipped when you send sources; the AIclicks team reviews competitor content before outreach starts.excluded_domains(array of strings) — domains that AIclicks must never use for this client. Subdomains are excluded too. AIclicks stores the bare domain, sohttps://www.example.combecomesexample.com.brand_reference_url(string) — the page that publishers should link to when you do not settarget_urlon a source.
planned (default) or launched. A planned campaign accepts sources but does not contact publishers.
ISO 4217 code. Only USD is available today. Defaults to USD.
Response
The new campaign. See Get Campaign for every field.
Errors
The key cannot access domain_id, or the team has no active subscription.
domain_id does not exist.
external_id is already used by another campaign of the team.
A value is out of range, for example a negative budget_cents or an unknown approval_mode.