Skip to main content
PATCH
/
v2
/
saved
/
audiences
/
{id}
v2 Update Audience
curl --request PATCH \
  --url https://api.globalwebindex.com/v2/saved/audiences/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "datasets": [
    "ds-core",
    "ds-96c906f1"
  ],
  "expression": {
    "and": "<array>",
    "datapoints": [
      "q2_1"
    ],
    "min_count": 123,
    "not": false,
    "options": [
      "<string>"
    ],
    "or": "<array>",
    "question": "q2",
    "suffixes": [
      1
    ]
  },
  "flags": [
    "authored",
    "curated"
  ],
  "folder": 123,
  "folder_id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
  "name": "Male with credit card and short-term loan",
  "position": 128,
  "shared": false
}
'
{
  "created_at": "<string>",
  "datasets": [
    "ds-core",
    "ds-96c906f1"
  ],
  "description": "Male millennials aged 18-24 who use social media daily",
  "expression": {
    "and": "<array>",
    "datapoints": [
      "q2_1"
    ],
    "min_count": 123,
    "not": false,
    "options": [
      "<string>"
    ],
    "or": "<array>",
    "question": "q2",
    "suffixes": [
      1
    ]
  },
  "flags": [
    "authored"
  ],
  "folder_id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
  "id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
  "name": "Male with credit card and short-term loan",
  "permissions": {
    "audience_overall": "accessible",
    "meta": {}
  },
  "position": 128,
  "shared": false,
  "sharings": {},
  "updated_at": "<string>",
  "user_id": 12345,
  "v1_id": 12345
}

Authorizations

Authorization
string
header
required

Path Parameters

id
string
required

Audience id

Body

application/json

Audience body

datasets
string[]

Dataset codes

Example:
["ds-core", "ds-96c906f1"]
expression
object

Defines the audience criteria using question and datapoint combinations

flags
string[]

Additional flags about audience (authored, curated, isP2)

Example:
["authored", "curated"]
folder
integer

V1 folder ID (legacy, use folder_id for v2)

folder_id
string

Null/nil uuid or folder uuid

Example:

"b140035b-3adc-43bf-a39d-8e8005c8af2a"

name
string

Human readable name

Example:

"Male with credit card and short-term loan"

position
number

Position to give to be able to sort

Example:

128

shared
boolean

Whether the audience is shared

Example:

false

Response

OK

created_at
string
datasets
string[]

The dataset codes used in the audience

Example:
["ds-core", "ds-96c906f1"]
description
string

The generated description of the audience

Example:

"Male millennials aged 18-24 who use social media daily"

expression
object

The expression defining the audience criteria

flags
string[]

The flags associated with the audience

Example:
["authored"]
folder_id
string

The folder ID containing the audience

Example:

"b140035b-3adc-43bf-a39d-8e8005c8af2a"

id
string

The v2 UUID identifier of the audience

Example:

"b140035b-3adc-43bf-a39d-8e8005c8af2a"

name
string

The name of the audience

Example:

"Male with credit card and short-term loan"

permissions
object

The permissions for the audience

position
number

The position for sorting

Example:

128

shared
boolean

Whether the audience is shared

Example:

false

sharings
object

The sharing information for the audience

updated_at
string
user_id
integer

The user ID who owns the audience

Example:

12345

v1_id
integer

The v1 ID of the audience

Example:

12345