Skip to main content
POST
/
audiences
Create Audience
curl --request POST \
  --url https://api.audiencelab.io/audiences \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data @- <<EOF
{
  "name": "<string>",
  "filters": {
    "age": {
      "minAge": 25,
      "maxAge": 45
    },
    "city": [
      "<string>"
    ],
    "state": [
      "<string>"
    ],
    "personalState": [
      "<string>"
    ],
    "zip": [
      "<string>"
    ],
    "gender": [],
    "businessProfile": {
      "industry": [
        "<string>"
      ],
      "seniority": [
        "<string>"
      ],
      "companyName": [
        "<string>"
      ],
      "jobTitle": [
        "<string>"
      ],
      "excludeJobTitle": [
        "<string>"
      ]
    },
    "attributes": {
      "education": [
        "bachelor's",
        "master's"
      ],
      "excludeEducation": [
        "high school"
      ]
    }
  },
  "segment": [
    "b2c_1253"
  ],
  "days_back": 123
}
EOF
{
  "audienceId": "812b78c3-83e6-4d6a-8245-def0dde26223"
}

Authorizations

X-Api-Key
string
header
required

Body

application/json
name
string
required
filters
object
required

Filter criteria for audience selection. All array fields must be passed as arrays even for single values.

segment
string[]

Optional list of audience segment IDs. Use the full exact ID including its prefix in the current taxonomy nomenclature:

  • b2c_<number> — consumer (B2C) segments, e.g. b2c_1253
  • b2b_<number> — business (B2B) segments, e.g. b2b_1042

Pass the complete ID with its prefix. Bare numbers (1253) and the legacy Delivr format (al_XXXXXX) are not supported.

Example:
["b2c_1253"]
days_back
integer

Response

Audience created successfully

audienceId
string
Example:

"812b78c3-83e6-4d6a-8245-def0dde26223"