CoolaData provides an API that can be used  to update user information without having to send events especially for this purpose. This can be used for a bulk update of user information, or for ongoing updates.

The update support only existing user scope properties in the project (adding new properties is not supported with this API) and will affect any future events sent for this user.

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

 

API End Point

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

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>",
  "properties":{
   "user":{
    "<property name>":"<new value>",
    "<property name2>":"<new value>"
   }
  },
  ...
}
]

Sample Payload

[
{
 "customer_user_id" : "458dsf832-4324h3-dsfsf34532-dsf73d",
  "properties":{
   "user":{
    "email":"johng@4x4videos.com",
    "plan_type":"Premium"}
   }
  },
{ "customer_user_id" : "29fh84g7-fg86fg0gh-dsfsf34341-239hf47", 
   "properties":{ 
     "user":{
       "email":"neo.goldman@gmail.com",
       "plan_type":"Free",
       "plan_update_date":"2018-05-23" } }  
}
]

 

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.
Print Friendly, PDF & Email