Skip to main content
Contributor I
March 3, 2023
Solved

New API - Bulk creation and updates of profiles?

  • March 3, 2023
  • 15 replies
  • 1543 views

It seems like the new APIs are a major step backwards in certain regards and I’m hoping that I'm just misunderstanding their usage. For instance, if I have an array containing, say, two hundred profiles that I want to insert into a list, some of which are existing profiles with updated information and some of which are new profiles, previously I could use the https://a.klaviyo.com/api/v2/list/[listid]/members endpoint, which accepts an array of profiles and would update/create the profiles and ensure they were in the referenced list.

With the new API it seems like I have cycle through the list one-by-one and use a POST call for new users, and PATCH call for existing users, even though the POST call knows which profile is being referenced as the existing ID is returned in the error message. After doing that I use the Subscribe or Add profiles endpoint to add them to the list via Klaviyo ID (as opposed to a key field like email address that we don’t have to get back from Klaviyo).

While I sort of understand splitting the profile operations from the list operations (although it’s certainly more cumbersome since we now have to transport and store data back from Klaviyo, where before we didn’t), it’s puzzling that the profile operations don’t accept arrays and that you have to use a different call based on it being a new profile or an update to an existing one - especially considering the POST operation clearly knows that the profile exists. My operation that previously could be done in 1 call (or a few, depending on the number of profiles) now needs to be done in hundreds or even thousands of calls.

Am I misunderstanding things? If not, is there a plan to at least include support for arrays in the POST or PATCH operations by the time the v2 API sunsets? I’d also suggest that POST operations be allowed to update existing profiles (could be an optional parameter). 

    This topic has been closed for replies.
    Best answer by Brian Turcotte

    Hi @newuser2!

     

    It’s definitely possible to bulk-update profiles using the Update Profile endpoint, you’d just have to loop through that call for each profile. This was actually the topic for March’s Developer Challenge, and here was our winner’s answer, if you’re interested:

     

    Best,

    Brian

    15 replies

    October 20, 2023

    Same here. We’re currently evaluating Brevo (Sendinblue) and many others as most Klaviyo competitors have this basic bulk-update functionality.

    It would be a real pain to migrate from Klaviyo but not having this functionality is a deal breaker.

    Contributor I
    April 3, 2024

    If this isn’t forthcoming would it be possible to at least increase rate limits on APIs that create/update profiles?

    Contributor I
    April 27, 2024

    We found ourselves with this issue when we had the requirement to broadcast emails.

    Essentially we used the Subscription API, as it allows bulk profile creation, but it turns out that it doesn’t allow profile custom properties.

    So we found the Bulk Profile Import API in the new API version recently released and despite they suggest not to use this API for updating a small number of profiles, it actually covers the bulk profile update scope very well. This API allowed us to bulk create profiles but also passing custom properties during creation. The API also allows to subscribe the profiles to as many lists as needed (the limit should be described in the docs)

    In conclusion, this API is the one we need to create or update profiles in bulk.

    I hope this helps, the implementation is actually very easy and straightforward.

    Contributor I
    May 9, 2024

    For those who are still looking for a solution for bulk update profiles, this is the endpoint you should use:
    https://developers.klaviyo.com/en/reference/spawn_bulk_profile_import_job

    and this is a doc reference case needed:
    https://developers.klaviyo.com/en/docs/use_klaviyos_bulk_profile_import_api#payload-limits-and-job-expiration

    Contributor I
    June 25, 2024

    Hey all.

    thanks @tomasleiva9 for the reference! Actually this is exactly the endpoint I wnat to use.

    Does someone have a reference to an actual usage of this endpoint? I want to understand how to manage the failures after sending the bulk imports to Klaviyo. 

    Thanks