POST
/
v1
/
user
/
{distinct_id}
/
merge
curl --request POST \
  --url https://hub.suprsend.com/v1/user/{distinct_id}/merge/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "from_user_id": "<string>"
}'
{
  "distinct_id": "_distinct_id_",
  "properties": {},
  "created_at": "2025-04-04T21:37:36.712496+00:00",
  "updated_at": "2025-04-04T21:37:36.743167+00:00",
  "$inbox": [
    {
      "value": "4nlPk4t4kurG5kChOELB8Q1LcDI9DHzHQ70st2E2C24",
      "id_provider": "suprsend",
      "status": "active",
      "perma_status": "active"
    }
  ]
}

In SuprSend, you can merge duplicate user identities into a single distinct_id to consolidate user profiles, especially when users interact across different products or transition from anonymous to identified states. You can use it in following scenarios:

  • If a user can log into multiple products (such as different apps or services within your platform) and has different identifiers across products which needs to be merged later.
  • Anonymous to Identified Transition: Many platforms allow users to interact or explore the product anonymously before signing up. During this period, user actions are typically tracked under an anonymous ID. Once the user signs up or logs in, you can merge the anonymous profile into their newly created identifier. This preserves any data collected during the anonymous period and associates it with the user’s identified profile. You need to create a user with the new identifier first before merging the profiles.

How profile merge works?

When you merge two users, there’s a primary user passed in your API path param and merge a secondary / old user passed as from_user_id in your payload. The primary distinct_id is retained after the merge and the from_user_id is deleted. The deletion process is permanent and from_user_id can’t be recovered once deleted.

Authorizations

Authorization
string
header
required

Pass as Bearer <API_KEY>. Get API Key from SuprSend dashboard Developers -> API Keys section.

Path Parameters

distinct_id
string
required

Unique identifier of primary user

Body

application/json
from_user_id
string

Unique identifier of secondary user whose profile needs to be merged into primary user.

Response

201
application/json
201 - Created

user object of the primary user after the merge.