Solved

Need to add new users to list, API doku very weak on list usage explaination

  • 21 November 2021
  • 2 replies
  • 450 views

Badge +2

Greetings.

First off, it’s hard to get an account started here, if you’re developer for a company that does not want you to use the main account (which I can totally understand, honestly).

 

Ok so I need to add email / firstname / lastname / phone / country to a list automatically when the user stated to opt in to newsletter / ads per mail/phone in a thírd party shop.

 

I keep getting stuck in the API documentation and clues that I find on the internet simply don’t seem to work. 

I search for existing profiles:

Response: {"detail":"There is no profile matching the given parameters"}

None found, I’d need to make one most likely. (how?)

 

My best bet: send it straight forward to the list api / members api / …

Response: {"detail":"profiles is a required parameter."}

Note: It’s absolutely set, I even get that message when I POST the ORIGINAL example data.

 

This is kinda mudfart as it ruins my entire weekend with the kids.

 

Please help me, thanks!!!

icon

Best answer by JunkMedia 24 November 2021, 11:44

View original

2 replies

Badge +2

I got it to work. I suspect a misstake in the headers I previously sent with cURL.

 

Also Api v1 used base64 encoded data which I had hardcoded in the sender

Userlevel 7
Badge +60

Hello @JunkMedia,

Thanks for sharing your feedback with the Klaviyo Community!

I think it would be really helpful if you could share the calls you’re making to better see what the issue may be. 

To add contacts to a Klaviyo list via Klaviyo’s API, you’ll want to be hitting the subscribe endpoint as explained in the Subscribe Profiles to List as part of the List API. In addition, if you were actually trying to redirect customers from an existing signup form to a Klaviyo list, you can actually set up a redirect as explained in the How to Redirect Existing Signup Forms to Klaviyo Help Center article.

I hope this helps!

David

Reply