Once the audience segment is created, use this method to add audience identifiers to the segment you just created.
Endpoint:
POST /v1/audiences/{viantSegmentId}/data
[
{
"viantSegmentId": "fpsegm123123",
"countryCode": "US",
"values": [
"54de994b6f7ec60471b6018e05d87434e9ae93787eda6f45fdbbd5ee640713ee",
"9209fha090930923h0fa0980923hh09a09fu0923j90u09fu09q309uf09u90u93"
]
}
]
Notes
- The payload must be a JSON array of objects.
- Maximum size per request: 10MB
- Supports compression using
Content-Encoding: gzip- The
viantSegmentIdin the URL must match the value in the payload.- Requests will be rejected if the segment status is
ARCHIVED.- You can append new user records to an existing segment by making additional POST requests with new data.
- When adding audiences to a brand new segment, at least 1000 matches are REQUIRED for the segment to become active
- Audiences added will be processed at Viant every 10 minutes and once processed the segment status will be updated accordingly
Response (Success):
{ "message": "Audience data payload processed.", "published": 10000, "failed_publishes": 0, "bad_records": 0, "bad_records_details": "" }
Response (Failure -- Payload Error):
{ "message": "invalid payload: 10 bad record(s)", "published": 0, "failed_publishes": 0, "bad_records": 10, "bad_records_details": "actual bad record data will be returned back here" }
Response (Failure -- Validation):
{ "error": "error message" }