Skip to main content

Create Audience

Creates an audience and automatically starts its build process, if no errors were found.

note

Your permissions can change the types of files you can view, generate and download.

Getting Started

URL REQUEST (POST)
https://api.statsocial.com/platform/v0/audiences

Main Parameters

These parameters will be repeated every time an audience is created

Name and Descriptions

Enter the name of the audience and its description

Name And Description
{
"audience":{
"description":"The audience description goes here",
"name":"My amazing audience"
}
}

Callback

The caller can, optionally, send a callback URL in the request that will be called by the Silhouette API via a POST request once the build process is complete.

Since the callback is optional, the caller can keep hitting the Get Audience Data endpoint in order to check the build status.

The payload sent via the callback signal is exactly the same that would be returned if the caller had hit the Get Audience Data endpoint.

Add Callback url
{
"callback_url":"https://yoursite.com/callback"
}

Insight auto generation

Endpoint allows generating automatically insight, by passing generate_insights_automatically=true.
In this case additional parameter for insight callback is allowed insight_callback_url
By default insights are not generated automatically

Add Callback url
{
"generate_insights_automatically": true,
"insight_callback_url": "https://my.callback/insight/endpoint",
}

Choose Outputs

If the caller has the choose_outputs permission, they can, optionally, choose the outputs of the audience in the outputs array.

If the outputs are not specified, the outputs generated will be the same as the caller's can_generate permissions.

If the caller does not have the choose_outputs permission, the outputs will be chosen based on the caller's permissions to generate outputs and the outputs array will be ignored.

All permissions are managed by StatSocial.

The available output types are: ss_id, twitter_id, twitter_user, md5, email_raw, cint_id, ma_id.

Even if the caller has the choose_outputs permission and doesn't specify the ss_id output in the outputs array, it will always be present.

Choose outputs manually
{
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
]
}

Let's go to examples

Create Audience With Affinities

First we must find affinities

URL REQUEST (GET)
https://api.statsocial.com/platform/v0/affinities

we can add a custom query to find a specific affinity, using the query parameter, in the example below we will search for Lewandowski

https://api.statsocial.com/platform/v0/affinities?query=Lewandowski

We will receive a json like this

{
"response": [
{
"id": ".b2b.",
"name": "B2B",
"is_category": true,
"can_add": false,
"kind": "affinity"
},
{
"id": ".brands.",
"name": "Brands",
"is_category": true,
"can_add": false,
"kind": "affinity"
},
{
"id": ".influencers.",
"name": "Influencers",
"is_category": true,
"can_add": false,
"kind": "affinity",
"children": [
{
"id": "a197",
"name": "Sports",
"is_category": true,
"followers_count": 238080000,
"can_add": true,
"kind": "affinity",
"children": [
{
"id": "a759",
"name": "Soccer",
"is_category": true,
"followers_count": 120750000,
"can_add": true,
"kind": "affinity",
"children": [
{
"id": "a38802",
"name": "Robert Lewandowski",
"is_category": false,
"followers_count": 420000,
"can_add": true,
"is_match": true,
"kind": "affinity"
}
]
}
]
}
]
},
{
"id": ".interests.",
"name": "Interests",
"is_category": true,
"can_add": false,
"kind": "affinity"
},
{
"id": ".media.",
"name": "Media",
"is_category": true,
"can_add": false,
"kind": "affinity"
},
{
"id": ".personas.",
"name": "Personas",
"is_category": true,
"can_add": false,
"kind": "affinity"
},
{
"id": ".private.",
"name": "Private",
"is_category": true,
"can_add": false,
"kind": "affinity"
}
],
"information": {
"version": "0.0.1"
}
}

now we can get Lewandowski's ID, which would be a38802 and send it when creating an audience, as in the example below

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"affinities":{
"affinities":[
{
"id":"a38802"
}
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67454,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

You can find all the details for affinities in this link

Create Audience With Employment & Profession Data (B2B)

When using a b2b parameter, the filter field is optional.

In the filter field, you can specify the direction of the filter. The available directions are: <, >, <=, >=.

The job_titles and employer_names can NOT be used in the same parameter. They must be used individually.

To get the ID of employer names use the search employers endpoint and to get the ID of job titles use the search job titles endpoint.

The name field returned by those search endpoints can be used in the screen_name field of an employer and/or a job title. But it is not necessary and won't make a difference.

The ID field is mandatory and must always be present.

Jobs Titles

First we must find Jobs

URL REQUEST (GET)
https://api.statsocial.com/platform/v0/b2b/job-titles

we can add a custom query to find a specific job title, using the query parameter, in the example below we will search for Analyst, Senior Programmer

https://api.statsocial.com/platform/v0/b2b/job-titles?query=Analyst%2C%20Senior%20Programmer

We will receive a json like this

{
"response": {
"data": [
{
"id": "Analyst, Senior Programmer",
"name": "Analyst, Senior Programmer",
"followers_count": 14,
"kind": "b2b_jobtitle"
}
],
"has_next": false,
"next": ""
},
"information": {
"version": "0.0.1"
}
}

now we can get Analyst, Senior Programmer ID, which would be Analyst, Senior Programmer and send it when creating an audience, as in the example below

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"b2b":{
"job_titles":[
{
"id":"Analyst, Senior Programmer"
}
],
"filter":{
"count":100,
"direction":"<"
}
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67527,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

You can find all the details for job titles in this link

Employers

First we must find Employers

URL REQUEST (GET)
https://api.statsocial.com/platform/v0/b2b/employers

we can add a custom query to find a specific employer, using the query parameter, in the example below we will search for Statsocial

https://api.statsocial.com/platform/v0/b2b/employers?query=statsocial

We will receive a json like this

{
"response": {
"data": [
{
"id": "StatSocial",
"name": "StatSocial",
"followers_count": 81,
"kind": "b2b_employer"
},
{
"id": "StatSocial Past Life: Founder of RateMyTeachers/RateMyProfessors, PeekYou",
"name": "StatSocial Past Life: Founder of RateMyTeachers/RateMyProfessors, PeekYou",
"followers_count": 1,
"kind": "b2b_employer"
}
],
"has_next": false,
"next": ""
},
"information": {
"version": "0.0.1"
}
}

now we can get StatSocial ID, which would be StatSocial and send it when creating an audience, as in the example below

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"b2b":{
"employer_names":[
{
"id":"StatSocial"
}
],
"filter":{
"count":100,
"direction":">="
}
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67531,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

You can find all the details for job titles in this link

Create Audience With Personality

When using personalities, you need to pass the personality term field in the personalities array.

You can get the available personalities in the get personalities endpoint.

https://api.statsocial.com/platform/v0/personality-types

We will receive a json like this

{
"response": {
"personalities": [
{
"term": "challenge"
},
{
"term": "closeness"
},
{
"term": "curiosity"
},
{
"term": "excitement"
},
{
"term": "harmony"
},
{
"term": "ideal"
},
{
"term": "liberty"
},
{
"term": "love"
},
{
"term": "practicality"
},
{
"term": "self-expression"
},
{
"term": "stability"
},
{
"term": "structure"
},
{
"term": "agreeableness"
},
{
"term": "altruism"
},
{
"term": "cooperation"
},
{
"term": "modesty"
},
{
"term": "morality"
},
{
"term": "sympathy"
},
{
"term": "trust"
},
{
"term": "conscientiousness"
},
{
"term": "achievement striving"
},
{
"term": "cautiousness"
},
{
"term": "dutifulness"
},
{
"term": "orderliness"
},
{
"term": "self-discipline"
},
{
"term": "self-efficacy"
},
{
"term": "extraversion"
},
{
"term": "activity level"
},
{
"term": "assertiveness"
},
{
"term": "cheerfulness"
},
{
"term": "excitement-seeking"
},
{
"term": "friendliness"
},
{
"term": "gregariousness"
},
{
"term": "neuroticism"
},
{
"term": "anger"
},
{
"term": "anxiety"
},
{
"term": "depression"
},
{
"term": "immoderation"
},
{
"term": "self-consciousness"
},
{
"term": "vulnerability"
},
{
"term": "openness"
},
{
"term": "adventurousness"
},
{
"term": "artistic interests"
},
{
"term": "emotionality"
},
{
"term": "imagination"
},
{
"term": "intellect"
},
{
"term": "liberalism"
},
{
"term": "conservation"
},
{
"term": "hedonism"
},
{
"term": "openness to change"
},
{
"term": "self-enhancement"
},
{
"term": "self-transcendence"
}
]
},
"information": {
"version": "0.0.1"
}
}

now we can choose the id of one of the personalities, in this case we will choose curiosity and send it to create the audience as in the example below

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"personality":{
"personalities":[
"challenge"
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67539,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience With Age

The available age ranges for an age parameter are: 18-24, 25-34, 35-44, 45-54, over 54 and unknown.

It is possible to use an age parameter as the first parameter, but it requires a special permission that can only be granted by StatSocial.

An age parameter's operation field can never be OR, unless it is the first parameter.

Let's see an example of using age

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"age":{
"ranges":[
"18-24"
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67573,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience With Gender

The available genders for a gender parameter are: male, female and unknown.

It is possible to use a gender parameter as the first parameter, but it requires a special permission that can only be granted by StatSocial.

A gender parameter's operation field can never be OR, unless it is the first parameter.

Let's see an example of using gender

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"gender":{
"genders":[
"female"
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67574,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience With Ethnicity

The available ethnicities for an ethnicity parameter are: asian, black, hispanic, native, white, unknown.

An ethnicity parameter can never be used as the first parameter.

An ethnicity parameter's operation field can never be OR.

Let's see an example of using ethnicity

In this case I added the gender parameter as OR(INCLUDE), to be able to use ethnicity as AND (FILTER), I could also use it as NOT (EXCLUDE)

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"gender":{
"genders":[
"female"
]
}
},
{
"operation":"AND",
"ethnicity":{
"ethnicities":[
"asian"
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67576,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience With Location

You can add location as the first parameter if you have permission to do so

You can find all the details for location in this link

Cities

First we must find Cities

URL REQUEST (GET)
https://api.statsocial.com/platform/v0/location/cities

we can add a custom query to find a specific job title, using the query parameter, in the example below we will search for New York

https://api.statsocial.com/platform/v0/location/cities?query=New%20York

We will receive a json like this

{
"response": {
"data": [
{
"id": "82107",
"name": "East New York",
"kind": "city"
},
{
"id": "1001500394",
"name": "East New York",
"kind": "city"
},
{
"id": "82396",
"name": "New York City",
"kind": "city"
},
{
"id": "1001500400",
"name": "New York City",
"kind": "city"
},
{
"id": "82397",
"name": "New York Mills",
"kind": "city"
},
{
"id": "81132",
"name": "New York Mills",
"kind": "city"
},
{
"id": "81905",
"name": "West New York",
"kind": "city"
}
]
},
"information": {
"version": "0.0.1"
}
}

now we take the data from West New York, and use it to build the audience as in the example below

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"location":{
"cities":[
{
"id": "81905",
"name": "West New York",
"kind": "city"
}
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67568,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Countries

First we must find Countries

note

Remember that the countries parameter cannot be used as OR (INCLUDE), but can be used as AND (FILTER) and NOT (EXCLUDE)

URL REQUEST (GET)
https://api.statsocial.com/platform/v0/location/countries

we can add a custom query to find a specific job title, using the query parameter, in the example below we will search for United States

https://api.statsocial.com/platform/v0/location/countries?query=united%20states

We will receive a json like this

{
"response": {
"data": [
{
"id": "231",
"name": "United States",
"kind": "country"
},
{
"id": "230",
"name": "United States Minor Outlying Islands",
"kind": "country"
}
]
},
"information": {
"version": "0.0.1"
}
}

now we take the data from United States, and use it to build the audience as in the example below

note

The countries parameter cannot be the first parameter when building an audience, so we use the data used in the previous example where we built an audience with the cities parameter, the cities parameter coming first and countries in second

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation": "OR",
"location":{
"cities":[
{
"id": "81905",
"name": "West New York",
"kind": "city"
}
]
}
},
{
"operation":"OR",
"location":{
"countries":[
{
"id": "230",
"name": "United States Minor Outlying Islands",
"kind": "country"
}
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67569,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

DMAs

First we must find Dmas

URL REQUEST (GET)
https://api.statsocial.com/platform/v0/location/dmas

we can add a custom query to find a specific job title, using the query parameter, in the example below we will search for new

https://api.statsocial.com/platform/v0/location/dmas?query=new

We will receive a json like this

{
"response": {
"data": [
{
"id": "501",
"name": "New York",
"kind": "dma"
},
{
"id": "521",
"name": "Providence - New Bedford",
"kind": "dma"
},
{
"id": "533",
"name": "Hartford & New Haven",
"kind": "dma"
},
{
"id": "544",
"name": "Norfolk - Portsmouth - Newport News",
"kind": "dma"
},
{
"id": "545",
"name": "Greenville - New Bern - Washington",
"kind": "dma"
},
{
"id": "622",
"name": "New Orleans",
"kind": "dma"
}
]
},
"information": {
"version": "0.0.1"
}
}

Now we take the data from New Orleans, and use it to build the audience as in the example below

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"location":{
"dmas":[
{
"id": "622",
"name": "New Orleans",
"kind": "dma"
}
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67883,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Regions/States

First we must find Regions/States

URL REQUEST (GET)
https://api.statsocial.com/platform/v0/location/regions

we can add a custom query to find a specific job title, using the query parameter, in the example below we will search for New York

https://api.statsocial.com/platform/v0/location/regions?query=New%20York

We will receive a json like this

{
"response": {
"data": [
{
"id": "3372",
"name": "New York",
"kind": "region"
}
]
},
"information": {
"version": "0.0.1"
}
}

now we take the data from New York, and use it to build the audience as in the example below

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"location":{
"regions":[
{
"id": "3372",
"name": "New York",
"kind": "region"
}
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 67572,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience With Upload

Available ID types: ss_id, twitter_id, twitter_user, md5, email_raw, ramp_id, cint_id, ma_id.

These ID types are used in the outputs and in the upload type fields.

Let's see an example of using upload

{
"audience":{
"name":"Name Audience",
"description":"audience description"
},
"callback_url":"https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"upload":{
"keys":[
"/uploads/2022-11-02/078ace94fad569f01d1a3a99a440cf5c.ssid"
],
"type":"ss_id"
}
}
]
}
{
"response": {
"id": 67577,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience with Twitter Followers

When using twitter_followers parameter you can specify id or screen_name or both.
Note that you must know the id's or screen_names of the followers you want to fetch.

You can specify cut_off field which indicates the minimum number of accounts follower must follow to be included. The cut_off field can never be greater than 10.

For twitter_followers parameter you can specify last_tweeted field which indicates the maximum number of days since the follower last tweeted. Available values for last_tweeted field are: 0, 1, 7, 30, 60, 90, 180 and 365

Let's see an example of using twitter_followers

{
"audience": {
"name": "Test api audience of Twitter Followers with screen name and id"
},
"outputs": [
"ss_id",
"md5"
],
"parameters": [
{
"operation": "OR",
"twitter_followers": {
"accounts": [
{
"id": "11111",
"screen_name": "name1"
},
{
"3907896689": "22222",
"screen_name": "name2"
}
],
"cutoff": 1,
"last_tweeted": 180
}
}
]
}

We will receive a json like this

{
"response": {
"id": 10,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience with Twitch Followers

When using twitch_followers parameter you can specify id or screen_name or both. Note that you must know the id's or screen_names of the followers you want to fetch.

For twitch_followers the cut_off field must be set to 1.

Let's see an example of using twitch_followers

{
"audience":{
"name":"Test api audience of Twitch Followers with screen name and id"
},
"outputs":[
"ss_id",
"md5"
],
"parameters":[
{
"operation":"OR",
"twitch_followers":{
"accounts":[
{
"id":"11111",
"screen_name": "name1"
},
{
"id":"22222",
"screen_name": "name2"
}
],
"cutoff":1
}
}
]
}

We will receive a json like this

{
"response": {
"id": 10,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience with Instagram Engagers

When using instagram_engagers parameter you can specify id or screen_name or both. Note that you must know the id's or screen_names of the followers you want to fetch.

For instagram_engagers the cut_off field must be set to 1.

Let's see an example of using instagram_engagers

{
"audience":{
"name":"Test api audience of Instagram Engagers with screen name and id"
},
"outputs":[
"ss_id",
"md5"
],
"parameters":[
{
"operation":"OR",
"instagram_engagers":{
"accounts":[
{
"id":"111111",
"screen_name": "name1"
},
{
"id":"222222",
"screen_name": "name2"
}
],
"cutoff":1
}
}
]
}

We will receive a json like this

{
"response": {
"id": 10,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience with TikTok Engagers

When using tiktok_engagers parameter you can specify id or screen_name or both. Note that you must know the id's or screen_names of the followers you want to fetch.

For tiktok_engagers the cut_off field must be set to 1.

Let's see an example of using tiktok_engagers

{
"audience":{
"name":"Test api audience of TicTok Engagers"
},
"outputs":[
"ss_id",
"md5"
],
"parameters":[
{
"operation":"OR",
"tiktok_engagers":{
"accounts":[
{
"id":"1",
"screen_name":"name1"
},
{
"id":"2",
"screen_name":"name2"
}
],
"cutoff":1
}
}
]
}

We will receive a json like this

{
"response": {
"id": 10,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience with Youtube Channels

When using youtube_channels parameter you can specify id or screen_name or both. Note that you must know the id's or screen_names of the followers you want to fetch.

You can specify cut_off field which indicates the minimum number of accounts follower must follow to be included. The cut_off field can never be greater than 10.

Let's see an example of using youtube_channels

{
"audience":{
"name":"Test api audience of Youtube Channels"
},
"outputs":[
"ss_id",
"md5"
],
"parameters":[
{
"operation":"OR",
"youtube_channels":{
"accounts":[
{
"id":"UCbrbwT0o3LWVmhyvkvtWuTg",
"screen_name":"name1"
},
{
"id":"UCHUn2GT4DD2vM9QB0vTUmWg",
"screen_name":"anme2"
}
],
"cutoff":2
}
}
]
}

We will receive a json like this

{
"response": {
"id": 10,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

The bio_search parameter type can be used to search across bios in all socials You can specify the phrases you want to search for in the phrases field and mark the socials you want to search in.

Let's see an example of using bio_search

{
"audience": {
"name": "Test api audience of Bio Search"
},
"outputs": [
"ss_id",
"md5"
],
"parameters": [
{
"operation": "OR",
"bio_search": {
"search_in_twitter": true,
"search_in_youtube": false,
"search_in_instagram": true,
"search_in_twitch": false,
"phrases": [
"golang"
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 10,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

The tweet_search parameter type can be used to search any string you want across twitter. StatSocial searches tweets that are no more than 7 days old.

Let's see an example of using tweet_search

{
"audience":{
"name":"Test api audience of 7-day Tweet Search"
},
"outputs":[
"ss_id",
"md5"
],
"parameters":[
{
"operation":"OR",
"tweet_search":{
"phrases":[
"golang",
"#golang"
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 10,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

Create Audience with multiple parameters Complex example

You can add more than one parameter for create audience endpoint. Each parameter must contain an operation field which can be OR (include), AND (filter), NOT (exclude).

Let's see an example of creating an Audience with multiple parameters

{
"audience":{
"name":"Test api audience of multiple conditions"
},
"callback_url":"http://localhost:8080",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
],
"parameters":[
{
"operation":"OR",
"youtube_channels":{
"accounts":[
{
"id":"ID1"
},
{
"id":"ID2"
},
{
"id":"ID3"
},
{
"id":"ID4"
},
{
"id":"ID5"
}
],
"cutoff":4
}
},
{
"operation":"NOT",
"twitter_followers":{
"accounts":[
{
"id":"158487331"
},
{
"id":"158487332"
},
{
"id":"158487333"
},
{
"id":"158487334"
},
{
"id":"158487335"
}
],
"cutoff":4,
"last_tweeted":180
}
},
{
"operation":"AND",
"instagram_engagers":{
"accounts":[
{
"id":"26669533"
},
{
"id":"26669534"
},
{
"id":"26669535"
},
{
"id":"26669536"
},
{
"id":"26669537"
}
],
"cutoff":1
}
},
{
"operation":"OR",
"twitch_followers":{
"accounts":[
{
"id":"163932929"
},
{
"id":"163932930"
},
{
"id":"163932931"
},
{
"id":"163932932"
},
{
"id":"163932933"
}
],
"cutoff":1
}
},
{
"operation":"OR",
"upload":{
"keys":[
"/uploads/2022-11-02/078ace94fad569f01d1a3a99a440cf5c.ssid"
],
"type":"ss_id"
}
},
{
"operation":"AND",
"location":{
"countries":[
{
"id":"123",
"screen_name":"country 123"
}
],
"cities":[
{
"id":"123",
"screen_name":"city 123"
}
],
"regions":[
{
"id":"123",
"screen_name":"region 123",
"kind": "region"
}
],
"dmas":[
{
"id":"123",
"screen_name":"dma 123"
}
]
}
},
{
"operation":"AND",
"gender":{
"genders":[
"female"
]
}
},
{
"operation":"AND",
"age":{
"ranges":[
"18-24"
]
}
},
{
"operation":"AND",
"ethnicity":{
"ethnicities":[
"asian"
]
}
},
{
"operation":"OR",
"affinities":{
"affinities":[
{
"id":"a100"
}
]
}
},
{
"operation":"AND",
"tweet_search":{
"phrases":[
"golang",
"#golang"
]
}
},
{
"operation":"NOT",
"personality":{
"personalities":[
"challenge"
]
}
},
{
"operation":"OR",
"bio_search":{
"search_in_twitter":true,
"search_in_youtube":false,
"search_in_instagram":true,
"search_in_twitch":false,
"phrases":[
"golang"
]
}
},
{
"operation":"OR",
"b2b":{
"job_titles":[
{
"id":"PROGRAMMER"
}
],
"filter":{
"count":100,
"direction":"<"
}
}
},
{
"operation":"OR",
"b2b":{
"employer_names":[
{
"id":"Google"
}
],
"filter":{
"count":100,
"direction":">="
}
}
},
{
"operation":"OR",
"b2b":{
"employer_names":[
{
"id":"Google Play"
}
]
}
}
]
}

We will receive a json like this

{
"response": {
"id": 10,
"status": "running"
},
"information": {
"version": "0.0.1"
}
}

you can see more about uploading files in this link