Create File Segment
Creates a new Custom File Segment from a CSV file URL.
Limits
| Rate Limit Name | Rate Limit |
|---|---|
| total active segment | The limit of the total number of active custom segments at a time for a client is 1000. |
| file_segment ops per hour | The total number of file segment operations (create/add/remove) per hour per client allowed is 10. |
| file_segment ops per day | The total number of file segment operations (create/add/remove) per day per client allowed is 100. |
| file_segment users per day | The total number of users uploaded via the File segment is limited to 2 million per day. (This limit is customizable, please get in touch with support) |
| file_size_limit | The size of the file from which the segment is created/updated. For each request, the file size limit is 150 MB. |
Notes
Limits
- Breaching the limits will reject the request.
- Per hour and per day limits will consider the calculation based on the last hour and last 24 hrs respectively.
CSV File Requirements
- The attribute names should be separated by new lines.
- CSV should be a single column and less than 150MB.
- Values should not end with a comma (e.g.,
abcdnotabcd,). - Values should not have duplicates or special characters (e.g.,
abcdnot"abcd"ora#bc). - File should not have empty rows or columns.
- A user attribute value must uniquely identify a single user.
- Sample File Link
Segment Processing & Availability
As soon as the request is received at the MoEngage system, MoEngage creates a custom segment with zero users. After this, the file is processed and users are added to the custom segment. If the created custom segment is queried in between the file processing, it will show zero or partial user count.Authorizations
Basic Authentication using your Workspace ID (as username) and Data API Key (as password) from the MoEngage Dashboard.
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
Configuration for the new file segment.
Schema for creating a new file segment.
Name of the custom 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.
Segment expiry time in days. The segment is archived after this time.
Callback URL to receive the result of segment processing.
List of email IDs to receive segment processing response.
Response
Everything worked as expected.