Add an audience to a campaign
curl --request POST \
--url https://fandom-api-preview.vercel.app/api/v1/campaigns/{campaignId}/audiences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audienceId": "6524f0c1e4b0a1b2c3d4e5f6"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({audienceId: '6524f0c1e4b0a1b2c3d4e5f6'})
};
fetch('https://fandom-api-preview.vercel.app/api/v1/campaigns/{campaignId}/audiences', 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/{campaignId}/audiences"
payload = { "audienceId": "6524f0c1e4b0a1b2c3d4e5f6" }
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>"
}
}Campaigns
Add an audience to a campaign
Attaches a saved audience and, by default, starts generating its targeting.
Scope: campaigns:write.
Send an Idempotency-Key header to make retries safe.
POST
/
campaigns
/
{campaignId}
/
audiences
Add an audience to a campaign
curl --request POST \
--url https://fandom-api-preview.vercel.app/api/v1/campaigns/{campaignId}/audiences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audienceId": "6524f0c1e4b0a1b2c3d4e5f6"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({audienceId: '6524f0c1e4b0a1b2c3d4e5f6'})
};
fetch('https://fandom-api-preview.vercel.app/api/v1/campaigns/{campaignId}/audiences', 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/{campaignId}/audiences"
payload = { "audienceId": "6524f0c1e4b0a1b2c3d4e5f6" }
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.
Maximum string length:
200Path Parameters
Campaign id.
Pattern:
^[a-f0-9]{24}$Body
application/json
Response
Success
draft, loading (collecting data), ready or error.
Show child attributes
Show child attributes
In the account's currency.
Available options:
daily, total Show child attributes
Show child attributes
Show child attributes
Show child attributes
Opens the campaign in Fandom.

