Skip to main content
Contributor I
May 27, 2022
Solved

Create segment via API

  • May 27, 2022
  • 15 replies
  • 1320 views

Does anyone know of a way to create a segment via API? Im trying to automate creating a segment to contain all profiles in the account. There is an endpoint to create a list through the API, but I cant find an endpoint to create a segment.

The reason I ask here is because I have noticed that there there are API endpoints that exist but are not included in the documentation. Possibly because they have been deprecated.

If anyone has any input here it would be much appreciated! Thanks!

This topic has been closed for replies.
Best answer by Kim Strauch

Hey @aemery @jimk @DanErezSD @eaglepeakoutdoors, good news! We released an API for creating and updating segments. I’d recommend checking out our Segments API overview to get started. 


Excited to hear more about what you build with it!

15 replies

alex.hong
Klaviyo Alum
May 27, 2022

Hi there @eaglepeakoutdoors,

Thanks for posting to the Community.

There is no API endpoint to create a Segment. You can only create Segments in the Klaviyo dashboard since it involves making definitions. In terms of what you can achieve, we have a developer doc with explanations.

 

Apologies for the inconvenience,

Alex

jimk
Active Contributor II
Active Contributor II
June 26, 2023

Good day.  By chance is there an update on this since the original post?  If I know the segment definitions in advance is it now possible to create and segment via API?

Thanks…..Jim

 
 
 
Segmentninja.io - High-margin, high-CLV retention and acquisition only, using proven Fortune 500 segmentation and predictive AI models.
David To
Klaviyo Employee
Klaviyo Employee
June 26, 2023

Hello @jimk,

As part of our new API, we do have an endpoint for segments now. However, this endpoint is meant for retrieving the segment and profiles associated with them.

Currently, it’s still not supported to create segments via API. 

You can find more information on our segment endpoint from our API Reference here

David

jimk
Active Contributor II
Active Contributor II
June 26, 2023

Thanks @David To.

Is creating segments via API on the roadmap?

Cheers…..Jim

 
 
 
Segmentninja.io - High-margin, high-CLV retention and acquisition only, using proven Fortune 500 segmentation and predictive AI models.
David To
Klaviyo Employee
Klaviyo Employee
June 26, 2023

Hey @jimk,

I’m unsure if creating segments via API is on our roadmap or not. I’ll certainly share this feedback with our Product Team - especially the ones responsible for the rollout of our new API to explore this further.

David

jimk
Active Contributor II
Active Contributor II
June 26, 2023

Thanks again David.

I know it might not be practical, but we have a specific need/use-case and it would be very useful.  We have a workaround for now.  

Cheers….Jim

 
 
 
Segmentninja.io - High-margin, high-CLV retention and acquisition only, using proven Fortune 500 segmentation and predictive AI models.
Contributor I
September 8, 2023

@jimk very interested to hear your workaround as we also need a create-segment endpoint. Would you mind sharing it?

Contributor I
September 12, 2023

We need that too

jimk
Active Contributor II
Active Contributor II
September 14, 2023

Hi @jaco5842 and @lonsilon.

Sorry for the tardy reply.  Just back from holidays.  
I’m not the dev on our team, so my explanation may not be technically correct. The gist of our workaround is to dynamically create a ‘list’ and programmatically (based on our criteria) select which profiles will be added to that list.  Hope this helps.

Cheer...Jim

 
 
 
Segmentninja.io - High-margin, high-CLV retention and acquisition only, using proven Fortune 500 segmentation and predictive AI models.
Contributor I
March 16, 2024

we also need this.