Create an audience
curl --request POST \
--url https://fandom-api-preview.vercel.app/api/v1/audiences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Parents of young builders",
"description": "Parents buying building sets for kids 6–12",
"keywords": [
"building sets",
"stem toys"
],
"dataStoreIds": [
"6524f0c1e4b0a1b2c3d4e5f6"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Parents of young builders',
description: 'Parents buying building sets for kids 6–12',
keywords: ['building sets', 'stem toys'],
dataStoreIds: ['6524f0c1e4b0a1b2c3d4e5f6']
})
};
fetch('https://fandom-api-preview.vercel.app/api/v1/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/audiences"
payload = {
"name": "Parents of young builders",
"description": "Parents buying building sets for kids 6–12",
"keywords": ["building sets", "stem toys"],
"dataStoreIds": ["6524f0c1e4b0a1b2c3d4e5f6"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"description": "<string>",
"kind": "<string>",
"keywords": [
"<string>"
],
"topics": [
"<string>"
],
"tags": [
"<string>"
],
"dataStoreIds": [
"<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>"
}
}Audiences
Create an audience
Names must be unique in the workspace. Link data stores so targeting has real data behind it.
Scope: audiences:write.
Send an Idempotency-Key header to make retries safe.
POST
/
audiences
Create an audience
curl --request POST \
--url https://fandom-api-preview.vercel.app/api/v1/audiences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Parents of young builders",
"description": "Parents buying building sets for kids 6–12",
"keywords": [
"building sets",
"stem toys"
],
"dataStoreIds": [
"6524f0c1e4b0a1b2c3d4e5f6"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Parents of young builders',
description: 'Parents buying building sets for kids 6–12',
keywords: ['building sets', 'stem toys'],
dataStoreIds: ['6524f0c1e4b0a1b2c3d4e5f6']
})
};
fetch('https://fandom-api-preview.vercel.app/api/v1/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/audiences"
payload = {
"name": "Parents of young builders",
"description": "Parents buying building sets for kids 6–12",
"keywords": ["building sets", "stem toys"],
"dataStoreIds": ["6524f0c1e4b0a1b2c3d4e5f6"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"description": "<string>",
"kind": "<string>",
"keywords": [
"<string>"
],
"topics": [
"<string>"
],
"tags": [
"<string>"
],
"dataStoreIds": [
"<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>"
}
}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:
200Body
application/json
Required string length:
1 - 160Who these people are, in plain words. Drives targeting.
Maximum string length:
4000Maximum array length:
200Required string length:
1 - 200Maximum array length:
100Required string length:
1 - 200Maximum array length:
50Required string length:
1 - 100Data stores this audience is built from.
Maximum array length:
25Data store id.
Pattern:
^[a-f0-9]{24}$
