Sync Cohort Members
This API adds or removes a list of users from a custom segment (cohort) in MoEngage.
- 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. - This API endpoint does not currently support Team-level scoping. All segments generated using this call will be assigned to the Default Team automatically.
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.
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.
Authorizations
Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.
- Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
- Password: Use your API Key, which you can find within the Data tile.
For more information on authentication and getting your credentials, refer here.
Headers
This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
Body
The cohort details and the members to add or remove.
This field indicates whether users need to be added to the cohort or removed from it.
add_members, remove_members This field indicates the name of the partner whose cohort is being synced to MoEngage.
"6HNBXFm7ZS"
Contains the information about the cohort to be synced.
Response
Success. This response is returned when the request is processed successfully.