curl --request POST \
--url https://fandom-api-preview.vercel.app/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Spring launch",
"campaignType": "DEMAND_GEN",
"objective": "Reach parents who buy building toys for kids 6–12",
"budget": 50
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Spring launch',
campaignType: 'DEMAND_GEN',
objective: 'Reach parents who buy building toys for kids 6–12',
budget: 50
})
};
fetch('https://fandom-api-preview.vercel.app/api/v1/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://fandom-api-preview.vercel.app/api/v1/campaigns"
payload = {
"name": "Spring launch",
"campaignType": "DEMAND_GEN",
"objective": "Reach parents who buy building toys for kids 6–12",
"budget": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"status": "<string>",
"objective": "<string>",
"brandId": "<string>",
"brand": {
"name": "<string>",
"website": "<string>",
"description": "<string>"
},
"industry": "<string>",
"language": "<string>",
"locations": [
"<string>"
],
"successMetrics": [
"<string>"
],
"campaignType": "<string>",
"budget": 123,
"budgetType": "daily",
"endDate": "<string>",
"biddingStrategy": "<string>",
"targetCpa": 123,
"targetRoas": 123,
"audiences": [
{
"id": "<string>",
"name": "<string>",
"audienceId": "<string>",
"dataStoreIds": [
"<string>"
]
}
],
"googleAds": {
"customerId": "<string>",
"accountName": "<string>",
"campaignId": "<string>",
"status": "<string>"
},
"url": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}Create a campaign
Creates the campaign exactly as the app’s New campaign form does. Audiences you pass are attached and start generating targeting right away. Nothing is sent to Google Ads.
Scope: campaigns:write.
Send an Idempotency-Key header to make retries safe.
curl --request POST \
--url https://fandom-api-preview.vercel.app/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Spring launch",
"campaignType": "DEMAND_GEN",
"objective": "Reach parents who buy building toys for kids 6–12",
"budget": 50
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Spring launch',
campaignType: 'DEMAND_GEN',
objective: 'Reach parents who buy building toys for kids 6–12',
budget: 50
})
};
fetch('https://fandom-api-preview.vercel.app/api/v1/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://fandom-api-preview.vercel.app/api/v1/campaigns"
payload = {
"name": "Spring launch",
"campaignType": "DEMAND_GEN",
"objective": "Reach parents who buy building toys for kids 6–12",
"budget": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"status": "<string>",
"objective": "<string>",
"brandId": "<string>",
"brand": {
"name": "<string>",
"website": "<string>",
"description": "<string>"
},
"industry": "<string>",
"language": "<string>",
"locations": [
"<string>"
],
"successMetrics": [
"<string>"
],
"campaignType": "<string>",
"budget": 123,
"budgetType": "daily",
"endDate": "<string>",
"biddingStrategy": "<string>",
"targetCpa": 123,
"targetRoas": 123,
"audiences": [
{
"id": "<string>",
"name": "<string>",
"audienceId": "<string>",
"dataStoreIds": [
"<string>"
]
}
],
"googleAds": {
"customerId": "<string>",
"accountName": "<string>",
"campaignId": "<string>",
"status": "<string>"
},
"url": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"requestId": "<string>"
}
}Authorizations
An API key from Settings → API access, starting with fnd_.
Headers
Any unique string. Repeating a request with the same key returns the first result instead of doing it twice.
200Body
1 - 160Google Ads campaign type.
SEARCH, DEMAND_GEN, VIDEO, DISPLAY What the campaign should achieve and for whom. Drives targeting.
4000Fills the brand's name, website and description into the campaign.
^[a-f0-9]{24}$25Audience id.
^[a-f0-9]{24}$A connected Google Ads account to create it in later. See List Google Ads accounts.
^\d{3}-?\d{3}-?\d{4}$Daily budget.
x <= 10000000Google Ads bidding strategy.
MAXIMIZE_CONVERSIONS, MAXIMIZE_CONVERSION_VALUE, TARGET_CPA, TARGET_ROAS, TARGET_CPC, TARGET_SPEND, MANUAL_CPC 120Language code. Default en.
20Country or region codes, e.g. ["US"]. Default ["US"].
208020200Response
Success
draft, loading (collecting data), ready or error.
Show child attributes
Show child attributes
In the account's currency.
daily, total Show child attributes
Show child attributes
Show child attributes
Show child attributes
Opens the campaign in Fandom.

