Is it possible to subscribe a profile to a list and also add custom properties to that profile in one request? This was possible with the previous API version but now I’m not sure.
My request works without adding custom properties, but when I tried adding ‘newKey’ => ‘value’ to the Profile’s object and I got this error:
newKey' is not a valid field for the resource 'profile'
I stumbled upon this thread when trying to see how to add custom profiles properties when subscribing. Its not as great as the single post to create a profile and add to a list as before but with the new api you should be able to create/update a profile using
I included both the email and the id when subscribing and it seems to work.
Apologize for the delay and any confusion here. Also, we recognize that this may not be the most convenient workflow. Our team is considering ways to make this common use case easier going forward.
That’s a great callout that we can improve the Subscribe Profiles API documentation to clarify how to achieve this use case. We appreciate your feedback!
My sincere apologies for the delay here! It’s true that you can no longer add custom properties to a profile using this endpoint, which is intended only to identify and subscribe the profile to a list.
Instead, you would have to make two calls, one to subscribe and one to update the profile with the custom properties using the Update Profile endpoint.
My sincere apologies for the delay here! It’s true that you can no longer add custom properties to a profile using this endpoint, which is intended only to identify and subscribe the profile to a list.
Instead, you would have to make two calls, one to subscribe and one to update the profile with the custom properties using the Update Profile endpoint.
Best,
Brian
Has anyone been able to get this to work? I have tried to add properties but they dont appear or update. I have tried using the meta object but the values appear in [] brackets as if the value is an array element - seems like the API mis-interprets the json structure - even though I followed the documentation
Before, I could subscribe the user and update custom properties in one request.
Now, with the new API, I need to make 3 requests to do this.
1. Subscribe the user
2. Get profile id, since the subscribe endpoint does not send a response id (ridiculous)
3. Update profile
But here’s the problem... If I do this synchronously, the 2nd step (finding the profile id) doesn’t work because it can’t find the profile id yet since it’s probably just been created. It will work a few seconds later but I need this to happen immediately.
I’m also curious about a follow up on this. I want to subscribe and add a custom attribute to a profile, but if we have to make 2 calls synchronously, I need the profile id from the first call which isn’t in the response.
I stumbled upon this thread when trying to see how to add custom profiles properties when subscribing. Its not as great as the single post to create a profile and add to a list as before but with the new api you should be able to create/update a profile using
I’m having the same issue here. I guess I’ll try doing what @zmyers has done:
Make a call to create/update the profiles first.
Then subscribe the profiles to the list.
I don’t know how else to get the new profile IDs.
What Klaviyo SHOULD do is provide us a status endpoint when we mass subscribe emails to a list. That way we can periodically check the status endpoint, and once the async and out-of-process operation is finished on Klaviyo’s side, then the status endpoint could give us a list of profile IDs - or something along those lines.
Klaviyo’s dev team needs to take notes from Shopify, this is how Shopify processes GraphQL mutations in their API infrastructure. They do it async and out-of-process, but they give the API caller a status endpoint to check where the final results are returned.
Your initial answer is not correct, we cannot update a profile in the Klaviyo API without first having the profile ID. What you suggested is not possible.
I stumbled upon this thread when trying to see how to add custom profiles properties when subscribing. Its not as great as the single post to create a profile and add to a list as before but with the new api you should be able to create/update a profile using
I included both the email and the id when subscribing and it seems to work.
Apologize for the delay and any confusion here. Also, we recognize that this may not be the most convenient workflow. Our team is considering ways to make this common use case easier going forward.
That’s a great callout that we can improve the Subscribe Profiles API documentation to clarify how to achieve this use case. We appreciate your feedback!