Uploading Users to a Segment
Once a segment is created, users can be uploaded to it using our APIs. Topsort support three actions:- Add: Append new users to the existing segment, without making changes to existing ones.
- Remove: Delete specific users from the segment.
- Replace: Overwrite the entire segment with a new user list
Adding, removing, or replacing users does not update the segment right away. Allow up to 24 hours for those user changes to be reflected in the segment.
- File format is .txt
- No headers
- One Opaque User ID per row, without emails or personal information.
Restricting a Segment to Specific Vendors
By default, a new segment is global: every vendor in your marketplace can select it as targeting. To limit a segment to specific vendors, manage its vendor list with your Advanced API Key:- List vendors:
GET /public/v1/segment-service/segments/{segment_id}/vendorsreturns the vendors assigned to the segment. An emptyvendorIdslist means the segment is global. - Add vendors:
PUT /public/v1/segment-service/segments/{segment_id}/vendorsadds the given vendors. Vendors already assigned stay. Adding the first vendor turns a global segment into a restricted one. - Remove vendors:
DELETE /public/v1/segment-service/segments/{segment_id}/vendorsremoves the given vendors. Removing the last vendor makes the segment global again.
vendor_id query parameter. The response contains the global segments plus the segments assigned to that vendor.