Create New Audience Segment

Use this method to create an empty audience segment to which you can later add audience IDs. Supports below ID types - SHA256 Email IDs, SHA256 Phone Numbers, SHA256 Physical Addresses, IP Addresses (IPv4) unhashed, Viant Cookie IDs, Mobile IDs (IDFA, AAID)

Endpoint:
POST /v1/audiences

Request Body:

{
  "name": "API Walkthrough Test Segment 02",
  "description": "API Training Test Segment 02",
  "dataType": "email_sha256",
  "accountId": 2222,
  "advertiserIds": [55812],
  "externalAudienceId": "ext_aud_id_1",
  "ttl": 345600
}

Response (Success):

{  
  "name": "audience name",  
  "externalAudienceId": "agencyaudienceabc123",  
  "viantSegmentId": "fpsegm123123abcabcdefdef",  
  "status": "INACTIVE",
  "ttl": 345600
}

Note: The status will remain "INACTIVE" until valid data is added and meets the required threshold.

Response (Failure):

{  
  "error": "error message"  
}

`

Field Descriptions:

Field NameTypeDescription
namestringThe name of the audience (required)
descriptionstringA description of the audience (optional)
dataTypestringOnly one of: phonenumber_sha256,email_sha256, address_sha256, ip, cookie, mobile_id
accountIdintThe Viant/Adelphic account ID (required)
advertiserIdsarray of intOne or more advertiser IDs for audience sharing (required)
externalAudienceIdstringCustom ID for referencing this audience (required)
statusstringCurrent status of the segment: INACTIVE, ACTIVE, or ARCHIVED
ttlint
  • Segment ttl (time to live) (optional)
  • If the ttl expires, the segment will become archived.
  • ttl is measured in seconds. For example, 345600 represents 345600 seconds.
  • The minimum ttl is 2 days (172800 seconds), and the maximum ttl is 32000000 seconds.
  • If the user does not provide a ttl, the default ttl is 32000000 seconds.