There is any way I can do that with the current API versions?
Thanks in advance,
Nico
Page 1 / 1
Hello @ngerolami,
Thanks for sharing your question with the Klaviyo Community!
The current Klaviyo API versions do not allow creating segments via API. I’ll certainly share your use case and feedback with our Product Team to explore more on this function!
You are certainly on the right track of utilizing the Get List and Segment Members endpoint to return members of a list or segment. However, in order to do so you’ll first need to create the segment within the Klaviyo UI which would return a list of contacts who are in a specific list who has the specific profile property you are parsing for. With the segment created, you can either review the members of the segment within the Klaviyo UI, export the segment as a .CSV to review, or use the Get List and Segment Members endpoint to return the list via API.
A segment definition you can use for this would be “If someone is or is not in a list, Person is in X list AND Properties about someone, Custom Profile Property equals X”. Additionally, you can add more definitions to this rule to further drill down and filter for your desired profiles.
Thanks for being a part of the Klaviyo Community!
David
David, thanks for your Answer, I’ll try that and see if that helps.