Skip to main content
Solved

Create Segment API call question

  • September 26, 2024
  • 1 reply
  • 42 views

Forum|alt.badge.img+1

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?  

 

Best answer by chloe.strange

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

1 reply

chloe.strange
Community Manager
Forum|alt.badge.img+42
  • Community Manager
  • 452 replies
  • Answer
  • October 19, 2024

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