Replace Audience IDs

Replace all of the audience IDs within current segment with a new batch of audeince IDs using this method.

Use this method to replace all of the current audience IDs within an existing audience segment with a new batch of audience IDs. This action will remove all of the existing audience IDs from an existing active (live) audience segment and add new audience IDs within 24 hrs.

Endpoint: PUT /v1/audiences/{viantSegmentId}/replace

Request Body:

  • Make sure to match the segment ID form the end point URL in the request body
  • Make sure to replace the segment audiences with the same data type you input when creating the original segment as it is not possible to validate the data type of the hashed value..
[{
    "viantSegmentId": "fpsegm123123123",
    "countryCode": "US",
    "values": [
      "ab3734a0fc997bc94af16707fa4555b006e7c71d3d476a60bd944de79b3aec56",
      "597bddf1f0a98fa67a0dcadd481c8615748634626a63086618a15c3e21db56f1",
      "80f6ddac82826ad247c7dd97752b0885963b4ebf330ef78b8e9e194cb022053b",
      "6a2d8d3a588ec223c5640df5556c02f88956f920b5e0fa3301df019ce85b551d",
      (...)
       ]
}]

Response (Success):

Use the "Job Status Retrieval" GET method to query the JOB ID returned to check the status of replace audience action. As a best practice avoid adding audiences or making another replace audience call till this action is completed (typically takes upto 24 hrs)

HTTP Response Code: 200
{
    "created": "2025-11-19T15:25:40.852663022Z",
    "job_id": "86a471e1-cd3d-44d4-b720-ec9082690ae2",
    "message": "Replace audience request created successfully",
    "segment_id": "fpsegm123123123",
    "status": "REQUESTED"
}

Response (Failure):

HTTP Response Code: 400
{
  "error" : "error message"
}