Skip to main content
POST
/
audiences
cURL
curl --request POST \
  --url https://admin.fanfare.io/api/audiences \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "archived": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "imports": [
    {
      "archived": true,
      "audienceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "createdBy": "<string>",
      "errorCount": 123,
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "processedConsumers": 123,
      "progress": 123,
      "s3Key": "<string>",
      "errors": [
        {
          "issues": [
            "<unknown>"
          ],
          "row": 123
        }
      ],
      "totalConsumers": 123,
      "updatedAt": "2023-11-07T05:31:56Z",
      "updatedBy": "<string>"
    }
  ],
  "name": "<string>",
  "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "rules": [
    {
      "audienceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "field": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "values": [
        "<string>"
      ],
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "position": 0
    }
  ],
  "description": "<string>",
  "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "groupName": "<string>",
  "iconName": "<string>",
  "lastRefreshedAt": "2023-11-07T05:31:56Z",
  "metadata": {},
  "primaryExternalId": "<string>",
  "primaryLastSyncedAt": "2023-11-07T05:31:56Z",
  "primarySourceVendor": "<string>",
  "primarySyncSource": {
    "archived": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "createdBy": "<string>",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "syncSource": "<string>",
    "syncSourceId": "<string>",
    "lastSyncedAt": "2023-11-07T05:31:56Z",
    "sourceData": {},
    "syncStatus": "PENDING",
    "updatedAt": "2023-11-07T05:31:56Z",
    "updatedBy": "<string>"
  },
  "primarySyncSourceId": "<string>",
  "refreshIntervalSeconds": 123,
  "updatedAt": "2023-11-07T05:31:56Z",
  "updatedBy": "<string>"
}

Authorizations

Authorization
string
header
required

Fanfare secret key. Keep secret credentials on your server.

Body

application/json
name
string
required
type
enum<string>
required
Available options:
DYNAMIC,
STATIC_LIST,
SYNCED_LIST
description
string | null
groupId
string<uuid> | null
groupName
string | null
groupType
enum<string> | null
Available options:
SEGMENTED_VALUE,
RFM
iconName
string | null
lastRefreshedAt
string | null
metadata
object | null
primarySyncSource
object | null
refreshIntervalSeconds
number | null
rules
object[] | null

Response

Audience created successfully

archived
boolean
required
createdAt
string<date-time>
required
createdBy
string
required
id
string<uuid>
required
imports
object[]
required
name
string
required
Minimum string length: 1
organizationId
string<uuid>
required
rules
object[]
required
type
enum<string>
required
Available options:
DYNAMIC,
STATIC_LIST,
SYNCED_LIST
description
string | null
groupId
string<uuid> | null
groupName
string | null
groupType
enum<string> | null
Available options:
SEGMENTED_VALUE,
RFM
iconName
string | null
lastRefreshedAt
string<date-time> | null
metadata
object | null
primaryExternalId
string | null
primaryLastSyncedAt
string<date-time> | null
primarySourceVendor
string | null
primarySyncSource
object | null
primarySyncSourceId
string | null
refreshIntervalSeconds
number | null
updatedAt
string<date-time> | null
updatedBy
string | null