Skip to main content
POST
/
v1
/
integrations
/
cohortsync
curl --request POST \ --url https://api-{dc}.moengage.com/v1/integrations/cohortsync \ --header 'Authorization: Basic <encoded-value>' \ --header 'Content-Type: application/json' \ --header 'MOE-APPKEY: <moe-appkey>' \ --data ' { "action": "add_members", "partner": "6HNBXFm7ZS", "parameters": { "cohort_name": ".Partner_Name", "cohort_id": "JKTAuqTRhC", "cohort_description": "A cohort of users from a partner.", "members": [ { "uid": "mm1UR87z4T" }, { "uid": "AtCxliflui" } ] } } '
{ "status": "success", "message": "Your request has been accepted and will be processed soon." }

Overview

The MoEngage Cohort Sync API allows partners to synchronize cohorts or audiences created in their ecosystem directly with MoEngage.

Key Functions

The API facilitates the following operations:
  • Create Custom Segments: Automatically creates a custom segment (Audience) in MoEngage that can be utilized for marketing campaigns.
  • Manage Membership: Adds or removes lists of users belonging to a custom segment.
  • Dynamic Updates: Updates existing segments dynamically, ensuring marketing campaigns engage the latest set of users during the next scheduled run.
Important: The Cohort Sync API only matches users already present in MoEngage based on the User ID (uid) provided in the request. This API does not create new users.

Benefits

  • Direct Integration: Enables segment creation via direct server-to-server calls without requiring separate CSV files or hosting URLs.
  • Efficiency: Ideal for segment operations involving smaller subsets of users.

User Resolution

The Cohort Sync API resolves existing users in MoEngage based on predefined user identifiers:
  • Identifier: We primarily rely on the User ID (uid) provided in the request payload.
  • Matching: This must match the Unique User ID set in MoEngage (typically available for registered or logged-in users).
  • Profile Association: Each Unique User ID corresponds to a single user profile. Even if a user is logged in across multiple devices, the devices are associated with that single user profile.

Rate Limits

Please adhere to the following limits:
  • Frequency: 300 requests per minute.
  • Payload Structure: One payload per request (each payload can contain multiple UIDs).
  • Size Limit: The payload size cannot exceed 128KB.

Authorizations

Authorization
string
header
required

Basic Authentication using your Workspace ID (from Settings -> Account -> APIs -> Workspace ID) as the username and the Data API Key (from Settings -> Account -> APIs -> API keys -> Data) as the password.

Headers

MOE-APPKEY
string
required

This is your MoEngage account's APP ID. You can find it at Settings -> Account -> APIs -> App ID.

Body

application/json

The cohort details and the members to add or remove.

action
enum<string>
required

This field indicates whether users need to be added to the cohort or removed from it.

Available options:
add_members,
remove_members
parameters
object
required

Contains the information about the cohort to be synced.

partner
string

This field indicates the name of the partner whose cohort is being synced to MoEngage.

Example:

"6HNBXFm7ZS"

Response

Success. This response is returned when the request is processed successfully.

Response body for a successful request.

status
string

The status of the request.

Example:

"success"

message
string

A message indicating the request was accepted.

Example:

"Your request has been accepted and will be processed soon."