| <br><br>#### Note<br><br>This API is a closed feature and is not available by default. To enable this API for your account, please connect with your CSM or drop a mail to support@moengage.com.<br><br> | The User Merge API merges two users in MoEngage based on their ID. ID is a client-defined identifier for a user. This API can be used when multiple profiles have been created for a single user. For example, a user registered once with a mobile number and once with an email id can be merged. Duplicate users created due to integration or tech issues can also be merged. There are two types of user merging in MoEngage: | Default merge | Manual Merge | | --- | --- | | <br><br>MoEngage merges users with the same ID<br><br> | <br><br>MoEngage merges users having different IDs<br><br> | | <br><br>Happens automatically, and no action is required from your side. For more information, refer to User Merge.<br><br> | <br><br>Does not happen automatically; the User Merge API needs to be called with the list of users to be merged along with their IDs.<br><br> | ## API Endpoint ``` POST https://api-0X.moengage.com/v1/customer/merge?app_id= ``` The 'X' in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number (value of X) and replace the value of 'X' in the URL by referring to the DC and API endpoint mapping [here](https://help.moengage.com/hc/en-us/articles/360057030512-Data-Centers-in-MoEngage). ## Authentication Basic authentication sends a Base64-encoded string containing username and password for all API requests. Do the following when you are using the API for the first-time authentication: For example, basic Authentication encodes a 'username:password' using base64 and prepends it with the string 'Basic '. The string is passed in the authorization header as follows: {"Authorization":"Basic bmF2ZWVua3VtYXI6bW9lbmdhZ2U="} # Request Parameters | Key | Data Type | Sample Values | Description | | --- | --- | --- | --- | | <br><br>APP_ID<br><br> | <br><br>String<br><br> | <br><br>{"APP_ID": "APP ID"}<br><br> | <br><br>This is the APP ID of your MoEngage account, and needs to be passed along with the request. You can find your MoEngage APP ID in the MoEngage Dashboard API Settings. Navigation: Settings -> API -> General Settings -> DATA API section. For more information, refer to Authentication.<br><br>Note: You can also fetch the APP ID from the following navigation: Settings -> App -> General Settings.<br><br> | # Request Headers | Key | Mandatory/Optional | Sample Values | Description | | --- | --- | --- | --- | | <br><br>Authorization<br><br> | <br><br>Mandatory<br><br> | <br><br>{"Authorization": "Basic bmF2ZWVua3VtYXI6bW9lbmdhZ2U=="}<br><br> | <br><br>This is the authentication parameter for access control and needs to be passed along with the request. The APP KEY and API SECRET need to be picked up from the DATA API Settings in MoEngage Dashboard, and a Basic Authorization header needs to be created and set in the header. Navigation: Settings -> API -> General Settings -> DATA API section. For more information, refer to Authentication.<br><br> | | <br><br>Content-Type<br><br> | <br><br>Mandatory<br><br> | <br><br>{"Content-Type": "application/json"}<br><br> | <br><br>Set the Content-Type header to application/json for using the User Merge API.<br><br> | # Request Body | Key | Mandatory/Optional | Values | Description | | --- | --- | --- | --- | | <br><br>merge_data<br><br> | <br><br>Mandatory<br><br> | <br><br>Array of Objects<br><br> | <br><br>This field contains the list of UID pairs of the users who are to be merged. <br><br>Example:<br><br>{<br><br>“merge_data”:<br><br> \[ // All the different pairs of users to merge<br><br>{<br><br> “merged_user”: ““, // This user will merge into below user<br><br> “retained_user”: “” // Above user will merge into this user<br><br>},<br><br>{<br><br> “merged_user”: ““, // This user will merge into below user<br><br> “retained_user”: “” // Above user will merge into this user<br><br>}<br><br>\]<br><br>}<br><br> <br><br>Every object in the Array contains a pair of UID strings - the ‘merged_user’ and the ‘retained_user’. <br><br>Note: <br><br>1. UID is the unique identifier for a user maintained by you. MoEngage stores this identifier in the [ID attribute in the user profile](https://help.moengage.com/hc/en-us/articles/360044285511-User-Profile#h_01FTESCBSZJY53DJ2NS18YVE0E).<br>2. If the merging of any user fails in the array, it will skip that object and continue with others.<br><br> | # Response | Key | Data Type | Description | | --- | --- | --- | | <br><br>status<br><br> | <br><br>String<br><br> | <br><br>This field contains a brief description (“success” and “fail”) of the request status.<br><br> | | <br><br>operation<br><br> | <br><br>String<br><br> | <br><br>This field contains “created” when there is no error in the payload, and the user merge is successful.<br><br> | | <br><br>error<br><br> | <br><br>JSON Object<br><br> | <br><br>This field contains the details of the error:<br><br>1. message - the error message indicating the reason for the failure of the request<br>2. type - the error type indicating the failure type <br>3. request_id - the unique identifier associated with every request<br><br> | # Response Codes | Status Code | Request State | Description | | --- | --- | --- | | <br><br>200<br><br> | <br><br>Success<br><br> | <br><br>This response is returned when the request is processed successfully. <br><br> | | <br><br>400<br><br> | <br><br>Bad Request<br><br> | <br><br>This response is returned when the required parameters are missing from the request or when the provided parameters are invalid.<br><br> | | <br><br>401<br><br> | <br><br>Authorization Failure<br><br> | <br><br>This response is returned when the authorization fails due to incorrect values for the APP KEY/ HTTP Auth Header.<br><br> | | <br><br>403<br><br> | <br><br>Account Suspended Temporarily<br><br> | <br><br>This response is returned when the user account that is being merged has been suspended temporarily.<br><br> | | <br><br>409<br><br> | <br><br>API SECRET not configured<br><br> | <br><br>This response is returned when the authorization fails due to the APP SECRET key not being set on the Dashboard.<br><br> | | <br><br>413<br><br> | <br><br>Payload Limit Exceeded<br><br> | <br><br>This response is returned when the payload size has exceeded the limit set.<br><br> | | <br><br>415<br><br> | <br><br>Unsupported media type<br><br> | <br><br>This response is returned when the header “Content-Type” is not provided/is not supported.<br><br> | | <br><br>429<br><br> | <br><br>Rate Limit Breach<br><br> | <br><br>This response is returned when the number of requests per minute has exceeded the rate limit.<br><br> | | <br><br>5xx<br><br> | <br><br>Internal Server Error<br><br> | <br><br>This response is returned when the system runs into an unexpected error.<br><br> | # Rate Limit The rate limit is 1000 user updates per minute.
Versori has established itself as the third generation of Integration Platform as a Service (iPaaS). Versori builds custom integrations for its customers using an intuitive visual user interface.
Versori’s connector engine means there is no dependency on an existing library of apps, all you need to start is the documentation of the app or system you want to integrate to.
Drag and drop the Open API Spec into Versori's connector engine to create a new connector in minutes.
Build out visual integration workflows with powerful data tools on an intuitive canvas UI.
Deploy your automated workflow instantly and maintain your integrations with ease.
Is there something wrong with this spec? Let us know and Versori's engineering team will improve the quality of the spec based on your feedback.
Automatically match and transform data fields between systems with precision, reducing manual effort and errors.
Design integrations visually, test workflows instantly, and deploy seamlessly—accelerating your time to value.
Drag and drop API specifications to build custom integrations, unlocking endless connectivity with minimal setup.