Skip to main content
October 28, 2022
Solved

NEW API - How to add multiple new profiles to a list?

  • October 28, 2022
  • 2 replies
  • 332 views

Hello!

I’m trying to move to the latest API, but I can’t find a way to add multiple profiles to a list, like I was able to do with the old “POST /api/v2/list/{list_id}/members“.

What am I missing?

The old endpoint used to accept an array of profiles data and add all the profiles, automatically omitting the ones that already exist in the list.

How can I replicate this behavior with the new endpoints?

 

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

    Hi @Kalo and welcome to the Community!

     

    If I’m understanding your use case correctly, the original v2 POST /api/v2/list/{list_id}/members endpoint that you mentioned is the Add Members to a List endpoint. An approximate equivalent for the new v3 API would be the Subscribe Profiles endpoint.

     

    The main difference here is that the v2 endpoint is intended to act similarly to a .CSV import, meaning that profiles added with this endpoint are assumed to have already supplied consent. With the new v3 endpoint, you can still add multiple profiles to a list, but it’s now impacted by double opt-in.

     

    This means that even if you’re moving customers from one list to another, if you have double opt-in enabled, those customers moved to the new list via API will receive a confirmation email.

     

    I hope this helps and thank you for using the Community!

     

    - Brian

    2 replies

    Brian Turcotte
    Klaviyo Alum
    October 31, 2022

    Hi @Kalo and welcome to the Community!

     

    If I’m understanding your use case correctly, the original v2 POST /api/v2/list/{list_id}/members endpoint that you mentioned is the Add Members to a List endpoint. An approximate equivalent for the new v3 API would be the Subscribe Profiles endpoint.

     

    The main difference here is that the v2 endpoint is intended to act similarly to a .CSV import, meaning that profiles added with this endpoint are assumed to have already supplied consent. With the new v3 endpoint, you can still add multiple profiles to a list, but it’s now impacted by double opt-in.

     

    This means that even if you’re moving customers from one list to another, if you have double opt-in enabled, those customers moved to the new list via API will receive a confirmation email.

     

    I hope this helps and thank you for using the Community!

     

    - Brian

    October 31, 2022

    Hi @Brian Turcotte ,

    thanks for your reply! And yes, this helps!

    I’ve checked the Subscribe Profiles page, but it provides very basic information. :(

    Do you have any idea what the “custom_source” string attribute is about?

    And the “subscriptions” array of objects on that page only shows “email” and “phone_number” attributes for the objects. Are we able to add “name”, ‘city”, “zip” and “country” attributes like in V2?

    Thanks again for your help!