Endpoints
The Custom Segments API is a collection of the following endpoints:File Segments (v2)
- Create File Segment: Creates a new Custom File Segment from a CSV file URL.
- Add Users to File Segment: Adds a list of users from a CSV file to an existing file segment.
- Remove Users from File Segment: Removes a list of users from a CSV file from an existing file segment.
- Replace Users in File Segment: Replaces all users in an existing file segment with a new list of users from a CSV file.
Segment Lifecycle (v2)
- Archive Custom Segment: Archives an existing custom segment (File or Filter).
- Unarchive Custom Segment: Unarchives an existing custom segment, making it active again.
Filter Segments (v3)
- List Custom Segments: Lists all custom segments.
- Create Filter Segment: Creates a new custom segment based on a set of filter conditions.
- Get Custom Segment by ID: Fetches a specific custom segment (File or Filter) by its ID.
- Update Filter Segment: Updates an existing custom filter segment by its ID.
FAQs
Filter-Based Segments
How can I generate the payload for custom segment creation?
How can I generate the payload for custom segment creation?
You can generate the payload directly from the MoEngage Dashboard. Navigate to Test & Debug -> Segment Payload, choose your filters, and click Generate Payload.
How do I get the ID of a custom segment I created earlier but didn't save?
How do I get the ID of a custom segment I created earlier but didn't save?
Use the List Custom Segment API with the
name query parameter to filter and retrieve the unique ID of the desired segment.Why am I getting a 409 Conflict error even with a different name?
Why am I getting a 409 Conflict error even with a different name?
Both the name and the definition (filters) of a custom segment must be unique. If the definition matches an existing segment, the API returns a 409 Conflict.
How do I know which existing segment is conflicting?
How do I know which existing segment is conflicting?
In the case of a 409 error, the response payload includes the
existing_cs_name and existing_cs_id of the conflicting segment.How do I increase the rate limits?
How do I increase the rate limits?
Please connect with your account manager.
File-Based Segments
Why does my new segment show zero users immediately after creation?
Why does my new segment show zero users immediately after creation?
Segment processing is asynchronous. MoEngage first creates the segment container (showing zero users) and then processes the file. The count will update once processing is complete.
Can I update a file segment using filter conditions?
Can I update a file segment using filter conditions?
No. File segments can only be updated (add/remove/replace) via the File Segment API using CSV imports. For attribute-based updates, use Filter Segments.
Segment Lifecycle
What is the benefit of archiving a segment instead of deleting it?
What is the benefit of archiving a segment instead of deleting it?
Archiving allows you to reuse segments for A/B testing or historical analysis without recreating them from scratch, while keeping your active segment list within the 1000-segment limit.