Skip to main content

Is it possible to use create segment (https://developers.klaviyo.com/en/reference/create_segment) to create a segment with the API based on a custom property?   For example this sample profile has Age of xyz.  Can I create a segment with the API for all ages of XYZ?  And if so is it the PROFILEPROPERTYCONDITION I need to use?  

 

Hi @kenw222

Please create one segment using the GUI segment builder and then view the JSON that is generated. Please check the profile-property name in the generated JSON and then use this in subsequent calls to the create segment API. This document includes information on how to use the GUI and then how to access the JSON view: https://developers.klaviyo.com/en/reference/segments_api_overview. I hope this helps!

~Chloe


Reply