Skip to main content
Contributor I
April 6, 2022
Solved

bulk update profile though api

bulk update profile though api is possible?

    This topic has been closed for replies.
    alex.hong
    alex.hongAnswer
    Klaviyo Alum
    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
     

    3 replies

    alex.hong
    alex.hongAnswer
    Klaviyo Alum
    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
     

    Contributor II
    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
    Klaviyo Alum
    April 24, 2023

    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