Replace Users from File Segment
This API replaces all users in an existing file segment with a new list of users from a CSV file.
- This API drops all existing users from the segment and adds the new users provided in the File URL.
- Only the newly added users are counted towards the daily file segment user limit.
- This API does not currently support Team-level scoping. All segments generated using this call will be assigned to the Default Team automatically.
Authorizations
Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.
- Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
- Password: Use your API Key, which you can find within the Data tile.
For more information on authentication and getting your credentials, refer here.
Headers
Select the file content type.
text/csv, application/csv, application/vnd.ms-excel, text/plain, application/octet-stream, binary/octet-stream Set the database from which the data is available (MOE-DBNAME).
Body
Details of the segment to update and the file URL of users to replace with.
Schema for updating an existing file segment (add, remove, replace users).
Name of the segment. Must be unique for creation.
Name of the user attribute to use as an identifier (e.g., 'ID', 'email').
The data type of the attribute_name.
string, double A public, downloadable URL to a single-column CSV file.
Callback URL to receive the result of segment processing.
List of email IDs to receive segment processing response.
Unique identifier corresponding to the target segment. When both cs_id and name are populated, the system prioritizes cs_id.