Skip to main content
Solved

bulk update profile though api


Forum|alt.badge.img+2

bulk update profile though api is possible?

Best answer by alex.hong

Hi there @MayankShoree,

Welcome to the Community!

The Klaviyo API Identify endpoint only allows for updates of one profile at a time - the idea here would be to use a loop to make multiple calls. This is the method I would recommend using.

Still, if you would like to bulk update profiles, there exists our List API V2, specifically the POST https://a.klaviyo.com/api/v2/list/{LIST_ID}/members endpoint

This endpoint is meant to add profiles to a list without subscribing them - but we can use the same endpoint to update properties for profiles that may already exist in the list.

For example, in a test list of mine I had cstestklaviyo@gmail.com and cstestklaviyo@outlook.com as members. Yet, I could make the following call to add "test_property" as a property with values of "valueA" and "valueB" respectively:

​​?name=Screen+Shot+2020-08-11+at+5.46.12+PM.png​​

This led to the property being created on the profile:

?name=Screen+Shot+2020-08-11+at+5.48.30+PM.png

If the property already exists, this endpoint will update the value as well.

 

Hope that helped,

Alex
 

View original
Did this topic or the replies in the thread help you find an answer to your question?

3 replies

alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • Answer
  • April 6, 2022

Hi there @MayankShoree,

Welcome to the Community!

The Klaviyo API Identify endpoint only allows for updates of one profile at a time - the idea here would be to use a loop to make multiple calls. This is the method I would recommend using.

Still, if you would like to bulk update profiles, there exists our List API V2, specifically the POST https://a.klaviyo.com/api/v2/list/{LIST_ID}/members endpoint

This endpoint is meant to add profiles to a list without subscribing them - but we can use the same endpoint to update properties for profiles that may already exist in the list.

For example, in a test list of mine I had cstestklaviyo@gmail.com and cstestklaviyo@outlook.com as members. Yet, I could make the following call to add "test_property" as a property with values of "valueA" and "valueB" respectively:

​​?name=Screen+Shot+2020-08-11+at+5.46.12+PM.png​​

This led to the property being created on the profile:

?name=Screen+Shot+2020-08-11+at+5.48.30+PM.png

If the property already exists, this endpoint will update the value as well.

 

Hope that helped,

Alex
 


Forum|alt.badge.img
  • Contributor II
  • 3 replies
  • April 18, 2023

Hi all!

I have a follow-up question. In the latest version (v2023-02-22), I don’t see the same endpoint allowing us to update properties for profiles (https://developers.klaviyo.com/en/reference/create_list_relationships). Is there any workaround in the current version other than using the endpoint in v2 that you provided above? If there are no other options, and we must use v1-2, since it’s a legacy one, can anyone provide us a timeline on when this will sunset?
Thanks all for your help in advance!


Brian Turcotte
Forum|alt.badge.img+37

Hi @newuser2!

 

I noticed that you also posted this question in another thread which I just answered, so for the sake of visibility and organization, I’m going to link to that here:

 

Thanks for using the Community!

- Brian


Reply