Skip to main content

Hey team,

When using the HTTP API to publish an event with user properties included, will the existing user property array for the user get added to or updated entirely?

For example, if user Alice had a user property called `cohorts`, and I published a `join_cohort` event with `{ cohorts: [new_cohort_name] }` in user properties, will that outright set her `cohorts` value to just the new cohort or will it instead append the new cohort name to the existing list of cohorts? Thanks!

Hi @Akash Gupta 

AFAIK, it will outright set the cohort value to the new cohort name.

Looking at the docs, it looks like HTTP API doesn’t support the append operation in case of user properties. But it does for group properties.

If you want the ability to append values to the property array, then you can use the Identify API to make the change instead of using HTTP API for that purpose.

Hope this helps.

 

 


Got it, thanks @Saish Redkar!


Reply