Skip to main content
The MoEngage Segments API allows you to manage your audience segments. This suite includes the v2 API for handling high-volume file-based segments and segment lifecycles, the v3 API for dynamic, filter-based segments, and the Cohort Sync API for synchronizing external audiences directly with MoEngage.

Endpoints

The Segments API is a collection of the following endpoints:

File Segments (v2)

The File Segments API allows you to create and manage segments by importing users from CSV files hosted at a URL.

Manage Segments (v2)

The Manage Segments API allows you to control the lifecycle of your segments by archiving or unarchiving them.

Filter Segments (v3)

The Filter Segments API allows you to create and manage dynamic segments based on user attributes and behavioral filter conditions.

Cohort Sync

The Cohort Sync API allows you to synchronize cohorts or audiences created in your own ecosystem directly with MoEngage. This server-to-server integration enables you to add or remove users from custom segments dynamically, ensuring your marketing campaigns always target the most relevant audience.
  • Automated Segment Creation: Automatically creates a custom segment in MoEngage if it doesn’t already exist.
  • Dynamic Membership: Real-time updates to segments allow scheduled campaigns to engage the latest set of users.
  • No Middleware Needed: Direct server-to-server calls remove the need for manual CSV uploads or hosting external URLs.
  • Increased Efficiency: Ideal for segment operations involving smaller subsets of users.
Endpoint:
These API endpoints do not currently support Team-level scoping. All segments generated using these calls will be assigned to the Default Team automatically.

FAQs

Filter-Based Segments

You can generate the payload directly from the MoEngage Dashboard. Navigate to Test & Debug -> Segment Payload, choose your filters, and click Generate Payload.
Use the List Segment API with the name query parameter to filter and retrieve the unique ID of the desired segment.
Both the name and the definition (filters) of a segment must be unique. If the definition matches an existing segment, the API returns a 409 Conflict.
In the case of a 409 error, the response payload includes the existing_cs_name and existing_cs_id of the conflicting segment.
Please connect with your account manager.

File-Based Segments

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.
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.

Manage Segments

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.

Cohort Sync

The Cohort Sync API enables the creation of segments without needing separate files or CSVs, eliminating the requirement for a separate path or URL as seen in the File Segment API. Segment creation can be initiated by making a direct server-to-server call, eliminating the additional steps required for generating user files.
The Cohort Sync API does not create new users in MoEngage. Instead, it resolves existing users in MoEngage based on predefined user identifiers and assigns them to the corresponding custom segment created through Cohort Sync.

Postman Collections

Test these endpoints quickly by importing our Postman collections: File Segments, Filter Segments, and Cohort Sync in Postman.