Skip to main content

Overview

The MoEngage Custom Segments API allows you to programmatically manage your audience segments. This suite includes the v2 API for handling high-volume file-based segments and segment lifecycles, and the v3 API for dynamic, filter-based custom segments.

Custom Segment API Endpoints

The Custom Segments API is a collection of the following endpoints:

File Segments (v2)

Segment Lifecycle (v2)

Filter Segments (v3)

Segment Types

TypeDescriptionBest For
File SegmentCreated by importing a CSV file of unique user identifiers.Large, static lists or external data imports.
Filter SegmentCreated based on user attributes or real-time actions/events.Dynamic targeting based on user behavior and profile data.

Usage Limits & Guidelines

File Segment Limits

Rate Limit NameLimit Value
Total Active SegmentsMaximum of 1000 active custom segments per client.
Operations per Hour10 operations (create/add/remove) per hour.
Users per Day2 million users uploaded via File Segment per day.
File SizeMaximum 150 MB per CSV file.

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

Segment Lifecycle

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.