User Identities Matching API

Journey Analytics provides an API that can be used to match between two identities of the same user without having to send an event. The API matches between a user_id and that user's user_alternative_id.

Once an event is sent with a user_id and user_alternative_id together or and API request for matching is sent, Journey Analytics will associate all events from this registered user, based on user_alternative_id, to the pre-registered user, based on user_id. Read more about handling multiple user identities here.

The API is called using customer_user_id (the actual user id sent in events, not the internal_user_id Journey Analytics allocated per user). The API will work only for existing users that sent events in the past. Notice that since Journey Analytics deletes users after a period of inactivity, the user updated might not exist in Journey Analytics records if the period has passed. For more information about the period Journey Analytics keeps users, contact Medallia Support or contact your CSM directly.

API End Point

https://app.cooladata.com/api/v2/projects/{projectId}/users/identities

Replace the [project_id] placeholder with your actual Project ID found in the project settings.

Method

POST

Header

ContentType:application/json
Authorization:Token [User_API_Token]

Replace the [User_API_Token] placeholder with your actual user API Token found when clicking on your user in the application.

The request will be permitted only for ADMIN user permissions.

Payload

{
"customer_user_id" : "<user_id>",
"alternative_user_id": "<new alternative user id >"
}

Sample Payload

{
"customer_user_id" : "458dsf832-4324h3-dsfsf34532-dsf73d",
 "alternative_user_id": "johdue@gmailtest.com"
}

Response

  • Success: 200 ok + number of users updated
  • Failure: 400 bad request
    • No customer user id <id> for project <project id> – this means the user_id you requested to update does not exist (never sent events) or was deleted since the period of user inactivity defined in your project has past.
    • Operation requires admin permissions on project <project id> – this means you are using a non-admin authorization token.