Skip to main content

Regenerate Audience

Regenerates an audience.

Every call to this endpoint consumes an API credit. f the regeneration process fails, the credit will be refunded to the company automatically.

Expanded audiences cannot be regenerated.

Getting Started

URL REQUEST (POST)
https://api.statsocial.com/platform/v0/audiences/{audience_id}/regenerate

An optional callback_url url.

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

An optional outputs. If outputs are not provided audience will be re-generated with the same outputs as the original audience.

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

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",
}

Let's go to example

In this example we will search for an audience with affinities

note

We create this audience in this example

https://api.statsocial.com/platform/v0/audiences/67454/regenerate

With This Payload

{
"callback_url": "https://yoursite.com/callback",
"outputs":[
"ss_id",
"twitter_id",
"twitter_user",
"md5",
"email_raw",
"cint_id",
"ma_id"
]
}

We will receive a json like this

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