Skip to main content
Solved

Whats the correct procedure to create a profile and add to a list ID?

  • September 14, 2023
  • 4 replies
  • 797 views

Forum|alt.badge.img+1

Previously we were using the POST /api/v2/list/{list_id}/ subscribe endpoint which created the profile via the passed in email in Klaviyo with email: subscribed set and returned their id in the response. We were then storing this ID and if the user then wanted to add SMS we were using the PUT api/v1/person/${id}?phone_number=${phone}&api_key=${apiKey} to add their phone number.

Because the v1/v2 are now deprecated we are looking to update these endpoints. I tried using the POST /api/profile-subscription- bulk-create-jobs/ endpoint which add the email and email subscribed to Klaviyo but a status of 202 or 204 is returned with no data which I’m assuming is due to if people are doing a bulk upload? So the ID is no longer available. 

Would this now have to be done using 3 endpoints? create profile, update profile w/ email, update profile w/ phone number.

I also need to ensure that the user is set to email subscribed when being added to Klaviyo. 

 

Thanks

Best answer by Brian Turcotte

Hi @BenC66!

My apologies for the delay here! The short answer is yes, to accomplish this, you’d first need to subscribe the profile using the email address. Then, to update the profile you would need the Profile ID, which you can retrieve by making a call to Get Profiles and filtering for a specific email. Then you’d make whatever Update Profile call you need to make from there.

 

Best,

Brian

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

4 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @BenC66!

 

I’m going to check on this with Engineering and I’ll update the thread ASAP!

 

Best,

Brian


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • October 5, 2023

Hi @BenC66!

My apologies for the delay here! The short answer is yes, to accomplish this, you’d first need to subscribe the profile using the email address. Then, to update the profile you would need the Profile ID, which you can retrieve by making a call to Get Profiles and filtering for a specific email. Then you’d make whatever Update Profile call you need to make from there.

 

Best,

Brian


Forum|alt.badge.img+1
  • Contributor I
  • 2 replies
  • March 1, 2024

A question about the proposed solution:

When a user subscribes they have to confirm their email address. Is it possible to use Get Profiles on a user that hasn’t confirmed their email yet?

If not, when are we supposed to update their name with Update Profile? Would we need to create a webhook to do this?


Brian Turcotte
Forum|alt.badge.img+37

Hi @redwire!

Yes, if they’ve entered their email but have yet to confirm the double opt-in, the Profile is still created but just their marketing consent is not yet set, so you can still use Get Profiles.

 

Best,

Brian