Skip to main content
I’ve been running into an issue trying to add profiles to a list in batches of 950.  Things were working fine but I started to run into this error:
{:success=>false, :response=>{:errors=>[{:id=>"c8932474-507f-45e6-9d12-4a1a87403ae1", :status=>400, :code=>"invalid", :title=>"Invalid input.", :detail=>"Invalid profile IDs: set()", :source=>{:pointer=>"/data/"}}]}}

The endpoint is:
https://a.klaviyo.com/api/lists/{id}/relationships/profiles/

And I tried to keep my payload under 1000 so 950 per call.  I’ve been able to successfully move 20,000 profiles into a list without issue but lately I’ve been getting the error above.  Any ideas what might be happening?  I was going to drop my numbers down to try to isolate which profiles might be failing.  Would love any feedback if anyone has hit the same error.

Hi @Chops!

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

Best,

Brian


I found the issue, it’s on my end.  set() is maybe Python so you’re trying to create a list with no duplicates which made me think I probably have duplicate IDs in my list and I found 5 duplicates in the list I was trying to send.  I need to update the code on my end to de-dupe before attempting to send these. 


Hi @Chops!

Glad to hear it’s resolved and thanks for sharing your solution with the Community!

 

- Brian


I ran afoul of this just now. @Chops is a hero for figuring this out. @Brian Turcotte Please log a request with the engineering team to make this an actual error message, rather than what it is today. It will save customers & partners a lot of time. 


@Brian Turcotte I think it would be worth making the error message more informative. 

I have the same error message with the same root cause (profiles duplication):

Invalid profile IDs: set()

And it’s quite difficult to guess what’s wrong with the payload. 

It would be good to mention duplicates in the error message.

Thank you.


@Chops and @MVysh, thank you for raising this issue! Our Engineering team is working on a fix to de-dupe the profile IDs on our end to avoid this error case.